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: How to add a link to the displayimage.php page at the bottom  (Read 6474 times)

0 Members and 1 Guest are viewing this topic.

dryadsong

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 3
    • DryadSong.com
How to add a link to the displayimage.php page at the bottom
« on: October 22, 2006, 11:38:39 pm »

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. 
Logged

zac

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 153
Re: How to add a link to the displayimage.php page at the bottom
« Reply #1 on: October 22, 2006, 11:55:46 pm »

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

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

dryadsong

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 3
    • DryadSong.com
Re: How to add a link to the displayimage.php page at the bottom
« Reply #2 on: October 23, 2006, 12:25:22 am »

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?
Logged

zac

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 153
Re: How to add a link to the displayimage.php page at the bottom
« Reply #3 on: October 23, 2006, 12:31:50 am »

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?

Code: [Select]
// 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;
Logged

dryadsong

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 3
    • DryadSong.com
Re: How to add a link to the displayimage.php page at the bottom
« Reply #4 on: October 23, 2006, 12:49:55 am »

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

zac

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 153
Re: How to add a link to the displayimage.php page at the bottom
« Reply #5 on: October 23, 2006, 01:26:28 am »

yea.. u right.. ok.. i shut up now :P
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: How to add a link to the displayimage.php page at the bottom
« Reply #6 on: October 23, 2006, 07:22:35 am »

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

Page created in 0.022 seconds with 20 queries.