vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   The Ultimate Quote Hack!! (https://vborg.vbsupport.ru/showthread.php?t=38906)

Boofo 05-22-2002 10:50 AM

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?

KuraFire 05-22-2002 11:07 AM

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.

John 05-22-2002 11:11 AM

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

John 05-22-2002 11:23 AM

Help! (These errors are from when I installed the second addon hack) The first hack worked fine :(

KuraFire 05-22-2002 11:30 AM

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*

John 05-22-2002 11:32 AM

It works! Thank you! :)

KuraFire 05-22-2002 11:50 AM

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:

John 05-22-2002 11:58 AM

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 :(

KuraFire 05-22-2002 12:10 PM

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? :)

John 05-22-2002 12:15 PM

Quote:

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"


All times are GMT. The time now is 07:56 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04020 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete