1

(9 replies, posted in PunBB 1.3 extensions)

niknak wrote:

Hello Ju!

The CSS generator you developed is great!

I've managed to customize most of the parts of my forum. However, I did not manage to customize the pages related to the PMs of my forum.

This is because when I registered and created a profile at http://spinkbb.jsand.net/punbb I didnt get the feature of sending personal messages. So I couldn't get the CSS for those windows.
As a result, my private message windows are not aligned with the colours of my forum.

Is there a way to fix this? Please help!

Thanks!!

NN

Hi niknak,
the official extension pun_pm is now installed on SpinkBB !

http://spinkbb.jsand.net/punbb/

Thanx for your feedback.

2

(9 replies, posted in PunBB 1.3 extensions)

Garciat wrote:

(randomize, base the whole theme on one color, invert)

It's coming soon, i'm working on it.

3

(9 replies, posted in PunBB 1.3 extensions)

Hello,
sorry for my english, i'm french smile.

For those who don't know SpinkBB yet, it is a styles generator for PunBB; a graphic interface whose goal is to colorize your forum easily.
Former version : http://www.jsand.net/spinkbb

The newer version radically changes its spirit to offer a larger interactive functionning way and evoluated possibilities (import, permanent save, public preview, browsing the whole script, etc.)

SpinkBB 1.3 beta :
http://spinkbb.jsand.net/punbb

I need some help to :
- fully test and precisely report bugs so that we can correct them together
- possibly translate this file into other languages

The languages file :
http://spinkbb.jsand.net/Langues.js
(Display > Encoding > UTF-8 under Firefox, if you see anormal characters)

Javascript Preview of an example entirely made with SpinkBB

I need your reactions, thanks ...

4

(2 replies, posted in PunBB 1.3 discussion)

s0me0ne wrote:

Will there be a SpinkBB or simililar setup for fast color changing of PunBB 1.3?

I know its not hard to do it manually, but that site made it so fast to do.

SpinkBB 1.3 is soon... wait wink.

Hello,
sorry for my english.

Example :
http://punbb.org/forums/viewtopic.php?pid=4807
http://punbb.org/forums/viewtopic.php?pid=4811
http://punbb.org/forums/viewtopic.php?pid=4814
http://punbb.org/forums/viewtopic.php?pid=4816
etc.

All the URL are considered by search engines as different pages while they have same contents.
It's a duplication of contents in the engines...

I have proposed this mod (example : CtrlAltSuppr.com), but is this problem foreseen in 1.3 ?

Rickard wrote:

Nice! Man, you've done a nice job on the ctrlaltsuppr forums. They look great smile

Thanx, I love the code of PunBB ^^

nobody?

(on Punres)

hcgtv wrote:

Hi,

Do we have a working mod of this for 1.2.5?

Thanks.

In the same style

Hello !
Sorry for my english, and the translation (French version).

>> http://www.punres.org/download.php?id=372

Connorhd ?

Connorhd wrote:
Ju wrote:
Connorhd wrote:

edit: i just started installing this i think your missing some bits from viewforum.php? like the $forums_icon = array(3,2,17,18,16);

Heu, I don't understand...
3,2,17,18,16 are numbers (id) of forums concerned by this mod.

