View Full Version : QuoteIt! - Quote Database
Cap'n Steve
10-04-2005, 10:00 PM
QuoteIt! version 3.0
QuoteIt! allows you to have a database of quotes integrated with your forum. Users submit quotes that can then be voted on by the other users, using your choice of two rating systems. The average installation will show a random quote on the forum home page, but you can include it on any vBulletin page or on your portal home page.
If you'd like to see a demo, go to forums.monkeycrap.com (http://forums.monkeycrap.com).
Features:
Random Quote
- a random quote can be shown on any vBulletin powered page
- the administrator can set a default rating threshold that quotes must meet before showing up as the random quote
- a new random quote can be chosen at a specific interval of time, to reduce server load
Quote Database
- quotes can be searched, filtered, and sorted by many different criteria
- quotes have a "context" field that can be turned on or off to include more information about the quote
- quotes can be embedded in posts with bbcode
- each post and private message now has a "Submit to Quotes" link that allows users to quote things said on your forum more easily
Quote Ratings System
- quotes can be rated either plus/minus or on a scale from 1 to 5
- quotes below a certain total score or average score can be filtered out
Quote Management
- quotes can either be automatically approved or moderated
- the quote moderation que is like the que for posts, enabling the moderation of several quotes at once
- usergroup permissions are used for adding, editing, deleting, rating and viewing quotes
- most actions use AJAX to avoid page reloads
Don't forget to click install (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=135297)!
Currently known problems are listed here.
The files needed to edit the included images are attached to this post.
This hack is based on QuoteIt! 1.2, originally by magnus. The "submit post" feature was inspired by an addon by CtrlAltDel.
Other versions (development will continue for the 3.6 version only): QuoteIt! 3 for vBulletin 3.6.x | QuoteIt! 2.03 for vBulletin 3.0.x
Lea Verou
10-05-2005, 03:34 AM
Installed and works nicely and nothing is lost! :)
When will the vbadvanced module come out? :)
Neutral Singh
10-05-2005, 04:06 AM
Oh Yes! Oh Yes!! Oh Yes!!!
Finally !!! Thank You !!!
Cap'n Steve
10-05-2005, 04:47 AM
Attached are instructions for adding a random quote block to vBadvanced CMPS. vBportal seems to have become a commercial product, if anyone knows how to create addons for that, please let me know.
UPDATE: Added instructions for adding quotes to the quick moderation block.
Neutral Singh
10-05-2005, 04:53 AM
Why its no showing up in my ForumHome? :confused: Everything seems to installed without any errors?
Cap'n Steve
10-05-2005, 05:03 AM
Did you set "Show Random Quote" to yes under vBulletin Options -> Forums Home Page Options? You can also set it through the QuoteIt! Options link.
Also, you have to edit the FORUMHOME template as shown in the instructions.
Neutral Singh
10-05-2005, 05:13 AM
Forums Home Page Options? is not showing up in my AdminCP. I even tried editing the phrase and saving it. But the option is not showing up.
Show Random Quote : Yes
ForumHome template Edited : Yes
Vizionz
10-05-2005, 05:26 AM
yes it is fool its in your vbulletin options :P
Vizionz
10-05-2005, 05:33 AM
mine aint in forum home page >
its just under vbulletin options
Boofo
10-05-2005, 05:34 AM
Any way to make this so that only the Admin can enter quotes?
Lea Verou
10-05-2005, 05:37 AM
Any way to make this so that only the Admin can enter quotes?
By denying all other quotes maybe?
By removing the add new quote link from the template so only you know the link?
Maybe there are permissions but I'm too bored to have a look right now :p
Vizionz
10-05-2005, 05:39 AM
i thought u did something wrong but it aint you its this hack it dont work :( sorry neutral i misread what u said
maybe the only one who has a name with neutral in it :P
Lea Verou
10-05-2005, 05:41 AM
i thought u did something wrong but it aint you its this hack it dont work :( sorry neutral i misread what u said
Maybe you'd add a quote to your post so that we know who you are talking to? :rolleyes:
Cap'n Steve
10-05-2005, 05:43 AM
The easy way to only allow administrators would be to edit quotes.php
Find
require_once('./global.php');
and after that add
if ($_REQUEST['do'] != 'view' AND $_REQUEST['do'] != 'list' AND $_REQUEST['do'] != 'rate' AND !empty($_REQUEST['do'])) {
if (!$vbulletin->userinfo['permissions']['adminpermissions']) {
print_no_permission();
exit;
}
}
Restricting the quotes to various usergroups is something I'll work on for the next version.
EDIT: For those of you having problems, what exactly is going wrong? What shows up on your forum home page? What happens if you go to quotes.php?
Vizionz
10-05-2005, 05:47 AM
this dont work for me
i added the product
i uploaded the files
i even tried to submit a quote normal and moderated
when it was moderated i accepted the quote it said added to the phrazes but it isnt showing on the forum home
http://www.thaasylum.com/index.php see for yourself
even add a quote
http://www.thaasylum.com/quotes.php
there showing up in there but nothing on home page
Lea Verou
10-05-2005, 05:49 AM
this dont work for me
i added the product
i uploaded the files
i even tried to submit a quote normal and moderated
when it was moderated i accepted the quote it said added to the phrazes but it isnt showing on the forum home
have you made the necessary template edits to FORUMHOME?
(yes you have to make them manually)
Vizionz
10-05-2005, 05:53 AM
have you made the necessary template edits to FORUMHOME?
(yes you have to make them manually)
dont talk to me like i am stupid
Neutral Singh
10-05-2005, 05:53 AM
In Forums Home Page Options this option is not showing up in my AdminCP. I even tried editing the phrase and saving it. But the option is not showing up.
This seems to be the main problem. Its must have been, by default, disabled under that option and as its not visible, we can not enable it. Anyways of showing it in Forums Home Page Options?
Lea Verou
10-05-2005, 05:57 AM
dont talk to me like i am stupid
I was just trying to help, but if you think I am talking to you like you are stupid maybe we have a little problem here!
ontopic: Have you made the appropriate settings so that it's displayed in forumhome? Sometimes we make silly mistakes without noticing, this doesn't mean we're stupid ;)
Vizionz
10-05-2005, 05:59 AM
(yes you have to make them manually) i found that offensive
but okay
yes i followed every direction
under vbulletin options there is quote it.
it lets you dispaly random quote i got it clicked
but undr vbulletin options > forum home page theres nothing there with quote it
Lea Verou
10-05-2005, 06:01 AM
(yes you have to make them manually) i found that offensive
but okay
yes i followed every direction
under vbulletin options there is quote it.
it lets you dispaly random quote i got it clicked
but undr vbulletin options > forum home page theres nothing there with quote it
have you refreshed the frame that has the admincp options? I made this mistake several times with the plugins as it's not automatically refreshed...
Alien
10-05-2005, 06:02 AM
Confirmed working great on WTF.com!
Thanks so much for updating this!!
Vizionz
10-05-2005, 06:02 AM
yep just double checked that as well.
give it a go yourself its a 10 second hack to install
Vizionz
10-05-2005, 06:06 AM
i dont understand it. i can see the quotes in the quotes.php but its not showing on my forum homepage unless its my cookies not showing you look http://www.thaasylum.com
and thaasylum.com/quotes.php
i see the quotes there but not on forum home
Neutral Singh
10-05-2005, 06:08 AM
Quite interestingly Submit to Quotes is working fine. Even this link is working fine --> http://www.sikhphilosophy.net/sikhphilosophy/quotes.php but its now showing up in forumhome. :(
Lea Verou
10-05-2005, 06:09 AM
yep just double checked that as well.
give it a go yourself its a 10 second hack to install
Then I have no idea what the problem can be... :/
PS: Actually, I have installed the hack, first of all in fact if you see my post :p :p
Good luck with the problem!
Cap'n Steve
10-05-2005, 06:16 AM
I think I've fixed it, download the zip again and reimport the product-quoteit.xml file (be sure "Allow Overwrite" is set to yes).
For some reason it didn't export the settings before. :ermm:
Vizionz
10-05-2005, 06:20 AM
that was it :) thanks captain :P
Boofo
10-05-2005, 06:23 AM
By denying all other quotes maybe?
By removing the add new quote link from the template so only you know the link?
Maybe there are permissions but I'm too bored to have a look right now :p
Sorry, didn't mean to bore you. ;)
Lea Verou
10-05-2005, 06:25 AM
Sorry, didn't mean to bore you. ;)
Sorry... :(
Neutral Singh
10-05-2005, 06:27 AM
Yipeeeeeeeee!!! Now It works !! Thanks
Alien
10-05-2005, 06:34 AM
I'm not sure what I did to make it work the first time? :)
What exactly was wrong the first time? I have all settings, and everything displayed properly.. I guess I must have had a setting from a previous version of the quote hack where others didn't? What changed in the new file, or if i had the proper tables in the database already was there any need for me to redo the plugin?
Vizionz
10-05-2005, 06:37 AM
almost perfect
okay now i changed the rating from 1to 5 instead of + and minus and it says i dont have permission yet i am a admin ?
Cap'n Steve
10-05-2005, 06:46 AM
Vizionz - What part gives you the error? Is it when you change the rating style or when you try and rate some quotes?
Alien - Your guess is as good as mine. It should be impossible to still have the settings from the 3.0 version, but apparently you did. The way I actually got the settings to export to the XML file makes no sense, either.
Vizionz
10-05-2005, 06:50 AM
when i try and rate the quotes. i dont know if its because i submitted the quote or what
Cap'n Steve
10-05-2005, 06:53 AM
I just tried it and I think it's because you already rated the quote. The rating list shouldn't be showing up though, I'll take a look at it.
Lea Verou
10-05-2005, 06:59 AM
I can confirm that the vbadvanced module works perfectly too.
Can't wait for 2.5!
Alien
10-05-2005, 07:02 AM
When you edit a quote, there is an uncached template: quote_addquote
When you view, delete, or add all is well. Just editing has 1.
Just an FYI. :)
Alien
10-05-2005, 07:05 AM
In moderation, when I attempt to moderate one (happens in delete, or approve) I get this:
Could not find phrase 'quote_x_has_been_approved'.
Aside from the missing phrase, it approves or deletes properly.
Cap'n Steve
10-05-2005, 07:08 AM
I reuploaded the zip again because the templates were slightly messed up.
I know about the missing phrase, I decided to release it anyway since it won't hurt anything and I can't figure out how to get it to show up yet. Don't worry, that phrase is only in the admincp anyway.
Not a good start for my 3.5 modding career, but that should be the last problem.
Vizionz
10-05-2005, 07:12 AM
yep that worked thanks. been wanting this hack for awhile
if i run into any probalems i will let you know
Neutral Singh
10-05-2005, 07:14 AM
When i try to add a quote it says -->
Please complete all the fields. Press the back button, correct the problem then try again.
I enter data in all three fields here --> http://www.sikhphilosophy.net/sikhphilosophy/quotes.php
:confused:
Vizionz
10-05-2005, 07:17 AM
yeah we got another problem with the updated zip
now
http://thaasylum.com/Array[bburl]/quotes.php?do=addquote
Neutral Singh
10-05-2005, 07:17 AM
I tried again and now it works... ;)
Alien
10-05-2005, 07:18 AM
Looking good..
Only other suggestion I could make is correcting all the xhtml invalid code using the w3c validator. :) There's a large amount of invalid code that appears pretty easy to fix..
GREAT JOB!
Neutral Singh
10-05-2005, 07:22 AM
yeah we got another problem with the updated zip
now
http://thaasylum.com/Array[bburl]/quotes.php?do=addquote
Yeah!! In the postbit and postbit_legacy:
Replace the code as:
<!-- BEGIN QuoteIt! -->
<a href="$vboptions[bburl]/quotes.php?do=submitpost&postid=$post[postid]">$vbphrase[submit_to_quotes]</a>
<!-- END QuoteIt! -->
Now, it should work.
For those who want "Submit to Quotes" option to show up only while viewing the threads, you can use the following conditionals in postbit and postbit_legacy.
<if condition="THIS_SCRIPT=='showthread'">
<!-- BEGIN QuoteIt! -->
<a href="$vboptions[bburl]/quotes.php?do=submitpost&postid=$post[postid]">$vbphrase[submit_to_quotes]</a>
<!-- END QuoteIt! -->
</if>
Enjoy !!
Vizionz
10-05-2005, 07:27 AM
but it isnt a postbit edit Its on the actual; forumhome template for me
Vizionz
10-05-2005, 07:32 AM
i fixed it myself in the xml.
Cap'n Steve
10-05-2005, 07:43 AM
The reason I changed it was because that's what was causing the rating problems. But it looks like that only works in the conditional tags, so I changed everything else back. Boy I wish there was some documentation for this.
NuclioN
10-05-2005, 08:17 AM
Serious conflicts with stuff from an earlier quote we had. The link in postbit shoots us nowhere, the page will not appear with that code. Then we see old quotes from the previous version and after submit there's a database error. Missing context sql etc.
Is there an uninstall to make room for this new quoteit ?
Alien
10-05-2005, 08:36 AM
Is there a way for us to run it purely as it's own script?
I disabled the hack, and can still go to the quotes.php file, vote, browse, submit one, etc. perfectly. However, when disabling this hack it also removes the admincp option fields and the moderation section (but these can be loaded if you know the url). Can we have an option to just use this as an add-on as well to save the homepage 2-3 queries?
NuclioN
10-05-2005, 09:13 AM
What would be nice is when you add quotes from the postbit the line of (quoted) text is already present in the quote textfield. :)
Cap'n Steve
10-05-2005, 06:02 PM
Alien - I'm not sure what you mean. If you just set Show Random Quote to no, it won't show up on the homepage but you can still do everything else.
Nuclion - Did you have an earlier version of this hack or was it some other quotes system? If you're using the Submit to Quotes link in a post, the quote and author fields should be automatically filled out, is this not what's happening?
NuclioN
10-05-2005, 07:00 PM
No Cap, that's not what's happening. I've re-installed the updated version and the quotes are visible om forumhome, however when the link in postbit is used no info is put into the textfield. No author and no quote... it's totally empty.
Reeve of shinra
10-05-2005, 07:08 PM
Glad to see this!
Cap'n Steve
10-06-2005, 03:07 AM
It's working fine on my test forum, can I get a link to your forum?
Alien
10-06-2005, 04:59 AM
Alien - I'm not sure what you mean. If you just set Show Random Quote to no, it won't show up on the homepage but you can still do everything else.
Yeah my bad, it's all working perfectly now! I put the link to it in my header!
Thanks so much! :)
NuclioN
10-06-2005, 06:37 AM
It's working fine on my test forum, can I get a link to your forum?
Don't ask me how this is possible but after changing the style it worked ok in the postbit (??)
lexx27
10-06-2005, 09:49 AM
Before i started using the quote it hack i had a quotation database with images. When i tried to link the images in this hack it was like this:
"<img> quote"
I didnt like it. But as you can see there is a big gap on the left of the quote where there is enough space for a picture. How can i do this? It will be great if there is a way.
Thank you by the way for this great hack!
*i also posted this at 2.0 because i am interested in both versions
Cyricx
10-06-2005, 04:43 PM
Hmm the quote post link isn't transfering variables right.
It comes up with the author text box empty
and the message text box just says "Array"
The edit quote link does the same.
VaaKo
10-06-2005, 09:38 PM
I installed this mod, but there is somethign wrong with the template, take a look:
https://vborg.vbsupport.ru/ (http://img160.imageshack.us/my.php?image=quote8ag.jpg)
see this empty space?
how do I remove it?
I found this extra code in the html: <td class="alt1" width="30%"></td>
in the template: quote_randomequote
if I remove it will it work?
and also, when I try to moderate the quotes, it says that some phrases are missing..
DefenceTalk
10-06-2005, 09:57 PM
NO border?
http://www.defencetalk.com/forums
Why isn't there any border for random quote table?
VaaKo
10-06-2005, 09:57 PM
nevermind, I took care of it
but I noticed that guests can see and click on the link "add a quote"
shouldn't this be visible to registered users only?
how can I make it work like that?
NuclioN
10-06-2005, 09:59 PM
How did you remove that space on the left side in the quote box? :)
Bubble #5
10-06-2005, 09:59 PM
Looks great Cap'n Steve! Was a sinch to install :)
However, could you please give us more detailed information on how Average Threshold, Total Threshold, and Enable Context should be used?
Thanks!
fringehead
10-07-2005, 02:18 AM
Nice job Captain! I clicked install!
Cap'n Steve
10-07-2005, 04:02 AM
If you don't want any space to the left of the quotes, in the quote_listbit template, find
<td width="30%" class="alt1"></td>
<td class="alt1">
and replace that with
<td colspan="2" class="alt1">
then, in quote_randomquote find
<tr><td class="alt1" width="30%"></td>
<td class="alt1">
and replace that with
<tr><td colspan="2" class="alt1">
If you want to add an image to the left of the quote, edit quote_listbit and quote_randomquote and put the image between <td class="alt1" width="30%"> and </td>.
Cyricx, edit quote is also working fine on my test server. Save a copy of the page with the error on it and attach it to a post so I can take a look.
Defencetalk, in quote_randomquote find border="0" and delete that.
VaaKo
10-07-2005, 09:30 AM
how can I allow my moderators to moderate quotes as well?
and how will I be able to add a border for the random quote table?
cause there was 2 border="0" and I removed them both and still not getting a border for the table
I think I should be adding 1 instead of 0
VaaKo
10-07-2005, 09:45 AM
nevermind I solved it
DefenceTalk
10-07-2005, 09:48 AM
border="0"
Yup, removing border=0 doesn't do anything. If you change it to 1, it doesn't come out right like the rest of the borders.
lexx27
10-07-2005, 10:44 AM
If you want to add an image to the left of the quote, edit quote_listbit and quote_randomquote and put the image between <td class="alt1" width="30%"> and </td>.
But this will add the same image for every quote.
I would like if it is possible to be able to add a different image with every quote.
An idea is to put manually the "". But how can i remove them?
Cyricx
10-07-2005, 02:08 PM
Screenie attached.
This happens when clicking the link to add a post to the database either in threads or PMs.
Cap'n Steve
10-07-2005, 08:40 PM
Cyricx - I really need an html file to try and figure it out. Just use File->Save in your browser.
lexx27 - That's not really possible with this version, maybe in the next one.
Defencetalk - Try changing cellspacing="0" to cellspacing="1" in quote_randomquote
I haven't yet figured out how to do moderator permissions, but I'm working on it.
NuclioN
10-07-2005, 08:52 PM
Maybe a small sized avatar from the member who has quoted the post next to the quote :)
Cap'n Steve
10-07-2005, 09:28 PM
Bubble #5 - Sorry, it explains it under the Forum Home Options, but not under the QuoteIt! Options, here's an explanation:
Total Threshold - Quotes won't show up as the Random Quote unless their total rating is at least this number.
Average Threshold - Quotes won't show up as the Random Quote unless their average rating is at least this number.
Context - This is just an extra text box where users can include extra information, like where the quote came from.
eure-mudder
10-11-2005, 12:43 PM
First of all I have to say, great hack, it runs like a charm.
But like Alien said some Posts above me your code dose not pass the W3C Validator.
He shows me 2 Errors on This code
/quotes.php?do=view"eid=5">#5</a>
Which hast to be this Part in the quote_randomquote template
<a style="float:$stylevar[right];" href="$vboptions[bburl]/quotes.php?do=view"eid=$randomquote[quoteid]">#$randomquote[quoteid]</a>
dose anybody know how to solve this prob.?
And your CSS code sould not apper in body of the page. It should be in the Head.I copied it into the additional CSS definitions.So they are in the Head.
Cap'n Steve
10-12-2005, 02:39 AM
I think it's complaining about the & in the link. Try replacing it with &
I'd love to start fresh on the templates and do it with a lot less tables, but I'll have to brush up on my CSS first. I'll work on that for the next version.
eure-mudder
10-12-2005, 05:39 AM
Yes the & was the Reason.
Thank you!
Snort_2005
10-12-2005, 12:36 PM
If we install this and we had the version for 3.0.x installed, would we retain things such as settings and quotes? O_o
Lea Verou
10-12-2005, 02:42 PM
Any EDA for the next version, even a loose one???
@Snort: Yes you will :)
Cap'n Steve
10-12-2005, 06:12 PM
If we install this and we had the version for 3.0.x installed, would we retain things such as settings and quotes? O_o
You'll still have the quotes, but not the settings.
I have no idea when the next version will be out, sorry. :speechless:
Neutral Singh
10-15-2005, 03:52 PM
Database error in vBulletin 3.5.0:
Invalid SQL:
SELECT COUNT(*) AS quotes FROM quotes
WHERE AND quotes.average >= 0 AND quotes.rating >= 0 approved = 1;
MySQL Error : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND quotes.average >= 0 AND quotes.rating >= 0 approved = 1' a
Error Number : 1064
Date : Saturday, October 15th 2005 @ 12:36:13 PM
Script : http://www.sikhphilosophy.net/sikhphilosophy/quotes.php?do=list
I only changed the hook to global_start. Everything else is working except this error when i click view all. Any clues please?
Cap'n Steve
10-16-2005, 06:34 AM
Edit the "Random Quote" plugin, and after the last line add this
$threshold = '';
Neutral Singh
10-16-2005, 11:59 AM
Sweet, works like a charm now. :) Thanks
Cyricx
10-19-2005, 02:50 PM
Figured out my error...
I had forgotten to revert the old templates from the previous Quote It version for 3.0.x
Great hack!! Totally loving this :)
Cyricx
10-19-2005, 03:01 PM
Ooo!! Idea for ya!
Quotes: xx
in postbit :)
Basically kinda like post count, but quote count :)
Sure it'd involve adding a field to the user table and then adding a way to increase the count when adding a quote and decrease the count when the quote is being deleted :)
But that would certainly up the traffic on the quotes :)
Cap'n Steve
10-20-2005, 04:18 AM
Good idea. It sounds pretty easy to do, so it'll probably be in the next version.
Rabbitoh Warren
10-23-2005, 03:52 PM
Apart from the default templates (which I've since edited to my liking, see attachment) this is a great hack. Thanks Steve! :up:
Lea Verou
10-24-2005, 02:26 PM
I took today a good look at the templates quote_listquote and quote_listbit cause I wanted to change them to fit the look of my forum better...
The problem with the looks ot this -otherwise excellent- mod is that it uses it's own CSS classes!!!! Why do so and not use vbulletin's classes? It would fit much more if it was done this way and it would also save you the time to make your own CSS classes from vbulletin variables...
edit: Also, by the way, how can I set the default sorting method to show new additions at the top?
Rabbitoh Warren
10-24-2005, 03:40 PM
Anyone know how to stop the link to "Submit to Quotes" from appearing when a user is viewing their private messages?
Cyricx
10-24-2005, 03:44 PM
Anyone know how to stop the link to "Submit to Quotes" from appearing when a user is viewing their private messages?
In your postbit or postbit_legacy template find:
<!-- BEGIN QuoteIt! -->
<a href="$vboptions[bburl]/quotes.php?$session[sessionurl]do=submitpost&postid=$post[postid]">$vbphrase[submit_to_quotes]</a>
<!-- END QuoteIt! -->
And REPLACE IT with:
<!-- BEGIN QuoteIt! -->
<if condition="THIS_SCRIPT=='showthread' OR THIS_SCRIPT=='showpost'">
<a href="$vboptions[bburl]/quotes.php?$session[sessionurl]do=submitpost&postid=$post[postid]">$vbphrase[submit_to_quotes]</a> </if>
<!-- END QuoteIt! -->
Rabbitoh Warren
10-24-2005, 03:55 PM
Thanks Cyricx, that did the trick. :up:
Cap'n Steve
10-25-2005, 03:52 AM
I took today a good look at the templates quote_listquote and quote_listbit cause I wanted to change them to fit the look of my forum better...
The problem with the looks ot this -otherwise excellent- mod is that it uses it's own CSS classes!!!! Why do so and not use vbulletin's classes? It would fit much more if it was done this way and it would also save you the time to make your own CSS classes from vbulletin variables...
edit: Also, by the way, how can I set the default sorting method to show new additions at the top?
I could have used more default classes, but I like my pretty buttons. ;) Like I said, it was a nightmare trying to get certain things to look good in every browser and hopefully I'll have time to redesign it soon.
There's no way to sort quotes by date yet. Unfortunately I didn't think of that until after I released version 2.
TwinsForMe
10-25-2005, 09:15 PM
On the older version, I had edited FORUMDISPLAY, SHOWTHREAD, and search_results, so the quotes would show up in each forum, when viewing a thread, and after hitting "New Posts". How can I do the same with this version?
Cap'n Steve
10-25-2005, 10:15 PM
Just edit the Random Quote plugin so it uses the global_start hook and add this code at the end:
$threshold = '';
Then add the $showrandomquote to whatever templates you want to.
TwinsForMe
10-25-2005, 11:12 PM
Thanks. :)
Holidazed
10-27-2005, 12:12 AM
I added the latest quote version and the install went smooth. However, after I add my first quote, it does not display on the forumhome page. I just see
""
When I attempt to edit it, the form is empty as if I never made a quote at all. If when editing, I add text in the fields and press the submit button, I get the same message as Neutral Singh (show below)
Please complete all the fields. Press the back button, correct the problem then try again.
In addition, I have the same problem as Don Corleone (shown below)
I installed this mod, but there is something wrong with the template, take a look:
http://img160.imageshack.us/img160/639/quote8ag.th.jpg (http://img160.imageshack.us/my.php?image=quote8ag.jpg)
see this empty space?
how do I remove it?
Help!!
Cap'n Steve
10-27-2005, 04:09 AM
To fix the spacing, see this post.
For the other problem, do you have quote moderation turned on? You might have to approve the quote. If not, you should redownload and reimport the hack (be sure to allow overwrite and revert your QuoteIt! templates).
Holidazed
10-27-2005, 04:27 PM
Thank you. The problem is in my big fat fingers. I had it misconfigured. I also fixed the spacing issue due to y our help.
Thank you
Snort_2005
10-28-2005, 05:24 AM
Attempted to install the mod after I had it on vB 3.0.7
Database error in vBulletin 3.5.0:
Invalid SQL:
INSERT INTO vb3_datastore
(title, data) VALUES
("quote_settings", "1:0::1:5:0:::");
MySQL Error : Duplicate entry 'quote_settings' for key 1
Error Number : 1062
Date : Friday, October 28th 2005 @ 01:05:52 AM
Script : http://www.zcworld.net/forums/admincp/plugin.php
Referrer : http://www.zcworld.net/forums/admincp/plugin.php?do=productadd
IP Address : 216.76.169.190
Username : Sephiroth
Classname : vb_database
Cap'n Steve
10-29-2005, 03:26 AM
Somehow you kept the settings through the upgrade. It might still work, but if not, edit the product-quoteit.xml file and delete everything between <installcode> and </installcode>. Then reimport the file, making sure "allow overwrite" is checked.
Snort_2005
11-04-2005, 04:39 PM
Database error in vBulletin 3.5.1:
Invalid SQL:
INSERT INTO vb3_setting
(varname, grouptitle, value, defaultvalue, datatype, optioncode, displayorder, advanced, volatile, product)
VALUES
(
'showquote',
'forumhome',
'1',
'0',
'boolean',
'yesno',
90,
0,
1,
'quoteit'
),
(
'ratequote',
'forumhome',
'0',
'0',
'number',
'<select name=\\\"setting[ratequote]\\\" tabindex=\\\"1\\\" class=\\\"bginput\\\">\r\n<option value=\\\"0\\\" \" . iif($setting[\'value\']==0, \'selected=\"selected\"\') . \">\" . $vbphrase[\'disabled\'] . \"</option>\r\n<option value=\\\"1\\\" \" . iif($setting[\'value\']==1, \'selected=\"selected\"\') . \">\" . $vbphrase[\'plus_or_minus\'] . \"</option>\r\n<option value=\\\"2\\\" \" . iif($setting[\'value\']==2, \'selected=\"selected\"\') . \">\" . $vbphrase[\'1_to_5\'] . \"</option>\r\n</select>',
100,
0,
1,
'quoteit'
),
(
'averagethreshold',
'forumhome',
'',
'',
'number',
'',
110,
0,
1,
'quoteit'
),
(
'totalthreshold',
'forumhome',
'',
'',
'number',
'',
120,
0,
1,
'quoteit'
);
MySQL Error : Duplicate entry 'ratequote' for key 1
Error Number : 1062
Date : Friday, November 4th 2005 @ 12:38:57 PM
Script : http://www.zcworld.net/forums/admincp/plugin.php
Referrer : http://www.zcworld.net/forums/admincp/plugin.php?do=productadd
IP Address : 216.76.169.217
Username : Sephiroth
Classname : vb_database
That's after I edited the xml. o_O;
edit: However, http://www.zcworld.net/forums/quotes.php just gives me a white screen.
Cap'n Steve
11-04-2005, 11:29 PM
Delete everything between <options> and </options> and try again.
Gaffer
11-05-2005, 02:22 AM
how the heck do i make it so the quotes show on all pages threw the template navbar.
thats where i ran the last version of the quoteit but this one even though thats where i put it only loads on home
Cap'n Steve
11-05-2005, 07:37 AM
Follow the instructions in this post to add it to every page.
funinthesun
11-10-2005, 01:14 AM
Interesting mod, might install later, thanks :)
Snort_2005
11-13-2005, 09:22 PM
Thank you. :)
*clicks install*
Greebo
11-14-2005, 11:36 AM
I'm having what seems to be a different problem. I've got the quotes showing up in my portal homepage, but whenever anyone, myself included, attempts to add a quote, edit a quote, or view all quotes (in short any access to quotes.php) all we get is a blank page with just html and body tags in it.
Any ideas?
OneShot
11-14-2005, 04:26 PM
Installed it - great Mod. One Question tho, is it possible to make the number of Quotes to moderate appear in the AdminCP Control Panel Home below Threats, Events and so on to moderate?
Cheers
OS
TygerTyger
11-14-2005, 07:22 PM
Installed it - great Mod. One Question tho, is it possible to make the number of Quotes to moderate appear in the AdminCP Control Panel Home below Threats, Events and so on to moderate?
Cheers
OS
Yeah, I was gonna suggest that. There's also a missing phrase: quote_x_has_been_approved.
Couple of other suggestions from me, the Quote Number (#X) goes up one for every submitted qotm, regardless of whether or not it actually gets approved. So you end up with quote numbers scattered all over the place and people asking where the missing numbers are.
And would it be possible for number of ratings (Total Ratings:) to count the number of times a quote has been rated, as opposed to adding up the scores it has been given? A quote gets rated twice and already has a Total Rating of 10, which is rather confusing to say the least.
It's a great mod anyway, love it :D
Cap'n Steve
11-15-2005, 04:07 AM
One Question tho, is it possible to make the number of Quotes to moderate appear in the AdminCP Control Panel Home below Threats, Events and so on to moderate?
Not yet. I'll put that on the list to be included in the next version.
And would it be possible for number of ratings (Total Ratings to count the number of times a quote has been rated, as opposed to adding up the scores it has been given?
$randomquote[votes] holds the number of votes. I'll take a look at getting the ids in order, and I already know about the phrase. It's not missing, I just can't seem to find the right phrasegroup for it.
I've got the quotes showing up in my portal homepage, but whenever anyone, myself included, attempts to add a quote, edit a quote, or view all quotes (in short any access to quotes.php) all we get is a blank page with just html and body tags in it.
I really have no idea. Could you put the quotes.php file back up so I can take a look at it?
GrendelKhan{TSU
11-15-2005, 06:17 AM
please tell me this is a fully phrased hack!! :)
I'm all over it if it is...looks great!! :D :D
TygerTyger
11-15-2005, 10:53 AM
Certainly is phrased :)
I'm allllllmost done setting this to use much less tables, but I'm stuck. On the FORUMHOME I have it set so that if the rating dropdown is available, the average vote scores etc don't show. Once you've voted, it is reversed. This works fine on FORUMHOME using the basic <if><else /></if> that's already in place in the mod, but it doesn't work on the View All Quotes page? The <else /> part just doesn't display.
And secondly the last things I need to customise are $sortby and $votebutton, I can't find where to do so for this mod? Are they standard vBulletin variables and not specific to the mod?
Edit: Hm, the title of my View All Quotes page is Array[bbtitle]?
Cap'n Steve
11-15-2005, 11:19 PM
And secondly the last things I need to customise are $sortby and $votebutton, I can't find where to do so for this mod? Are they standard vBulletin variables and not specific to the mod?
Edit: Hm, the title of my View All Quotes page is Array[bbtitle]?
$sortby and $votebutton are both generated in the quotes.php file. To fix the title, find all instances of "$vbulletin->options" in your templates and replace them with "$vboptions". To know what's wrong with your <if> statement, I'd have to see the template.
Borgs8472
11-17-2005, 02:30 AM
Thanks for a great port of your hack steve.
Only one problem left, even with context on, the context field is not filled in with a thread reference, it is blank.
Any ideas why this could be or how to fix? Thanks :)
Borgs8472
11-17-2005, 02:51 AM
Just edit the Random Quote plugin so it uses the global_start hook and add this code at the end:
$threshold = '';
Then add the $showrandomquote to whatever templates you want to.
btw, 'woo!'
Cap'n Steve
11-18-2005, 05:54 AM
Only one problem left, even with context on, the context field is not filled in with a thread reference, it is blank.
Any ideas why this could be or how to fix? Thanks :)
It should be added to the context after the quote is submitted. It doesn't show up in the box right now.
nexus851
11-18-2005, 11:44 AM
Seems after i installed the quoteit, i have 2 title bars.. (top one is the CMPS title, and the bottom is the Quoteit title) I want to get rid of one of the bar so it doesnt look funny... Can anyone help me with this? Do i remove or replace a code? Here's my quoteit_random template:
.vote {
color:$stylevar[smallfont_fgcolor];
font-family:'trebuchet ms',helvetica,sans-serif;
font-size:110%;
font-weight:bold;
background-color:$stylevar[button_bgcolor];
<if condition="$vbulletin->options[ratequote]==1">
width:25px;
height:25px;
</if>
border-top-color:$stylevar[alt2_bgcolor];
border-left-color:$stylevar[alt2_bgcolor];
border-right-color:$stylevar[alt1_bgcolor];
border-bottom-color:$stylevar[alt1_bgcolor];
filter:progid:DXImageTransform.Microsoft.Gradient
(GradientType=0,StartColorStr='#aa$gradient1',EndC olorStr='#aa$gradient2');}
}
</style>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="$stylevar[tablewidth]" align="center">
<thead>
<tr>
<td class="tcat">
$vbphrase[random_quote]
</td><td class="tcat" align="right">
<div align="right">
(<a href="$vboptions[bburl]/quotes.php?do=addquote">$vbphrase[add_a_quote]</a>
<if condition="$vbulletin->userinfo['permissions']['adminpermissions']">
| <a href="$vboptions[bburl]/quotes.php?do=delquote"eid=$randomquote[quoteid]">$vbphrase[delete_this_quote]</a> | <a href="$vboptions[bburl]/quotes.php?do=editquote"eid=$randomquote[quoteid]">$vbphrase[edit_this_quote]</a>
</if>
| <a href="$vboptions[bburl]/quotes.php?do=list">$vbphrase[view_all_quotes]</a>)
</div>
</td><td class="tcat" style="width:15px;">
<div style="float:right;" align="right">
<a href="#top" onclick="return toggle_collapse('forumhome_randomquote')"><img id="collapseimg_forumhome_randomquote" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumhome_randomquote].gif" alt="" border="0" /></a></div>
</td>
</tr>
</thead>
<tbody id="collapseobj_forumhome_randomquote" style="$vbcollapse[collapseobj_forumhome_randomquote]">
<tr><td class="alt1" width="30%">
<img src="$vboptions[bburl]/plasma/misc/pickup_final.gif" width="80" height="80">
</td>
<td class="alt1"><div style="font-style:italic;margin-right:10%;">
<p>"$randomquote[quote]"</p>
<p style="font-weight:bold;margin-left:25%;">- $randomquote[author]<if condition="$randomquote[context]"> ($randomquote[context])</if></p>
</div>
</td><td class="alt1" valign="top">
<a style="float:$stylevar[right];" href="$vboptions[bburl]/quotes.php?do=view"eid=$randomquote[quoteid]">#$randomquote[quoteid]</a>
</td>
</tr>
<if condition="$vbulletin->options[ratequote]==3">
<tr><td class="alt1" align="left" colspan="3">
$vbphrase[total_rating]: $randomquote[rating] - $vbphrase[average]: $randomquote[average]
</td>
</if>
<if condition="$vbulletin->options[ratequote]==1">
<tr><td class="alt1" align="left">
$vbphrase[total_rating]: $randomquote[rating] - $vbphrase[average]: $randomquote[average]
</td>
<td class="alt1" align="right" colspan="2">$vbphrase[rate_this_quote]:
<form name="rateplus" action="$vboptions[bburl]/quotes.php">
<input type="hidden" name="do" id="do" value="rate" />
<input type="hidden" name="quoteid" id="quoteid" value="$randomquote[quoteid]" />
<input type="hidden" name="vote" id="vote" value="plus" />
<input type="submit" value="+" class="vote" />
</form>
<form name="rateminus" action="$vboptions[bburl]/quotes.php">
<input type="hidden" name="do" id="do" value="rate" />
<input type="hidden" name="quoteid" id="quoteid" value="$randomquote[quoteid]" />
<input type="hidden" name="vote" id="vote" value="minus" />
<input type="submit" value="-" class="vote" /></form>
</td>
</if>
<if condition="$vbulletin->options[ratequote]==2">
<tr><td class="alt1" align="left">
$vbphrase[total_rating]: $randomquote[rating] - $vbphrase[average]: $randomquote[average]
</td>
<td class="alt1" align="right" colspan="2">$vbphrase[rate_this_quote]:
<form name="voting" id="voting" action="$vboptions[bburl]/quotes.php">
<input type="hidden" name="do" id="do" value="rate" />
<input type="hidden" name="quoteid" id="quoteid" value="$randomquote[quoteid]" />
<select name="vote" id="vote" onchange="document.voting.submit();">
<option value=""></option>
<option value="1"> 1 </option>
<option value="2"> 2 </option>
<option value="3"> 3 </option>
<option value="4"> 4 </option>
<option value="5"> 5 </option>
</select>
</form>
</td>
</if>
</tr>
</tbody>
Cap'n Steve
11-18-2005, 08:32 PM
I can't see your site right now, do you mean you have a second navbar? The quote shouldn't have anything to do with that. Is that your entire quote_randomquote template? I can see already that you're missing a couple lines if it is.
nexus851
11-18-2005, 09:20 PM
yeah, 2 navbars. 1 navbar is from the CMPS module, and the other is from the template module i guess..
yeah, that is my entire _quote_randomquote template. If im missing lines, please post
them or revise so that one of the title bar dissapears.
P.S- I had to remove the "/table" line from the bottom of the template because it was messing up the tables of any modules i put after this quoteit module. By removing it, it fixed the problem...
Cap'n Steve
11-19-2005, 01:29 AM
Here's the entire template. You're apparently missing the opening <style> tag on the first line which would cause problems. Taking out the closing </table> tag would also cause problems, but it still has nothing to do with the navbar. Did the two navbars appear before or after you changed the template? I can't duplicate either of your problems so it must have something to do with your style or the other modules.
<style type="text/css">
.vote {
color:$stylevar[smallfont_fgcolor];
font-family:'trebuchet ms',helvetica,sans-serif;
font-size:110%;
font-weight:bold;
background-color:$stylevar[button_bgcolor];
<if condition="$vboptions[ratequote]==1">
width:25px;
height:25px;
</if>
border-top-color:$stylevar[alt2_bgcolor];
border-left-color:$stylevar[alt2_bgcolor];
border-right-color:$stylevar[alt1_bgcolor];
border-bottom-color:$stylevar[alt1_bgcolor];
filter:progid:DXImageTransform.Microsoft.Gradient
(GradientType=0,StartColorStr='#aa$gradient1',EndC olorStr='#aa$gradient2');}
}
</style>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="$stylevar[tablewidth]" align="center">
<thead>
<tr>
<td class="tcat">
$vbphrase[random_quote]
</td><td class="tcat" align="right">
<div align="right">
(<a href="$vboptions[bburl]/quotes.php?do=addquote">$vbphrase[add_a_quote]</a>
<if condition="$bbuserinfo['permissions']['adminpermissions']">
| <a href="$vboptions[bburl]/quotes.php?do=delquote"eid=$randomquote[quoteid]">$vbphrase[delete_this_quote]</a> | <a href="$vboptions[bburl]/quotes.php?do=editquote"eid=$randomquote[quoteid]">$vbphrase[edit_this_quote]</a>
</if>
| <a href="$vboptions[bburl]/quotes.php?do=list">$vbphrase[view_all_quotes]</a>)
</div>
</td><td class="tcat" style="width:15px;">
<div style="float:right;" align="right">
<a href="#top" onclick="return toggle_collapse('forumhome_randomquote')"><img id="collapseimg_forumhome_randomquote" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumhome_randomquote].gif" alt="" border="0" /></a></div>
</td>
</tr>
</thead>
<tbody id="collapseobj_forumhome_randomquote" style="$vbcollapse[collapseobj_forumhome_randomquote]">
<tr><td class="alt1" width="30%"></td>
<td class="alt1"><div style="font-style:italic;margin-right:10%;">
<p>"$randomquote[quote]"</p>
<p style="font-weight:bold;margin-left:25%;">- $randomquote[author]<if condition="$randomquote[context]"> ($randomquote[context])</if></p>
</div>
</td><td class="alt1" valign="top">
<a style="float:$stylevar[right];" href="$vboptions[bburl]/quotes.php?do=view"eid=$randomquote[quoteid]">#$randomquote[quoteid]</a>
</td>
</tr>
<if condition="$vboptions[ratequote]==3">
<tr><td class="alt1" align="left" colspan="3">
$vbphrase[total_rating]: $randomquote[rating] - $vbphrase[average]: $randomquote[average]
</td>
</if>
<if condition="$vboptions[ratequote]==1">
<tr><td class="alt1" align="left">
$vbphrase[total_rating]: $randomquote[rating] - $vbphrase[average]: $randomquote[average]
</td>
<td class="alt1" align="right" colspan="2">$vbphrase[rate_this_quote]:
<form name="rateplus" action="$vboptions[bburl]/quotes.php">
<input type="hidden" name="do" id="do" value="rate" />
<input type="hidden" name="quoteid" id="quoteid" value="$randomquote[quoteid]" />
<input type="hidden" name="vote" id="vote" value="plus" />
<input type="submit" value="+" class="vote" />
</form>
<form name="rateminus" action="$vboptions[bburl]/quotes.php">
<input type="hidden" name="do" id="do" value="rate" />
<input type="hidden" name="quoteid" id="quoteid" value="$randomquote[quoteid]" />
<input type="hidden" name="vote" id="vote" value="minus" />
<input type="submit" value="-" class="vote" /></form>
</td>
</if>
<if condition="$vboptions[ratequote]==2">
<tr><td class="alt1" align="left">
$vbphrase[total_rating]: $randomquote[rating] - $vbphrase[average]: $randomquote[average]
</td>
<td class="alt1" align="right" colspan="2">$vbphrase[rate_this_quote]:
<form name="voting" id="voting" action="$vboptions[bburl]/quotes.php">
<input type="hidden" name="do" id="do" value="rate" />
<input type="hidden" name="quoteid" id="quoteid" value="$randomquote[quoteid]" />
<select name="vote" id="vote" onchange="document.voting.submit();">
<option value=""></option>
<option value="1"> 1 </option>
<option value="2"> 2 </option>
<option value="3"> 3 </option>
<option value="4"> 4 </option>
<option value="5"> 5 </option>
</select>
</form>
</td>
</if>
</tr>
</tbody>
</table><br />
Mr.Monkey
11-19-2005, 01:43 PM
Hey Cap'n, good job on quoteit, but I've managed to break something. I had an old version of quoteit installed, but I reverted all the templates necessary afterwards.
When I try to submit a quote, I get the following error:
Database error in vBulletin 3.5.1:
Invalid SQL:
INSERT INTO 1vb3_quotes
(quote, author, userid, approved, context) VALUES
("Test", "Test", 1, 0, "");
MySQL Error : Unknown column 'context' in 'field list'
Error Number : 1054
Date : Saturday, November 19th 2005 @ 04:38:35 PM
Script : http://www.tribeclown.com/vforum/quotes.php
Referrer : http://www.tribeclown.com/vforum/quotes.php?&do=addquote
IP Address : 146.115.44.37
Username : Test
Classname : vb_database
Any suggestions?
funinthesun
11-19-2005, 02:44 PM
I've just installed this and it seemed easy enough to do, however nothing is showing up when I add a quote? When I click to view all quotes it just takes me to the submit quote form. I didn't add the submit posts code, should I of added that as well? The options for showing quotes is in my forum home page options in my admincp which turns it on and off fine but no quotes, what have I done wrong? Also, where can I view all quotes that have been entered in my admincp? Thanks
OneShot
11-19-2005, 03:03 PM
Did you check in your AdminCP under Moderation -> Moderate Quotes? Because depending on your settings you have to approve them first.
funinthesun
11-19-2005, 03:21 PM
Hi OneShot
No, I hadn't checked but I just looked now and there is no option in the moderation section to moderate posts?
Mr.Monkey
11-19-2005, 05:37 PM
Hey Cap'n, good job on quoteit, but I've managed to break something. I had an old version of quoteit installed, but I reverted all the templates necessary afterwards.
When I try to submit a quote, I get the following error:
Database error in vBulletin 3.5.1:
Invalid SQL:
INSERT INTO 1vb3_quotes
(quote, author, userid, approved, context) VALUES
("Test", "Test", 1, 0, "");
MySQL Error : Unknown column 'context' in 'field list'
Error Number : 1054
Date : Saturday, November 19th 2005 @ 04:38:35 PM
Script : http://www.tribeclown.com/vforum/quotes.php
Referrer : http://www.tribeclown.com/vforum/quotes.php?&do=addquote
IP Address :
Username : Test
Classname : vb_database
Any suggestions?
Just in case anyone gets the same message, deleting it from the Plugins section, then reinstalling the .xml seems to have cleared the problem!
funinthesun
11-19-2005, 06:32 PM
I'm stumped on this one, I don't know why the quotes aren't showing up. Could it be something to do with my version of mySQL? :(
TygerTyger
11-19-2005, 07:03 PM
I'm stumped on this one, I don't know why the quotes aren't showing up. Could it be something to do with my version of mySQL? :(
Hard for anyone to say if you don't tell us what version it is ;)
Cap'n Steve
11-19-2005, 07:41 PM
Just in case anyone gets the same message, deleting it from the Plugins section, then reinstalling the .xml seems to have cleared the problem!
Be careful with that, as uninstalling the product will delete all your quotes. I think your original problem was that you had version 1.x installed and never upgraded to 2.0. As long as it works now it's ok, but I'll remember to take that into consideration for the install code.
funinthesun - If there's no "Moderate Quotes" link under Moderation, did you upload includes/xml/cpnav_quoteit.xml? To see quotes in the moderation que without the link, point your browser to admincp/quoteadmin.php?do=moderate
funinthesun
11-20-2005, 12:08 AM
Hi Cap'n Steve
Yes, I uploaded the cpnav_quoteit.xml file to includes/xml. I thought it was a simple install to be honest. I've pointed my browser to http://www.mysite.com/quotes.php?do=moderate and it's just a blank white page? :confused:
Cap'n Steve
11-20-2005, 03:29 AM
My fault. It's admincp/quoteadmin.php?do=moderate. :o
funinthesun
11-20-2005, 09:23 AM
Ok, that worked an brought the page up for me, I found the two quotes that had been submitted and they were both set to ignore. When I clicked approve on both of them it said "Could not find phrase 'quote_x_has_been_approved'. :confused:
funinthesun
11-20-2005, 09:25 AM
Also, moderate quotes is now showing up in the moderation section now but when I click on it, it says no quotes need moderation.
funinthesun
11-20-2005, 09:34 AM
P.S Quoteit! Options is showing on the vbulletin options drop down now and the setting was set to not show random quote so that may be why it was showing up? I've still got the Quoteit! options in my vbulletion options -> forums home page options as well. OK, just changed it back to show random quote and tada it worked :D Thanks very much for your help :)
funinthesun
11-20-2005, 09:37 AM
View all quotes in now also working and it shows up as viewing quotes in the who's online. Thanks again :)
TygerTyger
11-20-2005, 11:43 AM
Sorry, forgot to say thanks for your help. Got it all smartened up, and in the end I just removed the voting mechanism from View All Quotes entirely so the if/else statement wasn't needed. There's always someone who likes to screw with the ratings and being able to vote so many times at once was too open to abuse IMO.
Great mod, thanks again.
funinthesun
11-20-2005, 12:19 PM
Sorry, me again! Lol. Is there any way you can tell who's voted on the quotes?
Cap'n Steve
11-20-2005, 10:50 PM
Sorry, me again! Lol. Is there any way you can tell who's voted on the quotes?
It's stored in the database, but there's no way to see it on the quotes page or the admin page yet.
Warrior
11-28-2005, 05:48 PM
I had the same issue as Snort_2005 on page 7 of this thread. I think you should add to "Allow Overwrite" - I didn't do that and ended up with the same mySQL errors.
I have attached the upgrade XML that was edited per your instructions (page 7) and this worked perfectly. Thanks again for this hack!
[INSTALLED]
Mr.Monkey
11-29-2005, 12:14 AM
Can anyone suggest what I should add into the "adv_portal_moderation" to get the link to the quotes to moderate to show correctly on my quick moderate module in vbAdvanced?
lexx27
11-29-2005, 01:13 AM
I think there is a modification at vbadvanced page
Warrior
12-02-2005, 12:02 PM
Can anyone suggest what I should add into the "adv_portal_moderation" to get the link to the quotes to moderate to show correctly on my quick moderate module in vbAdvanced?
I am also interested in this... did I miss it somewhere?
Bubble #5
12-04-2005, 05:17 AM
The easy way to only allow administrators would be to edit quotes.php
Is there a way to only have admins add the quotes? The code above is only for editing the quotes. Maybe add a conditional before where it says "add a quote, show all quotes"? I'm not sure what the correct conditional would be though, or where to add it. Maybe in the templates? Thanks.
Gio Takahashi
12-04-2005, 06:51 AM
Database error in vBulletin 3.5.1:
Invalid SQL:
UPDATE quotes SET
votes = votes + 1,
rating = rating + 2,
average = rating / votes
WHERE quoteid = 385;
MySQL Error : Unknown column 'votes' in 'field list'
Error Number : 1054
Date : Sunday, December 4th 2005 @ 12:50:29 AM
Script : http://www.unitedempire.net/forum//quotes.php?do=rate"eid=385&vote=2
Referrer : http://www.unitedempire.net/forum/index.php
IP Address : 71.3.5.169
Username : Gio Takahashi
Classname : vb_database
BTW, I did have QuoteIt for Vb 3.0. Anyway, anything I can do to fix it? Should I just manually add the collumn or not?
Cap'n Steve
12-04-2005, 07:27 PM
I'm guessing you had QuoteIt! 1.2 but never upgraded to 2.0, right? I never even considered that situation when I released this version. :ermm: The next version should handle the upgrade better, but until then these queries should fix it:
UPDATE $TPquotes ADD COLUMN (votes SMALLINT(10) UNSIGNED NOT NULL DEFAULT 0, rating MEDIUMINT(10) NOT NULL DEFAULT 0, average FLOAT(3, 2) NOT NULL DEFAULT 0.00, context VARCHAR(250))
ALTER TABLE $TPquotes ADD INDEX rating
ALTER TABLE $TPquotes ADD INDEX average
Just replace $TP with your table prefix.
Cap'n Steve
12-04-2005, 07:52 PM
For those interested, I've added instructions for adding quotes to the vBadvanced quick moderation in this post.
Bubble #5
12-04-2005, 10:47 PM
Why doesn't this hack work in the header?
We added $showrandomquote (as mentioned in this thread) and made the changes to the plugin, but it still doesn't show up :(
What would block it from showing up?
Cap'n Steve
12-04-2005, 11:06 PM
To only allow administrators to add quotes, in quotes.php, find
require_once('./global.php');
below that, add
if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'addquote' OR $_REQUEST['do'] == 'editquote' OR $_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == 'submitpost' OR $_REQUEST['do'] == 'submit') {
if (!$vbulletin->userinfo['permissions']['adminpermissions']) {
print_no_permission();
exit;
}
}
I'm not sure about your other error, could you attach a saved html page where the quotes should be showing up in the header?
Gio Takahashi
12-05-2005, 01:40 AM
I'm guessing you had QuoteIt! 1.2 but never upgraded to 2.0, right? I never even considered that situation when I released this version. :ermm: The next version should handle the upgrade better, but until then these queries should fix it:
UPDATE $TPquotes ADD COLUMN (votes SMALLINT(10) UNSIGNED NOT NULL DEFAULT 0, rating MEDIUMINT(10) NOT NULL DEFAULT 0, average FLOAT(3, 2) NOT NULL DEFAULT 0.00, context VARCHAR(250))
ALTER TABLE $TPquotes ADD INDEX rating
ALTER TABLE $TPquotes ADD INDEX average
Just replace $TP with your table prefix.
a bit of an issue: I had to manually add in the columns because the syntax you gave does not seem to work.
Yes I replaced $TP with the correct table prefixes..well I don't use prefixes at all anyway >>.
none of the queries work at all.
Cap'n Steve
12-05-2005, 03:57 AM
That's weird, do you remember the error it showed?
Bubble #5
12-05-2005, 04:32 AM
Why doesn't this hack work in the header?
Does anyone understand why this doesn't show up in the header? It will show up everyplace else, just not in the header area... :ermm:
Cap'n Steve
12-05-2005, 06:10 AM
I don't know, could you attach the html page or post a link to your site?
Bubble #5
12-05-2005, 09:57 PM
could you attach the html page
Steve do you mean from view source? :ermm:
Scooterpig
12-05-2005, 11:36 PM
Great hack and working fine for me but just wondering how do you add a heap of quotes so that each time a page is reloaded a new random quote shows up please?
Thank you..:)
Bubble #5
12-06-2005, 12:18 AM
how do you add a heap of quotes
You add them in one by one...
Scooterpig
12-06-2005, 01:22 AM
You add them in one by one...
Bugga! Thanks.
Bubble #5
12-06-2005, 01:47 AM
Bugga!
:nervous:
Maybe the good Cap'n will add it in as a (much needed) feature (hint, hint) :surprised:
Cap'n Steve
12-06-2005, 04:25 AM
Steve do you mean from view source? :ermm:
Either that or use File->Save.
I didn't think there was much demand for batch adding, but I could probably whip up some add-on to do it.
Bubble #5
12-06-2005, 05:09 AM
This is what we are using. The 3 images are just background images.
<table width="90%" cellpadding="0" cellspacing="0" align="center"><tr>
<td><img src="$stylevar[imgdir_misc]/left_quote.gif" alt="" border="0" /></td><td width="50%" align="center" class="quotebar">$vbphrase[quote_of_the_day]: $randomquote[quote]
</td>
<td width="50%" align="center" class="quotebar"></td>
<td><img src="$stylevar[imgdir_misc]/right_quote.gif" alt="" border="0" /></td>
</tr>
</table>
We're just trying to get the quote itself to appear. No table. No links for add/edit/delete ECT.
$randomquote[quote] seemed to work well anyplace else we put it, but unfortunately we only need it in the header... :ermm: Why doesn't it work there?
Cap'n Steve
12-07-2005, 12:28 AM
Well I guess the best thing to do would be to change your quote_randomquote template to what you just posted, then follow the instructions for moving the Random Quote plugin to the Global Start hook and then just put $showrandomquote in the header template.
Bubble #5
12-07-2005, 02:43 AM
We tried that. Still doesn't show up :(
Here is what is at the top of our header template:
$showrandomquote
<table border="0" width="90%" cellpadding="0" cellspacing="0" align="center">
<tr>
<img src="$stylevar[imgdir_misc]/header_xmas.gif" width="890" height="50" border="0">
</tr>
<br />
<tr>
<td align="left"><a href="index.php?"><img src="$stylevar[imgdir_misc]/headerlogo.png" width="269" height="227" border="0"></a></td>
Here is what we see from view source:
<table border="0" width="90%" cellpadding="0" cellspacing="0" align="center">
<tr>
<img src="images/soness/misc/header_xmas.gif" width="890" height="50" border="0">
</tr>
<br />
<tr>
<td align="left"><a href="index.php?"><img src="images/soness/misc/headerlogo.png" width="269" height="227" border="0"></a></td>
<td align="center" valign="middle">
As you can see $showrandomquote is nowhere to be found :(
In listquote you have $header and $navbar listed above the code. Could that have anything to do with it? We tried moving them both to under the code but it didn't seem to help. The quotation marks for the quote DO show up, just not the actual quote itself :ermm:
Bubble #5
12-07-2005, 02:56 AM
OK nevermind, we've got it Steve. Thanks ! :nervous:
Bubble #5
12-07-2005, 07:19 AM
...would be GREAT if you could make an approve all button... :ermm:
Cap'n Steve
12-08-2005, 04:46 AM
You can just set the number of quotes to moderate at once to some high number, then use the approve buttonto set them all to approve.
Bubble #5
12-08-2005, 04:59 AM
Where do we set the number of quotes at?
And don't you have to click on each quote before you can approve it?
Cap'n Steve
12-08-2005, 07:58 PM
It's under vBulletin Options -> QuoteIt! Options. Then you click the approve button at the top to set all the "action" radio buttons to "approve", then click the button at the bottom to save it. It works just like thread and post moderation.
Bubble #5
12-08-2005, 08:52 PM
Thanks Steve :)
I just noticed that it has a feature there to turn moderation off. That would work out even better yet, since the Admin is the only one entering in quotes :nervous:
I think the only feature that this hack is missing is the ability to enter a page of quotes at once.
dieselpowered
12-16-2005, 06:27 PM
Hi there, I just wanted to let you know that when adding a quote, editing a quote, or viewing all quotes, the title bar in the brower shows:
Array[bbtitle] - Add a Quote
I assume this is not correct...how do we fix?
Thanks!!
Cap'n Steve
12-16-2005, 11:38 PM
Just find $vbulletin->options[bbtitle] and replace it with $vboptions[bbtitle] in your templates to fix the title problem.
Warrior
12-17-2005, 05:34 AM
If you want to add an image to the left of the quote, edit quote_listbit and quote_randomquote and put the image between <td class="alt1" width="30%"> and </td>.[/QUOTE]
Sweet - I put some big transparent quotes using this...
<tr><td class="alt1" width="30%">
After this, put a left side transparent quote gif...
<a style="float:$stylevar[right];" href="$vboptions[bburl]/quotes.php?do=view"eid=$randomquote[quoteid]">#$randomquote[quoteid]</a>
And after this put a right side transparent quote gif...
Screenshot attached...
dieselpowered
12-17-2005, 07:12 AM
If you want to add an image to the left of the quote, edit quote_listbit and quote_randomquote and put the image between <td class="alt1" width="30%"> and </td>.
Sweet - I put some big transparent quotes using this...
<tr><td class="alt1" width="30%">
After this, put a left side transparent quote gif...
<a style="float:$stylevar[right];" href="$vboptions[bburl]/quotes.php?do=view"eid=$randomquote">#$randomquote[quoteid]</a>
And after this put a right side transparent quote gif...
Screenshot attached...
Looks great...would you mind sharing those images??
Warrior
12-17-2005, 07:32 AM
Looks great...would you mind sharing those images??
No problem - see attached... BTW - they have some extra transparrent padding built into the gifs to position them correctly...
Warrior
12-17-2005, 09:26 AM
What was changed in 2.1??
I have 2.0, do I need to replace some files or rewrite everything?
dieselpowered
12-17-2005, 03:28 PM
I must be going something wrong...what is the code to add the quotes??
I am not sure that the code you have listed above exist in the new version. I do not know, any chance I can get you to give me some more defined instruction...sorry for the ignorance :)
Warrior
12-17-2005, 05:08 PM
I must be going something wrong...what is the code to add the quotes??
I am not sure that the code you have listed above exist in the new version. I do not know, any chance I can get you to give me some more defined instruction...sorry for the ignorance :)
Sure... open your template editor and get the template called "quote_randomquote" - this is using the quote gifs in my last post:
Find...
<tr><td class="alt1" width="30%">
After this, add...
<img src="http://www.yoursite.com/images/quoteleft.gif" alt="" width="150" height="97" border="0">
Then...
<a style="float:$stylevar[right];" href="$vboptions[bburl]/quotes.php?do=view"eid=$randomquote[quoteid]">#$randomquote[quoteid]</a>
And after this, add...
<br /><br /> <img src="http://www.yoursite.com/images/quoteright.gif" alt="" width="69" height="59" border="0">
Thats what I did... be sure to put the right dir for those images... if you want it in the View All Quotes list you will have to edit "quote_listquote"
dieselpowered
12-17-2005, 07:08 PM
Ok that worked...not sure what I was doing wrong.
How did you make those quotes? I really am trying to change the color, but it won't change it :( I was thinking more of a grey to match our site better.
Thanks for the help!!!
vonedaddy
12-18-2005, 02:28 AM
I checked the instructions 10 times and I did everything exact-to the T. I am getting DB errors, anyone's help is appreciated.
Database error in vBulletin 3.5.2:
Database error in vBulletin 3.5.2:
Invalid SQL:
SELECT COUNT(*) AS quotes FROM vbquotes
WHERE approved = 1;
MySQL Error : Table 'vonaone.vbquotes' doesn't exist
Error Number : 1146
Date : Saturday, December 17th 2005 @ 08:21:35 PM
Script : http://hereyah.com/forum/quotes.php
Referrer :
IP Address : **.**.**.**
Username : savone
Classname : vb_databasedatabase
BTW, I dont see anything. Looks like nothing happened... No admin options, no quotes box, nothing. And when I go right to quotes.php I get that error!
Cap'n Steve
12-18-2005, 03:29 AM
vonedaddy - try reimporting the product, be sure to check "allow overwrite". Let me know if that causes any errors.
sengerdw - the only thing changed was to allow 3.5 compatibility.
Nice work on those quotation mark images, by the way.
vonedaddy
12-18-2005, 03:32 AM
I assume to reimport you would need to uninstall... When I try to reinstall I get the following error:
Database error in vBulletin 3.5.2:
Invalid SQL:
DROP TABLE vbquotes;
MySQL Error : Unknown table 'vbquotes'
Error Number : 1051
Date : Saturday, December 17th 2005 @ 09:32:02 PM
Script : http://hereyah.com/forum/admincp/plugin.php
Referrer : http://hereyah.com/forum/admincp/plugin.php?do=productdelete&productid=quoteit&s=
IP Address : 68.46.5.248
Username : savone
Classname : vb_database
By the way I just re-imported and nothing still. Checked the database and no tables. But I do see the options in the control panel now, but if I enable it my forums dont work.
Warrior
12-18-2005, 02:51 PM
vonedaddy - try reimporting the product, be sure to check "allow overwrite". Let me know if that causes any errors.
sengerdw - the only thing changed was to allow 3.5 compatibility.
Nice work on those quotation mark images, by the way.
2.0 has been working great on vB 3.5.2 as far as I can tell. Can I just copy over the PHP files from 2.1 or should I reimport the product too? I didn't see any upgrade documentation... :nervous:
docvader
12-18-2005, 05:13 PM
I've been using Quoteit in vb 3.07 for quite some time, without problems. I successfully upgraded to vb 3.52, and followed your instructions to install this new version. I had the same problem that Snort had, used the upgrade xml file recently suggested, and I still get database errors. Now my index page is gone
Database error in vBulletin 3.5.2:
Invalid SQL:
SELECT COUNT(*) AS count FROM quotes AS quotes
WHERE approved = 1;
MySQL Error : Table 'vbtest.quotes' doesn't exist
Error Number : 1146
Date : Sunday, December 18th 2005 @ 11:16:06 AM
Script : http://x.russbo.com/vbtest/index.php
any suggestions? This certainly did not "upgrade" smoothly at all.
docvader
12-18-2005, 05:20 PM
I successfully uninstalled it and got my board back. But, it won't upgrade without database errors
Invalid SQL:
INSERT INTO setting
(varname, grouptitle, value, defaultvalue, datatype, optioncode, displayorder, advanced, volatile, product)
VALUES
(
'showquote',
'forumhome',
'1',
'0',
'boolean',
'yesno',
90,
0,
1,
'quoteit'
),
(
'ratequote',
'forumhome',
'2',
'0',
'number',
'<select name=\\\"setting[ratequote]\\\" tabindex=\\\"1\\\" class=\\\"bginput\\\">\r\n<option value=\\\"0\\\" \" . iif($setting[\'value\']==0, \'selected=\"selected\"\') . \">\" . $vbphrase[\'disabled\'] . \"</option>\r\n<option value=\\\"1\\\" \" . iif($setting[\'value\']==1, \'selected=\"selected\"\') . \">\" . $vbphrase[\'plus_or_minus\'] . \"</option>\r\n<option value=\\\"2\\\" \" . iif($setting[\'value\']==2, \'selected=\"selected\"\') . \">\" . $vbphrase[\'1_to_5\'] . \"</option>\r\n</select>',
100,
0,
1,
'quoteit'
),
(
'averagethreshold',
'forumhome',
'',
'',
'number',
'',
110,
0,
1,
'quoteit'
),
(
'totalthreshold',
'forumhome',
'',
'',
'number',
'',
120,
0,
1,
'quoteit'
);
MySQL Error : Duplicate entry 'showquote' for key 1
Error Number : 1062
Date : Sunday, December 18th 2005 @ 11:29:41 AM
Script : http://x.russbo.com/vbtest/admincp/plugin.php
Referrer : http://x.russbo.com/vbtest/admincp/plugin.php?do=productadd
IP Address : 67.77.47.30
Username : doc
Suggestions? Should I wipe out all of my Quoteit tables (I have backups), install this fresh, and then import the tables again??? I'm not sure how to do that, by the way :)
thanks
rich
Warrior
12-18-2005, 05:33 PM
vonedaddy - try reimporting the product, be sure to check "allow overwrite". Let me know if that causes any errors.
sengerdw - the only thing changed was to allow 3.5 compatibility.
Nice work on those quotation mark images, by the way.
Nevermind my last post - I just checked my plugin manager and it shows I have 2.1... the folder says 2.0 so I got confused... :ermm:
vonedaddy
12-18-2005, 05:35 PM
I assume to reimport you would need to uninstall... When I try to reinstall I get the following error:
Database error in vBulletin 3.5.2:
Invalid SQL:
DROP TABLE vbquotes;
MySQL Error : Unknown table 'vbquotes'
Error Number : 1051
Date : Saturday, December 17th 2005 @ 09:32:02 PM
Script : http://hereyah.com/forum/admincp/plugin.php
Referrer : http://hereyah.com/forum/admincp/plugin.php?do=productdelete&productid=quoteit&s=
IP Address : 68.46.5.248
Username : savone
Classname : vb_database
By the way I just re-imported and nothing still. Checked the database and no tables. But I do see the options in the control panel now, but if I enable it my forums dont work.
Capt, some help please :)
Anyone have any ideas for me?
samu2
12-18-2005, 06:09 PM
OK Installed,it is up and running,I have it set ti show on forum home,however there are no options for it in Admin CP,I cant moderat quotes or anything as their are no options for it at all.
Ive uploaded the admin cp folder and re built my bitfields,nothing. thank you in advance
Cap'n Steve
12-18-2005, 09:30 PM
samu2 - try editing a plugin in the Plugin Manager and then saving it without changing anything.
vonedaddy - do NOT uninstall. Just reimport the the product and check the "allow overwrite" box. If there are any errors during installation, post them.
docvader - run these queries to make sure the quote settings get reset:
DELETE FROM $TPsetting WHERE varname IN ("showquote", "ratequote", "averagethreshold", "totalthreshold")
DELETE FROM $TPdatastore WHERE title = "quote_settings"
Just replace the $TP with your table prefix first.
samu2
12-18-2005, 09:41 PM
try editing a plugin in the Plugin Manager and then saving it without changing anything.
Did that,it saved fine,nothing happened :)
Cap'n Steve
12-18-2005, 10:17 PM
That's really strange, are you sure cpnav_quoteit.xml is in your includes/xml folder? Try going to admincp/quoteadmin.php.
docvader
12-18-2005, 11:02 PM
Cap'n
Running those queries "cleaned" out the database and allowed me to freshly install the system without problems, on my test board.
Now, before I do this on my real board, how would you suggest I protect the few hunded quotes we've accumulated? How do I get them out of the database and then, after instaling quoteit, get those quotes back into the database??
Thanks for you help man. As usual, you're incredible prompt and effective
rich
x.russbo.com
Cap'n Steve
12-18-2005, 11:23 PM
Those queries will cause you to lose your old settings but not the quotes. It never hurts to make a backup, though.
vonedaddy
12-19-2005, 12:35 AM
vonedaddy - do NOT uninstall. Just reimport the the product and check the "allow overwrite" box. If there are any errors during installation, post them.
Did what you asked. Everything seemed fine, no errors during re-import. But it still gives me the same error when calling the quotes.php file.
Database error in vBulletin 3.5.2:
Invalid SQL:
SELECT COUNT(*) AS quotes FROM vbquotes
WHERE approved = 1;
MySQL Error : Table 'vonaone.vbquotes' doesn't exist
Error Number : 1146
Date : Sunday, December 18th 2005 @ 06:34:20 PM
Script : http://hereyah.com/forum/quotes.php
Referrer :
IP Address : 68.46.5.248
Username : savone
Classname : vb_database
Cap'n Steve
12-19-2005, 01:39 AM
That's really weird. Somehow it thinks you already have the quotes table when apparently you don't. Run these two queries to add the tables:
CREATE TABLE $TPquotes (
quoteid INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
quote MEDIUMTEXT NOT NULL,
author VARCHAR(75) NOT NULL,
userid INT(10) UNSIGNED NOT NULL DEFAULT 0,
approved TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
votes SMALLINT(10) UNSIGNED NOT NULL DEFAULT 0,
rating MEDIUMINT(10) NOT NULL DEFAULT 0,
average FLOAT(3, 2) NOT NULL DEFAULT 0.00,
context VARCHAR(250),
PRIMARY KEY (quoteid),
INDEX (rating),
INDEX (average),
KEY approved (approved))
CREATE TABLE $TPquoteratings (
quoteid INT(10) UNSIGNED NOT NULL,
userid INT(10) UNSIGNED NOT NULL,
rating TINYINT(1) NOT NULL,
PRIMARY KEY (quoteid, userid))
As always, replace $TP with your table prefix.
vonedaddy
12-19-2005, 02:05 AM
Got it, it didnt work at first but I noticed it created two tables.. One called $TBquotes and another called $TBquoteratings. So I ran the queries again and changed the names accordingly. It works now, thanks a million.
Also this is an awesome hack. Right now I am having some display problems but if I cant figure them out you will hear from me again. Thanks for this hack, and the support, two thumbs up.
vonedaddy
12-19-2005, 02:06 AM
As always, replace $TP with your table prefix.
DUH, Sorry. I just noticed that as I hit submit. I'm a moron, again thanks.
dieselpowered
12-19-2005, 02:40 AM
Well I am not sure what happened, however, it refuses to save quotes now??? It was working, however, now when I attempt to add a quote it does not save it??
Any help would be appreciated!
Cap'n Steve
12-19-2005, 02:46 AM
Does it give you an error? You may have to moderate the quotes before they show up if that option is on.
dieselpowered
12-19-2005, 03:12 AM
Darnit, that is right, I turned on moderation. Sorry, I will have another drink... :)
dieselpowered
12-19-2005, 03:25 AM
I would like to add the code to moderate the quotes within the moderation module in CMPS. I know the url to the moderation page, however, was curious if there was a way to place the number of quotes awaiting moderation next to the link.
Any thoughts? Thanks :)
Also, I had to delete a bunch of posts, now I have quotes 1-4 and then the next is quote #8. Is there any way to get the those numbers in sequence?
Cap'n Steve
12-19-2005, 04:05 AM
I would like to add the code to moderate the quotes within the moderation module in CMPS. I know the url to the moderation page, however, was curious if there was a way to place the number of quotes awaiting moderation next to the link.
Check out this post.
Also, I had to delete a bunch of posts, now I have quotes 1-4 and then the next is quote #8. Is there any way to get the those numbers in sequence?
Not right now. It's already been requested for the next version, though.
dieselpowered
12-19-2005, 05:29 AM
Check out this post.
No my friend, I am looking for the code to add to my CMPS moderation module so that I do not have to go into the admincp every time to check if new quotes have ben submitted.
Not right now. It's already been requested for the next version, though.
I went into the db and manually changed it, thanks :)
samu2
12-19-2005, 10:14 AM
OK Finally I got it to work :) is there any way I can get it to show up on all pages? great mod Thank you :)
dieselpowered
12-19-2005, 03:24 PM
After moderating, I am receiving this error:
"Could not find phrase 'quote_x_has_been_approved"
It is odd as looking within the phrase manager does have it existing? :ermm:
Also, is there a way to make a confirmation page so that people know that the quote will not display until approved?
Cap'n Steve
12-20-2005, 04:44 AM
No my friend, I am looking for the code to add to my CMPS moderation module so that I do not have to go into the admincp every time to check if new quotes have ben submitted.
I know, it's in that post I linked along with instructions for adding the Random Quote block.
To add a message for after a quote is submitted, create a template called quote_message (just base it off of quote_addquote and delete the text boxes) then, in quotes.php find
elseif ($_REQUEST['do'] == 'add') {
if (!$vbulletin->userinfo['userid']) {
print_no_permission();
exit;
}
if (empty($_POST['author']) OR empty($_POST['quote'])) {
eval(standard_error(fetch_error('requiredfields')) );
}
$approved = 0;
if ($settings[3] == 0) {
$approved = 1;
}
if ($settings[5] == 1) {
$context = $db->escape_string(htmlspecialchars_uni(trim($_POST['context'])));
}
$author = $db->escape_string(htmlspecialchars_uni(trim($_POST['author'])));
$quote = $db->escape_string(nl2br(htmlspecialchars_uni(trim($_PO ST['quote']))));
$db->query_write('
INSERT INTO ' . TABLE_PREFIX . 'quotes
(quote, author, userid, approved, context) VALUES
("' . $quote . '", "' . $author . '", ' . $vbulletin->userinfo['userid'] . ', ' . $approved . ', "' . $context . '")
');
header('Location: ' . $vbulletin->options['forumhome'] . '.php?' . $vbulletin->session->vars['sessionurl']);
}
and replace that with
elseif ($_REQUEST['do'] == 'add') {
if (!$vbulletin->userinfo['userid']) {
print_no_permission();
exit;
}
if (empty($_POST['author']) OR empty($_POST['quote'])) {
eval(standard_error(fetch_error('requiredfields')) );
}
$approved = 0;
if ($settings[3] == 0) {
$approved = 1;
}
if ($settings[5] == 1) {
$context = $db->escape_string(htmlspecialchars_uni(trim($_POST['context'])));
}
$author = $db->escape_string(htmlspecialchars_uni(trim($_POST['author'])));
$quote = $db->escape_string(nl2br(htmlspecialchars_uni(trim($_PO ST['quote']))));
$db->query_write('
INSERT INTO ' . TABLE_PREFIX . 'quotes
(quote, author, userid, approved, context) VALUES
("' . $quote . '", "' . $author . '", ' . $vbulletin->userinfo['userid'] . ', ' . $approved . ', "' . $context . '")
');
eval('print_output("' . fetch_template('quote_message') . '");');
}
I know about the missing phrase, I've yet to figure out what group to put it in. :ermm:
is there any way I can get it to show up on all pages?
Instructions are in this post.
thisgeek
12-20-2005, 07:13 AM
Is there any way to get the quotes to parse vbcode and smilies?
DefenceTalk
12-20-2005, 05:49 PM
FYI:
If you have Photopost installed, this mod's who is online process will cause issues with Photopost's Who is online not working correctly with vB.
Cap'n Steve
12-21-2005, 12:18 AM
Is there any way to get the quotes to parse vbcode and smilies?
Not yet.
FYI:
If you have Photopost installed, this mod's who is online process will cause issues with Photopost's Who is online not working correctly with vB.
I'll take a look at that.
CtrlAltDel
12-21-2005, 02:05 AM
nice work steve, thought i'd slap a post in here ;)
thisgeek
12-21-2005, 01:39 PM
How can I integrate QuoteIt with vbShout (v2)? - I want to add a 'Submit to Quotes' link on the archives page - any simple way of doing this?
Robbed
12-21-2005, 10:33 PM
After moderating, I am receiving this error:
"Could not find phrase 'quote_x_has_been_approved"
It is odd as looking within the phrase manager does have it existing? :ermm:
Same problem, any fixes?
also the title of the page is Array[bbtitle]
Cap'n Steve
12-22-2005, 03:54 AM
Same problem, any fixes?
also the title of the page is Array[bbtitle]
Just ignore the phrase for now, it's harmless.
To fix the title, change $vbulletin->options to $vboptions in the templates.
How can I integrate QuoteIt with vbShout (v2)?
I'm not sure how the vbShout database is structured, but you could probably just copy the submit post code and adapt it to their table. They'd probably be able to give you more help than me.
thisgeek
12-22-2005, 11:32 AM
Ok ta :)
docvader
12-23-2005, 04:07 AM
docvader - run these queries to make sure the quote settings get reset:
DELETE FROM $TPsetting WHERE varname IN ("showquote", "ratequote", "averagethreshold", "totalthreshold")
DELETE FROM $TPdatastore WHERE title = "quote_settings"
Just replace the $TP with your table prefix first.
Hi Capn
Running these queries allowed me to install the Quoteit on my 3.52 board, but, the hack is not "finding" all the the quotes that were previously in the database (from my 3.07 board running the older Quoteit). Is there another step or query that I have to run to enable the new hack to show the old quotes in the database?
Thanks!
rich
Cap'n Steve
12-23-2005, 04:24 AM
So it shows some but not all of your quotes? You must either have some quotes still awaiting moderation or have a minimum rating threshold set.
docvader
12-23-2005, 01:01 PM
Well, according to my database in my test board now, it lost all of my quotes. It's accepting new ones, and appears to be functioning correctly, but, my "quotes" and "quoterating" databases are empty (except for the new test quotes I put in.
At this point, is it as simple as exporting those two databases from my original board, and importing them back into the test board? Got any suggestions for upgrading the original board so that I don't lose the two "quote" databases?
Exporting the quotes and quotesratings sql files from my original board is no problem using phpmyadmin, but, I'm uncertain as to how to succesfully reimport them back into my test board, to get the original quotes to show up. "Uploading" the files didn't work.... (I'm not exactly a whiz when it comes to mysql).
Thanks!
rich
docvader
12-23-2005, 03:09 PM
Well, according to my database in my test board now, it lost all of my quotes. It's accepting new ones, and appears to be functioning correctly, but, my "quotes" and "quoterating" databases are empty (except for the new test quotes I put in.
At this point, is it as simple as exporting those two databases from my original board, and importing them back into the test board? Got any suggestions for upgrading the original board so that I don't lose the two "quote" databases?
Exporting the quotes and quotesratings sql files from my original board is no problem using phpmyadmin, but, I'm uncertain as to how to succesfully reimport them back into my test board, to get the original quotes to show up. "Uploading" the files didn't work.... (I'm not exactly a whiz when it comes to mysql).
Thanks!
rich
OK, that was easy, lol.
You have to drop the old database before you can install the new one. Just figured that out. Got it all working on my test board.
I guess dropping the old tables first, installing the hack fresh, and reuploading the backup sql databases is the easiest way to do this.
Thanks Capn, I'm learning all the time. Appreciate the help.
rich
Cap'n Steve
12-23-2005, 09:31 PM
It shouldn't mess with your quotes or ratings unless you uninstall it, in which case it will drop both tables. But as long as you've got it working, I guess everything's peachy. :nervous:
docvader
12-24-2005, 04:48 AM
My mistake. I did uninstall it, because I had lost my index page. I'll try those queries on my main board and install the hack fresh.
Robbed
12-24-2005, 01:01 PM
-quote_addquote is uncached
-Would it be possible to have another sort item, have it sort by random.
-Is there a way to make it parse smilies, bold, quotes etc.
Cap'n Steve
12-25-2005, 01:53 AM
-quote_addquote is uncached
-Would it be possible to have another sort item, have it sort by random.
-Is there a way to make it parse smilies, bold, quotes etc.
Good ideas, they're on the list to be included in the next version.
loonytune15
01-03-2006, 12:59 PM
Great hack installed easily.
Just wondering how I can make it so this hack fits in with the rest of my forumhome? Currently it sticks out like a sore thumb :)
http://www.monster-designs.com/forums
Thanks for any help you can provide..
CtrlAltDel
01-03-2006, 06:08 PM
i just strip out the bit that gets displayed on forumhome to be just the quote and author, check my site in my sig, just simple template editing...
Borgs8472
01-03-2006, 06:37 PM
Hey Cap'n Steve, what do I have to do to allow smileys to get parsed in the quotes?
Cap'n Steve
01-03-2006, 10:19 PM
looneytune15 - just edit the quote_randomquote template. It should be fairly obvious which variables hold the quote information.
Borgs8472 - you can't right now, it's being added for the next version.
loonytune15
01-04-2006, 04:11 PM
any idea on how long till the new version will be released?
Also can it be made more like the vb shoutbox where all the template additions are made automatically and fits into the style as well?
Cap'n Steve
01-05-2006, 03:27 AM
Do you meant you want it to edit the FORUMHOME template automatically when you install it? That's really not a good idea.
It'll probably be a while before the next version. I have a long list of things that need to be added.
ChurchMedia
01-05-2006, 03:29 AM
Thanks for the upgrade. I've been using the hack for a long time with v3.0.
My "Submit to Quotes" isn't working. It goes to the submit quote page, but the boxes are blank. Any ideas?
Great work!
ChurchMedia
01-05-2006, 04:18 AM
Thanks for the upgrade. I've been using the hack for a long time with v3.0.
My "Submit to Quotes" isn't working. It goes to the submit quote page, but the boxes are blank. Any ideas?
Great work!
I reverted my templates for this hack and now it works! :):):)
Robbed
01-05-2006, 10:12 PM
How do you make it display the newest quotes by default?
tarot
01-06-2006, 03:22 PM
I have what may be a stupid question. I only want the quoter on certain areas/forums on my board. How would I go about doing this?
CtrlAltDel
01-06-2006, 06:58 PM
How do you make it display the newest quotes by default?
change the sql query to reflect what you want...tada
I have what may be a stupid question. I only want the quoter on certain areas/forums on my board. How would I go about doing this?
move the $showrandomquote variable from where it is now and put it in the template you want it to be in...tada
Robbed
01-06-2006, 11:09 PM
change the sql query to reflect what you want...tada
Which line would that be.
Cap'n Steve
01-07-2006, 05:42 AM
How do you make it display the newest quotes by default?
You can't yet. :nervous:
I have what may be a stupid question. I only want the quoter on certain areas/forums on my board. How would I go about doing this?
You'll need a template conditional for specific forums, something like this:
<if condition="$_REQUEST['f']==forum_id_goes_here">$showrandomquote</if>
You'll also need to move the Random Quote plugin to the global hook and add this at the end of the plugin:
$threshold = '';
GamerJunk.net
01-07-2006, 06:14 AM
Is there a way to used a vbphrase to post a random quote? like
[ quote51 ] or [ randomquote ]
Cap'n Steve
01-07-2006, 09:09 PM
Do you mean you want to use a bbcode so it shows up in the post? It's not possible yet, but it's an interesting idea.
Warrior
01-08-2006, 03:04 AM
I love watching great hacks evolve... ;)
Great hack,
I didn't want to have the large quote block at the top of every page and the Vbadvanced module you posted was a complete mess. No offence. It might be the diff between 3.5.2 and 3.5.3 but I started with a fresh 3.5.3 board yesterday and it simple destroyed the pages.
Anyway long story short, I disassemble the large block and created a sideblock module. It's not the prettiest thing and the code is messy but it works for me.
Using quote_randomquote and if anyone wants to do this here is how I broke it down:
<tr colspan="2" ><td class="alt1">
<a href="$vboptions[bburl]/quotes.php?do=addquote">$vbphrase[add_a_quote]</a><br />
<a href="$vboptions[bburl]/quotes.php?do=list">$vbphrase[view_all_quotes]</a>
</td></tr>
<tr><td class="alt1">
<a style="float:$stylevar[left];" href="$vboptions[bburl]/quotes.php?do=view"eid=$randomquote[quoteid]">#$randomquote[quoteid]</a> : $randomquote[author] <p>"$randomquote[quote]"</p>
<p style="font-weight:bold;margin-left:25%;">- <if condition="$randomquote[context]"> ($randomquote[context])</if></p>
<if condition="$vbulletin->options[ratequote]==3">
$vbphrase[total_rating]: $randomquote[rating] - $vbphrase[average]: $randomquote[average]
<br />
</if>
<if condition="$vbulletin->options[ratequote]==1">
<br /> <style="float:$stylevar[left];">$vbphrase[total_rating]: $randomquote[rating] - $vbphrase[average]: $randomquote[average]</style>
<br />$vbphrase[rate_this_quote]:
<form name="rateplus" action="$vboptions[bburl]/quotes.php">
<input type="hidden" name="do" id="do" value="rate" />
<input type="hidden" name="quoteid" id="quoteid" value="$randomquote[quoteid]" />
<input type="hidden" name="vote" id="vote" value="plus" />
<input type="submit" value="+" class="vote" />
</form>
<form name="rateminus" action="$vboptions[bburl]/quotes.php">
<input type="hidden" name="do" id="do" value="rate" />
<input type="hidden" name="quoteid" id="quoteid" value="$randomquote[quoteid]" />
<input type="hidden" name="vote" id="vote" value="minus" />
<input type="submit" value="-" class="vote" /></form>
<br />
</if>
<if condition="$vbulletin->options[ratequote]==2">
<br />
$vbphrase[total_rating]: $randomquote[rating] - $vbphrase[average]: $randomquote[average]
<br />$vbphrase[rate_this_quote]:</style>
<form name="voting" id="voting" action="$vboptions[bburl]/quotes.php">
<input type="hidden" name="do" id="do" value="rate" />
<input type="hidden" name="quoteid" id="quoteid" value="$randomquote[quoteid]" />
<select name="vote" id="vote" onchange="document.voting.submit();">
<option value=""></option>
<option value="1"> 1 </option>
<option value="2"> 2 </option>
<option value="3"> 3 </option>
<option value="4"> 4 </option>
<option value="5"> 5 </option>
</select>
</form>
</td></tr>
</if>
<if condition="$vbulletin->userinfo['permissions']['adminpermissions']">
<tr><td class="alt1">
<a href="$vboptions[bburl]/quotes.php?do=delquote"eid=$randomquote[quoteid]">$vbphrase[delete_this_quote]</a>
<br />
<a href="$vboptions[bburl]/quotes.php?do=editquote"eid=$randomquote[quoteid]">$vbphrase[edit_this_quote]</a>
</td></tr>
</if>
That is the whole template minus a bunch of tds. The if statements are all intact and I switch the Phrases to suit my purpose as you will see in the attached screen shot. I moved the author to the top beside the Quote # and will use it as a title. I'll use the context as author or a link. Still have some touchups to do.
Cheers Jaks
Found an error in 3 templates
If you goto any Quoteit page you will see the page title is messed up.
$vbulletin->options[bbtitle]
should be
$vboptions[bbtitle]
It shows as Array[bbcode] in the browser because the tag use I believe is the ones used in VB 3.0.xx
These 3 templates need to be editted ( same edit in each one in the same place.)
quote_delquote
quote_addquote
quote_listquote
Find (right near the very top of each template)
<title>$vbulletin->options[bbtitle]
replace with
<title>$vboptions[bbtitle]
Now i need some help. I want to parse bbcode in context field output. I can't for the life of me remember how to do that.
Great hack I'd click install twice it I could :D
Jaks
tarot
01-10-2006, 12:36 AM
You can't yet. :nervous:
You'll need a template conditional for specific forums, something like this:
<if condition="$_REQUEST['f']==forum_id_goes_here">$showrandomquote</if>
You'll also need to move the Random Quote plugin to the global hook and add this at the end of the plugin:
$threshold = '';
Sorry to be so dumb but I'm really new to this thing. Which template do I put the template conditional in the Forumdisplay or somewhere else?
And the Random Quote plugin to global hook where does that go and do I remove it from where it is now or copy it to the new location? Where is it now?
That conditional statement goes in the forumdisplay template not to sure about the other.
Cap'n Steve
01-10-2006, 03:51 AM
tarot - I think it is the Forumdisplay template. As for the second step, go to your Plugin Manager, edit the plugin called "Random Quote", change the hook to "global_start" and add that piece of code at the end.
jaks - Parsing bbcode would require you to modify the code, and I can't really help you since I haven't gotten around to learning how to do it myself.
Cap'n
Could point me to the area where I need to edit and I will see if I can follow the bbcode parsing tutorial? I'll post how I make out good or bad. :S
Jaks
I'm not a coder at all and I know you said you don't know but do you think something like this as a plugin would work and if so where would I stick it in?
Update: Tried this in every quoteit related hook i could find. Did absolutely nothin
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$randomquote['value'] = $bbcode_parser->parse($randomquote["context"],0, true);
I just editted from the following code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
- <product productid="myspace_style_profile" active="1">
<title>Parse BBCode in Custom Profile Fields</title>
<description>Give your users the full effect by letting them use BB Code in their profile.</description>
<version>1.1</version>
<codes />
<templates />
- <plugins>
- <plugin active="1">
<title>Parse BBCode for Custom Profile Fields</title>
<hookname>member_customfields</hookname>
- <phpcode>
- <![CDATA[
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$profilefield['value'] = $bbcode_parser->parse($userinfo["$profilefieldname"],0, true);
]]>
</phpcode>
</plugin>
</plugins>
<phrases />
<options />
</product>
BrandiDup
01-10-2006, 04:23 PM
Installed on 3.5.3 and working perfectly.
Thank you very much for sharing this with us!
ok I figured out a way to manipulate the templates to link to a specific post. This is not by any means a great alternative but as I said before it works for me.
First I am only allowing admin to post these because it's bound to get too many broke links. So first I added permission tags around the "Add New Quote" link in the quote_randomquote and quote_listquote templates
Then I editted $randomquote[context] inquote_randomquote and quote_listbit.
K first the changes
( I didn't think to to copy the code prior to posting this so you might have to search by eye instead of with a text search. Not a very big templates anyway )
Find in quote_listbit template
<if condition="$randomquote[context]">
( $randomquote[context] )
</if>
Change to fit your url (((Make sure you edit it)))
<if condition="$randomquote[context]">
<a href="http://www.yoursite.com/your forum folder/showthread.php?t=$randomquote[context]">Read More, image anything you want!!</a>
</if>
Save and close
Next in the inquote_randomquote template ( If you only want to allow admin to submit quotes) **Recommended if you use this linking mod**
Find
$vbphrase[add_a_quote]
Change to
<if condition="$vbulletin->userinfo['permissions']['adminpermissions']"><a href="$vboptions[bburl]/quotes.php?do=addquote">$vbphrase[add_a_quote]</a></if>
Then find
<p style="font-weight:bold;margin-left:25%;">- <if condition="$randomquote[context]">$randomquote[context]</if></p>
Change it same as the last template
<p style="font-weight:bold;margin-left:25%;">- <if condition="$randomquote[context]"> <a href="http://www.yoursite.com/your forum foldershowthread.php?t=$randomquote[context]">Read More</a></if></p>
Next in the quote_listquote template
Find
(<a href="quotes.php?$session[sessionurl]&do=addquote">$vbphrase[add_a_quote]</a> )
Change to
<if condition="$vbulletin->userinfo['permissions']['adminpermissions']">(<a href="quotes.php?$session[sessionurl]&do=addquote">$vbphrase[add_a_quote]</a> - </if>
Now to link to a post all you need to do is enter just the thread ID# in the context field.
Example: You want to link to this thread below all you need to enter is 8 in the context field.
http://www.trulyunusual.com/wards/showthread.php?t=8
Alternatively you could set it up so it will link to external pages aswell very easily. Just play with it. BTW I removed the ( and ) because they are cosmetic and interfer when trying to link.
Hope this helps some one.
This hack be used in many applications. Random images, random links, random facts with read more etc... :D
Your the best Cap'n
Jaks
This is how it would look for external links ( I use author as my title and not user so if you dont need the title in there chage it to suit your needs.)
<a title="$randomquote[author]" href="$randomquote[context]">Read More</a>
Jaks
Robbed
01-10-2006, 10:15 PM
jaks - Parsing bbcode would require you to modify the code, and I can't really help you since I haven't gotten around to learning how to do it myself.
What if you made the quote text box a wysisyg editor box? that way it would parse the code. I've seen it done on a few hacks.
Cap'n Steve
01-10-2006, 10:38 PM
You'd still need to convert the bbcode to HTML when people view the quote. Since there are no hooks in the hack yet, you'd have to parse it in quotes.php before it's printed out to the page.
You'd still need to convert the bbcode to HTML when people view the quote. Since there are no hooks in the hack yet, you'd have to parse it in quotes.php before it's printed out to the page.
Wish I could figure it out but the work around I did does the trick.
:D
Jaks
Robbed
01-11-2006, 12:02 AM
This is what they did for the downloads hack if it helps any
https://vborg.vbsupport.ru/showpost.php?p=859722&postcount=256
I tried to match stuff up and figure it out but it's a weeee bit over my head lol. Looks pretty straightforward until the db stuff. :S
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.