Informing users they must register/login to post comments. Informing users they must register/login to post comments.
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Informing users they must register/login to post comments.

Started by Nibbler, December 07, 2007, 10:48:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nibbler

Copy theme_html_comments() function from sample theme to your theme.php and change the end of the function from:


        $html .= template_eval($template_add_your_comment, $params);
    }

    return $html;
}


to


        $html .= template_eval($template_add_your_comment, $params);

    } elseif (!USER_ID && $CURRENT_ALBUM_DATA['comments'] == 'YES'){
$html .= '<p align="center">You must <a href="register.php">register</a> or <a href="login.php">login</a> to comment</p>';
    }

    return $html;
}


Adjust wording and/or add style to suit.

thomasso

May I ask, where exactly in theme.php shell I copy / paste the whole function? I copied theme_html_comments() function from sample theme to my file theme.php several times (each time to different part of code) and it did not work (the only result was error on line xy). I tried to place it at the very end of code in file theme.php, just over


<!-- End standard table -->

EOT;
}

H E R E

?>

and also H E R E


Nibbler

Place it just before the closing ?>. Make sure you copy the entire function.

thomasso

Yes, it works now perfectly! Maybe i did not copy the whole function when i tried it yesterday. Thank you!

ajanweb

Quote from: Nibbler on December 08, 2007, 03:36:49 PM
Place it just before the closing ?>. Make sure you copy the entire function.


Now this is a strange one I uploaded the pics with batch upload which I use all the time and I got my little blue thing with Ok in it as per usual and then I go to the album and all I get are markers in place of the pictures....

http://michaelshanks.me.uk/album/thumbnails.php?album=41 Google & <a href="http://www.evturnakliyat.com" title="evden eve nakliyat" target="_blank">Evden eve nakliyat</a> OKEY

None of the picture are outside the width perameters or are larger than the file size allowed...so having real fun with this one... Undecided

Kriss  Smiley