Author Topic: [Mod] Show user's lightbox to admin.  (Read 89435 times)

0 Members and 1 Guest are viewing this topic.

Offline Jasondavis

  • Full Member
  • ***
  • Posts: 157
    • View Profile
[Mod] Show user's lightbox to admin.
« Reply #15 on: February 24, 2003, 11:49:40 PM »
Quote from: V@no
are u sure that u redid Step 1.? I dont think so, because if there was some problem, u'd get atleast this: Show user's Favorites ()
and this is the actual line, that supposed to print on display (X)
Code: [Select]
"lang_show_user_lightbox" => $lang['show_user_lightbox']." (".$num_rows_all.")",



this is just weird then!  It is in the code I did it and it is still the same even the

"lang_show_user_lightbox" => $lang['show_user_lightbox']." (".$num_rows_all.")",

is there

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[Mod] Show user's lightbox to admin.
« Reply #16 on: February 24, 2003, 11:54:34 PM »
ok, would u pm me your code with like 10 extra lines (on top and bottom) from the original member.php ?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Jasondavis

  • Full Member
  • ***
  • Posts: 157
    • View Profile
thanks
« Reply #17 on: February 25, 2003, 12:38:11 AM »
I finally got it! I had it in the top section of the memeber.php file instead of the bottom section!  

1 more idea...would it be hard to have it display the number on the meberlist page as well for just admins?

Offline Bomba

  • Full Member
  • ***
  • Posts: 202
    • View Profile
[Mod] Show user's lightbox to admin.
« Reply #18 on: February 25, 2003, 10:29:53 PM »
hello, this mod sounds really cool but isn't possible to make all users seing the other user lightbox? only admin can see the lightbox?

thanks

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[Mod] Show user's lightbox to admin.
« Reply #19 on: February 26, 2003, 12:20:47 AM »
Quote from: Bomba
hello, this mod sounds really cool but isn't possible to make all users seing the other user lightbox? only admin can see the lightbox?

thanks

sure, I just thought that I wouldnt like if anyone could watch me while I'm taking shower...I think of lightbox as private zone...
but here what u need to do:
in step 1 change line:
Code: [Select]
     "url_show_user_lightbox" => ($user_info['user_level'] == ADMIN) ? $site_sess->url(ROOT_PATH."search.php?search_lightbox=".$user_row['user_id']) : "",
to this:
Code: [Select]
     "url_show_user_lightbox" => $site_sess->url(ROOT_PATH."search.php?search_lightbox=".$user_row['user_id']),

and in step 2.2. this code:
Code: [Select]
if ($user_info['user_level'] == ADMIN){;
  if ($search_lightbox != ""){
$sql = "SELECT *
  FROM ".LIGHTBOXES_TABLE."
  WHERE ".get_user_table_field("", "user_id")." = $search_lightbox";
 $search_lightbox_info = $site_db->query_firstrow($sql);
 $search_lightbox_ids = str_replace(" ", ",", trim($search_lightbox_info['lightbox_image_ids']));
  $search_id['image_ids'] = $search_lightbox_ids;
  }
}
to this:
Code: [Select]
 if ($search_lightbox != ""){
$sql = "SELECT *
  FROM ".LIGHTBOXES_TABLE."
  WHERE ".get_user_table_field("", "user_id")." = $search_lightbox";
 $search_lightbox_info = $site_db->query_firstrow($sql);
 $search_lightbox_ids = str_replace(" ", ",", trim($search_lightbox_info['lightbox_image_ids']));
  $search_id['image_ids'] = $search_lightbox_ids;
  }
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Bomba

  • Full Member
  • ***
  • Posts: 202
    • View Profile
[Mod] Show user's lightbox to admin.
« Reply #20 on: February 26, 2003, 01:28:59 AM »
:D thanks v@no

Offline Der_Nick

  • Newbie
  • *
  • Posts: 46
    • View Profile
    • http://www.fetteseite.com
[Mod] Show user's lightbox to admin.
« Reply #21 on: February 26, 2003, 11:07:47 AM »
Quote
Step 1.
Open member.php

Find: Code:
    $site_template->register_vars(array(
      "user_id" => $user_row['user_id'],
      "user_name" => (isset($user_row['user_name'])) ? htmlspecialchars($user_row['user_name']) : REPLACE_EMPTY,

Replace with: Code:
     $sql = "SELECT *
         FROM ".LIGHTBOXES_TABLE."
         WHERE ".get_user_table_field("", "user_id")." = ".$user_row['user_id'];
     $user_lightbox_info = $site_db->query_firstrow($sql);
     $num_rows_all = 0;
     if (!empty($user_lightbox_info['lightbox_image_ids'])) {
     $image_id_sql = str_replace(" ", ",", trim($user_lightbox_info['lightbox_image_ids']));
     $sql = "SELECT COUNT(image_id) AS images
          FROM ".IMAGES_TABLE."
          WHERE image_active = 1 AND image_id IN ($image_id_sql)";
     $result = $site_db->query_firstrow($sql);
     $num_rows_all = $result['images'];
    }
    $site_template->register_vars(array(
      "lang_show_user_lightbox" => $lang['show_user_lightbox']." (".$num_rows_all.")",
      "url_show_user_lightbox" => ($user_info['user_level'] == ADMIN) ? $site_sess->url(ROOT_PATH."search.php?search_lightbox=".$user_row['user_id']) : "",
      "user_id" => $user_row['user_id'],
      "user_name" => (isset($user_row['user_name'])) ? htmlspecialchars($user_row['user_name']) : REPLACE_EMPTY,


i have the avater mod!and so,the first code to find is another!how must i change the first step?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[Mod] Show user's lightbox to admin.
« Reply #22 on: February 26, 2003, 12:19:06 PM »
just insert this:
Code: [Select]
$sql = "SELECT *
FROM ".LIGHTBOXES_TABLE."
WHERE ".get_user_table_field("", "user_id")." = ".$user_row['user_id'];
$user_lightbox_info = $site_db->query_firstrow($sql);
$num_rows_all = 0;
if (!empty($user_lightbox_info['lightbox_image_ids'])) {
$image_id_sql = str_replace(" ", ",", trim($user_lightbox_info['lightbox_image_ids']));
$sql = "SELECT COUNT(image_id) AS images
FROM ".IMAGES_TABLE."
WHERE image_active = 1 AND image_id IN ($image_id_sql)";
$result = $site_db->query_firstrow($sql);
$num_rows_all = $result['images'];
}

before
Code: [Select]
$site_template->register_vars(array(
and this:
Code: [Select]
"lang_show_user_lightbox" => $lang['show_user_lightbox']." (".$num_rows_all.")",
"url_show_user_lightbox" => ($user_info['user_level'] == ADMIN) ? $site_sess->url(ROOT_PATH."search.php?search_lightbox=".$user_row['user_id']) : "",
after:
Code: [Select]
$site_template->register_vars(array(
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Caelestis

  • Newbie
  • *
  • Posts: 40
    • View Profile
[Mod] Show user's lightbox to admin.
« Reply #23 on: February 28, 2003, 01:37:38 AM »
well i asked for help or an idea how to do this several months ago and was told no and that it couldn't be done... now since it has been done do you know a way to show the number of times an image has been added to a lightbox...

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[Mod] Show user's lightbox to admin.
« Reply #24 on: February 28, 2003, 01:44:30 AM »
Quote from: Caelestis
well i asked for help or an idea how to do this several months ago and was told no and that it couldn't be done... now since it has been done do you know a way to show the number of times an image has been added to a lightbox...

not really. unless u want create new field in "4images_images" table, that will store how many times the image was added to lightbox.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Caelestis

  • Newbie
  • *
  • Posts: 40
    • View Profile
[Mod] Show user's lightbox to admin.
« Reply #25 on: February 28, 2003, 02:53:17 AM »
Quote from: V@no
Quote from: Caelestis
well i asked for help or an idea how to do this several months ago and was told no and that it couldn't be done... now since it has been done do you know a way to show the number of times an image has been added to a lightbox...

not really. unless u want create new field in "4images_images" table, that will store how many times the image was added to lightbox.


so by not really you mean yeah it's easy... ok

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[Mod] Show user's lightbox to admin.
« Reply #26 on: February 28, 2003, 09:46:33 AM »
Quote from: Caelestis

so by not really you mean yeah it's easy... ok

well, it's not too hard, I have an idea how to do so, but...dont have enough time...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Caelestis

  • Newbie
  • *
  • Posts: 40
    • View Profile
[Mod] Show user's lightbox to admin.
« Reply #27 on: February 28, 2003, 11:56:25 PM »
Quote from: V@no
Quote from: Caelestis

so by not really you mean yeah it's easy... ok

well, it's not too hard, I have an idea how to do so, but...dont have enough time...


hum... i've got it working with the phpBB intergration if anyone want's to know how just let me know...

EX: http://www.0-gravity.com/forums/profile.php?mode=viewprofile&u=2

pilotdoc

  • Guest
Does not work php4.3.1 apache2
« Reply #28 on: April 05, 2003, 07:04:22 PM »
Hi, Thanks for this mod, but it does not work on my site with php4.3.1 and apache2.  I do not know php, but I did a quick search for $HTTP_GET_VARS and $HTTP_POST_VARS on google and it seems they have been replaced by other commands $_GET and $_POST.  (?)

I tried to change over all of these in my search.php file, but still will not work.  "Show user's lightbox (3)" works, but when clicked through, it leads to a new blank search page.  

Any ideas?

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
[Mod] Show user's lightbox to admin.
« Reply #29 on: April 05, 2003, 08:27:59 PM »
Best to refer to www.php.net for all php documentation.  That's the official php site.