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 !

KuraFire 04-14-2003 09:43 AM

It's a mysql issue of poor randomizing in some cases, sometimes this is fixed by flushing mysql or rebooting the server, sometimes nobody has a clue why it doesn't randomize (anymore).

There is no real need to hardcode your quote count and seed on that using PHP instead, but it's an alternative escape method I guess....

LilDragonWings 04-14-2003 01:30 PM

I'm glad it was a mysql issue :) I only have ftp access to my server space, although my webhost will perform anything I ask them to, which is really great. Since I'm learning php/mysql as I go--glad I don't have to learn unix at the same time.

The php method was the only work around I found that worked for me, and I needed something that was reliable, and wouldn't hang without me knowing.

Thank you very much for a wonderful hack Kurafire !

KuraFire 04-14-2003 05:42 PM

You're welcome :)

Dan 05-11-2003 02:13 AM

Exactly what I was looking for

/me clicks install

TheComputerGuy 07-06-2003 06:10 PM

ever find a way to convert LEsanes over to yours?

Gutspiller 07-08-2003 05:35 AM

Did anybody get this problem in their profile once they added this hack: http://www.theforumz.com/forumz/memb...tinfo&userid=1

I think it may have been caused by this hack, but I'm not completely sure. I tried removing the lines that the instructions added into the member.php file, but the problems were still there. Did the query run anything that automatically added tables into that page?

If somebody can help me out or check their own profiles on their board if they've installed this hack, it would be a great help to me.

Thanks a bunch!

Boofo 07-08-2003 05:51 AM

The link takes you to the unregistered page. Maybe post a picture? ;)

KuraFire 07-09-2003 09:46 PM

Quote:

07-06-03 at 09:10 PM TheComputerGuy said this in Post #95
ever find a way to convert LEsanes over to yours?

not really bothered with it, but know this: I Will be looking into it all for when I create the ultimate quote Hack for vB3. It will contain an upgrade script to upgrade either from Lesane's quote hack (or any other if one exists and is popular) and this version of the hack, so that NO quotes you have will be lost, nor will you have to re-enter all quotes manually for when you upgrade to vBulletin 3. :)

That good enough for ya? :D

Gutspiller 07-10-2003 12:09 AM

Quote:

Yesterday at 12:51 AM Boofo said this in Post #97
The link takes you to the unregistered page. Maybe post a picture? ;)

I fixed it. I think I followed the instructions right, but I had the hacks that display "Percent of Total Views" and "Last Post Date".

I think the instructions were messed up for anybody that may have those hacks installed. I got it working by simply reorganizing some of the basic html.

Thanks though.

BTW are profiles regularly only for registered members? :confused:

Gutspiller 07-22-2003 02:29 AM

For some reason, my quote rotation rarely rotates quotes and most of the time it will only display the very first quote that was submitted. (which was mine)

Is anybody else having this problem? I don't have that many quotes submitted, but it should still be fairly random shouldn't it?

Can somebody please help me get it so that they are more random instead of showing the same one over and over? I really want to get this hack working. :(

KuraFire 07-22-2003 10:23 AM

Should be in this thread somewhere, already mentioned etc...

Gutspiller 07-22-2003 04:23 PM

Seems to be working now. Not as random as I'd like, but it's working. I was looking closer in the code and it said the hack is from Lesane. I... umm... don't know it says that because you used part of a hack he did or if I now somehow have his hack mixed up with yours, but changing the the random code in my index.php fixed the hack... whos ever it was. :surprised:

KuraFire 07-22-2003 07:46 PM

*slaps forehead and rolls eyes*

Lesane's hack is COMPLETELY different and (sorry Lesane) known to be really poorly coded, buggy, etc. etc. and overall just not work.

My hack is completely different from Lesane's, and just so you know: when I recreate my hack for vBulletin 3, there will be an install script that can insert your quotes from Lesane's hack into the new Ultimate Quote Hack (mine) for vB3, if you want.

Gutspiller 07-22-2003 07:57 PM

Well I doubt I will be updating to VB3 since from what I've heard there will be no updating possible from any previous versions of VB. I'm not completely restarting over. Plus my forum prolly already has all the hacks that VB3 does. ;)

Thanks though. It seems to be working now.

However I did have an idea that might get me to switch to your hack. If it would be possible to comment on quotes, that would be cool. I was thinking it would be cool to have who the quote was by hidden to regular members and members had to try and guess where the quote was from. So they could be like movie quotes and it would get some discussion going. The way the hack is going right now, it seems to be working fine, but we don't have many quotes, so as we get more if I notice problems, I may switch over to yours. I think I might have tried yours and had problems with it and my VB version, but I can't remember if it was this hack or another hack.

