Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Informing users they must register/login to post comments.  (Read 171174 times)

0 Members and 2 Guests are viewing this topic.

Nibbler

  • Guest
Informing users they must register/login to post comments.
« on: December 07, 2007, 10:48:40 pm »

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

Code: [Select]
        $html .= template_eval($template_add_your_comment, $params);
    }

    return $html;
}

to

Code: [Select]
        $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.
Logged

thomasso

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Informing users they must register/login to post comments.
« Reply #1 on: December 08, 2007, 03:16:23 pm »

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

Code: [Select]
<!-- End standard table -->

EOT;
}

H E R E

?>

and also H E R E

Logged

Nibbler

  • Guest
Re: Informing users they must register/login to post comments.
« Reply #2 on: December 08, 2007, 03:36:49 pm »

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

thomasso

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Informing users they must register/login to post comments.
« Reply #3 on: December 08, 2007, 04:06:40 pm »

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

ajanweb

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Informing users they must register/login to post comments.
« Reply #4 on: January 01, 2009, 10:38:32 am »

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
Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 20 queries.