Thank you very much Smartys. I tried it but it didn't work so I began playing around with it and came up with the following which now works.

$result = $db->query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.forum_desc, f.redirect_url, f.moderators, f.num_topics, f.num_posts, f.last_post, f.last_post_id, f.last_poster, p.poster_id as last_poster_id FROM '.$db->prefix.'categories AS c INNER JOIN '.$db->prefix.'forums AS f ON c.id=f.cat_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') LEFT JOIN '.$db->prefix.'posts AS p ON (p.id=f.last_post_id) WHERE fp.read_forum IS NULL OR fp.read_forum=1 ORDER BY c.disp_position, c.id, f.disp_position') or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error());

I had to change INNER JOIN to LEFT JOIN towards the end of the code and  I also had to remove "true" from that line as well because if left in I can only see 2 of my forums. The same thing happened when I left INNER JOIN there as well. Anyway, it works great now.

Thanks again
Bingiman

Can someone please assist me with this?

If you're interested in using a different set of smilies for each of your themes, then follow the instructions below:

NOTE: You *MUST* be using Rickard's Easy_BBcode MOD.

Step 1:
Open include/parser.php and look for the following line:

global $smiley_text, $smiley_img;

replace with:

global $smiley_text, $smiley_img, $pun_user;

look for:

        $text = preg_replace("#(?<=.\W|\W.|^\W)".preg_quote($smiley_text[$i], '#')."(?=.\W|\W.|\W$)#m", '$1<img src="img/smilies/'.$smiley_img[$i].'" width="15" height="15" alt="'.substr($smiley_img[$i], 0, strrpos($smiley_img[$i], '.')).'" />$2', $text);

replace with:

        $text = preg_replace("#(?<=.\W|\W.|^\W)".preg_quote($smiley_text[$i], '#')."(?=.\W|\W.|\W$)#m", '$1<img src="img/'.$pun_user['style'].'/smilies/'.$smiley_img[$i].'" alt="'.substr($smiley_img[$i], 0, strrpos($smiley_img[$i], '.')).'" />$2', $text);

Step 2:
Open mod_easy_bbcode.php and look for:

        echo "\t\t\t\t\t\t\t".'<a href="javascript:insert_text(\''.$smiley_text[$i].'\', \'\');"><img src="img/smilies/'.$smiley_img[$i].'" width="15" height="15" alt="'.$smiley_text[$i].'" /></a>'."\n";

replace with:

            echo "\t\t\t\t\t\t\t".'<a style="cursor: pointer;" onclick="insert_text(\''.$smiley_text[$i].'\', \'\');"><img src="img/'.$pun_user['style'].'/smilies/'.$smiley_img[$i].'" title="'.$smiley_img[$i].'" alt="'.$smiley_text[$i].'" /></a>'."\n";

Step 3:

Create a new folder in your /img/THEME/ directory and call it smilies. Simply copy your new smilies in there that suits your theme and away you go.

Something to keep in mind: Remember that the smiley names are all listed in parser.php so therefor all your smiley image names must be the same as listed in there.

hmm...Can you do it? I would really appreciate it. please..

Bingiman

*bump*

Well, I figured I would share my little secret with you guys. I know many people would like to make their logo clickable so here goes:

Step 1
open your style_cs.css and add at the bottom:

/* Lets make the logo clickable */

.link_logo
{
    position: relative; 
    width: 100%; 
    top: 5px; 
    float: left; 
    height: 0px; /* IE is annoying */
    left: 5px; 
    right: auto;
}

.logo_img
{
    border: 0; 
    width: 250px; 
    height: 90px;
}

Step 2
open include/template/main.tpl and add after

<div id="punwrap">

Step 3

<div class="link_logo"><a href="index.php"><img class="logo_img" alt="Your website name here" title="Your website name here" src="../img/blank.gif" /></a></div>

Step 4
To make an image called blank.gif. Open up your favorite graphics program and create a 1PX x 1PX image and save it to your punBB root IMG folder.

- Now, to set the height of the area where you want to make clickable you will need to play with the classes. The first one being .link_logo. You need to set the Top height in this area. Next is the  .logo_img class. You will need to set the image dimensions in this area.

TIP: In order to see what you're working with. Change the border: 0; to 1 just temporarily so that you can see exactly where the clickable area will be postioned. Once you are satisfied with it you can then set it back to: border: 1;.

