4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: V@no on February 13, 2003, 07:45:53 AM

Title: [Mod] Show user's lightbox to admin.
Post by: V@no on February 13, 2003, 07:45:53 AM
The simples way to do is use search engine to display someone's lightbox using image ids.

--------------------------------
Only ( :wink: ) 4 files to modify:
member.php
search.php
/lang/<yourlanguage>/main.php
/templates/<yourtemplate>/member_profile.html


---------------------------------


Step 1.
Open member.php

Find:
Code: [Select]
   $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: [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'];
    }
    $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,


Step 2.
Open search.php
Find:
Code: [Select]
include(ROOT_PATH.'global.php');
Add after:
Code: [Select]
if (isset($HTTP_POST_VARS['search_lightbox']) || isset($HTTP_GET_VARS['search_lightbox'])) {
  $search_lightbox = intval((isset($HTTP_POST_VARS['search_lightbox'])) ? trim($HTTP_POST_VARS['search_lightbox']) : trim($HTTP_GET_VARS['search_lightbox']));
  if ($search_lightbox) {
    $show_result = 1;
  }
}
else {
  $search_lightbox = "";
}

2.2.
Find:
Code: [Select]
$search_id = array();Add after:
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;
  }
}


Step 3.
Open /lang/<yourlanguage>/main.php

Add at the end, just before ?> :
Code: [Select]
$lang['show_user_lightbox'] = "Show user's lightbox";

Step 4.
Open /templates/<yourtemplate>/member_profile.html

Add where ever u want to display Show user's lightbox:
Code: [Select]
{if url_show_user_lightbox}<A href="{url_show_user_lightbox}">{lang_show_user_lightbox}</a>{endif url_show_user_lightbox}

now, when u logged in as admin, go view an user's profile.
Title: [Mod] Show user's lightbox to admin.
Post by: Shap on February 19, 2003, 06:19:02 AM
Quote
Step 4.
Open /templates/<yourtemplate>/member_profile.html

Add where ever u want to display Show user's lightbox: Code:
{if url_show_user_lightbox}<A href="{url_show_user_lightbox}">{lang_show_user_lightbox}</a>{endif url_show_user_lightbox}


This doesnt seem to be right... When I click on a profiles. all its showing me is

<A href="./search.php?search_lightbox=20">Show user's lightbox</a>
Title: [Mod] Show user's lightbox to admin.
Post by: V@no on February 19, 2003, 12:07:43 PM
Quote from: Shap
Quote
Step 4.
Open /templates/<yourtemplate>/member_profile.html

Add where ever u want to display Show user's lightbox: Code:
{if url_show_user_lightbox}<A href="{url_show_user_lightbox}">{lang_show_user_lightbox}</a>{endif url_show_user_lightbox}


This doesnt seem to be right... When I click on a profiles. all its showing me is

<A href="./search.php?search_lightbox=20">Show user's lightbox</a>

looks good to me... :roll:
Title: [Mod] Show user's lightbox to admin.
Post by: Shap on February 19, 2003, 04:29:51 PM
any idea why its not working for me?

why would it show
Code: [Select]
<A href="./search.php?search_lightbox=20">Show user's lightbox</a>

instead of creating a  link?
Title: [Mod] Show user's lightbox to admin.
Post by: V@no on February 19, 2003, 04:41:20 PM
did u look in the source of your page, maybe there is something else messing with this link?
Title: [Mod] Show user's lightbox to admin.
Post by: Shap on February 19, 2003, 05:58:34 PM
I'll take a look, but is it suppost to have the "." before /search.php?

<A href="./search.php?search_lightbox=20">Show user's lightbox</a>
Title: [Mod] Show user's lightbox to admin.
Post by: V@no on February 19, 2003, 06:04:58 PM
yes, dot means from current dir.
Title: [Mod] Show user's lightbox to admin.
Post by: Shap on February 19, 2003, 06:51:48 PM
haha..without being in front of it, I just realized what the problem was..I'm an idiot! I'm using dreamweaver and put the code on the "design view" Page, instead of inside the source code..

