forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: susied on November 12, 2009, 06:27:35 pm

Title: Help with Voting Button
Post by: susied on November 12, 2009, 06:27:35 pm
First off I am fairly new to php so would really appreciate some help.

I have created a custom template, theme, css and have most of it working.

I want to use 1 vote instead of the rating system. I found a different thread that explained how to get that working (Thanks btw for posting it).

The one part I don't understand how to do is to get my "Vote for Me" button to register the vote.

Here is the code from my theme:
Code: [Select]
<!-- BEGIN thumb_cell -->
        <td valign="top" class="thumbnails" width ="{CELL_WIDTH}" align="center">
<div class="Interior_Contestants">
                <table width="100%" cellpadding="0" cellspacing="0">
                        <tr>
                                <td align="center">
<h1> <div style="text-align:center;width:100%"> {CAPTION} </div></h1><br>
<table width="160" border="0" cellspacing="0" cellpadding="0">
                                  <tr bgcolor="#FFFFFF">
                                <td colspan="3"><img src="images/spacer.gif" width="160" height="11" /></td>
                                  </tr>
                                  <tr bgcolor="#FFFFFF">
                               <td rowspan="3"><img src="images/spacer.gif" width="11" height="20" /></td>
                                    <td><a href="{LINK_TGT}">{THUMB}<br /></a>
                                          {ADMIN_MENU}</td>
                               <td rowspan="3"><img src="images/spacer.gif" width="11" height="20" /></td>
                                  </tr>
                                  <tr bgcolor="#FFFFFF">
                                    <td><img src="images/spacer.gif" width="138" height="11" /></td>
                                  </tr>

                                  <tr bgcolor="#FFFFFF">
 <td valign="center" width="138" height="26">


                                  <a href="{RATE1}" title="{GREAT}" rel="nofollow">
                                             <img src="images/Button_Vote.gif" border="0" alt="{GREAT}" />
                                                                      </a> </td>
                                  </tr>

                                  <tr bgcolor="#FFFFFF">
                              <td colspan="3"><img src="/images/Misc/Spacer.gif" width="160" height="11" /></td>
                                  </tr>
                                </table>
                                        
                                </td>
                        </tr>
                </table>
           </div>
        </td>
<!-- END thumb_cell -->
Title: Re: Help with Voting Button
Post by: Jeff Bailey on November 12, 2009, 06:32:19 pm
Please post a link to your gallery (http://forum.coppermine-gallery.net/index.php/topic,55415.msg270616.html#msg270616) and a link to the post you are referring to. Next time use the bbcode button to post code, i have edited it for you.
Title: Re: Help with Voting Button
Post by: susied on November 12, 2009, 07:32:25 pm
It is under development at the moment but my link is http://www.catconnection.net/contest/cpg1.4.25/cpg14x/index.php

I have figured out what my problem is. The voting works on the displayimage.php page.

What I don't know is how to get the variables that I need to properly call ratepic.php from all the other pages.

Thanks for fixing my code.
Title: Re: Help with Voting Button
Post by: susied on November 12, 2009, 08:02:12 pm
Had to search again for the post that has helped me so much. http://forum.coppermine-gallery.net/index.php/topic,54319.0.html
Title: Re: Help with Voting Button
Post by: Jeff Bailey on November 12, 2009, 08:57:10 pm
Restore the gallery footer so that it is a clickable link, until then you will not receive support.
8.4.2.2 Preservation of author attributions (http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#copyright_additional_preservation)
Title: Re: Help with Voting Button
Post by: susied on November 12, 2009, 11:20:58 pm
My apologies. Link is in place. I decided to just send from Vote for Me to displayimage.php and let them vote there. I do have that working now.

This thread can be closed now. Thanks for responding.

Title: Re: Help with Voting Button
Post by: phill104 on November 12, 2009, 11:31:42 pm
So what happened to the link generated by our code?

Going through the code and removing it in the first place showns little respect, hastilly slapping a quick bit of html to make your own link even more so.

Is there a reason why you cannot restore the original credit?
Title: Re: Help with Voting Button
Post by: susied on November 13, 2009, 12:07:36 am
Wow you guys are brutal. I have been sick the past 4 days I have been working on this in a not so clear thinking mode (Not that you would care).

I have put the original back. I will be changing it again because I want to control things like font and positioning which is why I removed it in the first place.
My boss is very picky about artsy stuff like that.

You think whatever you like. This is automating a monthly photo contest that has been being done manually since 2003 and it generally gets around 100 pics and one month got 500 votes. So the link will get exposure.



Title: Re: Help with Voting Button
Post by: phill104 on November 13, 2009, 05:52:28 pm
It is not a case of being brutal. We just believe we should stick to the request of the original author of the software.

As for having to remove it to have control over style, well that is just silly. Feel free to adjust the css as you see fit. As long as the link is visible you can style it in the css as you please. You obviously have the skills to do that.