How to add a link to the displayimage.php page at the bottom How to add a link to the displayimage.php page at the bottom
 

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

How to add a link to the displayimage.php page at the bottom

Started by dryadsong, October 22, 2006, 11:38:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dryadsong

Hello -- I've searched for this, but either it's not here or my search terms weren't right. My problem is very specific, so hopefully there's a specific solution.

I had to turn comments off for guests because bots were posting hundreds of horrible comments every day. But since the majority of the comments were coming from random guests, the function is rendered pretty useless right now. I was wanting to put a link at the bottom of the filmstrip and comments that said something like "login or register to leave a comment" with the appropriate links. But I want it visible only on that page, and only to those who aren't logged it.
Is there a way to achieve this (admittedly very specific) end? I looked at displayimage.php, but unfortunately it made no sense to me. 

zac

I dont think you want to mess with display image but rather your theme.  Copy this into your theme and edit it:


// HTML template for the form to add comments

$template_add_your_comment = <<<EOT

        <form method="post" name="post" action="db_input.php">

                <table align="center" width="{WIDTH}" cellspacing="1" cellpadding="0" class="maintable">

                        <tr>

                                        <td width="100%" class="tableh2_compact"><b>{ADD_YOUR_COMMENT}</b></td>

                        </tr>

                        <tr>

                <td colspan="1">

                        <table width="100%" cellpadding="0" cellspacing="0">



<!-- BEGIN user_name_input -->

                                                        <tr>

                                                                <td class="tableb_compact">

                                        {NAME}

                                </td>

                                <td class="tableb_compact">

                                        <input type="text" class="textinput" name="msg_author" size="10" maxlength="20" value="{USER_NAME}" />

                                </td>

<!-- END user_name_input -->

<!-- BEGIN input_box_smilies -->

                                <td class="tableb_compact">

                                {COMMENT}

                                                                </td>

                                <td width="100%" class="tableb_compact">

                                <input type="text" class="textinput" id="message" name="msg_body" onselect="storeCaret_post(this);" onclick="storeCaret_post(this);" onkeyup="storeCaret_post(this);" maxlength="{MAX_COM_LENGTH}" style="width: 100%;" />

                                                                </td>

<!-- END input_box_smilies -->

<!-- BEGIN input_box_no_smilies -->

                                <td class="tableb_compact">

                                {COMMENT}

                                                                </td>

                                <td width="100%" class="tableb_compact">

                                <input type="text" class="textinput" id="message" name="msg_body"  maxlength="{MAX_COM_LENGTH}" style="width: 100%;" />

                                </td>

<!-- END input_box_no_smilies -->

                                <td class="tableb_compact">

                                <input type="hidden" name="event" value="comment" />

                                <input type="hidden" name="pid" value="{PIC_ID}" />

                                <input type="submit" class="comment_button" name="submit" value="{OK}" />

                                </td>

                                                        </tr>

                        </table>

                </td>

        </tr>

<!-- BEGIN smilies -->

        <tr>

                <td width="100%" class="tableb_compact">

                        {SMILIES}

                </td>

        </tr>

<!-- END smilies -->

                </table>

        </form>

EOT;


I would add this in a row at the beginning of the form <a href="Your Coppermine Install/login.php">Please login to comment</a>

I didnt try this so hope it works for you

dryadsong

Before I try this I have one question -- since the form to add comments only appears when a user is logged in, wouldn't the new link also only show up when the user is logged in?

zac

hmmm... good point.  This is why i never try to answer questions in this forum  ???  How about editing your filmstrip then and sticking the link at the bottom of that?


// HTML template for filmstrip display

$template_film_strip = <<<EOT



        <tr>

         <td valign="top" style="background-image: url({TILE1});"><img src="{TILE1}" alt="" border="0" /></td>

        </tr>

        <tr>

        <td valign="bottom" class="thumbnails" align="center">

          <table width="100%" cellspacing="0" cellpadding="3" border="0">

              <tr>

                 <td width="50%"></td>

                 {THUMB_STRIP}

                 <td width="50%"></td>

              </tr>

          </table>

        </td>

        </tr>

        <tr>

         <td valign="top" style="background-image: url({TILE2});"><img src="{TILE2}" alt="" border="0" /></td>

        </tr>

<!-- BEGIN thumb_cell -->

                <td valign="top" align="center">

                                        <a href="{LINK_TGT}">{THUMB}</a>

                                        {CAPTION}

                                        {ADMIN_MENU}

                </td>

<!-- END thumb_cell -->

<!-- BEGIN empty_cell -->

                <td valign="top" align="center" >&nbsp;</td>

<!-- END empty_cell -->



EOT;

dryadsong

But I think I would have the opposite problem then, in that the link would show when someone was logged in.  :(

zac


Sami

Instead of disabling Comment for guest , use CAPTCHA (MOD/PLUGIN) or Akisment (MOD)
‍I don't answer to PM with support question
Please post your issue to related board