Author Topic: Need help in adding new array just for GUEST  (Read 3978 times)

0 Members and 1 Guest are viewing this topic.

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Need help in adding new array just for GUEST
« on: October 21, 2007, 02:18:36 AM »
Hello,

I added a new array in details.html {image_info} and it is working good. Now I want that just the GUEST kan see the information.

I tried in detail.php and I put:
Quote
$image_info = "";
     if($user_info['user_level'] == GUEST) {
    $image_info= $lang['image_info];
   }

but it is not working.

Any help please?
Cruxy

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Need help in adding new array just for GUEST
« Reply #1 on: October 21, 2007, 02:39:22 AM »
In includes/functions.php file,

find:

Quote
"url_download" => $site_sess->url(ROOT_PATH."download.php?".URL_IMAGE_ID."=".$image_row['image_id']),

add after:

Code: [Select]
"lang_image_info" => ($user_info['user_level'] == GUEST) ? $lang['image_info'] : "",

In details.html file, use this:

Code: [Select]
{if user_loggedout}{lang_image_info}{endif user_loggedout}
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Re: Need help in adding new array just for GUEST
« Reply #2 on: October 21, 2007, 02:53:53 AM »
It works perfect. Thank you very much.

I have another question about new template just for GUEST.

I added a new template whos_online2.html (actualy I just copied the template whosonline.html and I gave it another name and I puted in another place on my site).
How can I make that also JUST THE GUEST can see the new template whos_online2.html? (The same way like user_loginform.html and user_logininfo.html).
Is het possible to do that?


Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Need help in adding new array just for GUEST
« Reply #3 on: October 21, 2007, 03:45:48 AM »
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Re: Need help in adding new array just for GUEST
« Reply #4 on: October 21, 2007, 10:52:09 PM »
Thank you, I meant something else, but I fix it myself.
I love 4images. It is a great gallery. :wink: