vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Simple newsportal / thread overview to add to your board... (https://vborg.vbsupport.ru/showthread.php?t=38334)

TECK 05-07-2002 08:16 AM

i looked at your code kura.. the way is set now will also show to everyone the posts made in a private forum (if you have a private forum). you need to add some perms in there... just a thought.

TECK 05-07-2002 08:18 AM

Quote:

Originally posted by xiphoid
I just put back the db_mysql.php for testing this, and only 4 queries could be related to the hack, the rest is obviously through global and default vB. I removed the hack and let the page load, and had 10 instead of 12. So I stick to only 2 queries. maybe a few more for replacements and/or smilies etc.
you cant have only 2 queries because for every thread it will do one. so if it shows 10 threads or posts, you will have 10 queries.. and so on...

KuraFire 05-07-2002 08:41 AM

That's nonsense.

It takes 1 query to extract the firstposts of X amount of different threads on the newsforum you specify, and 1 query to extract all the threads-overview info.

You can increase the amount of newsposts listed, but it won't affect the query count.

Nakkid, if you read post #8 in this thread, you'll see that I already commented on that. :)

(I'm not capable of adding permissions myself yet, still too much of a n00b for that, but I'm working on it :))

TECK 05-07-2002 08:50 AM

try this for perms:
https://vborg.vbsupport.ru/showthrea...threadid=38355

i didnt test it, i just put it togheter... let me know if it can help you out. :)
about the queries.. if i'm correct, for every thread,forum that is checked the script will perform a query. the more forums you have the more queries you will add, etc. goes the same way with the threads. i know element that have an impressive 108 queries on his page. over 40queries your server gets on its knees if it's a busy board..

KuraFire 05-07-2002 08:55 AM

Thanks, I'll have a look into it and see what I can work out. :)

:up:

KuraFire 05-07-2002 08:59 AM

Quote:

Originally posted by nakkid
about the queries.. if i'm correct, for every thread,forum that is checked the script will perform a query. the more forums you have the more queries you will add, etc. goes the same way with the threads. i know element that have an impressive 108 queries on his page. over 40queries your server gets on its knees if it's a busy board..
No, that's only the case if you run two queries per output, one to select the forum and thread, one to extract the post.

However, my query (in the newsportal.php file) uses a JOIN so that it can extract as many firstposts from a single (or multiple, if you want) forum, with only 1 single query. The JOIN worked perfectly fine in phpMyAdmin, but it seems to have a random bug when put in use through vB itself. It's still just 1 query though, trust me. :)

TECK 05-07-2002 09:01 AM

ok. thanks for the info. :)

Floris 05-07-2002 09:23 AM

Kura does it like we wish all of those type of scripts were made. Efficient. Nice example for vBportal etc.

KuraFire 05-07-2002 10:07 AM

Yeah I've seen a vbPortal site that had 199 queries run. :eek:

[high]* KuraFire goes dive into adding permissions to this script, now.. :)[/high]

FlyingDutchman 05-07-2002 10:44 AM

Quote:

Originally posted by KuraFire
Yeah I've seen a vbPortal site that had 199 queries run. :eek:
we all know that VbPortal sucks :)

I think your script is pretty nice man ;)
I like VbIndex a bit more (when you edit it well :D) because of it's menu...
oh, well, yours is cool too, if you don't have a high-end server ;)


All times are GMT. The time now is 01:06 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01210 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete