Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
The Ultimate Quote Hack!! Details »»
The Ultimate Quote Hack!!
Version: 1.00, by KuraFire KuraFire is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

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.

Comments
  #22  
Old 05-22-2002, 12:28 PM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's WAY more complex than the admin panel home thingy!

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:
$mysqlversion $DB_site->query_first("SELECT VERSION() AS version"); 

ADD BELOW:

PHP Code:
$quotesmod    $DB_site->query_first("SELECT count(*) AS count FROM quotes WHERE mod='N'"); 


FIND:

PHP Code:
makelabelcode('New Posts Today:'$newposts['count']); 
ADD BELOW:

PHP Code:
makelabelcode("Quotes awaiting <a href=\"quotes.php?s=$session[sessionhash]&action=moderate\">moderation</a>:"$quotesmod['count']); 
(edited: I turned "moderation" into a link, even easier now ^_^)

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.
Reply With Quote
  #23  
Old 05-22-2002, 12:35 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
Originally posted by KuraFire
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 &quot; in your templates. Much easier to take them off again if you decide to, at one point.


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.
Reply With Quote
  #24  
Old 05-22-2002, 12:51 PM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

to add _what_ to quotes.php ?

The Admin Panel Home moderation queue? That's an admin/index.php hack...

if not, then what?
Reply With Quote
  #25  
Old 05-22-2002, 01:14 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The fix you gave me in Post #12, remember?

Quote:
Originally posted by KuraFire
to add _what_ to quotes.php ?

The Admin Panel Home moderation queue? That's an admin/index.php hack...

if not, then what?
Reply With Quote
  #26  
Old 05-22-2002, 01:19 PM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #27  
Old 05-22-2002, 01:24 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #28  
Old 05-22-2002, 01:27 PM
MrLister's Avatar
MrLister MrLister is offline
 
Join Date: Oct 2001
Posts: 434
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, looks great
Reply With Quote
  #29  
Old 05-22-2002, 01:28 PM
Floris Floris is offline
 
Join Date: Jan 2002
Posts: 1,898
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #30  
Old 05-22-2002, 01:49 PM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...
Reply With Quote
  #31  
Old 05-22-2002, 01:54 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:29 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04729 seconds
  • Memory Usage 2,320KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete