It used to be like this. Showing latest posts (activity) is more useful as a html list, this way when somebody replies to a topic, thread moves to the top of the list and users who visit website's main page (and not forums) then they'll see that something has changed over there. (exactly as it is at the moment on http://punbb.informer.com/ under Recent Forums posts)

But since I saw that this fix now breaks the rss and other feed logic then I assume it would be better when there was an option to toggle between latest posts and latest topics created.

Alright, I took some time off to deal with this issue and I found that the order by was changed to thread posted date when it used to be the date of last post in a thread.

fix:

'ORDER BY'    => 't.posted DESC',

to:

'ORDER BY'    => 't.last_post DESC',

and voila everything works like it was 1.3.4

From 1.3.5 it lists topics by date created instead of date of last reply.

4

(41 replies, posted in PunBB 1.3 extensions)

how to make this specific video tag to not work in signatures? Without affecting other textformatting...

5

(41 replies, posted in PunBB 1.3 extensions)

My forum was 'crashing' as well, it said something faulty about compression, I disabled compression in forum settings and extension worked fine.

… my bad

Yes, it does, just that punbb 1.3 is about Unicode support, right?

in links, if they are too long, horizontal ellipsis appears (…)
The are coded wrong as … in ANSI but should  be ߪ as in Unicode

if extern.php displayed links are too long, then they are replaced directly with the (…) symbol, not with ߪ

Reference: http://www.alanwood.net/demos/ansi.html

9

(41 replies, posted in PunBB 1.3 extensions)

Please escape javascript properly in this extension and for html ending tags like </div> use <\/div>

10

(7 replies, posted in PunBB 1.3 troubleshooting)

SMTP Server (which probably includes all SMTP support) is disabled in 000webhost

source: http://www.000webhost.com/

In my opinion the phrase...

NOTE! Web server's system user will be set as an owner of the files and directories created while extension downloading and installation. Access mode for directories created will be set to 0777.

...isn't secure enough. It would be better idea to set it to 0755 (system user can do read,write,execute and all others just read and execute)

The reason why I'm asking this, is because i'm getting attacked by outside world repeatedly and my outdated pun_pm got hijacked by somebody and that made me to worry about others: the reason was the nasty chmod 777.

i just noticed that if xfire is empty it still displays xfire field on profile pages. Will be fixed within week.

13

(1 replies, posted in PunBB 1.3 troubleshooting)

myrem wrote:

Can't find the option to move threads. Miss that option. Could somebody help me?!

you can do it in two ways. if you watch the forum and want to move multiple threads, then at the bottom of the page there is a link called "moderate forum" click on that, select topics and press move.

in threads you can move them at the bottom of the page, there is a link called "Move topic"

I'll make some screenies.

E: Done!

Adds Xfire usernames to PunBB topics and profile pages. User can change username from Identity settings.

pun_xfire.zip v1.0.1

info about xfire is available at www.xfire.com

http://i40.tinypic.com/301lv1g.png

Thanks, Slavok.

my last question before releasing is the matter of licence, should I use any, if yes, which, how should I include it to the extension file?

but is there any solution to the line

$form = extract_elements(array('realname', 'url', 'location', 'jabber', 'icq', 'msn', 'aim', 'yahoo','xfire'));

so that i don't have to write the whole array to extension, so it adds just 'xfire' instead?

I'm done. Thanks for the link! I'll release this extension later, it needs still an installation script and some formatting of the code. Technically it works.

My aim is simple: to get xfire working in profiles. Xfire is Instant Messenger for gamers, has a cool and widely supported in-game overlay (like steam has, but better).

It's quite simple. But I haven't got the hang on hooks. I need a walkthrough, using hooks.

Modifiying directly the code, i was able to get it working. First one needs to add a new field into users table, let's examples from msn. Make the field exactly like msn's, just that the name is xfire. (i used phpmyadmin, due to novice sql skills, so it should be in install script, if one doesn't exist.)

in profile.php, it's also almost the copy of msn's, has one language variable.

Line 868:

$form = extract_elements(array('realname', 'url', 'location', 'jabber', 'icq', 'msn', 'aim', 'yahoo','xfire'));

so this array needs xfire.

below lines 1344-1345 are exact copies of msn (which are the named lines), with difference that they are named to xfire.
the same applies to lines 1555-1556

At the form (which is somewhere at the beginning of #1800 lines), there should be the input sizes size="20" maxlength="30" so it looks small, like aim and yahoo.

i thought the xfire username should be linked as http://www.xfire.com/profile/USERNAME and after that there is a link, which links as a friend. So we take advantage of xfire's own url protocol (xfire:add_friend?user=USERNAME). so, let's say it looks like this:

Xfire: username (Add as a friend)

unfortunately in this example the xfire's own protocol is being parsed differently by forum right now. The word Xfire doesn't require language string, because it's a name. Add as a friend phrase might need one.

In topics, below posts count (at poster's info). There's a simple Xfire: username
So people will see it.

and please, let's don't add uninstallation script (aka removal of the field in sql).

Removing isn't the solution, it's the way how to implement the buttons.
bbcodes are right now images with functions of clicking on them, but smilies are link-wrapped images. Tabindex works only on elements which you can use tab between (forms, links etc..). Images are not the case:

My PHP skills are pretty novice, so it might need some cleaning.

what i did, was that i removed the case of  bbcode buttons having the same endings (images versus form input buttons), so i don't know how will normal buttons do, but images did fine. Also my firefox html validator plugin wasn't very happy with the empty ':D','' at smilies, didn't change this though, but w3 validator doesn't whine anymore.

bar.php:

<?php

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

    Copyright (C) 2008  PunBB

    Based on Easy BBCode extension by Rickard Andersson.

    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

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

if (!defined('FORUM'))
    die();

// NOTE: I couldn't find how to remove sf-set from here.
?>    <div class="sf-set" id="pun_bbcode_bar">
        <div id="pun_bbcode_wrapper"<?php echo $forum_user['pun_bbcode_use_buttons']?' class="graphical"':'' ?>>
            <div id="pun_bbcode_buttons">
<?php

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

// List of tags, which may not to have attribute
if ($forum_user['pun_bbcode_use_buttons'])
    $tags_with_attr = array('color');
else
    $tags_with_attr = array('quote', 'color', 'url', 'email', 'img', 'list');

// Let's get the list of all tags
$tags = array_unique(array_merge($tags_without_attr, $tags_with_attr));

if ($forum_user['pun_bbcode_use_buttons'])
{
    if (file_exists($ext_info['path'].'/buttons/'.$forum_user['style'].'/'))
        $buttons_path = $ext_info['url'].'/buttons/'.$forum_user['style'];
    else
        $buttons_path = $ext_info['url'].'/buttons/Oxygen';
}
$tabindex = 1;

foreach ($tags as $filename => $tag)
{
    if (in_array($tag, $tags_without_attr))
    {
        if ($forum_user['pun_bbcode_use_buttons'])
            echo '<a href="javascript:insert_text(\'['.$tag.']\',\'[/'.$tag.']\');" tabindex="'.$tabindex.'"><img src="'.$buttons_path.'/'.(is_numeric($filename)?$tag:$filename).'.png" alt="['.$tag.']" title="'.$tag.'" /></a>'."\n";
        else
            echo '<input type="button" value="'.ucfirst($tag).'" name="'.$tag.'" onclick="insert_text(\'['.$tag.']\',\'[/'.$tag.']\');" tabindex="'.$tabindex.'" />'."\n";
    }

    if (in_array($tag, $tags_with_attr))
    {
        if ($forum_user['pun_bbcode_use_buttons'])
            echo '<a href="javascript:insert_text(\'['.$tag.'=]\',\'[/'.$tag.']\');" tabindex="'.$tabindex.'"><img src="'.$buttons_path.'/'.(is_numeric($filename)?$tag:$filename).'.png" alt="['.$tag.'=]" title="'.$tag.'" /></a>'."\n";
        else
            echo '<input type="button" value="'.ucfirst($tag).'=" name="'.$tag.'" onclick="insert_text(\'['.$tag.'=]\',\'[/'.$tag.']\');" tabindex="'.$tabindex.'" />'."\n";
    }

    $tabindex++;
}

?>
            </div>
            <div id="pun_bbcode_smilies">
<?php

// Display the smiley set
foreach (array_unique($smilies) as $smile_text => $smile_file)
    echo '<a href="javascript:insert_text(\''.$smile_text.'\', \'\');" tabindex="'.($tabindex++).'"><img src="'.$base_url.'/img/smilies/'.$smile_file.'" width="15" height="15" alt="'.$smile_text.'" /></a>'."\n";

?>            </div>
        </div>
    </div>

bump, still doesn't apply for bbcode buttons, because they are outputted differently from smilies. Negative values of tabindex are totally ok, just that you can't use them in images, but you can use them in links.

It's not a "strict" standard by w3c.

That will be all.

I met the author if this extension and he helped me with some small changes. like removing else from else if and changing return; to exit;

I have here an extension what was made in pre-rc1 time, it worked with the svn version back then. But for now the extension doesn't work with rc1 nor rc2.

What it has to do, is that to read ip's from every post with syntax

ip: [b]xxx.xxx.xxx.xxx.xxx[/b]

and list them as a table or raw in extern.php

<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE extension SYSTEM "ext-1.0.dtd">

<!--
***********************************************************************

    Copyright (C) 2008  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

***********************************************************************
-->

<extension engine="1.0">
    <id>codee_servers</id>
    <title>CoD.EE server output</title>
    <version>0.1</version>
    <description>Add methods into extern to output server ip's inserted into first posts of toppics in certain subforums.</description>
    <author>Is not that important</author>

    <minversion>1.3dev</minversion>
    <maxtestedon>1.3dev</maxtestedon>

    <hooks>
        <hook id="ex_start"><![CDATA[
    // yo    
    function output_raw($servers) {

    global $forum_config;

    echo "<table><tr><th>M2ng</th><th>Nimi</th><th>ip:port</th></tr>\n";
    foreach ($servers as $server)
    {
        preg_match_all("(ip: \[b\]([^\[]*))", $server['info'], $iped); //"(([^[\];])])"
        foreach($iped[1] as $ip){            
            if ($forum_config['o_censoring'] == '1')
                $server['name'] = censor_words($server['name']);
            echo '<tr><td>' . $server['game'] . "\t </td><td> " .$server['name'] ."\t </td><td> " . $ip . "</td></tr>\n";
        }
    }
    echo "</table>\n";
}
function output_servers_html($servers) {

    global $forum_config;

    echo "<table><tr><th>M2ng</th><th>Nimi</th><th>ip:port</th></tr>\n";
    foreach ($servers as $server)
    {
        preg_match_all("(ip: \[b\]([^\[]*))", $server['info'], $iped); //"(([^[\];])])"
        foreach($iped[1] as $ip){            
            if ($forum_config['o_censoring'] == '1')
                $server['name'] = censor_words($server['name']);
            echo '<tr><td>' . $server['game'] . "\t </td><td> " .$server['name'] ."\t </td><td> " . $ip . "</td></tr>\n";
        }
    }
    echo "</table>\n";
}
function output_servers_raw($servers) {

    global $forum_config;

    foreach ($servers as $server)
    {
        preg_match_all("(ip: \[b\]([^\[]*))", $server['info'], $iped); //"(([^[\];])])"
        foreach($iped[1] as $ip){            
            if ($forum_config['o_censoring'] == '1')
                $server['name'] = censor_words($server['name']);
            echo $server['game'].';'.$ip."\n";
        }
    }
}
]]></hook>
        <hook id="ex_new_action"><![CDATA[
//
// server list from toppics
//
else if ($_GET['action'] == 'servers') {

    $type = 'html';
    if (isset($_GET['type']) && is_scalar($_GET['type']))
    {
        if (strtolower($_GET['type']) == 'raw')
            $type = 'raw';
    }
    
    $forum_sql = '';

    // Was any specific forum ID's supplied?
    if (isset($_GET['fid']) && $_GET['fid'] != '')
    {
        $fids = explode(',', trim($_GET['fid']));
        $fids = array_map('intval', $fids);
        
        if (!empty($fids))
            $forum_sql = ' AND t.forum_id IN('.implode(',', $fids).')';
    }

    // Teemade nimed ja pealkirjad ja id'd
    $result = $forum_db->query('
        SELECT t.subject as name,  p.message as info, t.forum_id as game FROM '.$forum_db->prefix.'topics AS t 
        INNER JOIN '.$forum_db->prefix.'posts AS p ON p.topic_id=t.id  
        WHERE p.id = (SELECT id as a FROM '.$forum_db->prefix.'posts WHERE topic_id=t.id ORDER BY a ASC LIMIT 1)
        '.$forum_sql.' ORDER BY game, name DESC') or error('Serverite nimekirja ei saanud, sest '.print_r($forum_db->error(),1), __FILE__, __LINE__, $forum_db->error());

    if (!$forum_db->num_rows($result))
        exit($lang_common['Bad request']);
    while ($servers[] = $forum_db->fetch_assoc($result));

    $output_func = 'output_servers_'.$type;
    $output_func($servers);
    return;
}

]]></hook>
</hooks>
</extension>

And i have tried to put the code next to hooks, then it worked fine hmm

25

(3 replies, posted in Feature requests)

My forum members claim to say that they have time back by 1hr, i found out that it's due to DST. How to (mass-)fix that?

I added it to Feature requests because of requesting it as a feature or atleast default-tick.