76

(8 replies, posted in PunBB 1.2 troubleshooting)

http://stealingyour.info/explain.html

The following query in viewtopic.php (That I have modified myself, and has been modified by a couple mods installed) seems to be using a lot of CPU, and taking over 2secs to execute, which seems very slow to me compared with normal MySQL queries.

I was wondering if anyone has any suggestions as to what part is causing the problems, or even a way to fix them. Thanks

$result = $db->query('SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting,
u.num_posts, u.registered, u.admin_note, u.adult_sig, SUM(r.rep_plus) AS count_rep_plus, SUM(r.rep_minus) AS
count_rep_minus, u.reputation_enable, u.awards, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email,
p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_title, g.g_user_title, g.g_link_color,
g.g_hover_color, o.user_id AS is_online, b.id AS b_id, b.message AS b_message, b.expire AS b_expire, b.banned_by
AS b_by FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN
'.$db->prefix.'groups AS g ON g.g_id=u.group_id LEFT JOIN '.$db->prefix.'online AS o ON (o.user_id=u.id AND o.user_id!=1
AND o.idle=0) LEFT JOIN '.$db->prefix.'bans AS b ON b.username=u.username LEFT JOIN '.$db->prefix.'reputation as r
ON (r.user_id=u.id) WHERE p.topic_id='.$id.' GROUP BY p.id ORDER BY p.id LIMIT '.$start_from.','.$pun_user['disp_posts'],
true) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());

PS. Not sure if this is the correct board since its not a clean PunBB install, please move if necessary.

take a look in include/mysql/mysql.php (i think the folder is something like that, can't remember off the top of my head).

79

(5 replies, posted in Programming)

elbekko wrote:

What you could do is just set a cronjob to scan your uploaded files once a day smile

To be honest, I think that would be worse, and you'd be rescanning files you already scanned. Unless of course you make it note new files and only scan those, but I still would think scanning at all is overkill.

80

(5 replies, posted in Programming)

Personally, I wouldn't bother.

81

(16 replies, posted in General discussion)

Im not hugely into gaming, though I did just splash out on a nice new PC (Asus Commando, Core 2 Duo E6600, Geforce 8800 GTX, 2Gb Corsair PC6400, 74Gb WD Raptor). I play Battlefield2142 quite a bit, if your into that kinda game I would definately recommend checking it out.

Isn't it kinda lame to fake the amount of users you have though? I can't see any point other than trying to trick people into thinking a site is more popular than it actually is.

83

(98 replies, posted in News)

Urgh my forum is heavily modded, im too lazy these days tongue

Thanks for the update smile

I have an announcement mod installed on my forums, that flags specific boards to be announcement boards - any posts in them being exported to the portal and rss feeds. However I was wanting to automatically email a copy of any posts in these boards to members, to alert them of new announcements/news (obviously having un-subscribe options & what not, the aim is to inform not to spam).

Writing the mod wouldn't be any problem, however I could do with some help designing it - My forums have over 3000 members = 3000 emails per announcement (announcements aren't regular, 1 or 2 a week at tops). Obviously though sending 3000 emails in a simple loop is not going to go down well with the mail server. Not surprisingly actually my host's TOS states you can send a max of 200 emails an hour.

One solution that came to mind would be a email queue and some kind of script on crontab to send 100 or so every hour, but that seems kinda messy, and I'm pretty sure the host wouldn't be too happy with it, even if it is within the TOS.

Would simply using a SMTP server hosted elsewhere for my emailing be alright? Or would sending 3000+ requests to the external mail server still be a bit much? (My knowledge around email is fairly limited, it's not something I've had to deal with before.)

PS. I'm not sure if this is the best board for this, the context is PunBB but the question and problem themselves aren't - feel free to move.

Description wrote:

This mod adds a statistics module to your forums.

This mod requires adding a crontab, for extra help on this please see the documentation for your hostings control panel.
If you would like to see an example of this mod in action, you can do so at http://www.syi.cc/stats.php.

Please get the mod from PunRes.org: http://www.punres.org/desc.php?pid=352

The main reason I'm posting this here is because feedback would be great. I wrote this a week or 2 ago and only just got around to writing a readme for it and packaging it up to release. To be honest I have not tested the package, so I'm hoping I didn't forget anything.

Assuming your using the same mod which I've seen before, the answer is no.

87

(2 replies, posted in PunBB 1.2 bug reports)

Quick fix - move the url parsing to the top of the array so it parses it last.

UbuntuForums are really useful, and its members are very helpful: http://www.ubuntuforums.org/
UbuntuGuide has a very good wiki for Edgy (Codename for 6.10): http://ubuntuguide.org/wiki/Ubuntu_Edgy

Given up on this ):

Found a much nicer one already made so decided to use that, ive requested this thread be locked/deleted.

Can we have a link to where this is happening?

elbekko wrote:

They're working in IE7. And in IE6.

Yeh i sorted it, just had change FF to use outside too and set a left margin so they came out from under the div.

Damnit, I just noticed the line numbers aren't working at all in IE... Any suggestions why not? It's just an ordered list with decimal list style :s

Edit: Nevermind, IE was ignoring the inside command, and putting the numbers outside the list (ie. under the containing div).

MadHatter wrote:

\b$keyword\b will match the keywords correctly

Thank you (:

Firstly, i realise there are a bunch of syntax colouring mods out there, but I like to make my own mods instead, i like to know exactly how things work and its good practice. You can see a demo, along with the instructions here: http://www.syi.cc/viewtopic.php?pid=521483#p521483

I am not properly releasing this mod yet, as it has afew things in it I would like to get sorted first.

- Escape characters are not handled properly within strings, for example in line 20 in the first code tag.

'/(\'.*\')/U'

This of course should be continuously coloured, as the whole thing is ment to be a string.

- If the line is too long, it pushes onto the next line, eg.

01.
$text .= '</p><div class="codebox"><div class="incqbox"><h4>'.$lang_common['Code'].':</h4><div>'."\n".parse_code($inside[$i])."\n".'</div></div></div><p>';

- Keywords are highlighted even if part of a word. Eg:

$newly

I assume in regex there must be an easy enough way to specify it must not be surounded by alphanumeric chars? Ill look into it later on, as I said, my regex isn't top.

- I would like to have the current line being hovered over highlighted. This is simple enough for FF, as you can use li:hover in css. However in IE :hover is only defined for a tags, with a href property. Is there some way around this?

Really I am posting this, hoping for some help fixing these problems, to be fair I haven't actually tackled either properly yet, but my regex knowledge isn't amazing (for the first one is there some way to say the ending tag must not be followed by a \?).

Any input is appreciated.

Thanks

95

(7 replies, posted in PunBB 1.2 troubleshooting)

Smartys wrote:

Talk to your host and see what they can figure out from the webserver logs

As a side note: how do you have a VPS without access to Apache logs? hmm

My guess would be he ment shared hosting, but even most shared hosting allows access to apache logs for your own domains.

http://secunia.com/Internet_Explorer_Ar … lity_Test/

lol

97

(95 replies, posted in News)

Don't forget to clear the cache folder aswell so the config updates.

It's not a bug, the post count counts how many times the user has posted, not how many posts currently exist by them.

99

(5 replies, posted in PunBB 1.2 troubleshooting)

You sure it's not the hosting your using? Never heard of it myself.

100

(3 replies, posted in PunBB 1.2 troubleshooting)

Did you manually delete anything from the database?