Trust me, it is very simple to do and it works. You can also do the same thing for the admin.tpl file if you so desire.

Good luck!
Bingiman

Can someone please help me with this.

Thanks

I am trying to figure out what to add in order to make the user name to the right under Last Post clickable to their profile. I've tried but I suck at this. Any help would be greatly appreciated.

Thanks
Bingiman

Please do.

Cheers!
Bingiman

460

(2 replies, posted in General discussion)

I actually figured it out.

    <div id="searchbox">
      <form id="search2" method="get" action="search.php" style="margin: 0pt;">
        <p>
        <a href="search.php">
        <img src="../../img/search.gif" style="margin: 0pt 1ex;" alt align="middle" width="16" height="25" /></a>
        <input type="hidden" name="action" value="search" /><input type="hidden" name="show_as" value="topics" /><input type="text" name="keywords" maxlength="100" onfocus="this.value="" " value="Search..."/>
        </p>
      </form>
    </div>

461

(2 replies, posted in General discussion)

I have added a simple search to the header of my theme but I want it so that the search result basically search just the topics for the results. Here is my code below. Maybe someone call tell me what I need to add.

    <div id="searchbox">
      <form id="search2" method="get" action="search.php" style="margin: 0pt;">
        <p>
        <a href="search.php">
        <img src="../../img/search.gif" style="margin: 0pt 1ex;" alt align="middle" width="16" height="25" /></a>
        <input name="search"  value="Search..." onfocus="this.value = '';" onblur="if(this.value=='') this.value='Search...';" style="width: 170px;" type="text" size="20" />
        </p>
      </form>
    </div>

Thanks for the help
Bingiman

462

(124 replies, posted in News)

My prediction was at closing. My opinion preceded that. big_smile

Bingiman

463

(2 replies, posted in General discussion)

Thank you. It worked great.

464

(2 replies, posted in General discussion)

I am trying to keep the borders around my forum area but I want to remove the border around the brdwelcome area. I can't seem to find a solution to it. Any ideas?

Thanks
Bingiman.

465

(124 replies, posted in News)

In general I think we should all withhold judgments until we see a decline in productivity of the team or the viability of the product.  So far things look good and I'm seeing more progress on 1.3 than I've seen before.

It is an Opinion and not a judgment. There is a big difference between the two my friend.

Bingiman

466

(124 replies, posted in News)

@BlackJack - Dude, that theme on your site rocks! Just had to tell you that. big_smile

467

(124 replies, posted in News)

Apart from sponsoring the project, they wanted to later down the line offer paid-for web services in relation to PunBB (for example commercial grade PunBB hosting).

Whats' next? A special punBB for paying members. Now don't crucify me here people, but I think we are all entitled to our own opinions. I personally don't think anyone gains from this but the developers and those closely involved in punBB. Although you all have good intentions here for the project, I do think that you've (to quote a famous saying) "jumped the shark". Why does punBB need to rely on someone else funding the project. There are many great forums as well as CMS's out there that rely solely on advertising and they manage to still keep afloat. I think the company that is now involved has only one intention and that is to make money. They can never put the heart and sole into the project as you guys have for so long. Anyway, my prediction for punBB is that a lot of people will look for an alternative forum script. Lets see if I am right.

just my 2 cents.
Bingiman

468

(2 replies, posted in General discussion)

Sweet!

This is what I did based on your instructions:

functions.php now include:

