Version: 1.00, by KuraFire
Developer Last Online: Nov 2023
Version: 2.2.x
Rating:
Released: 05-21-2002
Last Update: Never
Installs: 55
No support by the author.
IF THIS HACK DOESN'T RANDOMIZE WELL FOR YOU, DO THIS:
(by Boofo)
"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. "
That should fix the problem for a lack of randomized quotes. ALSO NOTE THIS:
There's a bit of code going around that's 'unofficial' (ie. looks like it's from this hack, but it's adjusted and now flawed), saying "ORDER BY id" in the Query that gets the random quote. This is BAD CODE as it doesn't randomize anything at all. It should say "ORDER BY RAND(NOW())" instead.
</end Hack Issue Fix>
*drumroll*
It's here!
What does this hack do:
* it's an extension (big time!) on the Admin-only controlled hack I released earlier. If you installed that hack already, it should be pretty clear for you which steps you should ignore in the Instructions for this hack. What you Cannot ignore is the step about your Admin Panel, and the lines to add to admin/index.php !
* It lists a random quote either on your Forum Home, or in your Header. Next to that, it adds a Quote List, which is just a massive database of quotes that works just like the Memberlist, but with your quotes. It's searchable, and with the Add-on (see post #2!) users can also add quotes in it (which need moderation, before showing up online).
* Quotes can be added, edited and deleted from your Admin Panel. With the add-on, you can moderate quotes from your AP as well.
* There are no hard-coded colors. All colors are taken from your style, so all pages will appear in concordance of whatever style it is you're using.
Install instructions are in the zipfile: uqh_instructions.txt
For the add-on, see the second post, instructions file: w-add_instructions.txt
Have fun!
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
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.
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....
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?