coppermine-gallery.com/forum

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: slutgers on February 11, 2004, 06:29:24 AM

Title: Moving "rating" above the picture
Post by: slutgers on February 11, 2004, 06:29:24 AM
What file/code do I need to change in order for the "rate this picture" option to appear above the actual photo. www.slutgers.com/pictures to see what I mean (the users are too lazy to scroll down to rate our photos, 5000 views vs 40 votes)

Please answer idiot proof format, because I are idiot.

Thanks
Title: Moving "rating" above the picture
Post by: Casper on February 11, 2004, 11:18:52 AM
You need to edit themes/your_theme/theme.php.

Look for the line '// HTML template for the image rating box
$template_image_rating = <<<EOT'

shown here is the default theme code, but other themes will have different formatting.
// HTML template for the image rating box
$template_image_rating = <<<EOT

        <tr>
                <td colspan="6" class="tableh2_compact"><b>{TITLE}</b> {VOTES}</td>
        </tr>
        <tr>
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE0}" title="{RUBBISH}"><img src="images/rating0.gif" alt="{RUBBISH}" border="0" /><br /></a></td>
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE1}" title="{POOR}"><img src="images/rating1.gif" alt="{POOR}" border="0" /><br /></a></td>
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE2}" title="{FAIR}"><img src="images/rating2.gif" alt="{FAIR}" border="0" /><br /></a></td>
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE3}" title="{GOOD}"><img src="images/rating3.gif" alt="{GOOD}" border="0" /><br /></a></td>
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE4}" title="{EXCELLENT}"><img src="images/rating4.gif" alt="{EXCELLENT}" border="0" /><br /></a></td>
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE5}" title="{GREAT}"><img src="images/rating5.gif" alt="{GREAT}" border="0" /><br /></a></td>
        </tr>

EOT;


Now move all the above to be immediately above this;
// HTML template for intermediate image display
$template_display_picture = <<<EOT
Title: Moving "rating" above the picture
Post by: slutgers on February 11, 2004, 09:38:25 PM
I tried what was suggested but it didnt work. I'm using my own theme 'slutgers' but I simply copied the water_drop theme and made minor alterations (i.e. the header html).

I even tried to change those lines of code in the theme.php files of both directories thinking it might possibly reference the wrong directory, but it didnt work.

I also tried to move the voting to the top of the entire page, and that didn't work either.

Do you have any other suggetions?

Thanks for your help.
Title: Moving "rating" above the picture
Post by: Nibbler on February 11, 2004, 09:49:36 PM
You need to open your theme.php, and move the block:


starttable();
echo $picture;
endtable();


to just below the block:


    if ($votes) {
        starttable();
        echo $spacer;
        endtable();
        starttable();
        echo $votes;
        endtable();
    }