Visit the release topic over at PunRes to download it and find out more.

Link: http://www.punres.org/viewtopic.php?id=2622

77

(5 replies, posted in PunBB 1.2 show off)

looks fairly nice smile great job i must say

yes its definitely possible.......but most people that have designed large modifications such as the punbb gallery are waiting for PunBB 1.3 to be launched to make any major changes/updates to them.

79

(6 replies, posted in Feature requests)

elbekko wrote:

http://en.wikipedia.org/wiki/FFS

Try one of those. The 5th one to be specific.

lol........

oh yes you do.....this is mostly just adding things to header.php and include/functions.php nothing huge or anything. The plugin and portal page do the rest for you smile

what exactly do you mean when you say this? dont believe i know the difference.

forgot to mention that the coding seems to have passed validation! smile

http://validator.w3.org/check?uri=http% … Findex.php

Hello. just wanted to give you guys a heads up on my new upcoming modification. Before the initial release of it i would like people to test it using a demo site that i put together for it.

To test PunPortal 2.0 simply access the testing forum: http://www.fatal-gfx.com/forums/

Then simply login with this user and pass:

Username: admin
Password: admin

after that you are able to test punportal out by accessing the administration panel and then visiting the PunPortal plugin smile

let me know what you think of it and feel free to report any bugs.

have you moved to a new directory at all? im pretty sure that a feature can't just stop working for no apparent reason. It either has something to do with a change that you have made or a change that your host has made.

as elbekko said you need to stop creating topics and asking questions before you attempt to search.

to answer your question you may disable the ability for users to upload avatars through admin > options

86

(15 replies, posted in PunBB 1.2 troubleshooting)

no having a seperate image would be unnecessary tongue

try changing

for($pip=0; $pip<$num_pips; $pip++)

to

foreach($pip=0; $pip<$num_pips; $pip++)

87

(12 replies, posted in Feature requests)

pfft 1 click installations are a gift from god.

88

(0 replies, posted in Programming)

Well, i havent had much time if not any time at all to put forth all of my time and effort to develope punportal 2.0 yet, but i have made some progress by beginning on the main portal content such as the news, welcoming ect ect. Nothin much really.

Here is the source code so far:

<?php
define('PUN_ROOT', './');
define('PUN_QUIET_VISIT', 1);
require PUN_ROOT.'include/common.php';

$page_title = pun_htmlspecialchars($pun_config['o_board_title']) . '';
define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'header.php';
require PUN_ROOT.'include/parser.php';
 
?>
<div class="block">
<h2><span><?php echo 'Welcome to '.$pun_config['o_board_title'].''; ?></span></h2>
        <div class="box">
            <div class="inbox">
            <div><?php echo $pun_config['o_portal_welcome_message'] ?></div>
        </div>
    </div>