Once I get home, I'll double check thats the problem, but pretty sure it is!
Title: help
Post by: Jasondavis on February 24, 2003, 07:46:37 AM
hey i love this mod, but when browsing through a lot of my users profiles, there is no way to see if they have any images in the lightbox without clicking the link....would there be a way to have the number of images in the lightbox displayed next to the link to there lightbox?
Title: Re: help
Post by: V@no on February 24, 2003, 08:32:11 AM
Quote from: Jasondavis
hey i love this mod, but when browsing through a lot of my users profiles, there is no way to see if they have any images in the lightbox without clicking the link....would there be a way to have the number of images in the lightbox displayed next to the link to there lightbox?

do again Step 1.. I fixed it  :wink:
Title: thanks
Post by: Jasondavis on February 24, 2003, 08:50:03 AM
Hi V@no did you test this? I made the changed, but i dont see any changes?
Title: Re: thanks
Post by: V@no on February 24, 2003, 09:01:37 AM
Quote from: Jasondavis
Hi V@no did you test this? I made the changed, but i dont see any changes?

yes, I did
(http://come.no-ip.com/lightbox.gif)
Title: [Mod] Show user's lightbox to admin.
Post by: Jasondavis on February 24, 2003, 09:09:08 PM
V@no that is exactly what I was looking for! the only problem is that I cant get it to work for some raeson.....(http://www.jasondavis.ws/1.jpg)
Title: [Mod] Show user's lightbox to admin.
Post by: V@no on February 24, 2003, 11:40:38 PM
are u sure if redid Step 1.? I dont think so, because if there was some problem, u'd get 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.")",
Title: [Mod] Show user's lightbox to admin.
Post by: V@no on February 24, 2003, 11:41:32 PM
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.")",
Title: [Mod] Show user's lightbox to admin.
Post by: Jasondavis 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
Title: [Mod] Show user's lightbox to admin.
Post by: V@no 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 ?
Title: thanks
Post by: Jasondavis 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?
Title: [Mod] Show user's lightbox to admin.
Post by: Bomba 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
Title: [Mod] Show user's lightbox to admin.
Post by: V@no 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;
  }
Title: [Mod] Show user's lightbox to admin.
Post by: Bomba on February 26, 2003, 01:28:59 AM
:D thanks v@no
Title: [Mod] Show user's lightbox to admin.
Post by: Der_Nick 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?
Title: [Mod] Show user's lightbox to admin.
Post by: V@no 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(
Title: [Mod] Show user's lightbox to admin.
Post by: Caelestis 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...
Title: [Mod] Show user's lightbox to admin.
Post by: V@no 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.
Title: [Mod] Show user's lightbox to admin.
Post by: Caelestis 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
Title: [Mod] Show user's lightbox to admin.
Post by: V@no 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...
Title: [Mod] Show user's lightbox to admin.
Post by: Caelestis 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
Title: Does not work php4.3.1 apache2
Post by: pilotdoc 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?
Title: [Mod] Show user's lightbox to admin.
Post by: Chris 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.
Title: Re: Does not work php4.3.1 apache2
Post by: V@no on April 05, 2003, 09:00:58 PM
Quote from: pilotdoc
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?

does your search.php working at all?
the changes in this mod are exactly the same what u can find in search.php itself.
Title: [Mod] Show user's lightbox to admin.
Post by: pilotdoc on April 05, 2003, 10:19:44 PM
Hi, thanks for the quick reply.  
Yes, search works otherwise.  Any other ideas?  Maybe its just a stupid error, but I have done the steps several times carefully and still same results.
Title: [Mod] Show user's lightbox to admin.
Post by: uksoreeyes on April 11, 2003, 04:18:28 PM
hi I hate to be the awkward person here but I have applied the phpbb integration mod, How can I get this mod to work with phpbb?

Carl
Title: [Mod] Show user's lightbox to admin.
Post by: spoiledRHOtten on June 15, 2003, 07:39:20 AM
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.")",


Hi! for some reason, the link won't show up on user's profiles that I know have lightboxes. :(  Also, the same for the user's comments Mod.
Is it possible for you to take a look at my member.php file and tell me what is wrong? I'd really appreciate it!
Title: Re: [Mod] Show user's lightbox to admin.
Post by: TIMT on May 27, 2005, 01:22:45 PM
Hi everybody

What do I have to do for placing the following Link
Code: [Select]
{if url_show_user_lightbox}<A href="{url_show_user_lightbox}">{lang_show_user_lightbox}</a>{endif url_show_user_lightbox}in the ACP "Modify User", in the Option-Sections (like modify, delete, permissions, usergroup)?

This feature would help me.

Serge
Title: Re: [Mod] Show user's lightbox to admin.
Post by: TIMT on June 06, 2005, 04:14:41 PM
Modify user.php

find:
Code: [Select]
show_text_link($lang['nav_usergroups'], "usergroups.php?action=edituser&user_id=".$user_row[$user_table_fields['user_id']]);
after
Code: [Select]
show_text_link($lang['show_user_lightbox'], "[i]your_domain[/i]/search.php?search_lightbox=".$user_row[$user_table_fields['user_id']]);
Replace your_domain

That's all.
Title: Re: [Mod] Show user's lightbox to admin.
Post by: supastoked on July 01, 2005, 10:41:54 PM
Hi V@no,
Firstly can i say great mod!! It's something i was wanted to do for a while now, but wasnt sure how  :lol:
I've gone through all the steps twice now, but for some reason i cant seem to get it to work??
When i click on my profile all i can see {if url_show_user_lightbox}{endif url_show_user_lightbox}
Any suggestions as to what i the prob could be?
TIA
Chris
Title: Re: [Mod] Show user's lightbox to admin.
Post by: V@no on July 02, 2005, 12:48:25 AM
please check out our bug fixes forum.
Title: Re: [Mod] Show user's lightbox to admin.
Post by: supastoked on July 17, 2005, 01:24:32 AM
Hi V@no,
I have checked the bug/fixes forum and applied the mentioned fix - only prob is it still doesnt give a link to view the users lightbox?
Any suggestions would be much appreciated!!
Cheers
Chris
Title: Re: [Mod] Show user's lightbox to admin.
Post by: Matthias70 on July 29, 2005, 06:05:09 PM
Hi V@no,

is it possible, to integrate the admin link to user's lightbox into the memberlist?
A table like this
... name | email | homepage | lightbox | comments ...

Matthias
Title: Re: [Mod] Show user's lightbox to admin.
Post by: PhilippVienna on March 12, 2006, 09:09:27 PM
Hello,

this mod is exactly what i was looking for, but unfortunately in search.php I can't find the following:

Quote
if (isset($HTTP_POST_VARS['show_result']) || isset($HTTP_GET_VARS['show_result'])) {
 $show_result = 1;
}
else {
 $show_result = 0;
}

I also can't find anything which is similar to this!! Where shall I insert the code??

Pls help me! Thanks!
Title: Re: [Mod] Show user's lightbox to admin.
Post by: V@no on March 12, 2006, 10:01:47 PM
Since v1.7.2 almost everything that was above define('ROOT_PATH', 1); was moved into global.php
I've updated the original post it should work now with all versions ;)
Title: Re: [Mod] Show user's lightbox to admin.
Post by: ladyoz on March 28, 2006, 10:44:23 PM
Hi, thanks for the quick reply.  
Yes, search works otherwise.  Any other ideas?  Maybe its just a stupid error, but I have done the steps several times carefully and still same results.

I have the same problem.  I just get a blank Search page when I click on the link on the Member Profile page.  Any help would be appreciated :)  Thanks.
Title: Re: [Mod] Show user's lightbox to admin.
Post by: ladyoz on July 27, 2006, 01:57:40 AM
Hi, thanks for the quick reply.  
Yes, search works otherwise.  Any other ideas?  Maybe its just a stupid error, but I have done the steps several times carefully and still same results.

I have the same problem.  I just get a blank Search page when I click on the link on the Member Profile page.  Any help would be appreciated :)  Thanks.

Can anybody help me with this?  I've checked and quadruple checked all the changes made to the files and I can't find anything wrong.  I still get a blank search page when I click on the Show User's Lightbox link.  It has to be something simple, but I just can't find it  :roll:

Thanks in advance.
Title: Re: [Mod] Show user's lightbox to admin.
Post by: Stinus on July 30, 2006, 08:18:40 PM
Quote

Can anybody help me with this?  I've checked and quadruple checked all the changes made to the files and I can't find anything wrong.  I still get a blank search page when I click on the Show User's Lightbox link.  It has to be something simple, but I just can't find it  :roll:

Thanks in advance.

The same for me. The search page dos not work. Only if i mark "view new images only", all the new images is showed. Not "old" images is showed. I have put the old search.php from 1.7.2, but it is the same. I hope someone can help me.
Title: Re: [Mod] Show user's lightbox to admin.
Post by: ccsakuweb on August 30, 2006, 01:06:56 AM
hi!
i don't see the link to the lightbox gallery -.- and i'm the admin.. i have 1.7.3 version. Could you help me please?
Title: Re: [Mod] Show user's lightbox to admin.
Post by: mf-d on October 23, 2006, 08:11:13 PM
Hi, thanks for the quick reply. 
Yes, search works otherwise.  Any other ideas?  Maybe its just a stupid error, but I have done the steps several times carefully and still same results.

I have the same problem.  I just get a blank Search page when I click on the link on the Member Profile page.  Any help would be appreciated :)  Thanks.

