51

(2 replies, posted in PunBB 1.2 discussion)

yeah i thought that's what it meant it's just when i tried to do this using the Additional menu items via the admin panel entering these

0 = <a href="http://www.christopherpowell.co.uk/">Home</a>
1 = <a href="http://www.christopher-powell.co.uk/forum/forums.php">Forums</a>

the links were duplicating across the whole bar.

just put them like this

0 = <a href="http://www.christopherpowell.co.uk/">Home</a>
1 = <a href="http://www.christopher-powell.co.uk/forum/forums.php">Forums</a>

into notepad then pasted the code back into the "Additional menu items" section again though and it worked.

cheers guardian34

well i managed to change the limit from 25 to 15 ok and i also figured out that for me to show 15 instead of 25 in this section

Please enter a username between 2 and 15 characters long

i had to go into into lang/english/register.php

dam, i'm doing well heh wink

Job done though yeah. Thanks again Smartys!

53

(2 replies, posted in PunBB 1.2 discussion)

Additional menu items

By entering HTML hyperlinks into this textbox, any number of items can be added to the navigation menu at the top of all pages. The format for adding new links is X = <a href="URL">LINK</a> where X is the position at which the link should be inserted (e.g. 0 to insert at the beginning and 2 to insert after "User list"). Separate entries with a linebreak.

well? hmm

i guess some kind of image verification mod would be the best option...

link anyone pls?

forgot the link http://www.christopher-powell.co.uk/forum/index.php

forums is in the navigation box but not the in the header menu

its not. The first time install punbb it"forums" appeared in the menu but now it dosn't. Why?

I would add this myself using the Additional menu items but i don't want to mess any coding up. "forums" should be in there by default...

thanks for covering the above mentioned up Smartys wink

i will look into why i can't do a complete restore properly more next time should i come in to problems again

look forward to 1.3. wink

edit: btw no probs about moving thread...  *pfft punbb newbies aye big_smile

Dam, i missed that. Me = D'oh lol

I'm crap at php stuff etc... i give you 2 weeks until you start getting annoyed with me HAHA! big_smile

This needs updating as i went through the upgrade process very carefully and took my time integrating punportal in to punbb forums but found several problems. One is that "forums" was missing from menu bar on both the (portal / forum) index pages. Also when clicking on the profile in the portals Forum Statistics you just get a 404 error. I can see that if you hover over the link that the profile number is missing. What you have to do to correct it is a lot of messing about (i know this as Smartys helped me out with this in another thread of mine).

Sort it out guys tongue

Anyway, why cant people just download and install the forum/portal software all in one. It would save all the hassle of having to spend around 20 minutes integrating the dam thing then. Surely it?s easy enough for the developers to put together?

Also, when ever i mess up a mod (say one I haven?t used before) i have to completely start from fresh by restoring all the files from HD to my host and restoring the SQL file using phpmyadmin, but even when doing that your left with a load more errors.

This punbb is becoming a nightmare for me now lol

Shall i just come back in another 2 years time when its finished lol

And finally, why is that once i've installed the punbb forum software and check the user list i can see "Chris Powell" id=2  (profile) if i'm the admin of the board and i've just set it up shouldn't i be id=1 hmm

It seems to me like there?s a secret user using id1 for testing purposes lmao *tut tut lol tongue

hmmm, i now see this

Maintenance
The forums are temporarily down for maintenance. Please try again in a few minutes.

/Administrator

yeah i want to lower the charater limit. i will try it in a bit cheers as soon as i can access my admin panel. i went into mateince mode when i refreshed the page i got a 404 error i guess i must have been logged out = i can't access the admin panel now

i take back what i said about punbb being easier than phpbb now lol

smartys? what can i do to get access again sad

You know like set a limit for the amount of characters used in a username... like when registering heh :beer:

used when registering for visiitors? if so how?

Smartys wrote:
Smartys wrote:

Enable debug mode, paste the complete error here

how do i enable debug mode?

hey

i have the same problem so thought id post here instead

in the punbb portal i checked the fetch recent topics

but then got this error message

An error was encountered
Error: Unable to fetch the recent topics.

i'm unable to get in admin panel again now. so can't restore the sql file and i bet even i did this through phpmyadmin it wouldn't work because when fetching posts it would have written code to a file i think (which file i don?t know)