you must have edited your post because that is fixed now

           // ICON ETAT
            $forums_icon = array(3,2,17,18,16); // Numbers of the forums concerned (alsa in viewtopic.php and search.php)
            if(array_search($id,$forums_icon) !== false && $cur_topic['sticky']!='1' && $cur_topic['moved_to']==null) {

was missing before

Heu, yes, it's possible...

It's good now ??

Connorhd wrote:

edit: i just started installing this i think your missing some bits from viewforum.php? like the $forums_icon = array(3,2,17,18,16);

Heu, I don't understand...
3,2,17,18,16 are numbers (id) of forums concerned by this mod.

Connorhd wrote:

edit2: when a topic is new it says mark as non-resolved when i click that it marks it as resolved hmm

?
This mod was installed on PunBB.fr without problems...

SORRY, I was mistaken while translating !!!

CORRECTION (modified in my first post!) :
In viewtopic.php, after the line ~162 :

switch($cur_topic['resolu']) {
        case 0 :
            $iconetat_txt = '<strong style="color:#C80815;font-weight:bold">(Not resolved)</strong>';
            $iconetat_change_txt = '<br /> ( <a href="?id='.$id.'&etat=2" style="color:#F00">Mark topic as resolved</a> )';
            break;
        case 1 :
            $iconetat_txt = '';
            $iconetat_change_txt = '<br /> ( <a href="?id='.$id.'&etat=2" style="color:#F00">Mark topic as resolved</a> )';
            break;
        case 2 :
            $iconetat_txt = '<strong style="color:#2c831b;font-weight:bold">(Resolved)</strong>';
            $iconetat_change_txt = '<br /> ( <a href="?id='.$id.'&etat=0" style="color:#F00">Mark topic as not-resolved</a> )';
            break;

I edited my first post !

Sorry for my english.

Exemple : CtrlAltSuppr.com

MOD (translate by Ludo, thx !) :
This is a post status indicator which aims at showing if the problem exposed in the topic is solved or not. The topic creator got a link with 'mark this topic as solved' which changes the colour of the post status indicator. After having marked a topic as solved it's also possible to clic on 'mark topic as unsolved' in order to inform that finally the problem is not solved. This functions are accessible to admin and moderators. You have the possibility to choose on which forum this mod is applied.

SOURCE :

SQL (change **** by your table extension or drop) :

ALTER TABLE ****topics ADD resolu TINYINT(1) DEFAULT 1

/******* VIEWFORUM.PHP *******/

Line 112, REPLACE :

    // Without "the dot"
    $sql = 'SELECT id, poster, subject, posted, last_post, last_post_id, last_poster, num_views, num_replies, closed, sticky, moved_to FROM '.$db->prefix.'topics WHERE forum_id='.$id.' ORDER BY sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'];
}
else
{
    // With "the dot"
    switch ($db_type)
    {
        case 'mysql':
        case 'mysqli':
            $sql = 'SELECT p.poster_id AS has_posted, t.id, t.subject, t.poster, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to FROM '.$db->prefix.'topics AS t LEFT JOIN '.$db->prefix.'posts AS p ON t.id=p.topic_id AND p.poster_id='.$pun_user['id'].' WHERE t.forum_id='.$id.' GROUP BY t.id ORDER BY sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'];
            break;

        case 'sqlite':
            $sql = 'SELECT p.poster_id AS has_posted, t.id, t.subject, t.poster, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to FROM '.$db->prefix.'topics AS t LEFT JOIN '.$db->prefix.'posts AS p ON t.id=p.topic_id AND p.poster_id='.$pun_user['id'].' WHERE t.id IN(SELECT id FROM '.$db->prefix.'topics WHERE forum_id='.$id.' ORDER BY sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'].') GROUP BY t.id ORDER BY t.sticky DESC, t.last_post DESC';
            break;

        default:
            $sql = 'SELECT p.poster_id AS has_posted, t.id, t.subject, t.poster, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to FROM '.$db->prefix.'topics AS t LEFT JOIN '.$db->prefix.'posts AS p ON t.id=p.topic_id AND p.poster_id='.$pun_user['id'].' WHERE t.forum_id='.$id.' GROUP BY t.id, t.subject, t.poster, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to, p.poster_id ORDER BY sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'];
            break;

Per :

    // Without "the dot"
    $sql = 'SELECT id, poster, subject, posted, last_post, last_post_id, last_poster, num_views, num_replies, closed, sticky, moved_to, resolu FROM '.$db->prefix.'topics WHERE forum_id='.$id.' ORDER BY sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'];
}
else
{
    // With "the dot"
    switch ($db_type)
    {
        case 'mysql':
        case 'mysqli':
            $sql = 'SELECT p.poster_id AS has_posted, t.id, t.subject, t.poster, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to, t.resolu FROM '.$db->prefix.'topics AS t LEFT JOIN '.$db->prefix.'posts AS p ON t.id=p.topic_id AND p.poster_id='.$pun_user['id'].' WHERE t.forum_id='.$id.' GROUP BY t.id ORDER BY sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'];
            break;

        case 'sqlite':
            $sql = 'SELECT p.poster_id AS has_posted, t.id, t.subject, t.poster, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to, t.resolu FROM '.$db->prefix.'topics AS t LEFT JOIN '.$db->prefix.'posts AS p ON t.id=p.topic_id AND p.poster_id='.$pun_user['id'].' WHERE t.id IN(SELECT id FROM '.$db->prefix.'topics WHERE forum_id='.$id.' ORDER BY sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'].') GROUP BY t.id ORDER BY t.sticky DESC, t.last_post DESC';
            break;

        default:
            $sql = 'SELECT p.poster_id AS has_posted, t.id, t.subject, t.poster, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to, t.resolu FROM '.$db->prefix.'topics AS t LEFT JOIN '.$db->prefix.'posts AS p ON t.id=p.topic_id AND p.poster_id='.$pun_user['id'].' WHERE t.forum_id='.$id.' GROUP BY t.id, t.subject, t.poster, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to, p.poster_id ORDER BY sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'];
            break;