Can anybody help me with this?  I've checked and quadruple checked all the changes made to the files and I can't find anything wrong.  I still get a blank search page when I click on the Show User's Lightbox link.  It has to be something simple, but I just can't find it  :roll:

Thanks in advance.

Hi everybody, first of all thanks for your really great work, i like it very much, and I'm almost finished in modding it. However there's a little problem in showing user's lightbox to admin. Like the other people here, I can see how many pictures a specific user has in his lightbox, by clicking on it I only get a blank search form. I tried using english instead of german language, I thought maybe its a problem in language translation, but same problem in english. My Version of 4images is 1.7.2, I checked the mod  more than one time and i didn't see cause of the problem.

Has anyone solved this problem or has got an idea?

thanks so far
mf-d
Title: Re: [Mod] Show user's lightbox to admin.
Post by: mf-d on October 28, 2006, 10:52:24 PM
HELP pleaaaase  :roll: (if someone solved the problem mentioned above)
Title: Re: [Mod] Show user's lightbox to admin.
Post by: sweetmisery on November 15, 2006, 09:22:44 PM
I have the same problem. It shows up only a blank search screen when I click on the link. I had the mod in 1.7 and it worked fine. Now I have 1.7.4 and it doesn't work..  :(

Please V@no help us out here.  :)
Title: Re: [Mod] Show user's lightbox to admin.
Post by: sweetmisery on November 21, 2006, 09:52:39 PM
Anybody following this thread? Now I don't just get a blank search screen when I click on "show users lightbox" but also this error message:

