Check out how this guy coded it for extended bbcode - ideally you could make yours extension aswell and publish

http://punbb.informer.com/forums/topic/ … stify-v11/

Hm. Well what my bank does for example is just put up a page with information about how to clear cache. But for a forum I don't see the point as no information is sensitive....

Maybe you could just show the logout message longer and put some link or information on how to clear cache there.

tokyo wrote:

dont make their history go away

Which history exactely?!

shaheart wrote:

Have you edited that to work for 1.3.x ?

  No

shaheart wrote:

Why are there bits in red?

Those are what the code is in 1.3.x , black in this 1.2.x mod.

755

(10 replies, posted in PunBB 1.3 additions)

Okay....btw: why don't you put yourself on this wiki page:
http://punbb.informer.com/wiki/support
no reason why you can't be official norwegian support if no one else is doing it ...

we just need someone to tell you what to do at step 7 and 9 big_smile


##
##
##        Mod title:  Collapsable Categories
##
##      Mod version:  1.5
##   Works on PunBB:  1.2.*
##     Release date:  2006-08-27
##           Author:  Mike Lanman
##
##      Description:  Adds the abillity to collapse/expand categories. (like in Invision Power Board)
##
##   Affected files:  header.php
##                    index.php
##
##       Affects DB:  No
##
##            Notes:  1.) There are 2 other sets of icons included if you dont
##                        like the default. just upload thoes to img/ insted of
##                        the default ones.
##
##                    2.) Per style icons are avaible. just add them to
##                        "img/<your style>/" and keep the same file names.
##
##                    3.) In this version there is no way to use text, only
##                        images. In a sub version, ill try to find a way to be
##                        able to use text.
##
##       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 TO / ]---------------------------------------------------
#

img/
include/


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

header.php


#
#---------[ 3. FIND (line:65)]-------------------------------------------------
#

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


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

<script type="text/javascript" src="include/global.js"></script>


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

index.php


#
#---------[ 6. FIND (line:45)]-------------------------------------------------
#

$cur_category = 0;
$cat_count = 0;

line 88

$forum_page['cur_category'] = $forum_page['cat_count'] = $forum_page['item_count'] = 0;

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

// stuff for toggling categories
$cat_ids = (isset($_COOKIE['collapseprefs']))? $_COOKIE['collapseprefs'].',': FALSE;


#
#---------[ 8. FIND (line:57)]-------------------------------------------------
#

?>
<div id="idx<?php echo $cat_count ?>" class="blocktable">
    <h2><span><?php echo pun_htmlspecialchars($cur_forum['cat_name']) ?></span></h2>
    <div class="box">


lines 114-121?

?>    <div class="main-head">
        <h2 class="hn"><span><?php echo forum_htmlencode($cur_forum['cat_name']) ?></span></h2>
    </div>
    <div class="main-subhead">
        <p class="item-summary"><span><?php printf($lang_index['Category subtitle'], implode(' ', $forum_page['item_header']['subject']), implode(', ', $forum_page['item_header']['info'])) ?></span></p>
    </div>
    <div id="category<?php echo $forum_page['cat_count'] ?>" class="main-content main-category">
<?php

#
#---------[ 9. REPLACE WITH ]--------------------------------------------------
#

        // Setting varibles for toggling categories
        $div_box = strstr($cat_ids, $cat_count.',')? ' style="display:none"' : '';
        $exp_img = (is_file('img/'.$pun_user['style'].'/exp_down.png')? 'img/'.$pun_user['style'].'/': 'img/') . (strpos($div_box,'none') ? 'exp_down.png' : 'exp_up.png');
?>
<div id="idx<?php echo $cat_count ?>" class="blocktable">
    <h2>
        <span class="conr"><a href="javascript:togglecategory(<?php echo $cat_count?>);"><img src="<?php echo $exp_img?>" alt="Collapse" id="img_<?php echo $cat_count?>" /></a></span>
        <span><?php echo pun_htmlspecialchars($cur_forum['cat_name']) ?></span>
    </h2>
    <div class="box" id="box_<?php echo $cat_count ?>"<?php echo $div_box?>>
   
   