//
// Generate the "navigator" that appears at the top of every page (Sidelinks Only)
//
function generate_sidelinks()
{
    global $pun_config, $lang_common, $pun_user;

    // Index and Userlist should always be displayed
    $links[] = '<li id="sideindex"><a href="index.php">'.$lang_common['Index'].'</a>';
    $links[] = '<li id="sideuserlist"><a href="userlist.php">'.$lang_common['User list'].'</a>';


    if ($pun_config['o_rules'] == '1')
        $links[] = '<li id="siderules"><a href="misc.php?action=rules">'.$lang_common['Rules'].'</a>';

    if ($pun_user['is_guest'])
    {
        if ($pun_user['g_search'] == '1')
            $links[] = '<li id="sidesearch"><a href="search.php">'.$lang_common['Search'].'</a>';

        $links[] = '<li id="sideregister"><a href="register.php">'.$lang_common['Register'].'</a>';
        $links[] = '<li id="sidelogin"><a href="login.php">'.$lang_common['Login'].'</a>';

        $info = $lang_common['Not logged in'];
    }
    else
    {
        if ($pun_user['g_id'] > PUN_MOD)
        {
            if ($pun_user['g_search'] == '1')
                $links[] = '<li id="sidesearch"><a href="search.php">'.$lang_common['Search'].'</a>';

            $links[] = '<li id="sideprofile"><a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a>';
            //require(PUN_ROOT.'include/pms/functions_navlinks.php');
            if($pun_config['o_pms_enabled'] && $pun_user['g_pm'] == 1)
            $links[] = '<li id="sidemessage_list"><a href="message_list.php">'.$lang_common['Messages'].'</a>';

            $links[] = '<li id="sidelogout"><a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';
        }
        else
        {    
            $links[] = '<li id="sideuploadimg"><a href="uploadimg.php">'.$lang_common['Upload Image'].'</a>';
            $links[] = '<li id="sidesearch"><a href="search.php">'.$lang_common['Search'].'</a>';
            $links[] = '<li id="sideprofile"><a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a>';
            $links[] = '<li id="sideadmin"><a href="admin_index.php">'.$lang_common['Admin'].'</a>';
            if($pun_config['o_pms_enabled'] && $pun_user['g_pm'] == 1)
            $links[] = '<li id="sidemessage_list"><a href="message_list.php">'.$lang_common['Messages'].'</a>';
            $links[] = '<li id="sidelogout"><a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';
        }
    }

    // Are there any additional sidelinks we should insert into the array before imploding it?
    if ($pun_config['o_additional_sidelinks'] != '')
    {
        if (preg_match_all('#([0-9]+)\s*=\s*(.*?)\n#s', $pun_config['o_additional_sidelinks']."\n", $extra_links))
        {
            // Insert any additional links into the $links array (at the correct index)
            for ($i = 0; $i < count($extra_links[1]); ++$i)
                array_splice($links, $extra_links[1][$i], 0, array('<li id="sideextra'.($i + 1).'">'.$extra_links[2][$i]));
        }
    }

    return '<ul>'."\n\t\t\t\t".implode($lang_common['Link separator'].'</li>'."\n\t\t\t\t", $links).'</li>'."\n\t\t\t".'</ul>';
}

header.php now includes:

// START SUBST - <pun_sidelinks>
$tpl_main = str_replace('<pun_sidelinks>','<div class="inbox">'."\n\t\t\t". generate_sidelinks()."\n\t\t".'</div>', $tpl_main);
// END SUBST - <pun_sidelinks>

and main.tpl now includes:

    <div class="block">
        <h2><span>Menu</span></h2>
        <div class="box">
        <pun_sidelinks>            
        </div>
    </div>

It works GREAT! Thank you so much for your help on this.

Bingiman

469

(2 replies, posted in General discussion)

I am having some problems with this area and I don't know how to resolve it. I am using the frontpage mod with the sidelinks which is called from the main.tpl file. The problem that I am having is that id's are assigned to them so when the w3c validation sees it, it reports that the ID has already been used. This is obviously because of the fact that the punbb navlinks are in the header area already. How can I work around this to avoid the warnings.

btw: I do need to leave the id's in the functions file which is assigned to the pun links, only because my classes are already setup to use them

Thanks for any help here.
Bingiman

Looks great. I don't understand the link for PHP-Fusion though? You can also check out the PHP Fusion site at run at: http://phpfusion-themes.com and see my work.

Why is this an issue? Many smilies come from many places. I don't think VB created those smilies specifically for themselves. I am 100% sure that these images are found on many websites on the internet. As to who the original creator is, that I don't know.

472

(4 replies, posted in Programming)

I am really fond of http://www.simplephpblog.com/ - Very fast and has just what you would need for a blog.

I figured it out eventually. It had something to do with another class in my stylesheet. Thanks for your help.

Bingiman

That does not do anything.

I am trying to center an image where my nav links are but it won't validate if I use the following:

<div id="container" align="center">

If I remove the align="center" then it validates but then the image goes to the left.

Any idea how I can fix this?

Thanks
Bingiman