Default URL "hides" ads Default URL "hides" ads
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Default URL "hides" ads

Started by Venia, August 30, 2012, 08:30:18 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Venia

Hi all,

I need help figuring out how to remove #top_display_media from all my URLs when people click thumbs. The reason is that when people go straight to the image, they basically skip my ad. I found another thread, but cannot find the stated file anywhere and that thread is from 2010. Thanks in advance.

Jeff Bailey

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


Jeff Bailey

Probably the easiest way to do this, is to add this to your custom themes theme.php right before the closing ?>

/******************************************************************************
** 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 $votes;

    $picinfo = $superCage->cookie->keyExists('picinfo') ? $superCage->cookie->getAlpha('picinfo') : ($CONFIG['display_pic_info'] ? 'block' : 'none');
    echo $LINEBREAK . '<div id="picinfo" style="display: '.$picinfo.';">' . $LINEBREAK;
    starttable();
    echo $pic_info;
    endtable();
    echo '</div>' . $LINEBREAK;

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

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


If function theme_display_image() already exists in your theme
Find
echo '<a name="top_display_media"></a>'; // set the navbar-anchor
Replace with
//echo '<a name="top_display_media"></a>'; // set the navbar-anchor
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

Venia

That worked great, thank you so much!

Jeff Bailey

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