Search found 148 matches

by lanzer
Tue Feb 10, 2004 6:09 am
Forum: 2.0.x Discussion
Topic: adding a reference to topic title in viewtopic_body.tpl
Replies: 4
Views: 478

Thanks a lot for the suggestions! I will try it out later today. But perhaps I should explain it a bit better. I have added a MOD with which you can rate threads. Only problem is, the rating link is added in the template at the same level where your "profile", "icq", "msn&q...
by lanzer
Sun Feb 08, 2004 6:03 pm
Forum: 2.0.x Discussion
Topic: Help Needed
Replies: 6
Views: 305

Hi WebD, you need ($userdata['user_level'] == ADMIN) instead of ($userdata['user_level'] = ADMIN) Also, you can have ($userdata['session_logged_in'] && $userdata['user_level'] == ADMIN) *edit, didn't even notice the session logged in part. :) It just depends on what you plan to echo if a use...
by lanzer
Sun Feb 08, 2004 5:58 pm
Forum: 2.0.x Discussion
Topic: adding a reference to topic title in viewtopic_body.tpl
Replies: 4
Views: 478

Hi Paddy, the first post id can be found, though it'll be more inovlved than modifying just the tpl file. Reason being is that the script loops a defined portion of the template, and the first ID is never marked with a unique name. If you're up to it, the variable for the first post id is called: $p...
by lanzer
Sun Feb 08, 2004 5:37 pm
Forum: 2.0.x Discussion
Topic: [2.0.x] Tweaks for large forums
Replies: 1240
Views: 683441

There is a much simpler solution, without a need for an extra field. :D You can tell mySQL to index only xxx number of characters in the field (starting from left, of course). So if you index, say, 3 characters, if you have just reduced the number of records to be sequentially searched by more than...
by lanzer
Tue Feb 03, 2004 4:00 pm
Forum: 2.0.x Discussion
Topic: [2.0.x] Tweaks for large forums
Replies: 1240
Views: 683441

It's not necessary but recently I've noticed that registration had been slow because phpbb needs to search through the user database for any duplicate/existing e-mail address. (same goes for changing e-mail address) As it would take up quite a bit of RAM to index the e-mail address field, I've inste...
by lanzer
Tue Feb 03, 2004 3:44 pm
Forum: 2.0.x Discussion
Topic: [2.0.x] Tweaks for large forums
Replies: 1240
Views: 683441

Hi Gurukast: To answer your question, yes the hack on the first page is just a line line addition. It consist of the line: if ($row['post_time'] > $userdata['user_lastvisit']) $new_topic_data[$row['forum_id']][$row['topic_id']] = $row['post_time']; It's is inserted right after the line that reads &q...
by lanzer
Wed Jan 07, 2004 3:45 pm
Forum: 2.0.x Discussion
Topic: [2.0.x] Tweaks for large forums
Replies: 1240
Views: 683441

Last hack for the day

Under viewforum.php, I've replaced: $sql = "SELECT MAX(post_time) AS last_post FROM " . POSTS_TABLE . " WHERE forum_id = $forum_id"; with: $sql = "SELECT p.post_time AS last_post FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t USE INDEX(forum_n_post) W...
by lanzer
Wed Jan 07, 2004 2:32 pm
Forum: 2.0.x Discussion
Topic: [2.0.x] Tweaks for large forums
Replies: 1240
Views: 683441

Yet another hack

Found this one search query earlier: mysql> SELECT p.topic_id FROM bb_posts p, bb_forums f -> WHERE p.post_id IN (*list of posts*) -> AND f.forum_id = p.forum_id AND f.forum_id IN (17, 53, 54); +----------+ | topic_id | +----------+ | 27327 | | 316737 | | 345523 | | 455572 | +----------+ 4 rows in s...
by lanzer
Wed Jan 07, 2004 1:21 pm
Forum: 2.0.x Discussion
Topic: [2.0.x] Tweaks for large forums
Replies: 1240
Views: 683441

Another slow query hack

On my on-going quest to optimize every single "slow query" in phpbb, here's another quick hack. This one speeds up the "next thread/previous thread" links inside the view topic script: Inside viewtopic.php, replace this: $sql = "SELECT t.topic_id FROM " . TOPICS_TABLE ....
by lanzer
Tue Jan 06, 2004 11:29 am
Forum: 2.0.x Discussion
Topic: [2.0.x] Tweaks for large forums
Replies: 1240
Views: 683441

Hmm, the slowest queries in your database are queries that do not come with phpBB. I suspect it's related to a mod which you installed. If you have shell access, run something like the following to see which php file contains the query in question: fgrep -r "SELECT t.topic_title, t.topic_id, p2...
by lanzer
Mon Jan 05, 2004 2:08 pm
Forum: 2.0.x Discussion
Topic: [2.0.x] Tweaks for large forums
Replies: 1240
Views: 683441

Hello again, just a few tips before I get back to work: Change your thread cache size from 8 to 200. Your server will love you. Wait timeout can be as small as 120. If you have any stale processes you want them to disappear quick. That's all that I can think of. At least for the time being, if you h...
by lanzer
Mon Jan 05, 2004 5:35 am
Forum: 2.0.x Discussion
Topic: [2.0.x] Tweaks for large forums
Replies: 1240
Views: 683441

Hello Kolczyk, here are a few suggestions for you: - Your database is in big trouble, there isn't enough RAM and hard drives in there. You want more drives, and you want fast ones. U160 will be just as good as U320. Your goal would be to get as many of them as possible, and run RAID 0 with them. A h...
by lanzer
Sun Jan 04, 2004 6:08 am
Forum: 2.0.x Discussion
Topic: phpBB SQL Structure Question
Replies: 4
Views: 328

It's like the caramel secret... nobody will know~ :wink:

It's not used in version 2, up to 2.0.6 at least
by lanzer
Sun Jan 04, 2004 6:04 am
Forum: 2.0.x Discussion
Topic: phpbb & Database Tables...
Replies: 3
Views: 381

Yup, assuming you want identical forums for, say, 3 different users, you would want to do the following: 1. - Install phpbb first (which is what you've already done) 2. - Copy phpbb and all its contents to another directory, you now have a different form 3. - Backup your SQL database with something ...
by lanzer
Sun Jan 04, 2004 5:43 am
Forum: 2.0.x Discussion
Topic: [2.0.x] Tweaks for large forums
Replies: 1240
Views: 683441

Today a phpbb user just asked me for some tips in enhancing the speed of his phpbb forum, so I put together some quick tips, hope this will help others who have the same goal as his. -- article -- Giving the standard phpbb a diet is always good, but before that, there are a few things that you must ...

Go to advanced search