see http://www.christopher-powell.co.uk/forum/forums.php

help

66

(21 replies, posted in PunBB 1.2 troubleshooting)

fixed on both sites now. thanks smartys.

cheers guys wink

67

(21 replies, posted in PunBB 1.2 troubleshooting)

c'mon punbb staff... the support response times have been quick until now. don't stop, keep it up heh wink

68

(21 replies, posted in PunBB 1.2 troubleshooting)

Hmm

for some some reason when clicking on the link from the index page (portal) its trying to load the profile of root folder /htdocs it should be http://www.djpassions.com/forums/profile.php?id=4 which works fine as i can see by clicking on the Newest registered user: link from the forums page http://www.djpassions.com/forums/forums.php (see Newest registered user: at the bottom of the page)

how do i correct this

69

(21 replies, posted in PunBB 1.2 troubleshooting)

Dammit

I just noticed i didn't add it exactly right yeah. just uploaded the page with code corrected (or at least i thought it was) but the dam thing still isn?t loading up

Can you edit the header for me pls smartys and send it back to me. You could use yousendit.com or something? I think there is a problem with coding elsewhere too... maybe i didn't update the portal mod correctly. shame though because everything else works fine.

I have also got the forum on my personal website aswell http://www.christopher-powell.co.uk/ but have the exact same problem on that forum too sad

70

(21 replies, posted in PunBB 1.2 troubleshooting)

i only noticed the problem lastnight

<?php
/***********************************************************************

  Copyright (C) 2002-2005  Rickard Andersson (rickard@punbb.org)

  This file is part of PunBB.

  PunBB 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.

  PunBB is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  MA  02111-1307  USA

************************************************************************/


// Make sure no one attempts to run this script "directly"
if (!defined('PUN'))
    exit;

// Send no-cache headers
header('Expires: Thu, 21 Jul 1977 07:30:00 GMT');    // When yours truly first set eyes on this world! :)
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');        // For HTTP/1.0 compability


// Load the template
if (defined('PUN_ADMIN_CONSOLE'))
    $tpl_main = file_get_contents(PUN_ROOT.'include/template/admin.tpl');
else if (defined('PUN_PORTAL'))
    $tpl_main = file_get_contents(PUN_ROOT.'include/template/PunPortal.tpl');
else if (defined('PUN_HELP'))
    $tpl_main = file_get_contents(PUN_ROOT.'include/template/help.tpl');
else
    $tpl_main = file_get_contents(PUN_ROOT.'include/template/main.tpl');


// START SUBST - <pun_content_direction>
$tpl_main = str_replace('<pun_content_direction>', $lang_common['lang_direction'], $tpl_main);
// END SUBST - <pun_content_direction>


// START SUBST - <pun_char_encoding>
$tpl_main = str_replace('<pun_char_encoding>', $lang_common['lang_encoding'], $tpl_main);
// END SUBST - <pun_char_encoding>


// START SUBST - <pun_head>
ob_start();

// Is this a page that we want search index spiders to index?
if (!defined('PUN_ALLOW_INDEX'))
    echo '<meta name="ROBOTS" content="NOINDEX, FOLLOW" />'."\n";

?>
<title><?php echo $page_title ?></title>
<link rel="stylesheet" type="text/css" href="style/<?php echo $pun_user['style'].'.css' ?>" />
<?php

if (defined('PUN_ADMIN_CONSOLE'))
    echo '<link rel="stylesheet" type="text/css" href="style/imports/base_admin.css" />'."\n";

if (isset($required_fields))
{
    // Output JavaScript to validate form (make sure required fields are filled out)

?>
<script type="text/javascript">
<!--
function process_form(the_form)
{
    var element_names = new Object()
<?php

    // Output a JavaScript array with localised field names
    while (list($elem_orig, $elem_trans) = @each($required_fields))
        echo "\t".'element_names["'.$elem_orig.'"] = "'.addslashes(str_replace(' ', ' ', $elem_trans)).'"'."\n";

?>

    if (document.all || document.getElementById)
    {
        for (i = 0; i < the_form.length; ++i)
        {
            var elem = the_form.elements[i]
            if (elem.name && elem.name.substring(0, 4) == "req_")
            {
                if (elem.type && (elem.type=="text" || elem.type=="textarea" || elem.type=="password" || elem.type=="file") && elem.value=='')
                {
                    alert("\"" + element_names[elem.name] + "\" <?php echo $lang_common['required field'] ?>")
                    elem.focus()
                    return false
                }
            }
        }
    }

    return true
}
// -->
</script>
<?php

}

