1

(15 replies, posted in News)

For one forum I haven't updated punbb for a very long time. Should an update from 1.2 directly to 1.4 work?

pogenwurst wrote:

Or are you suggesting that the last post for the whole forum should be checked, regardless of who posted it?

Yes something like that. If the last posting in the actual topic is not x seconds in the past minimum, no new posting is allowed. Is that clear?

I just had to delete 10-15 posts send by an spam-bot. But these posts were all send one post per second. Perhaps it would be an easy and not-to-complex addition to PunBB to check if the last post is a certain number of seconds in the past when saving a new post? So lets say that only every 10 seconds a new posting is possible? This would have reduced the spam in my forum down to 10%.

4

(1 replies, posted in Feature requests)

Most of the webmasters are using the amazon associates programm to earn some cash. But when users are posting links to an amazon product the associate-id is missing and the admin has to put it there manually.

It would be nice if the parser could recognize amazon links and puts the associate-id in (saved somewhere in the admin options). It should also be able to see if an associate-id is used which isn't set in the preferences and changes it to the correct one.

Perhaps an option for version 1.3?

Try changing the "LIMIT ..." query at the end to "LIMIT 0, 1"?

6

(37 replies, posted in News)

Rickard wrote:

Carsten: Does you see that problem in these forums as well?

Ehm... No but I don't see this error at all anymore!? Perhaps some caching problem with my browser? I didn't closed it while updating from 1.5 to 1.2/1.2.2. perhaps he had some old stylesheets left in the cache.

7

(37 replies, posted in News)

Under Opera 7.54u2 I've some strange behavior with the navigation-row at the bottom:

http://www.musik-sammler.de/gfx/css_bug.gif

Try out MySQLDumper: http://www.mysqldumper.de
I can't say anything about the english documentation but you can do the following:

- install MySQLDumper on both your old and new server
- make a backup of your complete database and download it as a .gz file
- copy this backup-file in the right folder on your new server
- use MySQLDumper to load the backup and reconstruct your database

It works fine for me and you don't have to deal with shell access or upload limits.

9

(142 replies, posted in News)

I successfully updated my forum too. It took me longer to adapt the stylesheets than to update the forum... wink

10

(12 replies, posted in PunBB 1.2 bug reports)

Rod wrote:
An error was encountered 
File: /home/www/rbn/forum/11_to_12_update.php
Line: 69

I got the same error when I tried to make an update on my local machine as a test run. In my config.php I had the wrong database and prefix because I tried PunBB 1.2 Beta some days ago. After I changed to the old 1.5 database and prefix the error was gone. Perhaps it was your database-connection too?

Oh thank you! That's exactly what I needed right now in this moment! smile

12

(6 replies, posted in Feature requests)

Hello!

I'm running a german movie website and one of the disadvantages of discussing movies in a forum is: how can you tell important details of a movie without ruining the fun for people who haven't seen the movie? If you tell the surprise ending of a film somebody who wanted to see the movie will surely kill you.

So, I tried to make a workaround. It's not a real mod, only some additional lines in two scripts (version 1.1.2!). It works as follows:

[spoiler]This text will tell you the murderer.[/spoiler]

This will print your text like a quote, but in a almost unreadable color, nearly the same as the background color.

For an example have a look in this thread I've just started: http://www.senseofview.de/forum/viewtopic.php?id=109
The text is in german but I think you can see the functionality.

So, what have I changed? The only scripts I modified are edit.php and includes/parser.php and you have to make some additions in your style sheets.

Okay, first edit.php. In lines 112 and 113 I changed

$a = array("#\[quote\]#i", "#\[quote=#i" ... "#\[url=#i", "#\[/url\]#i");
$b = array('[quote]', '[quote=', '[/quote]', ... '[url]', '[url=', '[/url]');

to

$a = array("#\[quote\]#i", "#\[quote=#i" ... "#\[url=#i", "#\[/url\]#i", "#\[spoiler\]#i", "#\[/spoiler\]#i");
$b = array('[quote]', '[quote=' ... '[url]', '[url=', '[/url]', '[spoiler]', '[/spoiler]');