KuraFire 07-22-2003 08:09 PM

Commenting on quotes will be an admin-settable option for the Ultimate Quote Hack for vB3.

Hiding the Submitted By will be a usergroup setting, so you can say that usergroup X's quotes will always show the member who submitted, but people from usergroup Y who submit a quote will remain 'hidden'. :)

Gutspiller 07-22-2003 08:44 PM

Quote:

Today at 03:09 PM KuraFire said this in Post #105
Commenting on quotes will be an admin-settable option for the Ultimate Quote Hack for vB3.

Hiding the Submitted By will be a usergroup setting, so you can say that usergroup X's quotes will always show the member who submitted, but people from usergroup Y who submit a quote will remain 'hidden'. :)


Do you think it will be possible to use it on a 2.x board? or is it completely different code wise? :(

KuraFire 07-23-2003 06:51 AM

it'll be vBulletin 3 only, as the code will be 100% different.

DB8 MissingLink 08-04-2003 10:23 PM

Forgive me... I'm a bit of a newbie at this. I've got everything installed and it seems to be working but I can't seem to make it randomize. I know this has been addressed above, but I spent hours trying to figure out what the solution was and couldn't figure it out. I really want to make this work!

So could someone please post a walk-through on fixing the randomizer? Ideally, with a querry instead of a hard-coded random number range.

Thank you, and great hack (if I can get it to work!)

jEd
www.net-benefits.net

KuraFire 08-05-2003 08:27 PM

Quote:

03-05-03 at 03:44 PM geniuscrew said this in Post #83
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 :/

that bit of PHP code is NOT from my hack, entirely. "ORDER BY id" did NOT come from _my_ instructions!

It should be ORDER BY RAND(NOW())

KuraFire 08-05-2003 08:28 PM

Quote:

Today at 01:23 AM DB8 MissingLink said this in Post #108
So could someone please post a walk-through on fixing the randomizer? Ideally, with a querry instead of a hard-coded random number range.

Read the first post, or the post above this one, or Boofo's post a bit earlier in this thread (about 15 posts up). You have to use ORDER BY RAND(NOW()) in the query to make it work better.




Quote:

07-22-03 at 10:57 PM Gutspiller said this in Post #104
Well I doubt I will be updating to VB3 since from what I've heard there will be no updating possible from any previous versions of VB. I'm not completely restarting over. Plus my forum prolly already has all the hacks that VB3 does. ;)
You can update from 2.2.9 or 2.3.0.

I was running older than that myself, but I just took the queries out of the update scripts, ran those manually, and then I upgraded to vB3. Worked like a charm. It's just a few minor database adjustments that need to be made before you upgrade to vB3 :)

DB8 MissingLink 08-05-2003 08:49 PM

Ok, just to make sure:

In global.php or index.php (depending on where you put the quote) instead of:
Quote:

// random quote hack by KuraFire
$quot=$DB_site->query_first("SELECT quote,name FROM quotes ORDER BY rand() LIMIT 1");
$thequote = $quot['quote'];
$thequoter = $quot['name'];
you should put
Quote:

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

If that's right, I did it and I'm still not getting randomization.

KuraFire 08-06-2003 12:11 AM

Quote:

Yesterday at 11:49 PM DB8 MissingLink said this in Post #111
Ok, just to make sure:

In global.php or index.php (depending on where you put the quote) instead of:you should put.

If that's right, I did it and I'm still not getting randomization.



That's right. And you should be getting randomization. Check with your webhost to see about what version MySQL they are running, and whether they shouldn't upgrade it....

DB8 MissingLink 08-06-2003 07:39 AM

Ok, I've added NOW() to the Rand query and it's still not working. I'm running SLQ version 3.23.54 although the The client API built into PHP is only 3.23.49.

Could that be the problem? If not, any other workarounds?

jEd

KuraFire 08-06-2003 09:16 AM

It could well be because of that, yes. Two versions of MySQL might be conflicting in areas....

Ask your host if they could synchronize that :)

Bro_Joey_Gowdy 02-16-2006 10:42 PM

Is the available for vb3.5.3 ?


All times are GMT. The time now is 04:17 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.02091 seconds
  • Memory Usage 1,830KB
  • 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
  • (2)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (35)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