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)
-   -   The Ultimate Quote Hack!! (https://vborg.vbsupport.ru/showthread.php?t=38906)

nnjj.net 02-03-2003 04:36 PM

thanx allllllllllllot
its great :)

KuraFire 02-04-2003 09:08 PM

Glad you like ^_^

geniuscrew 03-05-2003 11:44 AM

Quote:

Originally posted by tweak
I installed this hack but My quotes started to go random on refresh then Stopped???? Now it sits on the same one.
You're not alone -_-

Mine just sits on ID 1 and once in a blue moon changes to ID 2

Edited: Well it changed to all of them after loads of refreshing.

I know this may sound stupid but how do I get it to get a quote in order?

PHP Code:

// random quote hack by KuraFire
 
$quot=$DB_site->query_first("SELECT id,quote,name FROM quotes ORDER BY id");
 
$thequote $quot['quote'];
 
$thequoter $quot['name']; 

doesn't work :/

Boofo 03-05-2003 12:32 PM

You need to change the RAND() to RAND(NOW()) to make it more random with the new versions of mySQL since version .54

The NOW will seed it and make it more random that it was before.

geniuscrew 03-05-2003 12:54 PM

Well it's changed - but now it's sitting on a different one -_-

Alien 04-09-2003 10:37 PM

Any confirmed resolution to the above problems before I install this on my new update? I love it, I just want to make sure it randomizes properly. :)

-Jason

KuraFire 04-10-2003 07:28 AM

It should work just fine - if it doesn't, it's more likely a problem with your server than the script, really :)

Alien 04-10-2003 09:47 PM

Okay I shall test and report back!

-Jason

ForKmaN 04-13-2003 01:38 PM

Wheres the latest file for this?

LilDragonWings 04-13-2003 09:13 PM

I'm having the stuck on a quote problem as well.

At first I had the template called only for users who were logged in (I had done this inadvertantly by putting the call for the home_randomquote template right after the IF statement to test for users.) When it was setup this way, the quote was perfectly random ... However, When I discovered this, I moved the call out side of the user logged in conditional, and it no longer randoms. It stays on the first quote for both logged in and logged out users. I've tried moving it throughout my index.php

Any ideas?

**I FIXED MY PROBLEM**

Changed the random seed by using the following:

srand((double)microtime()*1000000);

$random_number = rand(1,147);

$quot=$DB_site->query_first("SELECT quote,name FROM quotes WHERE id = '$random_number'");

**************

however, you should change the 1,147 to represent the number of quotes you have (this is the range of the random number selected I believe).

I think you can stick in a query to get the number, but i just hard code it...

Good luck !


All times are GMT. The time now is 08:54 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.02805 seconds
  • Memory Usage 1,735KB
  • 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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