$user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? strtolower($_SERVER['HTTP_USER_AGENT']) : '';
if (strpos($user_agent, 'msie') !== false && strpos($user_agent, 'windows') !== false && strpos($user_agent, 'opera') === false)
    echo '<script type="text/javascript" src="style/imports/minmax.js"></script>';

$tpl_temp = trim(ob_get_contents());
$tpl_main = str_replace('<pun_head>', $tpl_temp, $tpl_main);
ob_end_clean();
// END SUBST - <pun_head>


// START SUBST - <body>
if (isset($focus_element))
{
    $tpl_main = str_replace('<body onload="', '<body onload="document.getElementById(\''.$focus_element[0].'\').'.$focus_element[1].'.focus();', $tpl_main);
    $tpl_main = str_replace('<body>', '<body onload="document.getElementById(\''.$focus_element[0].'\').'.$focus_element[1].'.focus()">', $tpl_main);
}
// END SUBST - <body>


// START SUBST - <pun_page>
$tpl_main = str_replace('<pun_page>', htmlspecialchars(basename($_SERVER['PHP_SELF'], '.php')), $tpl_main);
// END SUBST - <pun_title>


// START SUBST - <pun_title>
$tpl_main = str_replace('<pun_title>', '<h1><span>'.pun_htmlspecialchars($pun_config['o_board_title']).'</span></h1>', $tpl_main);
// END SUBST - <pun_title>


// START SUBST - <pun_desc>
$tpl_main = str_replace('<pun_desc>', '<p><span>'.$pun_config['o_board_desc'].'</span></p>', $tpl_main);
// END SUBST - <pun_desc>


// START SUBST - <pun_navlinks>
$tpl_main = str_replace('<pun_navlinks>','<div id="brdmenu" class="inbox">'."\n\t\t\t". generate_navlinks()."\n\t\t".'</div>', $tpl_main);
// END SUBST - <pun_navlinks>
//PunPortal Language File//
require PUN_ROOT.'lang/'.$pun_user['language'].'/portal.php';
//PunPortal Language File//

// START SUBST - <pun_portal_title>
$tpl_main = str_replace('<pun_portal_title>', '<h1><span>'.pun_htmlspecialchars($pun_config['o_portal_title']).'</span></h1>', $tpl_main);
// END SUBST - <pun_portal_title>

// START SUBST - <pun_portal_desc>
$tpl_main = str_replace('<pun_portal_desc>', '<p><span>'.$pun_config['o_portal_desc'].'</span></p>', $tpl_main);
// END SUBST - <pun_portal_desc>

// START SUBST - <pun_portal_navigation>

if ($pun_config['o_portal_navigation'] == '1')
{
    $tpl_main = str_replace('<pun_portal_navigation>','<div id="portalnavigation" class="block"><h2><span>'.$lang_portal['Navigation'].'</span></h2><div class="box"><div class="inbox">'."\n\t\t\t".generate_pun_portal_sidelinks()."\n\t\t".'</div></div></div>', $tpl_main);
}
else 
    $tpl_main = str_replace('<pun_portal_navigation>','', $tpl_main);
// END SUBST - <pun_portal_navigation>

// START SUBST - <pun_portal_login>