</div>
<?
$fid = $pun_config['o_news_id'];
$newslimit = $pun_config['o_news_limit'];

 $result = $db->query('SELECT t.id, t.subject, t.num_replies, t.num_views, t.forum_id, p.topic_id, p.poster, p.poster_id, p.message, p.hide_smilies, p.posted, f.forum_name, u.use_avatar FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'posts AS p ON t.id=p.topic_id AND p.posted=t.posted INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id WHERE t.forum_id='.$fid.' AND t.moved_to IS NULL AND f.redirect_url IS NULL ORDER BY t.posted DESC LIMIT '.$newslimit) or error('Unable to fetch the portal news', __FILE__, __LINE__, $db->error());
 
if ($db->num_rows($result))
{
    while($cur_news = $db->fetch_assoc($result))
    {
    $news_message = parse_message($cur_news['message'], $cur_news['hide_smilies']);
    $news_title = $cur_news['subject'];
    $news_poster = '<a href="'.$pun_config['o_base_url'].'/profile.php?id='.$cur_news['poster_id'].'">'.pun_htmlspecialchars($cur_news['poster']).'</a>';
    $views = $cur_news['num_views'];
    $replies = $cur_news['num_replies'];
    $news_date = date('Y-m-d', $cur_news['posted']);
    
    
        $max_character_length = $pun_config['o_max_characters'];
    
        if (pun_strlen($news_message) > $max_character_length && $pun_config['o_news_truncate'] == '1')
            $news_truncated = trim(substr($news_message, 0, ($max_character_length))).' ..........<br /><br /><a href="'.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_news['topic_id'].'">Read More!</a>';
        else
            $news_truncated = $news_message;
    
    
        echo '<div class="block" id="news"><h2><span>'.$news_title.'</span></h2><div class="box"><div class="inbox"><div>'.$news_truncated.'</div><div style="text-align: right">Posted by '.$news_poster.' | Date Posted: '.$news_date.'<div style="text-align: right">Views: '.$views.' | Replies: '.$replies.    '</div></div></div></div></div>';
    }
}

?>

            
<?php
require PUN_ROOT.'footer.php';

Please state your opinions and feel free to add to the code and share it with us smile i will be adding much more to it as time goes by.

On a side note i will probably end up taking all of the style="" code out and inserting code in to base.css to style the portal. I find it to be much more efficient for some reason. Oh and another thing is that my code is far from valid and iam terrible when it comes to validation due to being a messy coder tongue, so if any of you neat coders out there would like to validate this then by all means feel free to do so and share it smile will be glad to add it to the developement.

89

(0 replies, posted in Programming)

Well, I have been trying to set up something similar to what vbulletin has. What it is is basically showing you where you are in bold and linking back to previous pages. Its jsut like the new feature that i have noticed in 1.3 and well im curious to know if it would be better to do this through include/functions.php and set it up as an array rather than setting the entire thing up in header.php and placing variable identifications through out different files.

Here is the code that iam working with:

// START SUBST - <pun_page_links>
    ob_start();
    
$page = isset($page) ? $page : NULL;
?>
<?php
if ($page == 'viewforum' || $page == 'moderate')
{
?>
<div id="pagelinks">
<a href="<?php echo $pun_config['o_base_url'] ?>"><?php echo $pun_config['o_board_title'] ?></a>         » <?php echo '<strong>'.pun_htmlspecialchars($cur_forum['forum_name']).'</strong>'; ?>
</div>
<?
} else if ($page == 'viewtopic')
{ 
?>
<div id="pagelinks">
<a href="<?php echo $pun_config['o_base_url'] ?>"><?php echo $pun_config['o_board_title'] ?></a>     » <a href="viewforum.php?id=<?php echo $cur_topic['forum_id'] ?>"><?php echo pun_htmlspecialchars($cur_topic['forum_name']) ?></a> » <strong><?php echo pun_htmlspecialchars($cur_topic['subject']) ?></strong>
</div>
<?
} else if ($page == 'post')
{
?>
<div id="pagelinks">
<a href="<?php echo $pun_config['o_base_url'] ?>"><?php echo $pun_config['o_board_title'] ?></a> » <strong><?php echo $cur_posting['forum_name'] ?></strong>
</div>
<?
} else if ($page == 'edit')
{
?>
<div id="pagelinks">
<a href="<?php echo $pun_config['o_base_url'] ?>"><?php echo $pun_config['o_board_title'] ?></a> » <a href="viewforum.php?id=<?php echo $cur_post['fid'] ?>"><?php echo $cur_post['forum_name'] ?></a> » <strong><?php echo $cur_post['subject'] ?></strong>
</div>
<?
} else if ($page == 'index')
{
?>
<div id="pagelinks">
 » <strong><?php echo $pun_config['o_board_title'] ?></strong>
</div>
<?
} else if ($page == '')
{
?>
<div id="pagelinks">
<a href="<?php echo $pun_config['o_base_url'] ?>"><?php echo $pun_config['o_board_title'] ?></a> » <strong><?php echo $page_title ?></strong>
</div>
<?
}
?>
<?php

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

you can view a small demo here if youd like: http://www.fatal-gfx.com

90

(3 replies, posted in PunBB 1.2 troubleshooting)

no i havent actually resolved the problem i have just ridded the view of it until it is resolved.

91

(3 replies, posted in PunBB 1.2 troubleshooting)

Well, i need some help with this one overlapping block.

Here is the code to the 2 side-by-side blocks.

<div id="welcome" class="block" style="width: 38%; float: right">
    <h2><span><?php echo $lang_common['Login'] ?></span></h2>
    <div class="box">
        <div class="inbox">
        <form id="login" 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 class="conl"><?php echo $lang_common['Username'] ?>: <input type="text" name="req_username" size="25" maxlength="25" tabindex="1" /><br /></label>
                <label class="conl"><?php echo $lang_common['Password'] ?>: <input type="password" name="req_password" size="16" maxlength="16" tabindex="2" /><br /></label>
                <p class="clearb"><?php echo $lang_login['Login info'] ?></p>
                <p><a href="register.php" tabindex="4"><?php echo $lang_login['Not registered'] ?></a>  
                <a href="login.php?action=forget" tabindex="5"><?php echo $lang_login['Forgotten pass'] ?></a></p>
                </div>
                <p><input type="submit" name="login" value="<?php echo $lang_common['Login'] ?>" tabindex="3" /></p>
            </form>
        </div>
    </div>
</div>
<div id="welcome" class="block" style="width: 61%; margin-right: 1%">
    <h2><span><?php echo $lang_common['Welcome'] ?> to <?php echo $pun_config['o_board_title'] ?></span></h2>
    <div class="box">
        <div class="inbox">
            <div><?php echo $pun_config['o_welcome_message'] ?></div>
        </div>
    </div>
</div>

92

(0 replies, posted in Programming)

Just wondering if any of you had any suggestions on what i could possibly tack on to this current line of code to possibly make it more secure when it comes to redirecting from index.php to login.php?

Here is my code:

// Check to see if the login redirection is enabled for guests //
if ($pun_config['o_login_redirect'] == '1' && $pun_user['g_id'] == PUN_GUEST)
    header('location: '.$pun_config['o_base_url'].'/login.php');

I have everything set up in the database along with the option in admin_options.php......what this does exactly is it lets me enable or disable a feature that automatically redirects all guests to login.php when attempting to visit index.php....this would make index.php inaccessable to guests along with encouraging them to either login or register.

Edit- Do you think it would be more efficient to use the redirect function rather than the header location?

Example:

// Check to see if the login redirection is enabled for guests //
if ($pun_config['o_login_redirect'] == '1' && $pun_user['g_id'] == PUN_GUEST)
    redirect(''.$pun_config['o_base_url'].'/login.php', 'Redirecting you to our login page. …');

if that code is correct that is

yes this is true that the more optional features there is the better it will be in my opinion smile so i agree with mark on this one.

replace this:

/****************************************************************/
/* 10. POST STATUS INDICATORS */
/****************************************************************/

/* 10.1 These are the post status indicators which appear at the left of some tables. 
.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and
.isticky = sticky topics. By default only .inew is different from the default.*/

DIV.icon {
    FLOAT: left;
    MARGIN-TOP: 0.1em;
    MARGIN-LEFT: 0.2em;
    DISPLAY: block;
    BORDER-WIDTH: 0.6em 0.6em 0.6em 0.6em;
    BORDER-STYLE: solid
}

DIV.searchposts DIV.icon {MARGIN-LEFT: 0}

/* 10.2 Class .tclcon is a div inside the first column of tables with post indicators. The
margin creates space for the post status indicator */

TD DIV.tclcon {MARGIN-LEFT: 2.3em}

with this:

/**************************************************/
 
/* 10. POST STATUS INDICATORS */
 
/**************************************************/
 
/* 10.1 These are the post status indicators which appear at the left of some tables. 
.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and
.isticky = sticky topics. By default only .inew is different from the default.*/
 
DIV.icon {
    FLOAT: left;
    DISPLAY: block;
    width:18px;
    height:18px
}
 
DIV.searchposts DIV.icon {MARGIN-LEFT: 0}
 
/* 10.2 Class .tclcon is a div inside the first column of tables with post indicators. The
margin creates space for the post status indicator */
 
TD DIV.tclcon {MARGIN-LEFT: 1.7em}
TD.tcl {padding-left:3px;}

and adjust to fit your needs....i believe you wree just missing a width and height in there.

it does work but i forgot to mention that you must declare the $forumid1 at the beginning of the file so at the beginning of recenttopics.php place this line of code:

$forumid1 = 'Put your forum id here';

dont forget to replace the text with the correct forum id you wish to retrieve the information from.

Ahh nevermind sorry to bother you guys i now have it so i might as well share it. Im currently displaying the forum moderators in viewforum.php just before the pagination links rather than taking up more space on index.php smile tell me what you think.

<div id="moderators">
    <div class="box" style="margin-bottom: 12px">
        <div class="inbox" style="margin: 5px">
            <?php if ($cur_forum['moderators'] != '')
    {
        $mods_array = unserialize($cur_forum['moderators']);
        $moderators = array();

        while (list($mod_username, $mod_id) = @each($mods_array))
            $moderators[] = '<a href="profile.php?id='.$mod_id.'">'.pun_htmlspecialchars($mod_username).'</a>';

        $moderators = "\t\t\t\t\t\t\t\t".'<p>'.$lang_common['Moderated by'].': '.implode(', ', $moderators).'</p>'."\n";
    } ?>
    <?php echo $moderators ?>
        </div>
    </div>
</div>

demo may be viewed here: http://www.fatal-gfx.com (look in the announcements forum ( the only forum set up )

97

(5 replies, posted in PunBB 1.2 troubleshooting)

this is a punbb forum and you have just posted a topic and here you are asking how to post a topic...this forum runs the exact same way yours does smile just had to clear that up.

yeah there is no difference in between the 2 packages tongue you must have done something wrong the first time smile anyways glad to help.

do you have ythe english language folder uploaded under the /lang/ directory?

100

(8 replies, posted in PunBB 1.2 discussion)

i think your getting an error because you have a ')' after PUN_GUEST when it should be placed at the end?

if ($pun_user['g_id'] < PUN_GUEST && $pun_user['id'] != '3')

Edited by Smartys - That code should work fine