How to hide 'rating' and 'file information' ? How to hide 'rating' and 'file information' ?
 

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 hide 'rating' and 'file information' ?

Started by P, October 23, 2013, 05:52:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

P

How to hide 'rating' and 'file information' ?
I need to hide them completely. Please help.

Jeff Bailey

Try
in your custom theme.php

/******************************************************************************
** Section <<<$template_image_rating>>> - START
******************************************************************************/
// HTML template for the image rating box
$template_image_rating = ''
/******************************************************************************
** Section <<<$template_image_rating>>> - END
******************************************************************************/

and (or just this)

/******************************************************************************
** Section <<<theme_display_image>>> - START
******************************************************************************/
function theme_display_image($nav_menu, $picture, $votes, $pic_info, $comments, $film_strip)
{
    global $CONFIG, $LINEBREAK;

    $superCage = Inspekt::makeSuperCage();

    $width = $CONFIG['picture_table_width'];

    echo '<a name="top_display_media"></a>'; // set the navbar-anchor
    starttable();
    echo $nav_menu;
    endtable();

    starttable();
    echo $picture;
    endtable();
    if ($CONFIG['display_film_strip'] == 1) {
        echo $film_strip;
    }



   echo $LINEBREAK

    echo '<a name="comments_top"></a>';
    echo '<div id="comments">' . $LINEBREAK;
        echo $comments;
        echo '</div>' . $LINEBREAK;

}
/******************************************************************************
** Section <<<theme_display_image>>> - END
******************************************************************************/

paste before the closing ?>

If this doesn't help please provide a link and a copy of your custom theme.php attached to this thread as theme.php.txt
Untested.
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

P

Hi Jeff, thanks for suggestion.

Which position in theme.php I should put those code?

Jeff Bailey

Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

P


Jeff Bailey

Quote from: Jeff Bailey on October 23, 2013, 09:06:54 PM
If this doesn't help please provide a link and a copy of your custom theme.php attached to this thread as theme.php.txt

What exactly happened?
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

P

this is how I put code .. in attach file.

P

and the result is.. (in below pic)

if i'm wrong, please show me how to put code correctly

Jeff Bailey

Sorry forgot a semi colon.

don't forget to rename it back to theme.php.
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

P

I try to save again, now the result is 'white blank page'. (rename to theme.php already)

Jeff Bailey

Try this one.

Unfortunately I don't have a gallery to test on at the moment, so please bear with my mistakes.
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

P

OK. It's work now. Thank you very much Jeff! I appreciate your help.

*put these code between EOT; and ?> (at the bottom of your theme.php), so I can hide rating and file information boxes*

QuoteEOT;

/******************************************************************************
** Section <<<theme_display_image>>> - START
******************************************************************************/
function theme_display_image($nav_menu, $picture, $votes, $pic_info, $comments, $film_strip)
{
    global $CONFIG, $LINEBREAK;

    $superCage = Inspekt::makeSuperCage();

    $width = $CONFIG['picture_table_width'];

    echo '<a name="top_display_media"></a>'; // set the navbar-anchor
    starttable();
    echo $nav_menu;
    endtable();

    starttable();
    echo $picture;
    endtable();
    if ($CONFIG['display_film_strip'] == 1) {
        echo $film_strip;
    }

    echo $LINEBREAK;

    echo '<a name="comments_top"></a>';
    echo '<div id="comments">' . $LINEBREAK;
        echo $comments;
        echo '</div>' . $LINEBREAK;

}
/******************************************************************************
** Section <<<theme_display_image>>> - END
******************************************************************************/

?>