#
#---------[ 10. SAVE/UPLOAD ]--------------------------------------------------
#

shaheart wrote:

there is one of these for 1.2.x

Link to it?

see this list:
http://punbb.informer.com/wiki/punbb13/extensions

if you find out what profile fields you want that don't exist --> feel free to add the request to the wiki
http://punbb.informer.com/wiki/punbb13/ … n_requests

Grez wrote:

allow registration for users with less than some frequency rate (for example 5?)

  • The best would be if that can be set my admin; "Minimum No Of Sightings Required To Block"

I'd want 1. Why?
Of 82 registrations blocked by this extension on a testsite last 7 days, 12 were 5 or less sightings. But the sightings were mostly fresh for the <=5. So I'd personally prefer to still not see those.

Grez wrote:

if frequency is bigger than 5 he can't register, if not he can register but he's warned that if his posts don't get "nospam" approval from mods or users in next week (for example) he'll banned.

I think this is good , as an option IF someone wants to double check.

Glad you agree, found some code in a old Rich Pedley Extension called Forum Fixes And Imgs (Beta) that adds the images with css....

Now I was trying to do the same but DROPPING the text link from lang/post.php  - but just deleting or changing text in post.php didn't work for me....

I'm trying to have the images (inserted with extensions imgs.css) replace the text

dirty version:


in viewforum.php

old line
$forum_page['page_post']['posting'] = '<p class="posting"><a class="newpost" href="'.forum_link($forum_url['new_topic'], $id).'"><span>'.$lang_topic['Post new topic'].'</span></a></p>';
   
HOW WOULD I DO THIS CORRECTLY VIA EXTENSION?   

new line
$forum_page['page_post']['posting'] = '<p class="posting"><a class="newpost" href="'.forum_link($forum_url['new_topic'], $id).'"></a></p>';


new additional stylesheeet

/imgs.css

.newpost, .newreply{
    padding-left: 90px;
    padding-top:3px;
}

.posting .newpost{
    background:transparent url(images/new_topic.gif) no-repeat center left;
}

.posting .newreply{
    background:transparent url(images/reply.gif) no-repeat center left;
}


extensions manifest.xml needs several lines like this (see extension link below for full code))

        <hook id="hd_head">
            <![CDATA[
            $forum_head[] = '<link rel="stylesheet" type="text/css" media="screen" href="'.$ext_info['url'].'/imgs.css" />';
            ]]>
        </hook>


       
based on
http://www.mediafire.com/file/zjywwo1uo … s_imgs.zip

I noticed we're using newpost class two times, once for  Post new topic   and once for Post reply
is it possible to

change

<a class="newpost" ...

to

<a class="newreply" ...

on line 195

as newpost already appears in viewforum.php


or change line 122 of viewforum.php from newpost to newtopic ...

Good stuff! My user lists are too clean though big_smile No records
Why don't you publish it under 1.3 Additions aswell seperately. It's a good project!

@ Slavok or alexp
you might want to try it on this site? Or give Grez access to test it?
also any chance of installing the stopforumspam extension here for further testing and improvement?

in extension/lang/English.php

find and replace word Karma

Ok probably best idea is if I close this topic and you post your code question in that other thread. So that people who posted and subscribed there see your questions/issues.

Hello and welcome

Did you check this post?
http://punbb.informer.com/forums/topic/ … b-posting/

For 1.3 Extension feature requests you can use this wiki page
http://punbb.informer.com/wiki/punbb13/ … n_requests

The 1.2 Mod you are currently using isn't compatible to 1.3.

Sure it would be a popular extension though...

I wanted to know if there's a way to set the maximum number of hours/days before the activation link for email registration expires?

If an admin is monitoring registrations though userlist, but users still are added to list 3-4 days back, it can make the job more time consuming.

I can't seem to find how to replace several links with images.
Ideally I'd like to be able to change "New posts", "Active topics", "Unanswered topics", "New messages", "Post new Topic",  "Post Reply"....

With the hook "fn_generate_navlinks_end" it had been possible like so (example)

