276 2008-01-24 11:12
Re: Problem With Broadcast Email (13 replies, posted in PunBB 1.2 troubleshooting)
277 2008-01-24 07:56
Re: Adding to the warning mod. (12 replies, posted in General discussion)
Change
if(regExpFile("#install_mod.*#i", './') && ($pun_user['g_id'] == PUN_ADMIN))
to
if(regExpFile("#install_mod.*#i", './') || regExpFile("#file_2.*#i", './' || regExpFile("#file3.*#i", './')) && ($pun_user['g_id'] == PUN_ADMIN))
Also, it' sad to see that I wrote code so badly ages ago =P
278 2008-01-22 17:58
Re: base URL, intranet only and limited external access (5 replies, posted in PunBB 1.2 troubleshooting)
Let's see...
Open functions.php
Replace
function confirm_referrer($script)
{
global $pun_config, $lang_common;
if (!preg_match('#^'.preg_quote(str_replace('www.', '', $pun_config['o_base_url']).'/'.$script, '#').'#i', str_replace('www.', '', (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''))))
message($lang_common['Bad referrer']);
}
With
function confirm_referrer($script)
{
global $pun_config, $lang_common;
$baseurls = array(
'url1',
'url2');
$bad = true;
foreach($baseurls as $baseurl)
if (preg_match('#^'.preg_quote(str_replace('www.', '', $baseurl).'/'.$script, '#').'#i', str_replace('www.', '', (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''))))
$bad = false;
if($bad)
message($lang_common['Bad referrer']);
}
Note that it's untested and you can't use the admin config setting anymore.
279 2008-01-22 16:56
Re: base URL, intranet only and limited external access (5 replies, posted in PunBB 1.2 troubleshooting)
You could also look into setting up multiple base URLs.
280 2008-01-21 21:07
Re: Calendar script (non PunBB related) (2 replies, posted in Programming)
Google Calendar?
281 2008-01-19 20:24
Re: Problem with my active topics mod. (12 replies, posted in General discussion)
Oh right, sorry
282 2008-01-19 19:58
Re: Problem with my active topics mod. (12 replies, posted in General discussion)
Let's see...
$result = $db->query('
SELECT p.poster_id AS has_posted, t.*
FROM '.$db->prefix.'topics AS t
LEFT JOIN '.$db->prefix.'posts AS p ON p.id=p.topic_id AND p.poster_id='.$pun_user['id'].'
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
)
GROUP BY p.id
ORDER BY t.last_post DESC
LIMIT '.$ak_limit
)
I believe that should do to group by thread.
283 2008-01-19 19:40
Re: Problem with my active topics mod. (12 replies, posted in General discussion)
It's slow as crap tho. You're usually better off grouping by the repeating column, alot faster.
284 2008-01-19 18:27
Re: Forum Growing FAST - Need Contractors To Optimize My Server / PunBB (22 replies, posted in PunBB 1.2 troubleshooting)
Apache is probably much better for balancing such great load. I bet it'd have Lighttpd in tears.
A slow query log could definitely find some bottlenecks.
Another good idea would be to implement FULLTEXT searching, to reduce search load.
285 2008-01-19 15:52
Re: [1.3] Simple configuration for extensions (6 replies, posted in Feature requests)
There should be an install section in which you can just execute queries. I don't see how exactly this would be useful.
286 2008-01-19 10:03
Re: rules and announcement gone! (4 replies, posted in PunBB 1.2 troubleshooting)
Changing the style shouldn't do that.
287 2008-01-18 15:11
Re: MySQL version poll (51 replies, posted in PunBB 1.2 discussion)
mysql Ver 14.12 Distrib 5.0.22
5.0.24a-standard-log
288 2008-01-18 15:08
Re: mt_rand() not random enough (3 replies, posted in PunBB 1.2 bug reports)
mt_rand() is about as random as you can get without using much more complex algorithms
A solution would be to generate a few random numbers, look them up and use the first one that isn't taken.
289 2008-01-17 20:54
Re: Separate user and forum db's (17 replies, posted in Programming)
Looks like annoying syntax when doing joins.
290 2008-01-16 22:16
Re: Separate user and forum db's (17 replies, posted in Programming)
He's probably using pgSQL.
291 2008-01-16 13:27
Re: The search function (40 replies, posted in Programming)
When searching for '*????*' it worked.
292 2008-01-15 18:25
Re: 1.3 suggestion - bbcode for font size (9 replies, posted in PunBB 1.2 discussion)
Indeed. Allowing style directly would be hell.
293 2008-01-15 16:33
Re: What RSS readers do people use (and enjoy)? (14 replies, posted in General discussion)
Ah, righty, thanks.
294 2008-01-15 12:54
Re: What RSS readers do people use (and enjoy)? (14 replies, posted in General discussion)
Hmm, I just installed FeedDemon. It looks nice, except that I haven't seen the option to order posts in a feed by date descending.
295 2008-01-13 18:05
Re: Compressing CSS and JS (9 replies, posted in General discussion)
You'll still save bandwidth.
Especially useful if you're running MediaWiki or so, that CSS is huge.
296 2008-01-12 00:05
Re: Compressing CSS and JS (9 replies, posted in General discussion)
Gzipping it is absolutely no problem.
297 2008-01-11 21:25
Re: I found this site. Is this even legal (15 replies, posted in General discussion)
Yeah, add it yourself
Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
298 2008-01-11 07:38
Re: Database is getting huge - What to do & What to look out for. (3 replies, posted in PunBB 1.2 troubleshooting)
Pretty much.
You might want to look in further optimising stuff like mods etc.
But the best way to see server load is in the Admin panel. If it's a dedicated server, you should be able to see MySQL's slow query log and resource usage too.
299 2008-01-09 07:41
Re: check_cookie function log message (6 replies, posted in PunBB 1.2 discussion)
Most likely, yes.
300 2008-01-08 21:16
Re: The search function (40 replies, posted in Programming)
No, it searches the posts/topics itself, no more search index.
It's a MySQL feature.