Line 165, after :

        if ($cur_topic['moved_to'] != 0)
            $subject = $lang_forum['Moved'].': <a href="viewtopic.php?id='.$cur_topic['moved_to'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
        else if ($cur_topic['closed'] == '0')
            $subject = '<a href="viewtopic.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
        else
        {
            $subject = '<a href="viewtopic.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
            $icon_text = $lang_common['Closed icon'];
            $item_status = 'iclosed';
        }

Add :

            // ICON ETAT
            $forums_icon = array(3,2,17,18,16); // Numbers of the forums concerned (also in viewtopic.php and search.php)
            if(array_search($id,$forums_icon) !== false && $cur_topic['sticky']!='1' && $cur_topic['moved_to']==null) {
                switch($cur_topic['resolu']) {
                    case 0 :
                        $iconetat_src = 'nop';
                        $iconetat_title = 'Topic not-resolved !';
                        $iconetat_alt = '0';
                        break;
                    case 1 :
                        $iconetat_src = 'new';
                        $iconetat_title = 'New topic';
                        $iconetat_alt = '1';
                        break;
                    case 2 :
                        $iconetat_src = 'ok';
                        $iconetat_title = 'Topic resolved';
                        $iconetat_alt = '2';
                        break;
                    default :
                        $iconetat_src = 'new';
                        $iconetat_title = 'New topic';
                        $iconetat_alt = '1';
                        break;
                } $iconetat = '<img class="iconetat" src="img/icon_'.$iconetat_src.'.gif" alt="'.$iconetat_alt.'" title="'.$iconetat_title.'" /> ';
            } else $iconetat='';

Line 211, after :

                            <div class="<?php echo $icon_type ?>"><div class="nosize"><?php echo trim($icon_text) ?></div></div>

Add :

                            <?php if(isset($iconetat)) echo $iconetat ?>

/******* VIEWTOPIC.PHP *******/

Line 96, replace :

// Fetch some info about the topic
if (!$pun_user['is_guest'])
    $result = $db->query('SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, s.user_id AS is_subscribed FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'subscriptions AS s ON (t.id=s.topic_id AND s.user_id='.$pun_user['id'].') LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$id.' AND t.moved_to IS NULL') or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error());
else
    $result = $db->query('SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$id.' AND t.moved_to IS NULL') or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error());

Per :

// Fetch some info about the topic
if (!$pun_user['is_guest'])
    $result = $db->query('SELECT t.subject, t.closed, t.num_replies, t.sticky, t.resolu, t.poster, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, s.user_id AS is_subscribed FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'subscriptions AS s ON (t.id=s.topic_id AND s.user_id='.$pun_user['id'].') LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$id.' AND t.moved_to IS NULL') or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error());
else
    $result = $db->query('SELECT t.subject, t.closed, t.num_replies, t.sticky, t.resolu, t.poster, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$id.' AND t.moved_to IS NULL') or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error());

Line 162, after :

    $subscraction = '<div class="clearer"></div>'."\n";

Add :

// ICON ETAT
$forums_icon = array(3,2,17,18,16); // Numbers of the forums concerned (also in viewforum.php and search.php)
if(array_search($cur_topic['forum_id'],$forums_icon) !== false && $cur_topic['sticky']!='1') {
    $poster_name = mysql_fetch_row($db->query('SELECT username FROM '.$db->prefix.'users WHERE id="'.$pun_user['id'].'"'));
    if($cur_topic['poster'] == $poster_name[0] || $is_admmod === true)
        define('PUN_ICONETAT',1);
    else
        define('PUN_ICONETAT',0);
    if(PUN_ICONETAT == 1) {
        if(isset($_GET['etat']) && ($_GET['etat']==0 || $_GET['etat'] ==2)) {
            $db->query('UPDATE '.$db->prefix.'topics SET resolu='.$_GET['etat'].' WHERE id="'.$id.'"');
            $cur_topic['resolu'] = $_GET['etat'];
        }
    }
    switch($cur_topic['resolu']) {
        case 0 :
            $iconetat_txt = '<strong style="color:#C80815;font-weight:bold">(Not resolved)</strong>';
            $iconetat_change_txt = '<br /> ( <a href="?id='.$id.'&etat=2" style="color:#F00">Mark topic as resolved</a> )';
            break;
        case 1 :
            $iconetat_txt = '';
            $iconetat_change_txt = '<br /> ( <a href="?id='.$id.'&etat=2" style="color:#F00">Mark topic as resolved</a> )';
            break;
        case 2 :
            $iconetat_txt = '<strong style="color:#2c831b;font-weight:bold">(Resolved)</strong>';
            $iconetat_change_txt = '<br /> ( <a href="?id='.$id.'&etat=0" style="color:#F00">Mark topic as not-resolved</a> )';
            break;
        default :
            $iconetat_txt = '';
            $iconetat_change_txt = '<br /> ( <a href="?id='.$id.'&etat=2" style="color:#F00">Mark topic as resolved</a> )';
            break;
    }
    if(PUN_ICONETAT == 0)
        $iconetat_change_txt = '';
}

Line 172, replace :

        <ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a></li><li> » <a href="viewforum.php?id=<?php echo $cur_topic['forum_id'] ?>"><?php echo pun_htmlspecialchars($cur_topic['forum_name']) ?></a></li><li> » <?php echo pun_htmlspecialchars($cur_topic['subject']) ?></li></ul>

Per :

        <ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a></li><li> » <a href="viewforum.php?id=<?php echo $cur_topic['forum_id'] ?>"><?php echo pun_htmlspecialchars($cur_topic['forum_name']) ?></a></li><li> » <?php echo pun_htmlspecialchars($cur_topic['subject']) ?><?php if(isset($iconetat_txt)) echo $iconetat_txt ?> <?php if(isset($iconetat_change_txt)) echo $iconetat_change_txt ?></li></ul>

/******* SEARCH.PHP *******/

Line 456, replace :

            $substr_sql = ($db_type != 'sqlite') ? 'SUBSTRING' : 'SUBSTR';
            $sql = 'SELECT p.id AS pid, p.poster AS pposter, p.posted AS pposted, p.poster_id, '.$substr_sql.'(p.message, 1, 1000) AS message, t.id AS tid, t.poster, t.subject, t.last_post, t.last_post_id, t.last_poster, t.num_replies, t.forum_id FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'topics AS t ON t.id=p.topic_id WHERE p.id IN('.$search_results.') ORDER BY '.$sort_by_sql;
        }
        else
            $sql = 'SELECT t.id AS tid, t.poster, t.subject, t.last_post, t.last_post_id, t.last_poster, t.num_replies, t.closed, t.forum_id FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'topics AS t ON t.id=p.topic_id WHERE t.id IN('.$search_results.') GROUP BY t.id, t.poster, t.subject, t.last_post, t.last_post_id, t.last_poster, t.num_replies, t.closed, t.forum_id'.$group_by_sql.' ORDER BY '.$sort_by_sql;

Per :

            $substr_sql = ($db_type != 'sqlite') ? 'SUBSTRING' : 'SUBSTR';
            $sql = 'SELECT p.id AS pid, p.poster AS pposter, p.posted AS pposted, p.poster_id, '.$substr_sql.'(p.message, 1, 1000) AS message, t.id AS tid, t.poster, t.subject, t.last_post, t.last_post_id, t.last_poster, t.num_replies, t.forum_id, t.resolu FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'topics AS t ON t.id=p.topic_id WHERE p.id IN('.$search_results.') ORDER BY '.$sort_by_sql;
        }
        else
            $sql = 'SELECT t.id AS tid, t.poster, t.subject, t.last_post, t.last_post_id, t.last_poster, t.num_replies, t.closed, t.forum_id, t.resolu FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'topics AS t ON t.id=p.topic_id WHERE t.id IN('.$search_results.') GROUP BY t.id, t.poster, t.subject, t.last_post, t.last_post_id, t.last_poster, t.num_replies, t.closed, t.forum_id'.$group_by_sql.' ORDER BY '.$sort_by_sql;