Undefined variable: search_lightbox in /home/gardenph/public_html/gallery/search.php on line 64

Does anybody know what I should do?
Title: Re: [Mod] Show user's lightbox to admin.
Post by: Mirra on December 07, 2006, 06:57:58 PM
Hm, well check what your line 64 in search.php say ;)
[or print it here]

btw. why would any admin know which pictures the users have in their lightbox? o.o [don't forget to say this in the license agreements at the registrations]
Title: Re: [Mod] Show user's lightbox to admin.
Post by: sweetmisery29f on January 12, 2007, 07:07:00 PM
Here are my lines 64-69. After a few changes now it's line 66 that is the trouble. Where the search lightbox is. What is wrong with it? Please help if you know.

$search_id = array();
if ($user_info['user_level'] == ADMIN){;
  if ($search_lightbox != ""){
      $sql = "SELECT *
           FROM ".LIGHTBOXES_TABLE."
           WHERE ".get_user_table_field("", "user_id")." = $search_lightbox";
Title: Re: [Mod] Show user's lightbox to admin.
Post by: mf-d on January 20, 2007, 05:22:52 PM
hi everybody,

ok as I was some tiem away from working on this problem I now restartet on finding the failure. I just tried to see the lightbox of one of my testusers, i can see this "Show user's lightbox (2)". The lightbox seems to be saved as I can see how many pictures the user has in, but by clicking on it I only get a blank search form.

Its no problem for the users in my database, I surely want to see the pictures they have n lighbox because I will use this lightbox somethingh like a shopping cart. 4images will be an inhouse database only with a few connections from outside by some special people. they should see small pictures and decide which pictures they want to have, if they have the pictures they want in their lightbox, they will call me and I will look, if i can give all the pictures to them, or if some are restricted. For mi its more a kind of database to see which pictures I have, it will be used in a small office, users from outisde will not be allowed.

But where is the problem that i can not see the lightbox??
Title: Re: [Mod] Show user's lightbox to admin.
Post by: mf-d on January 23, 2007, 12:35:38 PM
I soveld the problem  :D

ok I did not really solve it, I used v@no's Mod fur Mutli Lightboxes, a litte bit "overdressed" for what I want to have, but its working (some failures I have to correct now, my Download from Big Folder is not working at the moment, but I'm sure I will find it :wink: )
Title: Re: [Mod] Show user's lightbox to admin.
Post by: shadowhunter on October 19, 2007, 03:13:57 PM
Hello!

I have a problem with the user lightboxes:
I've checked all the changes made to the files and I can't find anything wrong. 
I still get a blank search page with 2 errors (undefined variable) when I click on the Show User's Lightbox link. 
It has to be something simple, but I just can't find it :roll:
Can anybody help me with this? 
Thanks in advance.
Greetings.

Error reporting in search.php:
Quote
Notice: Undefined variable: search_lightbox in /home/www/html/search.php on line 47

Notice: Undefined variable: search_lightbox in /home/www/html/search.php on line 81

search.php
Code: [Select]
$main_template = 'search';

define('GET_CACHES', 1);
define('ROOT_PATH', './');
include(ROOT_PATH.'global.php');
require(ROOT_PATH.'includes/sessions.php');
$user_access = get_permission();
include(ROOT_PATH.'includes/search_utils.php');

if (isset($HTTP_POST_VARS['search_lightbox']) || isset($HTTP_GET_VARS['search_lightbox'])) {
  $search_ids = str_replace(",", ", ", trim((isset($HTTP_POST_VARS['search_lightbox'])) ? trim($HTTP_POST_VARS['search_lightbox']) : urldecode(trim($HTTP_GET_VARS['search_lightbox']))));
  if ($search_lightbox != "") {     // ************************************* line 47 ***********************************
    $show_result = 1;
  }
}
else {
  $search_lightbox = "";
}

search.php
Code: [Select]
$search_cat = $cat_id;

$search_id = array();

if ($user_info['user_level'] != GUEST){;
  if ($search_lightbox != ""){ // ************************************* line 81 ***********************************
$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;
  }
}
Title: Re: [Mod] Show user's lightbox to admin.
Post by: thunderstrike on October 19, 2007, 07:10:51 PM
In search.php file,

find:

Quote
if ($search_lightbox != ""){

replace:

Code: [Select]
if (isset($search_lightbox) && $search_lightbox != "") {
Title: Re: [Mod] Show user's lightbox to admin.
Post by: shadowhunter on October 19, 2007, 07:52:49 PM
Hi!
I had changed (twice). The errors doesn't shown.
But the images of the selected lightbox aren't shown. It still doesn't work = blank search page.
I use the 4images 1.7.4, php version 4.4.7, mysql version 4.1.11.
Has got anyone an idea?
Thanks for your help! Greetings
Title: Re: [Mod] Show user's lightbox to admin.
Post by: thunderstrike on October 19, 2007, 08:30:12 PM
Quote
blank search page.

Ok, so keep:

Quote
if (isset($search_lightbox) && $search_lightbox != "") {

find:

Quote
}
else {
  $search_lightbox = "";

replace:

Code: [Select]
}
elseif (!isset($search_lightbox)) {
   $search_lightbox = "";
} else {
   $search_lightbox = "";
Title: Re: [Mod] Show user's lightbox to admin.
Post by: shadowhunter on October 19, 2007, 11:14:42 PM
Still a blank search page after i clicked the link: http://.../search.php?search_lightbox=1 !
Thank you!

My file search.php:
Code: [Select]
if (isset($HTTP_POST_VARS['search_lightbox']) || isset($HTTP_GET_VARS['search_lightbox'])) {
  $search_ids = str_replace(",", ", ", trim((isset($HTTP_POST_VARS['search_lightbox'])) ? trim($HTTP_POST_VARS['search_lightbox']) : urldecode(trim($HTTP_GET_VARS['search_lightbox']))));
  if (isset($search_lightbox) && $search_lightbox != "") {
    $show_result = 1;
  }
}
elseif (!isset($search_lightbox)) {
   $search_lightbox = "";
} else {
   $search_lightbox = "";
}
Code: [Select]
if ($user_info['user_level'] != GUEST){;
  if (isset($search_lightbox) && $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;
  }
}
Title: Re: [Mod] Show user's lightbox to admin.
Post by: thunderstrike on October 19, 2007, 11:29:28 PM
Ok so keep change.

Find:

Quote
$search_ids = str_replace(",", ", ", trim((isset($HTTP_POST_VARS['search_lightbox'])) ? trim($HTTP_POST_VARS['search_lightbox']) : urldecode(trim($HTTP_GET_VARS['search_lightbox']))));

add after:

Code: [Select]
$search_lightbox = $search_ids
Title: Re: [Mod] Show user's lightbox to admin.
Post by: shadowhunter on October 20, 2007, 12:29:38 PM
It works fine!
Thanks a lot!
Greetings.
Title: Re: [Mod] Show user's lightbox to admin.
Post by: e-trader_2002 on April 04, 2008, 11:45:45 PM
Hi there,

this is a great mod (after implementing the last changes described above by "thunderstrike").
It will save me tremendous amounts of time.
Thanks a lot!  :D

e-trader_2002
Title: Re: [Mod] Show user's lightbox to admin.
Post by: sigma. on August 10, 2008, 05:20:58 AM
Just updated to 1.7.6 tried to implement this mod again but the code in member.php has changed. I can't get it to work.

Anyone else have luck getting this mod to work with the latest?
Title: Ynt: [Mod] Show user's lightbox to admin.
Post by: sanko86 on January 25, 2009, 01:11:27 PM
dont work version 1.7.6
Title: Re: [Mod] Show user's lightbox to admin.
Post by: alekinna on January 25, 2009, 05:05:05 PM
In my gallery (v1.7.6) works fine!
Title: Re: [Mod] Show user's lightbox to admin.
Post by: sanko86 on January 25, 2009, 05:21:19 PM
only link open search.php
Title: Re: [Mod] Show user's lightbox to admin.
Post by: sanko86 on January 26, 2009, 02:14:53 PM
screen picture
Title: Re: [Mod] Show user's lightbox to admin.
Post by: V@no on January 26, 2009, 03:55:11 PM
Try re-do step 2 (not step 2.2)
I believe it was a bug in that step.
Title: Re: [Mod] Show user's lightbox to admin.
Post by: sanko86 on January 27, 2009, 07:49:00 AM
ı am thanks

ı am again try
Title: Re: [Mod] Show user's lightbox to admin.
Post by: sanko86 on January 27, 2009, 09:03:51 AM
ý am found problem

step 4

<A href="./search.php?search_lightbox=20">Show user's lightbox</a>

change



{if url_show_user_lightbox}<A href="{url_show_user_lightbox}">{lang_show_user_lightbox}</a>{endif url_show_user_lightbox}
Title: Re: [Mod] Show user's lightbox to admin.
Post by: V@no on January 27, 2009, 09:21:13 AM
Not sure who is more confused you or me, but {if url_show_user_lightbox}<A href="{url_show_user_lightbox}">{lang_show_user_lightbox}</a>{endif url_show_user_lightbox}
is already in Step 4. ;)
Title: Re: [Mod] Show user's lightbox to admin.
Post by: sanko86 on January 27, 2009, 09:27:45 AM
thanks v@no

good be

example: www.elemegim.info
Title: Re: [Mod] Show user's lightbox to admin.
Post by: lailash on June 13, 2009, 08:59:40 AM
Hallo,
ich habe eine Frage, ist es möglich diese MOD im ACP zu nutzen?

User verwalten>> User bearbeiten>>

Gefunden: 11270. Angezeigt: 1-100.
   Username                                 Email    Registrierungs-Datum    Letzte Aktion    Optionen
   reg. User / Favouriten (42)

liebe Grüsse Laila
Title: Re: [Mod] Show user's lightbox to admin.
Post by: bergblume on September 21, 2009, 06:29:12 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

yes, I would be interested in... can you pls. explain how you did realize it!
thanks, bergblume