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)
-   -   mYvBindex v3.1 (https://vborg.vbsupport.ru/showthread.php?t=44691)

Tigga 12-03-2002 08:51 PM

That's not hard to do at all and won't affect the queries one way or another. Just open up your myvbindex.php file and look for:
PHP Code:

$threads=$DB_site->query("SELECT thread.threadid,thread.title,thread.replycount,thread.postusername 

You would just replace "thread.postusername" at the end of that with "thread.lastposter". Then you would want to edit your index_threadbit template and replace this:

by <a href="$bburl/member.php?s=$session[sessionhash]&action=getinfo&userid=$thread[postuserid]">$thread[postusername]</a>

with this:

by <a href="$bburl/member.php?action=getinfo&find=lastposter&threadid =$thread[threadid]">$thread[lastposter]</a>

350Chevy 12-03-2002 09:34 PM

hmm, my threads string looks completely different in myvbindex.php

Code:

$threads=$DB_site->query("SELECT * FROM thread WHERE open='1' AND open<>10 $iforumperms ORDER BY lastpost DESC LIMIT $maxlatethreads");
while ($thread=$DB_site->fetch_array($threads)) {
  $title = unhtmlspecialchars($thread['title']);
  if (strlen($thread['title']) > $maxthreadchars and $maxthreadchars!=0) {
    $title = substr($thread['title'], 0, $maxthreadchars - 3) . '...';
}
  if ($showthreaddate) {
          $thread['time'] = vbdate($timeformat, $thread['dateline']);
          $thread['date'] = date("m-d-y", $thread['dateline']);
}

The news string looks simular to what you posted but that's for the news.. not the recent threads. ;)

Tigga 12-03-2002 09:43 PM

Ahhh, sorry about that. I changed that query a little when I was working on things and didn't realize it wasn't like that for the version on here. Really though, it makes your job a little easier. Just make the template modification above and it should work fine. :)

350Chevy 12-03-2002 09:48 PM

Gotcha! Thanks again! :)

I'm still trying to figure out why the weather temperatures don't show.

The front page now takes about 6 seconds or longer to load now too. There's not a lot of queries and the server and site are very fast. It's just the main page that takes a while to load. I've noticed other people with slower servers on sites that have low bandwidth and they load much faster than mine. Something doesn't add up...??

Tigga 12-03-2002 09:56 PM

No problem at all. :)
I'm still puzzled as to why the temperature doesn't work on some servers too... It works fine on my personal site, but not on my test server.
Does the page load ok if the weather is turned off? I was having that problem with mine too. It's nothing to do with the queries or anything like that, it's because it's now taking forever for it to get the weather info from theweatherchanel.com's server. That wasn't a problem a few moths ago, but for some reason it's now taking forever to get that info. I'm going to try to find another solution to display the weather when I get the time because I really like that feature, but I can't deal with my homepage taking 10-20 seconds to load.

350Chevy 12-03-2002 10:30 PM

nah.. with it turned off it still takes the same amount of time. The old index page was loading in 0.2 seconds or there abouts. Really fast.. I wonder how it loads on dialup.. lol

Maybe because it's grabbing a bunch of different templates where as my old index was only a few templates that did almost the same as your myvbindex. Yours looks better so I went with yours. ;)

Tigga 12-03-2002 10:43 PM

It really should take less than 1/2 second to load. Do you know how to put vBulletin in debug mode? If not, just open up your admin/config.php file and add $debug="1"; somewhere in there. Then upload that file, go to your index page and add ?explain=1 at the end of the url. That will show a breakdown of each query performed, how long it took, and etc. If you'd like to do that and post the results here I'll be glad to take a look and find out what's causing your page to take so long. Oh, and be sure not to leave it in debug mode afterwards because it could be a security risk. ;)

Oh, and it wouldn't have anything to do with the number of templates it's calling. It would have to be a query somewhere that's taking a while to execute.

350Chevy 12-03-2002 10:51 PM

hmm.. looks to be the poll...

--------------------------------------------------------------------------------

Query: SELECT poll.*,thread.* FROM poll LEFT JOIN thread ON (thread.pollid = poll.pollid) WHERE thread.forumid='108' ORDER BY poll.dateline DESC LIMIT 1
Time before: 0.20745205879211
Time after: 3.5907980203629

table type possible_keys key key_len ref rows Extra
poll ALL 94 Using temporary; Using filesort
thread ALL 5231 where used

--------------------------------------------------------------------------------

350Chevy 12-03-2002 10:54 PM

Yup.. I disabled the poll and check it out now..

Page generated in 0.32854795 seconds (54.16% PHP - 45.84% MySQL) with 25 queries.
[Debug Mode OFF] [PHP v4.2.3] [GZIP enabled - level 1] [Server Load: 1.18 ยป 1.35 : 1.18]

Tigga 12-03-2002 10:57 PM

Quote:

Query: SELECT poll.*,thread.* FROM poll LEFT JOIN thread ON (thread.pollid = poll.pollid) WHERE thread.forumid='108' ORDER BY poll.dateline DESC LIMIT 1
Time before: 0.20745205879211
Time after: 3.5907980203629
Well that would be the problem... Right there it took 3.3 seconds just to load the poll. Now that I know what the cause is I'll look over the files and see if I can figure out why it would be taking that long.


All times are GMT. The time now is 06:30 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.02677 seconds
  • Memory Usage 1,747KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)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