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: Newbie help: removing comments and ratings?  (Read 7603 times)

0 Members and 1 Guest are viewing this topic.

Syree

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 43
    • Janet Planet
Newbie help: removing comments and ratings?
« on: December 29, 2005, 01:37:44 pm »

Hello people, I'm new in using coppermine, actually new in using any php script, so i got some great help from someone on this forum setting it up and it works! :)

So far i can figure out how to make it look like i want, but i  can't seem to find how to remove the ratings and comment options? Also i'd like to remove the slideshow and next picture options above the picture if possible. I've tried to look around the forum for an answer, but the one answer i found i didn't understand. Can anyone help me with this? Thank you in advance!
« Last Edit: December 29, 2005, 04:25:36 pm by TranzNDance »
Logged

Syree

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 43
    • Janet Planet
Re: Newbie help: removing comments and ratings?
« Reply #1 on: December 29, 2005, 01:47:08 pm »

I found the comments and ratings how to remove this :) Now my only question remains how to remove the little icons above a picture once clicked on. THe options for slideshow and next and previous i mean :) Hope anyone can help me
Logged

Nibbler

  • Guest
Re: Newbie help: removing comments and ratings?
« Reply #2 on: December 29, 2005, 01:53:15 pm »

Copy the navbar template (as shown below) from themes/sample/theme.php into the theme.php of the theme you are using. then modify it as you want it.

Code: [Select]
// HTML template for the image navigation bar
$template_img_navbar = <<<EOT

        <tr>
                <td align="center" valign="middle" class="navmenu" width="48px"><a name="top_display_media"></a>
                        <a href="{THUMB_TGT}" class="navmenu_pic" title="{THUMB_TITLE}"><img src="{LOCATION}images/thumbnails.gif" align="middle" border="0px" alt="{THUMB_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <a href="javascript:;" class="navmenu_pic" onclick="blocking('picinfo','yes', 'block'); return false;" title="{PIC_INFO_TITLE}"><img src="{LOCATION}images/info.gif" border="0px" align="middle" alt="{PIC_INFO_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <a href="{SLIDESHOW_TGT}" class="navmenu_pic" title="{SLIDESHOW_TITLE}"><img src="{LOCATION}images/slideshow.gif" border="0px" align="middle" alt="{SLIDESHOW_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="100%">
                        {PIC_POS}
                </td>
<!-- BEGIN report_file_button -->
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <a href="{REPORT_TGT}" class="navmenu_pic" title="{REPORT_TITLE}"><img src="{LOCATION}images/report.gif" border="0" align="middle" alt="{REPORT_TITLE}" /></a>
                </td>
<!-- END report_file_button -->
<!-- BEGIN ecard_button -->
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <a href="{ECARD_TGT}" class="navmenu_pic" title="{ECARD_TITLE}"><img src="{LOCATION}images/ecard.gif"  border="0px" align="middle" alt="{ECARD_TITLE}" /></a>
                </td>
<!-- END ecard_button -->
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <a href="{PREV_TGT}" class="navmenu_pic" title="{PREV_TITLE}"><img src="{LOCATION}images/prev.gif"  border="0px" align="middle" alt="{PREV_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <a href="{NEXT_TGT}" class="navmenu_pic" title="{NEXT_TITLE}"><img src="{LOCATION}images/next.gif"  border="0px" align="middle" alt="{NEXT_TITLE}" /></a>
                </td>
        </tr>

EOT;
Logged

Syree

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 43
    • Janet Planet
Re: Newbie help: removing comments and ratings?
« Reply #3 on: December 29, 2005, 02:02:31 pm »

I'm trying ... I copied this into my theme.php file (i'm using the project vii one) and then i dont'know how to remove it? I'm sorry but this is all new to me. I have this copied inside theme.php now, but it doesn't do anything yet ..i tried to remove it but this also doesn't seem to work. Help? It's probably really easy, only not to me  :D
Logged

Nibbler

  • Guest
Re: Newbie help: removing comments and ratings?
« Reply #4 on: December 29, 2005, 02:04:53 pm »

You can just comment out the buttons you don't want

