Hi
If your main site uses Wordpress you should check this topic.
If you are using other CMS or your own, I guess you'll have to study the code and programme it for yourself. This wiki page could help you with that.
You are not logged in. Please login or register.
PunBB Forums → Posts by Grez
Hi
If your main site uses Wordpress you should check this topic.
If you are using other CMS or your own, I guess you'll have to study the code and programme it for yourself. This wiki page could help you with that.
But with that the url is not working then, is it?
Actually purpose of this extension isn't imo to "block spambots" but to show them to admin, so he can ban + delete them. And I think the bot will firstly try "working" way, before trying backslashs and so
Grez wrote:There are some bugs in core
Which ones are you thinking of?
http://punbb.informer.com/forums/topic/ … -revealed/ - [Ticket]
http://punbb.informer.com/forums/topic/ … ags-error/ - [Ticket]
http://punbb.informer.com/forums/topic/ … ars-twice/ - [Ticket]
http://punbb.informer.com/forums/topic/ … on-needed/ - [Ticket]
http://punbb.informer.com/forums/topic/ … ord-admod/ - [Ticket]
http://punbb.informer.com/forums/topic/ … g-problem/ - [Ticket]
As well, I would suggest to change Visit timeout description, since the current one isn't really informing...
'Visit timeout help' => 'Seconds idle before last visit data is updated',
I suggest something like this
'Seconds idle before user is logged out'
And also I think one little change could be done at rss feeds.
I'm browsing bugs that should be fixed at 1.3.5 so sorry for little bump, but I'm thinking, that most users have default setting of showing email (= disabled).
So wouldn't it be better, when the feed would produce <author>Nick</author>, when email showing is disabled, and <author>Nick (mail@whatever)</author> when it is allowed?
@nhodges Sorry, haven't looked the code carefully enough - the $post_info is isset, but $post_info['topic_id'] is not
$post_info is not isset when you are creating a new topic so you can't do this
[code=php]send_subscriptions($post_info, $new_pid);[/code]
BTW, just noticed - there's no link in Preview - could it be added there too?
You could use hook "co_common" and alter $forum_user['style'] if it's $mobile_browser
Altering table structure (or if you like 'adding cols') to users table is imo best solution for user's config - it's loaded automatically so you can use it from array $forum_user.
For global config you should use 'config' table, since the options are cached.
And for other stuff... Personally I use other mysql tables, but I guess it's only matter of choice (you can use files as well...)
And wasn't the url invisible for guests? Since I guess it could be feature (since guest shouldn't know about that topic)
Looking cool BTW, don't forget to add your extensions to Wiki's Extension list
@Huuuze: Ah, haven't thought about another possible Guest aliases...
So, this code, should work for everyone (no matter how is his "guest" called)
[code=php]$gen_elements['<!-- forum_announcement -->'] = ($forum_config['o_announcement'] == '1' && $forum_user['g_read_board'] == '1' && $forum_user['group_id'] == 2) ? '<div id="brd-announcement" class="gen-content">'.($forum_config['o_announcement_heading'] != '' ? "\n\t".'<h1 class="hn"><span>'.$forum_config['o_announcement_heading'].'</span></h1>' : '')."\n\t".'<div class="content">'.$forum_config['o_announcement_message'].'</div>'."\n".'</div>'."\n" : '';[/code]
For SFS and Url checker you can use hook ain_items_end and this code
[code=php] <div class="ct-set group-item<?php echo ++$forum_page['item_count'] ?>">
<div class="ct-box">
<h3 class="ct-legend hn"><span>StopForumSpam.com</span></h3>
<ul class="data-list">
<?php
$query = array(
'SELECT' => 'count(*)',
'FROM' => 'stopforumspam'
);
$result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
list($sfs) = $forum_db->fetch_row($result);
?>
<li><span><?php echo $sfs; ?> bots blocked</span></li>
</ul>
</div>
</div>
<div class="ct-set group-item<?php echo ++$forum_page['item_count'] ?>">
<div class="ct-box">
<h3 class="ct-legend hn"><span>URL spam checker</span></h3>
<ul class="data-list">
<?php
$query = array(
'SELECT' => 'u.username, us.ip, us.url, DATE_FORMAT(us.time, \'%Y-%m-%d\') AS date, us.type',
'FROM' => 'url_spam AS us',
'JOINS' => array(
array(
'LEFT JOIN' => 'users AS u',
'ON' => 'u.id = us.user_id',
),
),
'ORDER BY' => 'time DESC',
);
$result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
?>
<li><table>
<tr><th style="width: 100px;">User</th><th style="width: 70px;">IP</th><th style="width: 300px;">URL</th><th style="width: 70px;">Date</th><th style="width: 50px;">Type</th></tr>
<?php
while($spam = $forum_db->fetch_assoc($result)) {
echo "<tr>";
echo "<td>".$spam['username']."</td>";
echo "<td>".$spam['ip']."</td>";
echo "<td><small>".$spam['url']."</small></td>";
echo "<td>".$spam['date']."</td>";
echo "<td>".$spam['type']."</td>";
echo "</tr>";
}
?>
</table>
<center><i>Last 25 entries. Ordered by date.</i></center></li>
</ul>
</div>
</div>[/code]
Output is like this (administration index)
@Huuuze Installing it would be nice thing to do
Disable poll extension. There's en error in code (2 times " instead of only once) and since your forum sends header application/xhtml+xml instead text/html (which I have no idea how you've done) you'll get this error
Everything's possible But I'm thinking whether "silent updates" shouldn't be added into PunBB core as well (of course, with option to disable it, for people who change their forum's source code).
You know, fixing security bugs is important, but people are lazy to update. I don't know how about PunBB (developers could help here - how many % of queries to http://punbb.informer.com/update/ are from older versions?) but with browsers it's common, that there's a lot of not updated installations...
Hi. Try to enable debug mode please.
Note: For detailed error information (necessary for troubleshooting), enable "DEBUG mode". To enable "DEBUG mode", open up the file config.php in a text editor, add a line that looks like "define('FORUM_DEBUG', 1);" (without the quotation marks), and re-upload the file. Once you've solved the problem, it is recommended that "DEBUG mode" be turned off again (just remove the line from the file and re-upload it).
That's bad Found out, that \pL isn't supported in old version of PCRE, so you'll to upgrade it...
Anyway, this code should at least check php version and then use newer (working) or older (buggy, but not working properly) syntax
[code=php]if(PHP_VERSION >= 5.1) {
$search_for[$censor_key] = '/(?<!\pL)'.str_replace('\*', '\w*?', preg_quote($cur_word['search_for'], '/')).'(?!\pL)/iu';
} else {
//Contains bug with utf8 words, but couldn't find a way to solve it with old pcre
$search_for[$censor_key] = '/(?<=\W)('.str_replace('\*', '\w*?', preg_quote($cur_word['search_for'], '/')).')(?=\W)/iu';
}[/code]
//Grez: Added ticket
/admin/groups.php?edit_group=3
that's where such a feature option would be added right?
IMO it's not necessary, I guess in 99% times you'd like to block signatures and web as well so you don't need any option at all. I think I'll make it all directly in the code (Yup, I'm lazy )
Yea, I know what you mean - when you want to take someone's admin rights away you can't do it in his/her profile, but you have to go Administration > Users > Search > search that user > mark him and 'change group'
And as I'm thinking about it's little bit weird and it's another feature that should be implemented in 1.3.5
Or... there could be an extension, which would disallow people adding signatures and urls websites without any posts
Guess that would be better, than such email, right?
If admod wants to change his password, he doesn't need to enter his old one => could get funny when you go afk for few minutes
profile.php, line 339:
<?php if (!$forum_user['is_admmod']): ?>
replace with:
<?php if (!$forum_user['is_admmod'] || $forum_user['id'] == $id): ?>
Extensions used (installed): 'x' (x being a link that takes user to page with more information)...
I agree that there should be included unofficial extensions as well, but imo you don't need to have another page with info about those extensions. If it would be link to the Wiki page with extensions, that would be imo better.
Add unofficial extensions to punbb.informer.com Repository
That should also include reworking extension repository a little bit (sorting to categories...) - there's 23 official extensions - it would be real mess with adding those unofficial...
But imo even if this won't added I believe there should be 1.3.5 soon. There are some bugs in core, and well... the community would need some kind of signal like "We are still here. Join us." Otherwise PunBB will die
Ok, I had to Google a lot, but finally with StackOwerflow's help found solution
Replace line 809 in functions.php
$search_for[$censor_key] = '/(?<=\W)('.str_replace('\*', '\w*?', preg_quote($cur_word['search_for'], '/')).')(?=\W)/iu';
With
$search_for[$censor_key] = '/(?<!\pL)'.str_replace('\*', '\w*?', preg_quote($cur_word['search_for'], '/')).'(?!\pL)/iu';
And it should work ok
@tokyo Weird, just tried it out, and works fine for me
Guess this script should be used on this forum as well... I was updating Who uses PunBB at Wiki, and found out, that in last two years this forum grown with 26k new users, but only 3k topics and 20k posts
PunBB Forums → Posts by Grez
Powered by PunBB, supported by Informer Technologies, Inc.