Topic: Jump To: How can I add a link next to this text

OK,  quick question...   I want to put a link to the "Recent Topics" at the bottom of each page, specifically the "viewtopic" page so when someone is done reading a topic they can go right to recent topics list.   I don't want to mess up the otherwise super clean interface of punbb, so I'm thinking of just adding a link right next to the "Jump to" text.

Something like this:

Jump to recent topics or
<PULLDOWN>

I've got no idea how / where to insert the link/text to recent topics.  Seems simple enough, and probably is for one of you php masters.  Can someone give me a quick:  "insert the following code in this page, on line xxx"

Thanks in advance!!!

(by the way, if you have a suggestion for a better place for this link, let me know)>

Rob Ludlow 
www.Nifty-Stuff.com - Repository of all Stuff Nifty!
www.reviewum.com - Professor Ratings + Teacher Reviews

Re: Jump To: How can I add a link next to this text

Try this? In footer.php, find:

    // Display the "Jump to" drop list

Before, add:

    echo "\t\t\t".'<dl id="searchlinks" class="conl">'."\n\t\t\t\t".'<dt><strong>'.$lang_common['Search links'].'</strong></dt>'."\n\t\t\t\t".'<dd><a href="search.php?action=show_24h">'.$lang_common['Show recent posts'].'</a></dd>'."\n\t\t\t".'</dl>'."\n";

Re: Jump To: How can I add a link next to this text

guardian34, thanks for the reply.

That's close to what I want, but that also kicked over "Jump to" to the far right.

Is there a simple way to change the footer to say:


Jump to recent topics or

Just like what is already in the footer, but simply adding the link to "recent topics" after jump to.

Rob Ludlow 
www.Nifty-Stuff.com - Repository of all Stuff Nifty!
www.reviewum.com - Professor Ratings + Teacher Reviews

Re: Jump To: How can I add a link next to this text

Replace the line I gave you with this:

    echo "\t\t\t".'<p><a href="search.php?action=show_24h">'.$lang_common['Show recent posts'].'</a></p>'."\n";

You can place that before or after the "Jump to" list (shown here):

    // Display the "Jump to" drop list
    if ($pun_config['o_quickjump'] == '1')
    {
        // Load cached quickjump
        @include PUN_ROOT.'cache/cache_quickjump_'.$pun_user['g_id'].'.php';
        if (!defined('PUN_QJ_LOADED'))
        {
            require_once PUN_ROOT.'include/cache.php';
            generate_quickjump_cache($pun_user['g_id']);
            require PUN_ROOT.'cache/cache_quickjump_'.$pun_user['g_id'].'.php';
        }
    }

Re: Jump To: How can I add a link next to this text

thanks guardian34.  Unfortunately no matter what I do I can't get it on the same line as the "jump to" is there no way to do this?

Rob Ludlow 
www.Nifty-Stuff.com - Repository of all Stuff Nifty!
www.reviewum.com - Professor Ratings + Teacher Reviews

6 (edited by guardian34 2007-01-17 19:49)

Re: Jump To: How can I add a link next to this text

Try this? note that "or" will appear for all languages. If this matters to you, then you might be able to edit the language files instead of the cache.php file?


Open: include/cache.php

Find:

        $output .= "\t\t\t\t".'<form id="qjump" method="get" action="viewforum.php">'."\n\t\t\t\t\t".'<div><label><?php echo $lang_common[\'Jump to\'] ?>'."\n\n\t\t\t\t\t".'<br /><select name="id" onchange="window.location=(\'viewforum.php?id=\'+this.options[this.selectedIndex].value)">'."\n";

Replace with:

        $output .= "\t\t\t\t".'<form id="qjump" method="get" action="viewforum.php">'."\n\t\t\t\t\t".'<div><label><?php echo $lang_common[\'Jump to\'].\' <a href="search.php?action=show_24h">\'.strtolower($lang_common[\'Show recent posts\']).\'</a> or:\' ?>'."\n\n\t\t\t\t\t".'<br /><select name="id" onchange="window.location=(\'viewforum.php?id=\'+this.options[this.selectedIndex].value)">'."\n";

Edit: on second thought, you may want to change the wording for the link, so it would probably be better to change the common.php files for any lanaguages you use, instead of changing the above function?