Code: [Select]
// HTML template for the image navigation bar
$template_img_navbar = <<<EOT

        <tr>
                <td align="center" valign="middle" class="navmenu" width="48px"><a name="top_display_media"></a>
                        <a href="{THUMB_TGT}" class="navmenu_pic" title="{THUMB_TITLE}"><img src="{LOCATION}images/thumbnails.gif" align="middle" border="0px" alt="{THUMB_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <a href="javascript:;" class="navmenu_pic" onclick="blocking('picinfo','yes', 'block'); return false;" title="{PIC_INFO_TITLE}"><img src="{LOCATION}images/info.gif" border="0px" align="middle" alt="{PIC_INFO_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <!-- <a href="{SLIDESHOW_TGT}" class="navmenu_pic" title="{SLIDESHOW_TITLE}"><img src="{LOCATION}images/slideshow.gif" border="0px" align="middle" alt="{SLIDESHOW_TITLE}" /></a> -->
                </td>
                <td align="center" valign="middle" class="navmenu" width="100%">
                        {PIC_POS}
                </td>
<!-- BEGIN report_file_button -->
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <a href="{REPORT_TGT}" class="navmenu_pic" title="{REPORT_TITLE}"><img src="{LOCATION}images/report.gif" border="0" align="middle" alt="{REPORT_TITLE}" /></a>
                </td>
<!-- END report_file_button -->
<!-- BEGIN ecard_button -->
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <a href="{ECARD_TGT}" class="navmenu_pic" title="{ECARD_TITLE}"><img src="{LOCATION}images/ecard.gif"  border="0px" align="middle" alt="{ECARD_TITLE}" /></a>
                </td>
<!-- END ecard_button -->
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <!-- <a href="{PREV_TGT}" class="navmenu_pic" title="{PREV_TITLE}"><img src="{LOCATION}images/prev.gif"  border="0px" align="middle" alt="{PREV_TITLE}" /></a> -->
                </td>
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <!-- <a href="{NEXT_TGT}" class="navmenu_pic" title="{NEXT_TITLE}"><img src="{LOCATION}images/next.gif"  border="0px" align="middle" alt="{NEXT_TITLE}" /></a> -->
                </td>
        </tr>

EOT;
Logged

Syree

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 43
    • Janet Planet
Re: Newbie help: removing comments and ratings?
« Reply #5 on: December 29, 2005, 02:06:37 pm »

I'm almost afraid to ask but i don't dare to send you a personal message either (lol) ...but what is comment out??? I honeslty have no idea what do actually do then..  :-[
Logged

Nibbler

  • Guest
Re: Newbie help: removing comments and ratings?
« Reply #6 on: December 29, 2005, 02:08:09 pm »

I did it for you, all you need to do is copy/paste the code I posted into your theme.php
Logged

Syree

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 43
    • Janet Planet
Re: Newbie help: removing comments and ratings?
« Reply #7 on: December 29, 2005, 02:10:37 pm »

oh thank you! But i must make a mistake somehow, it doesn't change anything. I copied your post inside my theme.php (the one out of project vii) like this, maybe thats wrong?:

Code: [Select]
<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2005 Coppermine Dev Team
  v1.1 originaly written by Gregory DEMAR

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  ********************************************
  Coppermine version: 1.4.2
  $Source: /cvsroot/coppermine/devel/themes/project_vii/theme.php,v $
  $Revision: 1.62 $
  $Author: gaugau $
  $Date: 2005/10/25 01:16:24 $
**********************************************/

// ------------------------------------------------------------------------- //
// This theme has had all redundant CORE items removed                       //
// ------------------------------------------------------------------------- //
define('THEME_HAS_NO_SUB_MENU_BUTTONS'1);
define('THEME_IS_XHTML10_TRANSITIONAL',1);  // Remove this if you edit this template until
                                            // you have validated it. See docs/theme.htm.

// HTML template for template sys_menu spacer
$template_sys_menu_spacer ="|";

// HTML template for sub_menu
if ($CONFIG['custom_lnk_url'] != '') {

$template_sub_menu = <<<EOT
                        <table border="0" cellpadding="0" cellspacing="0">
                                <tr>
<!-- BEGIN custom_link -->
<td class="top_menu_left_bttn">
                                                <a href="{CUSTOM_LNK_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{CUSTOM_LNK_TITLE}">{CUSTOM_LNK_LNK}</a>
                                        </td>
                                        <td><img src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0" id="menu_spcer" alt="" /><br /></td>
<!-- END custom_link -->
                                        <td class="top_menu_bttn">
                                                <a href="{ALB_LIST_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{ALB_LIST_TITLE}">{ALB_LIST_LNK}</a>
                                        </td>
                                        <td><img src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0" id="menu_spcer" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="javascript:;" onmouseover="MM_showHideLayers('SYS_MENU','','show')">@</a>
                                        </td>
                                        <td><img src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0"  alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{LASTUP_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{LASTUP_TITLE}">{LASTUP_LNK}</a>
                                        </td>
                                        <td><img src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0"  alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{LASTCOM_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{LASTCOM_LNK}">{LASTCOM_LNK}</a>
                                        </td>
                                        <td><img src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0"  alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{TOPN_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{TOPN_LNK}">{TOPN_LNK}</a>
                                        </td>
                                        <td><img src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0"  alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{TOPRATED_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{TOPRATED_LNK}">{TOPRATED_LNK}</a>
                                        </td>
                                        <td><img src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0"  alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{FAV_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{FAV_LNK}">{FAV_LNK}</a>
                                        </td>
                                        <td><img src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0"  alt="" /><br /></td>
                                        <td class="top_menu_right_bttn">
                                                <a href="{SEARCH_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{SEARCH_LNK}">{SEARCH_LNK}</a>
                                        </td>
                                </tr>
                        </table>
EOT;

// HTML template for the image navigation bar
$template_img_navbar = <<<EOT

        <tr>
                <td align="center" valign="middle" class="navmenu" width="48px"><a name="top_display_media"></a>
                        <a href="{THUMB_TGT}" class="navmenu_pic" title="{THUMB_TITLE}"><img src="{LOCATION}images/thumbnails.gif" align="middle" border="0px" alt="{THUMB_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <a href="javascript:;" class="navmenu_pic" onclick="blocking('picinfo','yes', 'block'); return false;" title="{PIC_INFO_TITLE}"><img src="{LOCATION}images/info.gif" border="0px" align="middle" alt="{PIC_INFO_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <!-- <a href="{SLIDESHOW_TGT}" class="navmenu_pic" title="{SLIDESHOW_TITLE}"><img src="{LOCATION}images/slideshow.gif" border="0px" align="middle" alt="{SLIDESHOW_TITLE}" /></a> -->
                </td>
                <td align="center" valign="middle" class="navmenu" width="100%">
                        {PIC_POS}
                </td>
<!-- BEGIN report_file_button -->
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <a href="{REPORT_TGT}" class="navmenu_pic" title="{REPORT_TITLE}"><img src="{LOCATION}images/report.gif" border="0" align="middle" alt="{REPORT_TITLE}" /></a>
                </td>
<!-- END report_file_button -->
<!-- BEGIN ecard_button -->
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <a href="{ECARD_TGT}" class="navmenu_pic" title="{ECARD_TITLE}"><img src="{LOCATION}images/ecard.gif"  border="0px" align="middle" alt="{ECARD_TITLE}" /></a>
                </td>
<!-- END ecard_button -->
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <!-- <a href="{PREV_TGT}" class="navmenu_pic" title="{PREV_TITLE}"><img src="{LOCATION}images/prev.gif"  border="0px" align="middle" alt="{PREV_TITLE}" /></a> -->
                </td>
                <td align="center" valign="middle" class="navmenu" width="48px">
                        <!-- <a href="{NEXT_TGT}" class="navmenu_pic" title="{NEXT_TITLE}"><img src="{LOCATION}images/next.gif"  border="0px" align="middle" alt="{NEXT_TITLE}" /></a> -->
                </td>
        </tr>

EOT;


} else {
$template_sub_menu = <<<EOT
                        <table border="0" cellpadding="0" cellspacing="0">
                                <tr>
<!-- BEGIN custom_link -->
<!-- END custom_link -->
                                        <td class="top_menu_left_bttn">
                                                <a href="{ALB_LIST_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{ALB_LIST_TITLE}">{ALB_LIST_LNK}</a>
                                        </td>
                                        <td><img src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0" id="menu_spcer" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="javascript:;" onmouseover="MM_showHideLayers('SYS_MENU','','show')">@</a>
                                        </td>
                                        <td><img src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0"  alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{LASTUP_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{LASTUP_TITLE}">{LASTUP_LNK}</a>
                                        </td>
                                        <td><img src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0"  alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{LASTCOM_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{LASTCOM_LNK}">{LASTCOM_LNK}</a>
                                        </td>
                                        <td><img src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0"  alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{TOPN_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{TOPN_LNK}">{TOPN_LNK}</a>
                                        </td>
                                        <td><img src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0"  alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{TOPRATED_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{TOPRATED_LNK}">{TOPRATED_LNK}</a>
                                        </td>
                                        <td><img src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0"  alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{FAV_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{FAV_LNK}">{FAV_LNK}</a>
                                        </td>
                                        <td><img src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0"  alt="" /><br /></td>
                                        <td class="top_menu_right_bttn">
                                                <a href="{SEARCH_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{SEARCH_LNK}">{SEARCH_LNK}</a>
                                        </td>
                                </tr>
                        </table>
EOT;
}

?>

Logged

Nibbler

  • Guest
Re: Newbie help: removing comments and ratings?
« Reply #8 on: December 29, 2005, 02:12:14 pm »

Put it just before the ?> at the end of the file.
Logged

Syree

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 43
    • Janet Planet
Re: Newbie help: removing comments and ratings?
« Reply #9 on: December 29, 2005, 02:15:10 pm »

.... no succes, it gives me this error:

Code: [Select]
Parse error: parse error, unexpected $ in /var/www/html/coppermine/themes/project_vii/theme.php on line 157

*handing you over some chocolate* I feel really like bugging but i'm trying to understand this script
Logged

Syree

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 43
    • Janet Planet
Re: Newbie help: removing comments and ratings?
« Reply #10 on: December 29, 2005, 02:56:35 pm »

Ok I added it again, and now right above the ?> ending, and now it works for the half.... the previous and next buttons are gone, but the little folder image and the info button are still there ..
Logged

Nibbler

  • Guest
Re: Newbie help: removing comments and ratings?
« Reply #11 on: December 29, 2005, 02:58:13 pm »

You didn't say you wanted them removed too. Comment them out in the same way using the html <!-- comment --> method.
Logged

Syree

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 43
    • Janet Planet
Re: Newbie help: removing comments and ratings?
« Reply #12 on: December 29, 2005, 03:00:47 pm »

ooh..i will try to find this comment thing. Its all abracadabra to me LOL but i will try . thanks for your help!
Logged

Syree

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 43
    • Janet Planet
Re: Newbie help: removing comments and ratings?
« Reply #13 on: December 29, 2005, 03:13:39 pm »

YESSSSSSSS! I found out what a comment out is LOL!! (dont'laugh) ;) For me this was all abracada but i know now. Thank you very much for the help :)
Happy new year
Logged

Linea

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Newbie help: removing comments and ratings?
« Reply #14 on: January 01, 2006, 11:16:52 pm »

That was a very very good description, but in the theme.php I have, I don't find all these items...

// HTML template for sub_menu
$template_sub_menu = $template_sys_menu;

if (!defined('THEME_HAS_NO_SYS_MENU_BUTTONS')) {

  // HTML template for template sys_menu spacer
  $template_sys_menu_spacer ="::";

  // HTML template for template sys_menu buttons
  $template_sys_menu_button = <<<EOT
  <!-- BEGIN {BLOCK_ID} -->
        <a href="{HREF_TGT}" title="{HREF_TITLE}">{HREF_LNK}</a> {SPACER}
  <!-- END {BLOCK_ID} -->
EOT;

That was it! Where are alle the things starting with <td ? I would like to comment out some of them as Syree did, but how to comment out anything that isn't there??
Logged

Nibbler

  • Guest
Re: Newbie help: removing comments and ratings?
« Reply #15 on: January 01, 2006, 11:20:04 pm »

Copy the navbar template (as shown below) from themes/sample/theme.php into the theme.php of the theme you are using. then modify it as you want it.
Logged

Linea

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Newbie help: removing comments and ratings?
« Reply #16 on: January 01, 2006, 11:34:56 pm »

Navbar template??? I want to comment out things like top rated, last commented and so on. I can't find these items in the navbar template?!
Logged

Nibbler

  • Guest
Re: Newbie help: removing comments and ratings?
« Reply #17 on: January 01, 2006, 11:40:44 pm »

Then your question has nothing to do with this post, please start your own thread.
Logged
Pages: [1]   Go Up
 

Page created in 0.048 seconds with 20 queries.