1,276

(9 replies, posted in PunBB 1.2 discussion)

Can't anymore; our WiFi is gone now sad

1,277

(2 replies, posted in PunBB 1.2 troubleshooting)

I suppose you can always put a <pun_topic_title> in main.tpl and replace it in topic.php... but the problem here is that on any other page it will stay there and making your code invalid wink
What you could do is add it like this:

<title>Forum <!-- pun_topic_title --></title>

And do a str_replace in viewtopic.php, like this:

$tpl_main = str_replace('<!-- pun_topic_title -->', '- '.$cur_topic['subject'], $tpl_main);

1,278

(9 replies, posted in PunBB 1.2 discussion)

I've been on my local PunBB 1.3 in both IE Mobile and Opera Mobile, and both seemsed to remove the stylesheet.

Don't you have a search function? =/

1,280

(9 replies, posted in PunBB 1.2 discussion)

Yeah, but it doesn't remove the stylesheets when loading up in a mobile browser.

##
##
##            Mod title:     Topic Rating
##
##      Mod version:     1.2
##   Works on PunBB:     1.2.*
##     Release date:     2006-10-27
##           Author:     El Bekko (elbekko@gmail.com)
##
##      Description:     This adds the ability to give a topic a rating
##
##  Difference with
## previous version:     Fixed a language error, moved the language defs to a
##                        separate file, shows rating in viewforum.php
##
##   Affected files:     viewtopic.php
##                        viewforum.php
##
##       Affects DB:     Yes
##
##            Notes:    I took the pictures from the reputation mod as they're perfect
##
##       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.
##
##
##

Download here
Discuss here

Almost done, just creating the readme now (sigh, that takes long even with the generator I made -.-).

1,283

(15 replies, posted in PunBB 1.2 troubleshooting)

You could always just contact them and ask what's going on tongue

1,284

(15 replies, posted in PunBB 1.2 troubleshooting)

mod_security has nothing to do with PunBB wink It's a protection that comes from your host and analyses POST data.

1,285

(15 replies, posted in PunBB 1.2 troubleshooting)

Weird. Maybe you have some mod_security rules that block words in that that post or so =/

1,286

(15 replies, posted in PunBB 1.2 troubleshooting)

Making a thread worked fine for me >=/

1,287

(15 replies, posted in PunBB 1.2 troubleshooting)

Link?

I have some free time on my hands; I suppose I can update your mod for you smile

EDIT: Or even better, I'll just recreate it tongue

1,289

(15 replies, posted in PunBB 1.2 troubleshooting)

Delete all the files in the cache folder and chmod it again.

And why the hell are you setting your base url to google? >=/

1,290

(1 replies, posted in PunBB 1.2 troubleshooting)

You're echoing a MySQL resource. You need to do $db->result() or $db->fetch_assoc() on it and use the resulting string/array smile

I'll give you an example:

$stats_res = $db->query('SELECT username FROM '.$db->prefix.'users WHERE id='.$id);
$stats_data = $db->fetch_assoc($stats_res);
echo $stats_data['username'];

Or you could update your mod to do it decently tongue

Make topic_id unique, and use an INSERT INTO ... ON DUPLICATE KEY UPDATE query.

1,292

(9 replies, posted in PunBB 1.2 discussion)

I noticed too that PunBB posts are unreadable from IE and Opera Mobile.

PunBB 1.3's fully compliant XHTML code should solve this, as no style will be applied when loading it in your mobile browser wink

http://www.google.co.uk/intl/en_uk/images/logo.gif

Works fine for me in lowercase:

[url=http://www.google.co.uk][img]http://www.google.co.uk/intl/en_uk/images/logo.gif[/img][/url]

EDIT: sorry, read it wrong...

But yeah, PunBB converts it... so it might be easier to run through a script that applies preparse_bbcode() on the post.

Might be heavy if you have alot of those tho hmm

1,294

(4 replies, posted in PunBB 1.2 troubleshooting)

Never had any avatar problems on PHP5... but that's always with Apache.
Might be a request bug in lighttpd =/

Unless topics can get multiple ratings it shouldn't be any problem =/

1,296

(19 replies, posted in PunBB 1.2 troubleshooting)

Chmod the cache folder to 777.

For the mail: most SMTP hosts (being your ISP's most likely) disallow connections from outside IP adresses. That's why it worked locally but not on your webhosting.
Find a free SMTP service or webhosting with decent mail() support wink

1,297

(8 replies, posted in Programming)

Erm, pogenwurst, what did foreach() ever do to you? sad

<?php
$links = array(array('link', 'label'), array('link', 'label'));
shuffle($links);
foreach($links as $link_arr)
{
    echo '<a href="'.$link_arr[0].'">'.$link_arr[1].'</a>'."<br />\n"
}
?>

Too bad shuffle() messes up keys =/

Do you have any .htaccess files in your forum/ directory?

$result = $db->query("SELECT t.poster, t.subject, r.rate FROM ".$db->prefix."topics AS t JOIN ".$db->prefix."ratings AS r ON t.id=r.topic_id ORDER BY r.rate DESC LIMIT 5") or error('Unable to fetch ranked topics', __FILE__, __LINE__, $db->error());

I think this should do it smile I suppose you know how to get the data from the query tongue

I'll post the join query later on, but now I have something else to do smile