![]() |
The Ultimate Quote Hack!!
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! :D 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! |
Attached is the zipfile with the Add-on which allows Users to add quotes themselves. Those will then fall in the moderation queue and won't appear on the site until you've moderated them in your Admin Panel.
*edit* There was one query left out in the instructions file, it's included now. See post #15 in this thread for the query, it's all you need to do if you upgraded from my former hack to this one. |
This is a screenshot of what the Quotes List looks like WITHOUT the add-on:
|
This is a screenshot of what the Quotes List looks like WITH the add-on:
|
This is a screenshot of the Search page for quotes:
|
This is a screenshot of the Moderate Quotes page in your admin panel:
|
This is a screenshot of the Add a Quote page for your users, which is part of the Add-on!
|
seems cool, I'll install it when I wake up this morring (oh no, forgot there's school :eek: )
|
Pretty kinky hack ya got there KuraFire ;). I'll install it when I get home. :D
|
Sweet, the FFR is gonna have my hack?! :D
Kick-ass! ^_^ btw, I will be back to the FFR pretty soon, now that Project 3.5 is nearly done and all. :) Heard you got the battle system working, good job man. :):up: |
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:
PHP Code:
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. |
Database error in vBulletin Control Panel 2.2.4:
Invalid SQL: SELECT * FROM quotes WHERE mod='N' mysql error: Unknown column 'mod' in 'where clause' mysql error number: 1054 Database error in vBulletin 2.2.4: Invalid SQL: SELECT * FROM quotes WHERE 1=1 AND mod!='N' ORDER BY letter,name ASC LIMIT 0,30 mysql error: Unknown column 'mod' in 'where clause' mysql error number: 1054 |
Help! (These errors are from when I installed the second addon hack) The first hack worked fine :(
|
Hmmm. The zipfile didn't update my new query it seems..
John, run this query on your quotes table: ALTER TABLE quotes ADD mod VARCHAR(1) NOT NULL; That should fix it. *goes update the zipfile again, hoping it WILL add the new query file this time* |
It works! Thank you! :)
|
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. :)
Glad it works, JW :):up: |
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 :(
|
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? :) |
Quote:
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" |
That's WAY more complex than the admin panel home thingy! :eek:
Too ****ing complex, for my taste. :) This is what to do if you installed Freddie's Quick Stats hack, for your admin panel home: Find in admin/index.php : PHP Code:
ADD BELOW: PHP Code:
FIND: PHP Code:
PHP Code:
Again, this is if you have Freddie's hack already installed. If not, then you'll have to do a manual output of some kind. The query to add doesn't need changing, though the output will probably need changing if you don't have Freddie's hack. And with this, it'll display "Quotes awaiting moderation: [number]" in your Admin Panel Home. :) |
Thanks, that fixed my problem. It might not be a bad idea to add that to the quotes.php in your hack in case someone esle runs into that. :)
As far as having to put a name or letter in, with the editing capabilites, that is something that could always be done later if someone decided to go that route. I will never use that on my site as I will not doing the quote listing for the users. :) Quote:
|
to add _what_ to quotes.php ?
The Admin Panel Home moderation queue? That's an admin/index.php hack... if not, then what? :) |
The fix you gave me in Post #12, remember? :)
Quote:
|
Ah, yes, well, since it's a bad idea to have ""s in quotes themselves, why bother, really?
And for those who think their users will accidentally add quotes, there's two things to do: read the whole of this thread (it won't hurt them), or edit that template so that it says "Don't add ""s to your quote!" or whatever. :) |
Well, whatever you think is fine by me. It was just a suggestion to avoid a lot of questions later. :) I only wanted it for the editor anyway.
|
Thanks, looks great
|
Ah, very cool, .. Does this also show in the profile of a member the total amount of quotes they have added? And .. does this also show on the frontpage, the total amount of quotes in the database, and maybe on top, top quoter:
Would be nice (no, it would be sweet) This probably is the reason I haven't seen you on IRC for a while :P You were coding leetnez |
boofo, btw, that htmlspecialchars fix isn't necessary in this hack. The hack has a TEXTAREA field for the Quote, the former hack (which you have) still used a Text Input field for the quote, but with TEXTAREA ""s don't matter anymore. So people who install this from scratch won't have a problem at all...
|
Do I need to upgrade anything then? Or will it work the same after adding what you told me to add? I uploaded the new quote.php (with your fix added) and did the admin/index.php, but other than that I didn't add anything else. Is there anything I should replace?
|
Xiph: no, this hack does not, in any way, keep track of what user submits which and how many quotes. If you want that, use Lesane's hack. Mine is a more neutral, unbiased hack with an add-on that makes it a bit less neutral and unbiased, but still more than Lesane's.
If you want the total amount of quotes on forumhome, you should be able to easily add a query for that. Something like this: in root/index.php find: PHP Code:
PHP Code:
PHP Code:
And I've not been in IRC much because of this and other things. Project 3.5 is 99% done, I'm almost ready to send everything online and do the online debugging before opening up. ^_^ Boofo: No, not really. The only difference really, is that the old hack used a Text Input field for Quote, and the new (this) hack uses a Textarea field for Quote, in the Edit page. That, and the new hack doesn't allow empty entries... |
I don't have
// ###################### Start templates ####################### in my global.php |
Nevermind. :/
|
Is there away to delete the quotes that come with the hack?
Thanks :) |
Nevermind :/
I really should think before I ask these dumb questions. |
That's a valuable lesson in life, don't forget it. :)
;) |
Okay, out of boredom I added user-submission-tracking to this hack. It tracks which quotes a user submits, and shows the total number of quotes on their profile (only moderated quotes, not unmoderated submissions), and lastly, it uses the quotelist.php to display all the quotes that one particular user submitted, but in a silent way.
So in the end, it's got the same basic things as Lesane's hack, but taken to a whole new level with better code and a big searchable listing. :/ Instructions for user-tracking only on request by PM/mail, btw. |
this may sound stupid but what is phpmyadmin? =\ thats the only part of the instructions i havent finished because i dont know what it is
|
phpMyAdmin is a 3rd Party Program to run on your server. It's a graphical interface for Database control.
You can find it at www.phpwizards.net I believe, or at phpmyadmin.scourgeforge.net - most webservers have phpMyAdmin pre-installed for you anyway, so check that first! Basically, it allows you to edit, alter, and add to your database(s). Much easier than doing all that through the mysql command prompt. |
Database error in vBulletin 2.2.6:
Invalid SQL: SELECT COUNT(id) AS usertotal FROM quote WHERE ok='Y' mysql error: Table 'baz.quote' doesn't exist mysql error number: 1146 Date: Sunday 02nd of June 2002 11:07:11 PM Script: http://www.marietje.nl/vbb/vbb/userquote.php Everytime a google searches my site, I get that error. I installed that extra query + result of array to display the quotetotal on the frontpage. |
All times are GMT. The time now is 04:47 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|