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.
I just noticed after upgrading the hack, that if you try to edit a quote that has quotes around it, it does not show up in the editor. The quoter will and the letter, just not the quote. Also, it is now impossible to save a quote or edit one without filling in the quoter variable. It says that all variables must be completed. I would like to be able to save it without the quoter or letter if possible, since I will not be adding the part to my board for the listing of the quotes. Can this be done?
Ah, yes, I haven't htmlspecialchar'd the inputs, since on my own board I use no ""s around quotes. If you want them to display around each quote (ie. "this is a quote") you should better just add " in your templates. Much easier to take them off again if you decide to, at one point.
To fix that problem though, find in your admin/quotes.php this line:
PHP Code:
$quote=$DB_site->query_first("SELECT * FROM quotes WHERE id=$quoteid");
And add below it:
PHP Code:
$quote[quote] = htmlspecialchars($quote[quote]);
(if you use ""s in your name input as well, add `$quote[name] = htmlspecialchars($quote[name]);` below that).
The other issue: if you save without a letter, the quote will not show up in the Quotes List, Ever. And if you intend to disband the Quoter (Name) part, you can just fill in a dash ( - ) or so for the quoter name, or "Unknown" or whatever. Filling in nothing is a bad idea.
I updated the second post, with the instructions for the Moderation add-on. It now includes the query in post #15 in its instructions. The original file is untouched though, since the original hack doesn't need the mod column.
Kura, I've love to see something on the front page of the AdminCP like "There are currently [number] quotes awaiting moderation." - I can see myself forgetting tha people have added quotes
If you prefer, I can also write a line of code that will e-mail you whenever a user adds a new quote... though this could become quite tedious & annoying if you have a lot of users.
I'll let you know in this thread once I have it done, okay?
Originally posted by KuraFire Erm, I'll see what I can do.
If you prefer, I can also write a line of code that will e-mail you whenever a user adds a new quote... though this could become quite tedious & annoying if you have a lot of users.
I'll let you know in this thread once I have it done, okay?
How about a PM that is sent to a specified user (i.e. the admin) at a set time each day to inform of new quotes?
So, at the time "6.00pm" a PM is sent to the admin "John" if there are any new quotes for moderation.
e.g.
"Hi [admin's name], there are [number of new quotes] new quotes waiting to be moderated. Click here to moderate them"