Line 642, after :

                    $subject .= '  '.(!empty($subject_new_posts) ? $subject_new_posts : '');
                    $subject .= !empty($subject_multipage) ? ' '.$subject_multipage : '';
                }

Add :

                // ICON ETAT
                @reset($forum_list);
                while (list(, $temp) = @each($forum_list)) {
                    if($temp[0] == $search_set[$i]['forum_id']) {
                        $forums_icon = array(3,2,17,18,16); // Numbers of the forums concerned (also in viewforum.php and viewtopic.php)
                        if(array_search($temp[0],$forums_icon) !== false) {
                            switch($search_set[$i]['resolu']) {
                                case 0 :
                                    $iconetat_src = 'nop';
                                    $iconetat_title = 'Topic not resolved !';
                                    $iconetat_alt = '0';
                                    break;
                                case 1 :
                                    $iconetat_src = 'new';
                                    $iconetat_title = 'New topic';
                                    $iconetat_alt = '1';
                                    break;
                                case 2 :
                                    $iconetat_src = 'ok';
                                    $iconetat_title = 'Topic resolved';
                                    $iconetat_alt = '2';
                                    break;
                                default :
                                    $iconetat_src = 'new';
                                    $iconetat_title = 'New topic';
                                    $iconetat_alt = '1';
                                    break;
                            } $iconetat = '<img class="iconetat" src="img/icon_'.$iconetat_src.'.gif" alt="'.$iconetat_alt.'" title="'.$iconetat_title.'" />';
                        } else $iconetat = '';
                    }
                }

Line 642, after :

                            <div class="<?php echo $icon_type ?>"><div class="nosize"><?php echo trim($icon_text) ?></div></div>

Add :

                            <?php if(isset($iconetat)) echo $iconetat ?>

/******* STYLE/OXYGEN.CSS *******/
(or other theme)

At the end, add :

IMG.iconetat {
    FLOAT: left;
    MARGIN-TOP: 0.1em;
    MARGIN-LEFT: 0.5em;
    MARGIN-RIGHT: 0.5em;
    DISPLAY: block;
    BORDER-WIDTH: 0;
}

IMAGES :
img/icon_new.gif
img/icon_ok.gif
img/icon_nop.gif

Sorry for my english.

Exemple : CtrlAltSuppr.com

*****************************
IN INDEX.PHP
****************************

Line 42, replace :

$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 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'].') WHERE fp.read_forum IS NULL OR fp.read_forum=1 ORDER BY c.disp_position, c.id, f.disp_position', true) or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error());

Per :

$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 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'].') 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());

Line 109, replace :

    // If there is a last_post/last_poster.
    if ($cur_forum['last_post'] != '')
        $last_post = '<a href="viewtopic.php?pid='.$cur_forum['last_post_id'].'#p'.$cur_forum['last_post_id'].'">'.format_time($cur_forum['last_post']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_forum['last_poster']).'</span>';
    else
        $last_post = ' ';

Per :

    // Afficher le titre du dernier topic
    $queryid = $db->query('SELECT topic_id FROM '.$db->prefix.'posts WHERE id='.$cur_forum['last_post_id']);
    $idm = $db->result($queryid);
    $queryid = $db->query('SELECT subject FROM '.$db->prefix.'topics WHERE id='.$idm);
    $idm = $db->result($queryid);
    if(strlen($idm) > 30) {
        $idmComp = str_replace('"', "''", $idm);
        $idm = substr($idm, 0, 30).'...';
    } else
        $idmComp = '';

    // If there is a last_post/last_poster.
    if ($cur_forum['last_post'] != '') {
        $idmT = (isset($idmComp)) ? ' title="'.$idmComp.'"' : '';
        $last_post = format_time($cur_forum['last_post']).'<br />dans <a href="viewtopic.php?pid='.$cur_forum['last_post_id'].'#p'.$cur_forum['last_post_id'].'"'.$idmT.'><em>'.$idm.'</em></a><br /><span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_forum['last_poster']).'</span>';
    } else
        $last_post = ' ';