In includes/parser.php there is something more to do. Well, look around line 80 for:

$q_start = strpos($text, '[quote]');
$q_end = strpos($text, '[/quote]');

and add in the next line:

$s_start = strpos($text, '[spoiler]');
$s_end = strpos($text, '[/spoiler]');

Just some lines below add:

if ($s_start === false) $s_start = 65536;
if ($s_end === false) $s_end = 65536;

And below change

if (min($c_start, $c_end, $q_start, $q_end, $q2_start) == 65536)

to

if (min($c_start, $c_end, $q_start, $q_end, $q2_start, $s_start, $s_end) == 65536)

Below that you'll find something like this:

else if ($c_start < min($c_end, $q_start, $q_end))
{
  ...
}
else if ($c_end < min($c_start, $q_start, $q_end))
  message($lang_common['BBCode error'].' '.$lang_common['BBCode error 3']);

Just add almost the same, only modified for the spoiler tags:

// We found a [spoiler]
else if ($s_start < min($s_end, $q_start, $q_end))
{
    $tmp = strpos($text, '[/spoiler]');
    if ($tmp === false)
        message($lang_common['BBCode error'].' '.$lang_common['BBCode error 2']);
    else
        $text = substr($text, $tmp+10);

    $cur_index += $tmp+10;
}

// We found a [/spoiler] (this shouldn't happen since we handle both start and end tag in the if clause above)
else if ($s_end < min($s_start, $q_start, $q_end))
    message($lang_common['BBCode error'].' '.$lang_common['BBCode error 3']);

Search for the following line:

if (strpos($message, 'quote') !== false)

After the end of the if-clause add this:

if (strpos($message, 'spoiler') !== false)
{
    $message = str_replace('[spoiler]', '<br></span><table style="width:99%" align="center" cellspacing="4" cellpadding="6"><tr><td class="punspoiler"><span class="puntext"><strong>SPOILER!</strong></span><br><span class="punspoilertext">', $message);
    $message = str_replace('[/spoiler]', '</span></td></tr></table><span class="puntext">', $message);
}

That's it! As a last step you've to add to new classes to your style sheets. Just copy the TD.punquote and paste it as TD.punspoiler. And somewhere add a ".punspoilertext", which has a slightly darker color than the background-color of TD.punspoiler. Example:

TD.punspoiler {
    background-color: #F6F6F6;
    border: #606060;
    border-style: dashed;
    border-width: 1px
}
.punspoilertext { color: #D4D4D4; }

So, i hope this wasn't too confusing. If I missed important lines of the PunBB source it would be nice if you can show me where.

13

(2 replies, posted in PunBB 1.2 show off)

Oh, wow. Thank you! smile

14

(2 replies, posted in PunBB 1.2 show off)

I'm running a german movie site for 5 years now and recently I started a new forum with punBB. So if somebody wants to have a look at it:

http://www.senseofview.de is my site.
http://forum.senseofview.de is the forum.

By the way: nice work Rickard!

Hello!

I'm running a website where every 1 or 2 days I publish some news about movie or dvd related topics. Like "label XY is going to release DVD YZ in March...", anything like that. I have my own news system for that.

Is it possible with PunBB that I include a PunBB-script, call a function with all needed parameters and every new news is posted in the forum too?

This would be great.


Regards,

Carsten

16

(180 replies, posted in PunBB 1.2 troubleshooting)

Oh thanks, yeah. I didn't thought about that. Why doing it the easy way when there's a hard way...

17

(180 replies, posted in PunBB 1.2 troubleshooting)

Thanks for your reply. I got around this by commenting out the rows for the referer check in the source code and undo this when I made my updates. It's not that big problem for me because from home it all works properly. Thanks anyway. smile

18

(180 replies, posted in PunBB 1.2 troubleshooting)

It's my first post here and I've just started using punBB some days ago. Nice System! smile

Anyway, I get the Bad Referer error message too. But only at work because here is a firewall installed which filters the referer. I'm cannot disable this so this is a case which can't be solved?