forum.coppermine-gallery.net

No Support => Modifications/Add-Ons/Hacks => Mods: Comments => Topic started by: Nibbler on December 07, 2007, 10:48:40 pm

Title: Informing users they must register/login to post comments.
Post by: Nibbler 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.
Title: Re: Informing users they must register/login to post comments.
Post by: thomasso 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

Title: Re: Informing users they must register/login to post comments.
Post by: Nibbler on December 08, 2007, 03:36:49 pm
Place it just before the closing ?>. Make sure you copy the entire function.
Title: Re: Informing users they must register/login to post comments.
Post by: thomasso 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!
Title: Re: Informing users they must register/login to post comments.
Post by: ajanweb 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