coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 permissions => Topic started by: Vinicius Machado on February 16, 2010, 02:03:54 PM

Title: Disable PICINFO for non registered users
Post by: Vinicius Machado on February 16, 2010, 02:03:54 PM
How can I disable the PICINFO just for non registered users ?

I know almost nothing in PHP. But I've tried a lot of ting like copying other codes and testing in different ways but I Can't change this.

Thx
Title: Re: Disable PICINFO for non registered users
Post by: Jeff Bailey on February 16, 2010, 03:45:47 PM
Post a link. Board rules / Forum policies: Post Links (http://forum.coppermine-gallery.net/index.php/topic,55415.msg270616.html#msg270616)
Title: Re: Disable PICINFO for non registered users
Post by: Vinicius Machado on February 16, 2010, 05:54:09 PM
Sorry, I fogrgot that.

www.viniciusmachado.com/crisevini/album

user: tester
password: tester123
Title: Re: Disable PICINFO for non registered users
Post by: Nibbler on February 16, 2010, 06:13:59 PM
Add the following code to your custom theme's theme.php


function theme_display_image($nav_menu, $picture, $votes, $pic_info, $comments, $film_strip)
{
    global $CONFIG;

    $width = $CONFIG['picture_table_width'];

    starttable();
    echo $nav_menu;
    endtable();

    starttable();
    echo $picture;
    endtable();
    if ($CONFIG['display_film_strip'] == 1) {
        echo $film_strip;
    }


    echo $votes;


    if (USER_ID) {
        $picinfo = isset($_COOKIE['picinfo']) ? $_COOKIE['picinfo'] : ($CONFIG['display_pic_info'] ? 'block' : 'none');
        echo "<div id=\"picinfo\" style=\"display: $picinfo;\">\n";
        starttable();
        echo $pic_info;
        endtable();
        echo "</div>\n";
    }
   
    echo "<div id=\"comments\">\n";
        echo $comments;
        echo "</div>\n";

}
Title: Re: Disable PICINFO for non registered users
Post by: Vinicius Machado on February 17, 2010, 01:09:09 AM
Thx buddy. Thats it ! Issue solved !
Title: Re: Disable PICINFO for non registered users
Post by: Joachim Müller on February 18, 2010, 07:42:06 AM
Quote from: Vinicius Machado on February 16, 2010, 05:54:09 PM
Sorry, I fogrgot that.
You always "forget" that. You have been around long enough and supporters had to remind you of board rules countless times already, so I'm no longer willing to accept your apologies. If you fail to respect board rules in the future, you'll get banned. Locking