if ($pun_user['g_id'] == PUN_GUEST && $pun_config['o_portal_login'] == '1')
{
    ob_start();
    
require_once PUN_ROOT.'lang/'.$pun_user['language'].'/login.php';
    
$redirect_url = (isset($_SERVER['HTTP_REFERER']) && preg_match('#^'.preg_quote($pun_config['o_base_url']).'/(.*?)\.php#i', $_SERVER['HTTP_REFERER'])) ? htmlspecialchars($_SERVER['HTTP_REFERER']) : 'forums.php';

$required_fields = array('req_username' => $lang_common['Username'], 'req_password' => $lang_common['Password']);
$focus_element = array('login', 'req_username');
?>
<div class="block">
    <h2><span><?php echo $lang_portal['Login'] ?></span></h2>
    <div class="box">
        <form id="portallogin" method="post" action="login.php?action=in" onsubmit="return process_form(this)">
            <div class="inform">
                <input type="hidden" name="form_sent" value="1" />
                            <input type="hidden" name="redirect_url" value="<?php echo $redirect_url ?>" />
                            <label><strong><?php echo $lang_portal['Username'] ?></strong><br /><input type="text" name="req_username" size="18" maxlength="18" tabindex="1" /><br /></label>
                            <label><strong><?php echo $lang_portal['Password'] ?></strong><br /><input type="password" name="req_password" size="17" maxlength="17" tabindex="2" /><br /></label>
                            
                            <p><a href="register.php" tabindex="4"><?php echo $lang_login['Not registered'] ?><br /></a>
                            <a href="login.php?action=forget" tabindex="5"><?php echo $lang_login['Forgotten pass'] ?></a><br /></p>
                        <p><input type="submit" name="login" value="<?php echo $lang_portal['Login'] ?>" tabindex="3" /></p>
            </div>
        </form>
    </div>
</div>
<?php

    $tpl_temp = trim(ob_get_contents());
    $tpl_main = str_replace('<pun_portal_login>', $tpl_temp, $tpl_main);
    ob_end_clean();
}
else
    $tpl_main = str_replace('<pun_portal_login>', '', $tpl_main);
// END SUBST - <pun_portal_login>

// START SUBST - <pun_portal_recent_topics>
if ($pun_config['o_portal_recent_topics'] == '1')
{
ob_start();

$topicslimit = $pun_config['o_portal_topics_limit'];
?>
<div class="block" id="portalrecenttopics">
<h2><span><?php echo $lang_portal['Recent Topics'] ?></span></h2>
    <div class="box">
        <div class="inbox">
        <?
        $result = $db->query('SELECT id, subject, forum_id FROM '.$db->prefix.'topics WHERE forum_id <> '.$pun_config['o_portal_news_id'].' ORDER BY id DESC LIMIT ' .$topicslimit) or error('Unable to fetch the recent topics', __FILE__, __LINE__, $db->error());

        while($cur_topics = $db->fetch_assoc($result))
        {
            $recent_topics = '<ul><li><a href="'.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topics['id'].'">'.$cur_topics['subject'].'</a></li></ul>';
        
            echo $recent_topics;
        }
    ?>
        </div>
    </div>
</div>
<?
    $tpl_temp = trim(ob_get_contents());
    $tpl_main = str_replace('<pun_portal_recent_topics>', $tpl_temp, $tpl_main);
    ob_end_clean();
}
else
    $tpl_main = str_replace('<pun_portal_recent_topics>', '', $tpl_main);
// END SUBST - <pun_portal_recent_topics>

// START SUBST - <pun_portal_recent_posts>
if ($pun_config['o_portal_recent_posts'] == '1')
{
    ob_start();

    $postslimit = $pun_config['o_portal_posts_limit'];
    
    
?>
<div class="block" id="portalrecentposts">
<h2><span><?php echo $lang_portal['Recent Posts'] ?></span></h2>
    <div class="box">
        <div class="inbox">
        
    <?
        $result = $db->query('SELECT p.id, p.posted, t.last_post, t.subject, t.forum_id FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'topics AS t WHERE p.posted=t.last_post AND t.forum_id <> '.$pun_config['o_portal_news_id'].' ORDER BY p.posted DESC LIMIT ' .$postslimit) or error('Unable to fetch the recent posts', __FILE__, __LINE__, $db->error());

        while($cur_posts = $db->fetch_assoc($result))
        {
            $recent_posts = '<ul><li><a href="'.$pun_config['o_base_url'].'/viewtopic.php?pid='.$cur_posts['id'].'#p'.$cur_posts['id'].'">'.$cur_posts['subject'].'</a></li></ul>';
        
            echo $recent_posts;
        }
    ?>
        </div>
    </div>
</div>
<?
    $tpl_temp = trim(ob_get_contents());
    $tpl_main = str_replace('<pun_portal_recent_posts>', $tpl_temp, $tpl_main);
    ob_end_clean();
}
else
    $tpl_main = str_replace('<pun_portal_recent_posts>', '', $tpl_main);
// END SUBST - <pun_portal_recent_posts>

// START SUBST - <pun_portal_top_posters>
if ($pun_config['o_portal_top_posters'] == '1')
{
    ob_start();

    $posterslimit = $pun_config['o_portal_posters_limit'];
if ($posterslimit > '1')
{    
?>
<div class="block" id="portaltopposters">
<h2><span>Top <? echo $posterslimit ?> Posters</span></h2>
<div class="box">
        <div class="inbox">
<?
}
else
{
?>
<div class="block" id="portaltopposters">
<h2><span><?php echo $lang_portal['Top Poster'] ?></span></h2>
<div class="box">
        <div class="inbox">
    <?
}
    $result = $db->query('SELECT id, username, num_posts FROM '.$db->prefix.'users ORDER BY num_posts DESC LIMIT ' .$posterslimit) or error('Unable to fetch the recent topics', __FILE__, __LINE__, $db->error());
        
        while($cur_posters = $db->fetch_assoc($result))
        {
            $top_posters = '<ul><li><a href="'.$pun_config['o_base_url'].'/profile.php?id='.$cur_posters['id'].'">'.$cur_posters['username'].'</a> ( '.$cur_posters['num_posts'].' )</li></ul>';
        
            echo $top_posters;
        }
    ?>
        </div>
    </div>
</div>
<?
    $tpl_temp = trim(ob_get_contents());
    $tpl_main = str_replace('<pun_portal_top_posters>', $tpl_temp, $tpl_main);
    ob_end_clean();
}
else
    $tpl_main = str_replace('<pun_portal_top_posters>', '', $tpl_main);
// END SUBST - <pun_portal_top_posters>



// START SUBST - <pun_portal_forum_stats>
if ($pun_config['o_portal_forum_stats'] == '1')
{
    ob_start();

$result = $db->query('SELECT COUNT(id)-1 FROM '.$db->prefix.'users') or error('Unable to fetch total user count', __FILE__, __LINE__, $db->error());
$stats['total_users'] = $db->result($result);

$result = $db->query('SELECT id, username FROM '.$db->prefix.'users ORDER BY registered DESC LIMIT 1') or error('Unable to fetch newest registered user', __FILE__, __LINE__, $db->error());
$stats['last_user'] = $db->fetch_assoc($result);

$result = $db->query('SELECT SUM(num_topics), SUM(num_posts) FROM '.$db->prefix.'forums') or error('Unable to fetch topic/post count', __FILE__, __LINE__, $db->error());
list($stats['total_topics'], $stats['total_posts']) = $db->fetch_row($result);
}    

$num_guests = 0;
$users = array();
$result = $db->query('SELECT user_id, ident FROM '.$db->prefix.'online WHERE idle=0 ORDER BY ident', true) or error('Unable to fetch online list', __FILE__, __LINE__, $db->error());

while ($pun_user_online = $db->fetch_assoc($result))
    {
        if ($pun_user_online['user_id'] > 1)
            $users[] = "\n\t\t\t\t".'<dd><a href="'.$pun_config['o_base_url'].'/profile.php?id='.$pun_user_online['user_id'].'">'.pun_htmlspecialchars($pun_user_online['ident']).'</a>';
        else
            ++$num_guests;
    }
    $num_users = count($users);
    
if ($pun_config['o_portal_forum_stats'] == '1')
{
?>
<div class="block" id="portalforumstats">
<h2><span><?php echo $lang_portal['Forum Statistics'] ?></span></h2>
    <div class="box">
        <div class="inbox">
        <dl>
        <dt></dt>
            <dd><?php echo $lang_portal['Number of users'] ?>: <strong><?php echo $stats['total_users'] ?></strong></dd>
            <dd><?php echo $lang_portal['Number of topics'] ?>: <strong><?php echo $stats['total_topics'] ?></strong></dd>
            <dd><?php echo $lang_portal['Number of posts'] ?>: <strong><?php echo $stats['total_posts'] ?></strong></dd>
            <dd><?php echo $lang_portal['Newest user'] ?>: <a href="<? $pun_config['o_base_url'] ?>/profile.php?id=<? $stats['last_user']['id'] ?>"><?php echo  pun_htmlspecialchars($stats['last_user']['username']) ?></a></dd></dl><dl><?
            
            echo "\t\t\t\t".'<dd>'.$lang_portal['Users online'].': <strong>'.$num_users.'</strong></dd>'."\n\t\t\t\t".'<dd>'.$lang_portal['Guests online'].': <strong>'.$num_guests.'</strong></dd>'."\n\t\t\t".'</dl>'."\n"; ?>
        </div>
    </div>
</div>
<?
    $tpl_temp = trim(ob_get_contents());
    $tpl_main = str_replace('<pun_portal_forum_stats>', $tpl_temp, $tpl_main);
    ob_end_clean();
}
else
    $tpl_main = str_replace('<pun_portal_forum_stats>', '', $tpl_main);
// END SUBST - <pun_portal_forum_stats>

// START SUBST - <pun_portal_users_online>
if ($pun_config['o_portal_online'] == '1' && $num_users > 0)
{
    ob_start();

?>
<div class="block" id="portalusersonline">
<h2><span><?php echo $lang_portal['Users online'] ?></span></h2>
    <div class="box">
        <div class="inbox">
        <?php echo "\t\t\t".'<dl id="onlinelist" class= "clearb">'."\n\t\t\t\t".'<dt><strong>'.$lang_portal['Online'].': </strong></dt>'."\t\t\t\t".implode(',</dd> ', $users).'</dd>'."\n\t\t\t".'</dl>'."\n"; ?>
        </div>
    </div>
</div>
<?
    $tpl_temp = trim(ob_get_contents());
    $tpl_main = str_replace('<pun_portal_users_online>', $tpl_temp, $tpl_main);
    ob_end_clean();
}
else
    $tpl_main = str_replace('<pun_portal_users_online>', '', $tpl_main);
// END SUBST - <pun_portal_users_online>

// START SUBST - <pun_portal_forum_search>
if ($pun_config['o_portal_forum_search'] == '1')
{
    ob_start();
    
require_once PUN_ROOT.'lang/'.$pun_user['language'].'/search.php';
?>
<div class="block" id="portalforumsearch">
<h2><span><?php echo $lang_portal['Forum Search'] ?></span></h2>
        <div class="box">
            <form id="search" method="get" action="<?php echo $pun_config['o_base_url'] ?>/search.php">
            <div class="inform">
            <input type="hidden" name="action" value="search" />
            <input style="margin-bottom: 3px" type="text" name="keywords" size="25" maxlength="100" />
            <?php echo $lang_search['Show as'] ?><br />
            <select style="margin-bottom: 3px" name="show_as">
            <option value="topics"><?php echo $lang_search['Show as topics'] ?></option>
            <option value="posts"><?php echo $lang_search['Show as posts'] ?></option>
            </select><br />
            <input type="submit" name="search" value="<?php echo $lang_common['Submit'] ?>" accesskey="s" />
            </div>
        </form>
    <a href="<? echo $pun_config['o_base_url'] ?>/search.php">Advanced Search</a>
    </div>
</div>
<?
    $tpl_temp = trim(ob_get_contents());
    $tpl_main = str_replace('<pun_portal_forum_search>', $tpl_temp, $tpl_main);
    ob_end_clean();
}
else
    $tpl_main = str_replace('<pun_portal_forum_search>', '', $tpl_main);
// END SUBST - <pun_portal_forum_search>

// START SUBST - <pun_portal_ads>
if($pun_config['o_portal_advertisement'] == '1')
{
    ob_start();
    
$advertisement = $pun_config['o_portal_ads'];
?>
<div class="block" id="portalads">
<h2><span><?php echo $lang_portal['Ads'] ?></span></h2>
    <div class="box">
        <div class="inbox">
        <div><?php echo $advertisement ?></div>
        </div>
    </div>
</div>
<?
    $tpl_temp = trim(ob_get_contents());
    $tpl_main = str_replace('<pun_portal_ads>', $tpl_temp, $tpl_main);
    ob_end_clean();
}
else
    $tpl_main = str_replace('<pun_portal_ads>', '', $tpl_main);
// END SUBST - <pun_portal_ads>


// START SUBST - <pun_status>
if ($pun_user['is_guest'])
    $tpl_temp = '<div id="brdwelcome" class="inbox">'."\n\t\t\t".'<p>'.$lang_common['Not logged in'].'</p>'."\n\t\t".'</div>';
else
{
    $tpl_temp = '<div id="brdwelcome" class="inbox">'."\n\t\t\t".'<ul class="conl">'."\n\t\t\t\t".'<li>'.$lang_common['Logged in as'].' <strong>'.pun_htmlspecialchars($pun_user['username']).'</strong></li>'."\n\t\t\t\t".'<li>'.$lang_common['Last visit'].': '.format_time($pun_user['last_visit']).'</li>';

    if ($pun_user['g_id'] < PUN_GUEST)
    {
        $result_header = $db->query('SELECT COUNT(id) FROM '.$db->prefix.'reports WHERE zapped IS NULL') or error('Unable to fetch reports info', __FILE__, __LINE__, $db->error());

        if ($db->result($result_header))
            $tpl_temp .= "\n\t\t\t\t".'<li class="reportlink"><strong><a href="admin_reports.php">There are new reports</a></strong></li>';

        if ($pun_config['o_maintenance'] == '1')
            $tpl_temp .= "\n\t\t\t\t".'<li class="maintenancelink"><strong><a href="admin_options.php#maintenance">Maintenance mode is enabled!</a></strong></li>';
    }

    if (in_array(basename($_SERVER['PHP_SELF']), array('forums.php', 'search.php')))
        $tpl_temp .= "\n\t\t\t".'</ul>'."\n\t\t\t".'<ul class="conr">'."\n\t\t\t\t".'<li><a href="search.php?action=show_new">'.$lang_common['Show new posts'].'</a></li>'."\n\t\t\t\t".'<li><a href="misc.php?action=markread">'.$lang_common['Mark all as read'].'</a></li>'."\n\t\t\t".'</ul>'."\n\t\t\t".'<div class="clearer"></div>'."\n\t\t".'</div>';
    else
        $tpl_temp .= "\n\t\t\t".'</ul>'."\n\t\t\t".'<div class="clearer"></div>'."\n\t\t".'</div>';
}

$tpl_main = str_replace('<pun_status>', $tpl_temp, $tpl_main);
// END SUBST - <pun_status>


// START SUBST - <pun_announcement>
if ($pun_config['o_announcement'] == '1')
{
    ob_start();

?>
<div id="announce" class="block">
    <h2><span><?php echo $lang_common['Announcement'] ?></span></h2>
    <div class="box">
        <div class="inbox">
            <div><?php echo $pun_config['o_announcement_message'] ?></div>
        </div>
    </div>
</div>
<?php

    $tpl_temp = trim(ob_get_contents());
    $tpl_main = str_replace('<pun_announcement>', $tpl_temp, $tpl_main);
    ob_end_clean();
}
else
    $tpl_main = str_replace('<pun_announcement>', '', $tpl_main);
// END SUBST - <pun_announcement>


// START SUBST - <pun_main>
ob_start();


define('PUN_HEADER', 1);

cheers smartys

71

(21 replies, posted in PunBB 1.2 troubleshooting)

sorry, i'm on about the index page (portal) not the forums page

72

(21 replies, posted in PunBB 1.2 troubleshooting)

not for me

Forum Statistics
Number of users: 2
Number of topics: 0
Number of posts: 0
Newest user: budtezdorovy <<< --- try it for yourself
Users online: 0
Guests online: 1

73

(21 replies, posted in PunBB 1.2 troubleshooting)

sweet heh

but i think i buggered it up even more now

i've got           


<dd><?php echo $lang_portal['Number of users'] ?>: <strong><?php echo $stats['total_users'] ?></strong></dd>
<dd><?php echo $lang_portal['Number of topics'] ?>: <strong><?php echo $stats['total_topics'] ?></strong></dd>
dd><?php echo $lang_portal['Number of posts'] ?>: <strong><?php echo $stats['total_posts'] ?></strong></dd>
<dd><?php echo $lang_portal['Newest user'] ?>: <a href="<? $pun_config['o_base_url'] ?>/profile.php?id=<?php echo $stats['last_user']['id'] ?>"><?php echo  pun_htmlspecialchars($stats['last_user']['username']) ?></a></dd></dl><dl><?

what should it be?

74

(21 replies, posted in PunBB 1.2 troubleshooting)

not sure how you got that, where do i change this code though

cheers

chris

75

(21 replies, posted in PunBB 1.2 troubleshooting)

I?ve just noticed that the Newest User link which is the Forum Statistics ox (on the index page) doesn't work when clicking on it http://www.djpassions.com/forums/

What?s up that? Apart from that everything else seems to be working fine.

chris