(41 replies, posted in PunBB 1.3 extensions)

lbouriez wrote:

Hi, thanks for this extension.
Is it possible to add a button to put the video tag easily :=)?


open extensions/pun_bbcode/bar.php and find

// List of tags, which may have attribute
    $tags_without_attr = array('b', 'i', 'u', 'email', 'list', 'li' => '*', 'quote', 'code', 'url');

add 'video', into this just after 'quote',

Then upload the icon you wish to use as a button to extensions/pun_bbcode/buttons/THEME NAME/

hope that helps


(62 replies, posted in PunBB 1.3 extensions)

Hi - I've found if there is an empty line break in the text it doesn't center, any idea on a fix?


(35 replies, posted in PunBB 1.3 additions)

I am having the same error with a call to a member function on 1350

I to am recieving this error


(5 replies, posted in PunBB show off)

cheers thanks, ill look into that


(5 replies, posted in PunBB show off)

Thanks for all the feedback

fantasma wrote:

not bad! but the logo backgrond is different in the header

Is it at all possible you could screen print an post an image please? I have tested in opera, firefox, chrome and ie 7 & 8 and it all looks ok - what browser are you using?

many thanks again  cool


(35 replies, posted in PunBB 1.3 extensions)

this only works with local mp3s only yes?


(5 replies, posted in PunBB show off)

This site is currently in development, but I have just finished styling the forum


Got to say I do love Punbb!

Parpalak wrote:

Seems like

redirect('http://example.com/index.php', $lang_login['Logout redirect']);

thank you so much worked perfect!

Parpalak wrote:

The login redirect url can be changed at the line 359 of login.php.

The logout redirect URL can be changed at the line 165.

I'm having trouble editing this array

redirect(forum_link($forum_url['index']), $lang_login['Logout redirect']);

If I wanted that to basically go back a directory to /index.php how should I change it?

many thanks for your kind help


When a user logs in to my forum or logs out I want them to be redirected to my sites homepage

for example - /index.php not /forums/index.php

Can anyone help with changing the redirects?

I assumed this would be the case and '.....' would be used but it seems on my forum to be using V… instead? any suggestions?

I have noticed that when a post title is truncated in the extern.php script I seem to get a strange output where the text is cut off.. you can see this in example at my site - http://www.shedbass.net/

The text in the latest forum posts reads

Posted by KnoName

with the highlighted text being erroneous.

Is this a bug or something I have over looked?

Gordei4ik wrote:

Please specify what exactly you want to display on the main page of your site. Headers, as on http://www.dubterrain.net, or the full text of the first post?


Just the full text of the first please