15

(18 replies, posted in News)

Paul wrote:
Jameslicious wrote:

I'm just worried that it'll break when new versions come out.  I hate when that happens sad

Oops!

I will try to maintain SpinkBB for next the version of punBB, no soucis smile

For no duplicate :

Edit post.php, after (~ line 345) :

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

Add :

        $q_message = preg_replace("/\[swf url=([^ ]+) width=([0-9]*) height=([0-9]*)\]/", "[url]$1[/url]", $q_message);

Save and upload.

(sorry for my english)

Edit include/parser.php, after (line ~440) :

    $text = str_replace('<p></p>', '', '<p>'.$text.'</p>');

add :

    // BBCODE - Gestion des swf
    $codeswf = "\n\t\t\t\t\t<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0\" width=\"\$2\" height=\"\$3\">\n\t\t\t\t\t  <param name=\"movie\" value=\"\$1\" />\n\t\t\t\t\t  <param name=\"quality\" value=\"high\" />\n\t\t\t\t\t  <param name=\"loop\" value=\"false\" />\n\t\t\t\t\t  <embed src=\"\$1\" quality=\"high\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"\$2\" height=\"\$3\" loop=\"false\"></embed>\n\t\t\t\t\t</object>\n\t\t\t\t\t";
    $text = preg_replace("/\[swf url=([^ ]+) width=([0-9]*) height=([0-9]*)\]/", $codeswf, $text);

Save and upload (overwrite).

The bbcode syntaxe is :

[swf url=http://www.ndd.nld/flash.swf width=550 height=413]

smile

18

(142 replies, posted in PunBB 1.2 discussion)

CtrlAltSuppr.com

users : 500
topics : 1382
posts : 14316

Hello, very sorry for my english (I'm French).

'Open' and 'Close' from "Moderate this forum" are out.

In moderate.php, at the line 475, replace :

        $db->query('UPDATE '.$db->prefix.'topics SET closed='.$action.' WHERE id IN('.implode(',', array_keys($topics)).')') or error('Unable to close topics', __FILE__, __LINE__, $db->error());

By :

        $db->query('UPDATE '.$db->prefix.'topics SET closed='.$action.' WHERE id IN('.implode(',', $topics).')') or error('Unable to close topics', __FILE__, __LINE__, $db->error());

(sorry for my english, i'm french wink)

Hello everybody smile !

In order to make PunBB I find not easily reacheable for everyone, more avalaible and less "austere", I took the initiative to create a skin creation center for PunBB.
You can generate a whole skin starting from a single color, generate random skins, and in all cases, you always can edit each parameter (colors, effects...) directly on the interface.

All changes are applied in real time on the preview forum, so you are working directly on it before generating the code for your skin you just have to use !

Every thing is possible and all is easy .... 1, 2, 3 skin !

SpinkBB in english
SpinkBB in french
SpinkBB in spain

Go to your phpMyAdmin, and on the left, click on *_online.
View under ident...

22

(15 replies, posted in Archive)

Tout remplacer tu appelles ça une procédure d'upgrade big_smile ?

23

(15 replies, posted in Archive)

Ha, merci smile !

Hé béh faut que je prenne un jour de congé pr changer tout ça big_smile !

Au niveau SQL j'exécute les fichiers update des packs ?

24

(15 replies, posted in Archive)

Hello,

il faut donc remplacer tous les fichiers ??
N'est-ce pas un peu grossiste comme upgrade ?

Peut-on trouver qq part les fichiers exactes à changer pr passer de 1.2.0 à 1.2.2, ou les codes à changer (à la façon des mods).

Il se trouve que j'ai bcp touché au code, j'ai pas mal personnalisé et ça va être laborieux de tout refaire sad......

merci

Aprés tu as des solutions plus exotiques qui permettent de laisser le choix à l'utilisateur : soit il ouvre dans une nouvelle fenêtre (avec JS > compatible Strict), soit dans la même page.
Et si l'utilisateur ne dispose pas de JS (esprit XHTML), ça s'ouvre sans pb et directement sur la page.

Tout le monde n'approuve pas à 100%, mais c'est un bon compromis.
Pour voir par toi même : CtrlAltSuppr.com