$links['index'] = '<li id="navindex"'.((FORUM_PAGE == 'index') ? ' class="isactive"' : '').'><a href="'.forum_link($forum_url['index']).'" title="Index"><img src="'.$ext_info['path'].'/img/navindex.png" alt="Index" /></a></li>';

[see navlinks extension for full code or this demo website for example]

Another question; if I have my forum open to guest posting (with email required and username) of course I still get a lot of registrations from spammers. But those are nearly always in the SFS db. So would it be here (in post.php) that we could incorp another check (if user is guest). Especially if Pun Approval for posts is activated it cut down a lot of posts to approve I imagine!

lines 92-100 shown below

// Do we have permission to post?
if ((($tid && (($cur_posting['post_replies'] == '' && $forum_user['g_post_replies'] == '0') || $cur_posting['post_replies'] == '0')) ||
    ($fid && (($cur_posting['post_topics'] == '' && $forum_user['g_post_topics'] == '0') || $cur_posting['post_topics'] == '0')) ||
    (isset($cur_posting['closed']) && $cur_posting['closed'] == '1')) &&
    !$forum_page['is_admmod'])
    message($lang_common['No permission']);


($hook = get_hook('po_posting_location_selected')) ? eval($hook) : null;
Grez wrote:

why check IP's each time someone's logging in?

I think it's only interesting (potentially)  IF someone already has 3'000-10'000 users and just wants to make sure that the users logging in aren't just changing backlinks/signatures etc. but....

Grez wrote:

there's easier way to check registered users. Actually I wrote a script for that yesterday.

That's basically the endresult I was thinking of (a bit naively) smile

Grez wrote:

users on my forum I found that some of them were using IPs that were at SFS.com

Surprised by that. Is it TOR users? Because most registrations I see by bots are from India, Pakistan, USA, Philippines, China...

770

(10 replies, posted in PunBB 1.3 additions)

Good stuff. Are you going to have a forum ? Doesn't seem to be online at the moment (just info pages?)....

big_smile

btw:  Would it make sense, especially if someone has a large userbase already, with many spammer registrations, to run the same query on login.php? Then if there's a match DELETE the profile (or at least signal it).

somewhere here:

// Login
if (isset($_POST['form_sent']) && empty($action))
{
    $form_username = forum_trim($_POST['req_username']);
    $form_password = forum_trim($_POST['req_password']);
    $save_pass = isset($_POST['save_pass']);

    ($hook = get_hook('li_login_form_submitted')) ? eval($hook) : null;

    // Get user info matching login attempt
    $query = array(
        'SELECT'    => 'u.id, u.group_id, u.password, u.salt',
        'FROM'        => 'users AS u'
    );

    if ($db_type == 'mysql' || $db_type == 'mysqli')
        $query['WHERE'] = 'username=\''.$forum_db->escape($form_username).'\'';
    else
        $query['WHERE'] = 'LOWER(username)=LOWER(\''.$forum_db->escape($form_username).'\')';

    ($hook = get_hook('li_login_qr_get_login_data')) ? eval($hook) : null;
    $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
    list($user_id, $group_id, $db_password_hash, $salt) = $forum_db->fetch_row($result);

    $authorized = false;
    if (!empty($db_password_hash))
Slavok wrote:

Can this extension work when JS is disabled?

I don't think so, but best to ask KANekT directly in the release thread

Slavok wrote:

We have Antispam extension installed.

Isn't the CAPTCHA a bit weak? Simple for OCR software to crack...

Backup Version of Stopforumspam:
http://www.mediafire.com/file/vmsfi43m7 … _0.9.7.zip

774

(6 replies, posted in PunBB 1.3 troubleshooting)

I'd try and contact your hosts support and explain that you haven't changed anything and suddenly getting MySQL error above.

I believe I had something similiar once and contacted my support them, turned out they had updated something/ newer version etc.

Tell them exactely when it stopped working etc....

775

(6 replies, posted in PunBB 1.3 troubleshooting)

No better leave it for mom.
Another question: Are the old and the new forum running the same version of MySQL? or what versions were/are they running...