I'd like to show the original post of a topic on my home page, along with a link to the thread and if possible a number of replys, I've seen one site thats using such a script on a punbb 1.2 board ( http://www.dubterrain.net/ ) but cannot find anything for 1.3 - any ideas?


(2 replies, posted in PunBB 1.3 troubleshooting)

Actually I think the u. columns may not be standard within the punbb core, could some one just confirm this for me please


(2 replies, posted in PunBB 1.3 troubleshooting)


I currently working on a script for 1.3 I originally started for 1.2 and need to update some query's for the 1.3 structure, at the moment I am running into this error

Database reported: Unknown column 'u.use_avatar' in 'field list' (Errno: 1054).

when running debug mode, could anyone give the correct column for 1.3 to replace this one?

the full function it is withing looks like -

$result = $forum_db->query('SELECT t.id, t.subject, t.num_replies, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.forum_id, u.use_avatar, u.num_posts, u.registered, u.title, p.poster, p.poster_id, p.message, p.hide_smilies, p.posted, g.g_title, f.forum_name FROM '.$forum_db->prefix.'topics AS t INNER JOIN '.$forum_db->prefix.'posts AS p ON p.topic_id=t.id AND p.posted=t.posted INNER JOIN '.$forum_db->prefix.'users AS u ON u.id=p.poster_id LEFT JOIN '.$forum_db->prefix.'groups AS g ON g.g_id=u.group_id INNER JOIN '.$forum_db->prefix.'forums AS f ON f.id=t.forum_id WHERE t.forum_id IN ('.implode(',', $forumids).') AND t.moved_to IS NULL AND f.redirect_url IS NULL ORDER BY t.posted DESC LIMIT '.$master_limit) or error('Unable to fetch announcements', __FILE__, __LINE__, $forum_db->error());

Many thanks in advcance.

Peter wrote:

Sorry, I'd overlooked Smartys' post from 2007-03-18. I should be able to figure it out (again).

But I need the solution for the "latest registered 5 users", instead of "users online". Any pointers how to do that?

Thanks all!

any uptdate on this? I would love to use something like this to show last 5 registered users

bump, any developers point me in the right direction please? I know you guys really know your stuff so your help would be much appriacted  wink

Ok, slight update, if i add the line

  echo $links['profile'] .= "\n\t\t".'<li id="nav_pun_pm"'.('pun_pm' == substr(FORUM_PAGE, 0, 6) ? ' class="isactive"' : '').'><a href="'.forum_link($forum_url['pun_pm']).'"><span>'.$lang_pun_pm['Private messages'].'</span></a></li>';

To the script it creates the bullet point, and if I had text inbetween </span></a> it creates a link that works, but what I really want to use is the same system the forum uses ie - New messages (2) etc etc

any idea? I feel I am close but yet so far  big_smile


At the moment I'm working on a log in script for an external page that once logged in displays the user avatar, a link to edit there profile, how many messages they have and also a log out link.

I have success with displaying all of these apart from the message link, could some one point me in the right direction as to what page I should be looking at? I am using the pun_pm package coded by the punbb development team.

My current coding looks like this... ( please bare in mind it is ugly and basic at the moment as I am just working out the best way to achieve the effect )

 if($forum_user['id'] > 2)
  echo forum_htmlencode($forum_user['username']); 
  echo $user_avatar = '<img src="forums/'.$forum_config['o_avatars_dir'].'/'.$forum_user['id'].'.jpg" '.' width="30" height="30" alt="" />'; 
  echo '******* PRIVATE MESSAGE OUTPUT SHOULD GO HERE ******* ';
  echo $links['profile'] = '<li id="navprofile"'.((substr(FORUM_PAGE, 0, 7) == 'profile') ? ' class="isactive"' : '').'><a href="'.forum_link($forum_url['user'], $forum_user['id']).'">'.$lang_common['Profile'].'</a></li>';
  echo $links['logout'] = '<li id="navlogout"><a href="'.forum_link($forum_url['logout'], array($forum_user['id'], generate_form_token('logout'.$forum_user['id']))).'">'.$lang_common['Logout'].'</a></li>';


  echo "Log In Form Will Go Here";

any help would much appreciated  wink


(3 replies, posted in PunBB 1.3 additions)

If I'm honest I'm unsure how to the extension system works, if you can point me in the direction of some info on creating these I will be happy to work on the release


I did not make this Mod, I simply updated some of the coding to work with punbb 1.3.4.
All credit goes to the original author whos 1.2 Mod can be found here

Ok first step is to download the original mod and extract the flash player "dewplayer-multi.swf"

Then follow the below instructions.

##          Mod title :  Flash MP3 Player
##        Mod version :  2.0.0
##     Works on PunBB :  mod tested on the 1.3.4 version
##       Release date :  2009-12-12
##    Original Author :  Nicolas D. a.k.a. nicolas2k10 (nicolas2k10 at gmail.com)
    Update Author :      Source Code

##        Description :  This mod add the BBCode mp3 tag.
##                       This tag makes possible the insertion of a flash mp3 player in the posts.
##                       The MP3 files provided in parameter can be local or distant (http).
##              Usage :  One file : [mp3 url="path/file.mp3"]
##                       Many files : [mp3 url="path/file1.mp3|path/file2.mp3"]
##     Affected files :  include/parser.php
##                       post.php
##         Affects DB :  No
##              Notes :  This mod is based on a contribution of "Ju"
##                       (http://forums.punbb.org/viewtopic.php?id=7398) and use
##                       the DewPlayer (http://www.alsacreations.fr/?dewplayer).
##                       The flash code which is produced is valid Xhtml 1.0 Strict.
                **** All credit goes to the original author and those mentioned above ****
##         DISCLAIMER :  Please note that "mods" are not officially supported by
##                       PunBB. Installation of this modification is done at your
##                       own risk. Backup your forum database and any and all
##                       applicable files before proceeding.

#---------[ 1. UPLOAD ]--------------------------------------------------------

dewplayer-multi.swf to /

#---------[ 2. OPEN ]----------------------------------------------------------


#---------[ 3. FIND ]---------------------------------------------

        // Add paragraph tag around post, but make sure there are no empty paragraphs
    $text = preg_replace('#<br />\s*?<br />((\s*<br />)*)#i', "</p>$1<p>", $text);
    $text = str_replace('<p><br />', '<p>', $text);
    $text = str_replace('<p></p>', '', '<p>'.$text.'</p>');

#---------[ 4. AFTER, ADD ]----------------------------------------------------

    // Mod: Flash MP3 Player (8 new lines follow)
    $player_url     = 'dewplayer-multi.swf';
    $player_bgcolor = 'ffffff';
    $player_width   = 240;
    $player_height  = 20;
    $player_param   = '?bgcolor='.$player_bgcolor.'&amp;mp3=$2';  // For more options: http://www.alsacreations.fr/?dewplayer
    $player_alternative = '<strong>Flash not detected</strong>';
    $player_code = "\n\t\t\t\t\t<object type=\"application/x-shockwave-flash\" data=\"".$player_url.$player_param."\" width=\"".$player_width."\" height=\"".$player_height."\">\n\t\t\t\t\t  <param name=\"movie\" value=\"".$player_url.$player_param."\" />\n\t\t\t\t\t  <param name=\"bgcolor\" value=\"#".$player_bgcolor."\" />\n\t\t\t\t\t  ".$player_alternative."\n\t\t\t\t\t</object>\n\t\t\t\t\t";
    $text = preg_replace("/\[mp3 url=(&quot;|\"|'|)(.*?)\\1\]/", $player_code, $text);

#---------[ 5. OPEN ]----------------------------------------------------------


#---------[ 6. FIND ]---------------------------------------------

        list($q_poster, $q_message) = $forum_db->fetch_row($result);

#---------[ 7. AFTER, ADD ]----------------------------------------------------

        // Mod: Flash MP3 Player (1 new line follow)
        $q_message = preg_replace("/\[mp3 url=(&quot;|\"|'|)(.*?)\\1\]/", "[url]$2[/url]", $q_message);

#---------[ 8. SAVE/UPLOAD ]---------------------------------------------------

Once again full credit to the original author(s).

Never mind I have sorted it, was a line in the connected style sheet that created the border wink


Basically I am trying to edit the little coloured block that indicates new posts etc and replace it with an image, I changed the CSS properties to reflect a background image when I was running a punbb 1.2 board and it worked perfect but it would seem on punbb 1.3 I get a strange error I cannot seem to fix...

Notice the thick border around the image...


A snippet of the change I made here

.brd .main-content .main-item .icon {
    background-image: url(../../img/forum_read.png);
    background-repeat: no-repeat;
    background-color: #fff;

Any suggestions?