The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Admin-controlled (only) random quote hack for header/homepage Details »» | |||||||||||||||||||||||||||
Admin-controlled (only) random quote hack for header/homepage
Developer Last Online: Nov 2023
What does this hack do?
It adds a quote and the quoter to your board, either in your header/footer (hack global.php) or on your forumhome page (hack root/index.php). What's the additional server load of this hack? It adds 1 query to each page you have a quote show up on. If you add it to global.php it'll add 1 query to ALL pages, if you add it to root/index.php it'll only add 1 query to your forumhome, but you won't be able to show the quotes anywhere else. Why should we use your hack and not one of the two other quote hacks? Mine is extremely easy (_I_ made it, and I'm a n00b!) but, more importantly, it doesn't allow your users to enter quotes nor does it put it on two silly lines (no offense Lesane, but that aspect, I found absolutely horrid). This is useful if you have a lot of users and don't feel like spending 4 hours a day moderating all new quote-submissions your members made. Or, if you just want full control. Instructions: Step 1: run this query on your vBulletin database (I suggest in phpMyAdmin): PHP Code:
PHP Code:
PHP Code:
Step 2 b: if you want this to appear only on your forumhome, open root/index.php and find this line: PHP Code:
PHP Code:
That's it. I left it up to you entirely where and how you add the quote and quoter, seeing as how people will place it in different places entirely. Attached is a small selection of my own quotes database. Not all of it, for a: it'd be quite a lot, and b: it took me a lot of work to get those quotes together and into a database, neatly, and I'm not done processing my entire collection yet so I'm not making my entire quotes database publicly available. To add these 100 quotes to your database, run the contents of 100quotes.sql as a query in phpMyAdmin on your database. In the second post, I will add a screenshot. This hack is really basic, Kura, I'm sure you can do more with this! What's your plan, my man? Self-imployed vote of confidence, woohoo! *cough* anyway, yeah this is actually just the first part of a rather big hack I have in mind, though not yet in true development. What I'm Planning to create, is a quote index very similar to the memberlist, but then about quotes. You'll have noticed that the structure of the `quotes` table that this hack adds, includes a "letter" column. This is solely for the purpose of making the quotes table searchable by letter, later on. Like, when you click on members, you'll have the option to select all members by a single letter. Same with the quotes list I am working on (in my mind mostly, thus far). (edit: this quotes listing is now done. Contact me if you want an early release) UPDATE IN POST #20: Admin Panel Addition for easy Quotes adding! [high]* KuraFire awaits response again... [/high] Edit: credit goes out to Lesane for being the first one to have made a quote hack, of course, but this one is different, and I think it's good for people to be able to have a choice. Show Your Support
|
Comments |
#42
|
||||
|
||||
Yes, you're supposed to use the same Letters many times. 5 quotes by Nietzsche should all have the letter N, two quotes by Ambrose Bierce should both have the letter B. And so forth and so forth..
Glad you like it. |
#43
|
|||
|
|||
Kura, I don't find an issue with you creating this hack (even if I did the same one before you! ). Lesane's is a beautiful hack for those wanting to empower their users to contribute in such a fashion. Others, like yourself and me and others, have other reasons to use the methods we have used. I, for one, am secure in my use of my quote hack over Lesane's that when the attacks came, as they did for you, I just ignored them and carried on with what I'm doing. Kudo's to those who understand that there is more than one way to skin a cat and if it works for you - great! If Lesane's works for you - great!
Thanks for the contribution and let's see some more hacks. Sketch |
#44
|
||||
|
||||
Thx Sketch.
Okay, I finished the edit & delete functions for the Admin Panel (man, that was 4,3 KB of a now 5 KB quotes.php file!). If anyone wants them before I release it with the Quotes List hack (in a 'package'), contact me by mail or PM. Also, is anyone interested in me adding support for users to add their quotes and have them under moderation, like Lesane's? (but without the weird complexity of Lesane's hack (I looked at the files, eww) and with the benefit of users not likely to submit a quote that already exists in your database) If there is a desire for such an add-on ('s really easy, but I'll keep it as an add-on, don't feel like making it an option in the AP > vBulletin Options page) let me know, and I'll write it. I probably will, anyhow, for my own board, but it won't be default in the hack! |
#45
|
||||
|
||||
haha
had the wrong global..lol!! |
#46
|
||||
|
||||
Installed and working GREAT!
but i need to find a nice place to put it in the header..lol |
#47
|
||||
|
||||
|
#48
|
||||
|
||||
Quote:
and no i am not keeping my log like that |
#49
|
|||
|
|||
Well I had a quesiton for KuraFire, or anybody else who wants to answer... how would I make the Admin panel extension of this hack (Which is -not- obsolete in my opinion, this is exactly what we were looking for) continually update row id 1 instead of creating a new row every time, and having it randomly choose it? WE have a weekly saying, and we're only doing it one row to keep it the same.
Help is apreciated! |
#50
|
||||
|
||||
Erm, how would you want to randomly choose from something that is just 1 row?
I'm having a hard time what exactly you want - if you have only 1 quote that you change weekly, isn't it easier to just toss that in a template and change that, weekly? Cos using a whole quotes system for just 1 quote seems kinda silly, to me... And if you want multiple quotes, then why do you want to only use the first row??? |
#51
|
|||
|
|||
I used your quote hack, because it's easier for me. I don't really understand the templating system well enough to create templates, nor do I know enough about php/mysql. I know bits and pieces for this kind of stuff.
My main question, is how do I change your admin panel extension to update the same row, over and over again, instead of creating a new quote everytime? (Instead of making new rows, over write the old one every time) Still looking for help, Chris |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|