View Full Version : QuoteIt! Quote Management System v1.2
magnus
03-13-2004, 10:00 PM
-
QuoteIt! Development has been continued in this thread (https://vborg.vbsupport.ru/showthread.php?t=79756
). Please use this link for the latest version!
-
QuoteIt! 1.2
Description
This hack will allow you to maintain a database of quotes which can be added by users and displayed on FORUMHOME. Admin function includes the ability to delete quotes from the database.
Yes, you can use multi-line quotes. ;)
Information
Requested by djohn (re: https://vborg.vbsupport.ru/showthread.php?t=62420)
Thanks to Giveit2u43 for the username code!
Tested on RC4, should work on RC1+
Version History
v1.0 - Initial Release
v1.1 - Added ability to list all quotes as well as direct quote linking
v1.2 - Added quote moderation abilities
Planned Features
v2.0
- Quote rating system
- Top {X} Quotes
If you use this, please click https://vborg.vbsupport.ru/ (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=62470)
-
UPGRADES
v1.1 -> v1.2 UPGRADE INSTRUCTIONS (https://vborg.vbsupport.ru/showpost.php?p=485846&postcount=43)
v1.0 -> v1.1 UPGRADE INSTRUCTIONS (https://vborg.vbsupport.ru/showpost.php?p=485290&postcount=15)
-
3RD PARTY MODIFICATIONS/ADD-ONS
1. Add QuoteIt! to your vbIndex homepage! (https://vborg.vbsupport.ru/showpost.php?p=485919&postcount=46) by Giveit2u43
2. Add Who's Online Locations for QuoteIt! (https://vborg.vbsupport.ru/showpost.php?p=489370&postcount=82) by Acido
magnus
03-13-2004, 10:15 PM
*sigh* I completely forgot to include the "quotes.php" file in the first zip. The first post has been updated.
I swear, sometimes I'd forget my head...
croft
03-13-2004, 10:27 PM
this is pretty cool =)
Im gonna use this when you get more features in it. Great work.
MindTrix
03-13-2004, 10:28 PM
Nice work, cheers for releasing :)
Osterling
03-13-2004, 10:34 PM
i will use this once v2 comes out :D
AutomatikStudio
03-14-2004, 02:08 AM
i will use this once v2 comes out :DYou my friend missed the boat LONG ago. ;)
SteveK
03-14-2004, 04:22 AM
It looks like you missed a few " . TABLE_PREFIX . " in both index.php and quotes.php
I'll post the changes later if needed.
gmarik
03-14-2004, 05:26 AM
Now this looks good - you made it quicker that KuraFire, thanks!
magnus
03-14-2004, 07:03 AM
It looks like you missed a few " . TABLE_PREFIX . " in both index.php and quotes.php
I'll post the changes later if needed.
So I did.. I've updated the .ZIP file. Good call. ;)
deathemperor
03-14-2004, 10:39 AM
nice hack, I'm going to install this after the vb3 gold ^ ^
daFish
03-14-2004, 10:50 AM
Nice hack. Installed it on my testsystem and its running fine.
Looking forward to verison 2. :)
Giveit2u43
03-14-2004, 12:27 PM
My members are loving this hack and having great fun adding quotes.. One feature they did request was that It showed up the name of the member who submitted the quote.. I`ll be adding this myself on my installation but thought it might be a nice addition for the official version, maybe with an admin on/off option??
magnus
03-14-2004, 12:44 PM
My members are loving this hack and having great fun adding quotes.. One feature they did request was that It showed up the name of the member who submitted the quote.. I`ll be adding this myself on my installation but thought it might be a nice addition for the official version, maybe with an admin on/off option??
Yea, that'll be added. I store the userid of the person who submitted the quote, so it's just a matter of tossing $randomquote[userid] out somewhere.
Giveit2u43
03-14-2004, 12:47 PM
Yea, that'll be added. I store the userid of the person who submitted the quote, so it's just a matter of tossing $randomquote[userid] out somewhere.
Yeah just noticed that as I was looking at the code.. I changed your query to:
$result_quote = $DB_site->query("
SELECT quotes.*,user.username AS quotename FROM ".TABLE_PREFIX."quotes AS quotes
LEFT JOIN ".TABLE_PREFIX."user AS user ON (user.userid = quotes.userid)
ORDER BY rand() LIMIT 1
");
while ($quote = $DB_site->fetch_Array($result_quote)) {
$randomquote[quoteid] = $quote[quoteid];
$randomquote[quote] = $quote[quote];
$randomquote[author] = $quote[author];
$randomquote[username] = $quote[quotename];
}
$DB_site->free_result($result_quote);
eval('$showrandomquote .= "' . fetch_template('randomquote') . '";');
and then you can place $randomquote[username] where you want the submitters username to show :)
magnus
03-14-2004, 04:57 PM
v1.0 -> v1.1 UPGRADE INSTRUCTIONS
1. Download the quoteit1.1.zip from the first post, and upload the new quotes.php to your forum ROOT directory.
2. Run the following SQL query (or, you can insert the following phrase manually into the GLOBAL category):
INSERT INTO phrase (languageid, varname, text, phrasetypeid) VALUES (0, 'view_all_quotes', 'View All', 1);
3. Edit the randomquote TEMPLATE:
Find:
<if condition="$bbuserinfo['userid']">(<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></if>)</if>
REPLACE with:
<if condition="$bbuserinfo['userid']">(<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></if> | <a href="$vboptions[bburl]/quotes.php?do=list">$vbphrase[view_all_quotes]</a>)</if>
4. Create the following NEW templates:
TEMPLATE: quote_listquote
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head><title>$vboptions[bbtitle] - $vbphrase[random_quote]</title>
$headinclude
</head>
<body>
$header
$navbar
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="$stylevar[tablewidth]" align="center">
<thead>
<tr>
<td class="tcat" colspan="2">
<a style="float:$stylevar[right]" 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>
$vbphrase[random_quote]
</td>
</tr>
</thead>
<tbody id="collapseobj_forumhome_randomquote" style="$vbcollapse[collapseobj_forumhome_randomquote]">
$quotelistbit
</tbody>
</table><br />
$pagenav
$footer
</body>
</html>
TEMPLATE: quotelistbit
<table class="tborder" cellpadding="3" cellspacing="0" border="0" width="$stylevar[tablewidth]" align="center">
<tr>
<td class="alt1 smallfont" align="left">
Added by: <a href="$vboptions[bburl]/member.php?userid=$randomquote[userid]">$randomquote[username]
</td>
<td class="alt1" align="right">
<a href="$vboptions[bburl]/quotes.php?do=view"eid=$randomquote[quoteid]">#$randomquote[quoteid]</a>
</td>
</tr>
<tr>
<td class="alt1" align="center" colspan="2">
<i>"$randomquote[quote]"</i>
</td>
</tr>
<tr>
<td class="alt1 smallfont" align="left">
<if condition="$bbuserinfo['permissions']['adminpermissions']">(<a href="$vboptions[bburl]/quotes.php?do=delquote"eid=$randomquote[quoteid]">$vbphrase[delete_this_quote]</a>)</if>
</td>
<td class="alt1" align="right">
- <b>$randomquote[author]</b>
</td>
</tr>
</table>
Done !!
NuclioN
03-14-2004, 06:25 PM
"this is a test" ( | | )test quote <-- is what i see. No username and no link to submit or display all quotes :(
"this is a test" ( | | )test quote <-- is what i see. No username and no link to submit or display all quotes :(
I had the same problem, but when I clicked edit on one of the phrases and saved it without doing anything in the admincp it fixed it somehow.
Does anyone know why I get this error message on the indexpage?
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /usr/home/sites/xxxxxx/www/forum/index.php(115) : eval()'d code on line 19
Parse error: parse error, expecting `']'' in /usr/home/sites/xxxxxxx/www/forum/index.php(115) : eval()'d code on line 19
magnus
03-14-2004, 07:26 PM
"this is a test" ( | | )test quote <-- is what i see. No username and no link to submit or display all quotes :(
Yea, like kie said. Open up the phrase manager, click "edit" on any thread (it doesn't matter which), and then click save. In some cases you need to reload(?) the phrase database. I have no idea why, but I've run into this myself before.
magnus
03-14-2004, 07:30 PM
Does anyone know why I get this error message on the indexpage?
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /usr/home/sites/xxxxxx/www/forum/index.php(115) : eval()'d code on line 19
Parse error: parse error, expecting `']'' in /usr/home/sites/xxxxxxx/www/forum/index.php(115) : eval()'d code on line 19
Looks like a cut & paste gone wrong? I'm assuming line 19 is the QuoteIt! code. It looks like you left off a few trailing characters, open up the readme file and cut/paste again.
NuclioN
03-14-2004, 07:34 PM
Ok, that worked. :) there are two quotes now but when i click on 'View All' no quote is visable.
magnus
03-14-2004, 07:40 PM
Ok, that worked. :) there are two quotes now but when i click on 'View All' no quote is visable.
You've got the link screwed up.
It should be
$vboptions[bburl]/quotes.php?do=list
You have:
$vboptions[bburl]/quotes.php?do=view
I checked the .ZIP file, to see if it was a mistake on my part.. but it appears you modified the templates, and mistakenly confused the link. ;)
NuclioN
03-14-2004, 07:42 PM
Ok tnx. :)
--edit-- works ok now
Looks like a cut & paste gone wrong? I'm assuming line 19 is the QuoteIt! code. It looks like you left off a few trailing characters, open up the readme file and cut/paste again.
That didn't work.
magnus
03-14-2004, 07:51 PM
That didn't work.
Ok, remove the QuoteIt! code from index.php all together. Then, see if you still get the error.
Ok, remove the QuoteIt! code from index.php all together. Then, see if you still get the error.
I didn't get the error when I removed the code.
I also don't get the error when I have the code, but turn off the random quotes from the admincp.
magnus
03-14-2004, 07:59 PM
Just for the hell of it..
In INDEX.PHP:
Find:
// ### WELCOME MESSAGE #################################################
Add ABOVE:
// ### QUOTEIT ################################################## #######
if ($vboptions['showquote'])
{
$result_quote = $DB_site->query("
SELECT * FROM " . TABLE_PREFIX . "quotes ORDER BY rand() LIMIT 1
");
while ($quote = $DB_site->fetch_Array($result_quote)) {
$randomquote[quoteid] = $quote[quoteid];
$randomquote[quote] = $quote[quote];
$randomquote[author] = $quote[author];
$randomquote[userid] = $quote[userid];
$randomquote[approved] = $quote[approved];
}
$DB_site->free_result($result_quote);
eval('$showrandomquote .= "' . fetch_template('randomquote') . '";');
}
Didn't fix it.
The problem appeared after I tried to upgrade, so I'm guessing that it's something with the new templates og something.
magnus
03-14-2004, 08:07 PM
Didn't fix it.
The problem appeared after I tried to upgrade, so I'm guessing that it's something with the new templates og something.
Ahh! I know what it is. I've gone ahead an edited the upgrade instructions. I had cut and paste them from the installer, and I forgot that I left them escaped. So, just edit the template and look for any instance of \' and replace it with just '.
You'll need to edit the randomquote, quote_listquote and quotelistbit templates.
That's why it's crapping out. ;)
Giveit2u43
03-14-2004, 08:09 PM
Magnus, you need to strip the \'s out of the html above.. they`re okay when you're using an installer but cause problems when you're manually adding the templates..
also you`ve changed the name of the function for view to list, but not changed the link in the html in the upgrade instructions.
magnus
03-14-2004, 08:10 PM
Magnus, you need to strip the \'s out of the html above.. they`re okay when you're using an installer but cause problems when you're manually adding the templates..
also you`ve changed the name of the function for view to list, but not changed the link in the html in the upgrade instructions.
Yep. Beat ya to it. ;)
Giveit2u43
03-14-2004, 08:12 PM
Yep. Beat ya to it. ;)
*L* Just noticed that now.. thought I was being quick with my fixes.. apparently not :) but I do have one you haven`t spotted *g*
You missed two templates from the global templates array.. it should be:
$globaltemplates = array(
'quote_addquote',
'quote_delquote',
'quote_listquote',
'quotelistbit'
);
magnus
03-14-2004, 08:16 PM
Damn you! j/k :D
Ok, I updated the .ZIP file.. good looking out, thanks. ;)
Ahh! I know what it is. I've gone ahead an edited the upgrade instructions. I had cut and paste them from the installer, and I forgot that I left them escaped. So, just edit the template and look for any instance of \' and replace it with just '.
You'll need to edit the randomquote, quote_listquote and quotelistbit templates.
That's why it's crapping out. ;)
That fixed it!
Thank you. It's a great hack. :)
Rushty
03-15-2004, 01:57 PM
Any chance in a future version of adding an option in the user control panel to allow users to turn off the quotes for themselves.
Also maybe an approval system so admins have to approve the quote before its viewabale.
daFish
03-15-2004, 02:03 PM
A nice addition for a future version would be categories for quotes and the ability to show them only one day of the week or so. :)
magnus
03-15-2004, 04:56 PM
Any chance in a future version of adding an option in the user control panel to allow users to turn off the quotes for themselves.
Also maybe an approval system so admins have to approve the quote before its viewabale.
Actually, I just completed the approval section. Whether I wait until v2.0, or I release v1.2. I'll have to see. ;)
As for the user toggle, sure, I could add that. Consider it done. ;)
magnus
03-15-2004, 04:57 PM
A nice addition for a future version would be categories for quotes and the ability to show them only one day of the week or so. :)
Hrm.. I'll consider categories, we'll see.
As for when to display, do you mean it displays 1 quote per day/week/month rather than randomly changing every refresh?
gmarik
03-15-2004, 06:42 PM
Categorys would be awesome!
DrkFusion
03-16-2004, 12:25 AM
Thanks for this hack! Works great on a friends board, I modified it to take quotes from this website which provides RSS feeds of quotes. I developed an importer which takes the feeds and puts them into a database for this hack, I might release it as an addon. Doesn't seem stable as there is no interface for it pure backend.
This hack seems to be working fine, and is an asset since I had this incorporated on the main portal page.
Regards & Nice job!
magnus
03-16-2004, 12:37 AM
Thanks for this hack! Works great on a friends board, I modified it to take quotes from this website which provides RSS feeds of quotes. I developed an importer which takes the feeds and puts them into a database for this hack, I might release it as an addon. Doesn't seem stable as there is no interface for it pure backend.
This hack seems to be working fine, and is an asset since I had this incorporated on the main portal page.
Regards & Nice job!
DrkFusion, I'm glad you like the hack. Thanks! ;)
Also, I've noticed a couple of you have implemented this into your portals. Perhaps a few other people could benefit? If you'd like, you could post the modifications required here as per which portal (vbIndex, vBadvanced, etc..) and I could provide a link to them in the first thread.
Or, you could release them in the Add-On section. I have an upgrade coming out soon, which will include the moderating of posts, list sorting and user options toggle. I've decided to release these now, as their pretty much completed rather than waiting for v2.0.
Instead, v2.0 will have a few more configurations and user/admin-options and from the response so far, categories, lol. ;)
DrkFusion, I like your idea of incorporating RSS feeds. That's a great idea. :D
daFish
03-16-2004, 05:48 AM
Hrm.. I'll consider categories, we'll see.
As for when to display, do you mean it displays 1 quote per day/week/month rather than randomly changing every refresh?
I mean if day is sunday, show only quotes from category X otherwise show from all categories.
magnus
03-16-2004, 05:31 PM
v1.1 -> v1.2 UPGRADE INSTRUCTIONS
1. Download quoteit1.2.zip from the first post and uncompress it.
2. Upload quotes.php to your forum ROOT directory, overwriting the existing one.
3. Upload quoteadmin.php to your ADMINCP directory.
4. Run the following SQL queries:
INSERT INTO `setting` (`varname` , `grouptitle` , `value` , `defaultvalue` , `optioncode` , `displayorder` , `advanced` , `volatile` ) VALUES ( 'moderatequotes', 'forumhome', '0', '0', 'yesno', '6', '0', '1');
INSERT INTO `phrase` ( `phraseid` , `languageid` , `varname` , `text` , `phrasetypeid` ) VALUES ( '', '0', 'setting_moderatequotes_title', 'Disable Quote Moderation?', '5000');
INSERT INTO `phrase` ( `phraseid` , `languageid` , `varname` , `text` , `phrasetypeid` ) VALUES ( '', '0', 'setting_moderatequotes_desc', 'Selecting "No" will require all quotes to be approved before being displayed.', '5000' );
INSERT INTO `phrase` ( `phraseid` , `languageid` , `varname` , `text` , `phrasetypeid` ) VALUES ( '', '0', 'quote_x_has_been_approved', 'Quote ({1}) has been approved.', '9000' );
INSERT INTO `phrase` ( `phraseid` , `languageid` , `varname` , `text` , `phrasetypeid` ) VALUES ( '', '0', 'quote_x_has_been_deleted', 'Quote ({1}) has been deleted.', '9000' );
INSERT INTO `phrase` ( `phraseid` , `languageid` , `varname` , `text` , `phrasetypeid` ) VALUES ( '', '0', 'moderate_quotes', 'Moderate Quotes', '9' );
INSERT INTO `phrase` ( `phraseid` , `languageid` , `varname` , `text` , `phrasetypeid` ) VALUES ( '', '0', 'no_quotes_awaiting_moderation', 'No Quotes awaiting moderation', '2' );
5. Make the following FILE edits:
5a. In INDEX.PHP:
Find:
$result_quote = $DB_site->query("
SELECT * FROM quotes ORDER BY rand() LIMIT 1
");
REPLACE with:
$result_quote = $DB_site->query("
SELECT * FROM quotes WHERE approved=1 ORDER BY rand() LIMIT 1
");
5b. In ADMINCP/INDEX.PHP:
Find:
construct_nav_group($vbphrase['moderation'], '<hr />', "$df");
Add ABOVE:
construct_nav_option($vbphrase['moderate_quotes'], "quoteadmin.php?do=moderate");
Done !!
You will now have a new option under the "Moderation" category in the AdminCP, titled "Moderate Quotes". Quote moderating can be toggled via vBulletin Options -> Forums Home Page Options -> Disable Quote Moderation?
Sting
03-16-2004, 08:04 PM
hey i get this error while trying to do an install Parse error: parse error in /home/###/public_html/forum/admincp/install_quoteit.php on line 325
magnus
03-16-2004, 08:47 PM
hey i get this error while trying to do an install Parse error: parse error in /home/###/public_html/forum/admincp/install_quoteit.php on line 325
Woops, my fault. Re-download the .ZIP in the first post. ;)
Giveit2u43
03-16-2004, 09:02 PM
vbindex integration..
in vbindex.php (or whatever you renamed it to) find:
'vbindex_customblock_6'
and change it to:
'vbindex_customblock_6',
'randomquote'
next find:
// ## USERS IGNORE ##
if (trim($bbuserinfo['ignorelist'])) {
$ignorelist = 'AND thread.postuserid NOT IN ('.str_replace(' ', ',', $bbuserinfo['ignorelist']).')';
}
and add BENEATH it:
$result_quote = $DB_site->query("
SELECT quotes.*,user.username AS quotename FROM quotes AS quotes
LEFT JOIN ".TABLE_PREFIX."user AS user ON (user.userid = quotes.userid)
ORDER BY rand() LIMIT 1
");
while ($quote = $DB_site->fetch_Array($result_quote)) {
$randomquote[quoteid] = $quote[quoteid];
$randomquote[quote] = $quote[quote];
$randomquote[author] = $quote[author];
$randomquote[userid] = $quote[userid];
$randomquote[username] = $quote[quotename];
$randomquote[approved] = $quote[approved];
}
$DB_site->free_result($result_quote);
eval('$showrandomquote .= "' . fetch_template('randomquote') . '";');
Then edit your VBINDEX template and place:
$showrandomquote
after:
$home[news]
You can actually place $showrandomquote anywhere you`d like the quotes to show up..
gmarik
03-17-2004, 03:17 AM
Nice one, Giveit!
Any ideas about the category option?
magnus
03-17-2004, 01:15 PM
Nice one, Giveit!
Any ideas about the category option?
Yup, categories are in the works as we speak. ;)
Acido
03-17-2004, 06:34 PM
where i can place the query code in vbadvance homepage ?
I'm not sure iditing adv_index.php, can you help me ?
magnus
03-17-2004, 07:12 PM
where i can place the query code in vbadvance homepage ?
I'm not sure iditing adv_index.php, can you help me ?
I'm not too familiar with vBadvanced, however, you should just be able to place the $result_quote call anywhere near the beginning of the main call, and call it with the $showrandomquote in one of the templates.
You'll need to fiddle with it, because like I said, I don't use vBadvanced.
Acido
03-17-2004, 07:45 PM
I'm not too familiar with vBadvanced, however, you should just be able to place the $result_quote call anywhere near the beginning of the main call, and call it with the $showrandomquote in one of the templates.
You'll need to fiddle with it, because like I said, I don't use vBadvanced.
No problem. I'll find a way, then i'll post it here.
Thanx ;)
djohn
03-18-2004, 01:28 PM
Can't stop coming and looking at my forums after that hack was installed, magnus.
Never had any problems with it, works smoothly.
I thought of a suggestion just now. My forum's quote database is basically an archive of irc quotes, and the only two features now I really need are: the ability to search, and the numbering of quotes. It's kind of hard to describe, but if you go to bash.org, you'll se what i mean. Every quote has it's own number, and it would come very usefull in this hack. For example, when refering to some particular quote, you could make it look like that: http://www.forumaddress.com/quotes.php?14 where 14 is the number of the quote. If you follow that link, you'd see the requested quote there. Also, you could add the number display right beside the quote, like bash.org has.
wooh, regards :)
magnus
03-18-2004, 02:01 PM
Can't stop coming and looking at my forums after that hack was installed, magnus.
Never had any problems with it, works smoothly.
I thought of a suggestion just now. My forum's quote database is basically an archive of irc quotes, and the only two features now I really need are: the ability to search, and the numbering of quotes. It's kind of hard to describe, but if you go to bash.org, you'll se what i mean. Every quote has it's own number, and it would come very usefull in this hack. For example, when refering to some particular quote, you could make it look like that: http://www.forumaddress.com/quotes.php?14 where 14 is the number of the quote. If you follow that link, you'd see the requested quote there. Also, you could add the number display right beside the quote, like bash.org has.
wooh, regards :)
John, I'm glad you like it. Hell, your request is the reason I even made this, lol. ;)
Just so you know, quotes are numbered, have you upgraded to at least v1.1? They can be accessed via http://www.forumaddress.com/quotes.php?do=view"eid=1
As for the search, that's been added to v2.0 as well as sorting. Look for it soon. ;)
djohn
03-19-2004, 01:09 PM
The feature of viewing quotes seperately is news to me, but concerning the numbering, i meant the possibility of showing the quote number next to the quote on forumhome.
Format suggestion:
#1 +(63)- [E|X] magnus
Where #1 is the quote number, +(63)- is the rating, + and - are the buttons to rate the quote up or down, ideally it would be that registed users can rate only once, and the information on whether the user has rated or not would be stored in the database, guest rating could be turned on\off, the limitation would be applied to the ip. [X|E] are the quick edit (E) and delete (X) buttons. magnus is the username of the one, who submitted the quote.
magnus
03-19-2004, 01:44 PM
The feature of viewing quotes seperately is news to me, but concerning the numbering, i meant the possibility of showing the quote number next to the quote on forumhome.
Format suggestion:
#1 +(63)- [E|X] magnus
Where #1 is the quote number, +(63)- is the rating, + and - are the buttons to rate the quote up or down, ideally it would be that registed users can rate only once, and the information on whether the user has rated or not would be stored in the database, guest rating could be turned on\off, the limitation would be applied to the ip. [X|E] are the quick edit (E) and delete (X) buttons. magnus is the username of the one, who submitted the quote.
djohn, all if this is already possible (in v1.1 or v1.2). Since it's all template driven, you just simply need to design the template how you see fit. For instance, see the attached screenshot:
TheComputerGuy
03-20-2004, 11:33 AM
I dunno what it is...I can not see the Moderate quotes in my admin panel...nor can I see the options to add or delete quotes on the forumhome :(
Any suggestions?
Great hack!
Giveit2u43
03-20-2004, 11:42 AM
Goto Phrases, and just click edit on any phrases and then click save.. you don`t need to actually edit anything but you need to do that to update the phrases cache...
Vb-Hispano
03-20-2004, 03:44 PM
in gold no working
magnus
03-20-2004, 04:00 PM
in gold no working
That's not very helpful. There's no reason for it not to work, as it doesn't rely on anything other than a SQL DB and the quotes.php file.
So, would you care to elaborate on what specifically isn't working?
Giveit2u43
03-20-2004, 04:18 PM
Working fine for me on Gold.. Make sure you've edited, saved and uploaded the changes..
Acido
03-20-2004, 06:57 PM
That's not very helpful. There's no reason for it not to work, as it doesn't rely on anything other than a SQL DB and the quotes.php file.
So, would you care to elaborate on what specifically isn't working?
I cant see the Option "Display Random Quote?" in Admincp >> Forums Home Page Options. It's gone after Upgrade to Gold. Peharps i need run a manual query?
djohn
03-20-2004, 07:03 PM
djohn, all if this is already possible (in v1.1 or v1.2). Since it's all template driven, you just simply need to design the template how you see fit. For instance, see the attached screenshot:
wow :) care to share that template?
the language didnt install correctyl
Azhrialilu
03-20-2004, 08:46 PM
I cant see the Option "Display Random Quote?" in Admincp >> Forums Home Page Options. It's gone after Upgrade to Gold. Peharps i need run a manual query?
I've got it showing in the vbulletin options but not in the moderation section... and nothing showing on forum home either to show that a quotes system is running.
Ok, here comes my suggestion.
What I would be using this for is to display member quotes....things that the members have posted and are "quote worthy."
I think it would be great to have a small icon in each postbit that allows you to add a member quote to the database.
You would copy the relevent part of a members post, and click an icon. The next screen would only have a textarea to paste in the quote, since the name would be the user who posted the comment you are quoting.
Additionally, in the actual displayed quote, I would like a link to the original post so people can view the quote in context.
Of course people could still add random quotes as well by clicking "add quote" in the quote display area. If they use this link, THEN they are allowed to add a name. If they add a quote via a post, then the name is generated automatically.
I can probably add this myself if needed, but I figured I'd post here in case you wanted to add it to your release. :)
Nice job, magnus.
Edit: Oh, and it would be nice if you re-worded your AdminCP. The current wording seems backwards and confusing:
Disable Quote Moderation? Selecting "No" will require all quotes to be approved before being displayed"
I would suggest using:
Moderate Quotes? Selecting "Yes" will require all quotes to be approved before being displayed"
magnus
03-20-2004, 10:34 PM
I cant see the Option "Display Random Quote?" in Admincp >> Forums Home Page Options. It's gone after Upgrade to Gold. Peharps i need run a manual query?
I haven't upgrade to Gold, yet.. but I couldn't imagine why it wouldn't show. It's not like upgrading will remove entries from the 'settings' DB. Go and edit a phrase, then click save. You don't need to make any actual changes, just open and save. See if that fixes it.
magnus
03-20-2004, 10:34 PM
the language didnt install correctyl
What language? There are no languages to install... please elaborate.
magnus
03-20-2004, 10:35 PM
I've got it showing in the vbulletin options but not in the moderation section... and nothing showing on forum home either to show that a quotes system is running.
You need to perform the file and template edits again. You don't need to run the installer, but view the README and do the file and template edits.
magnus
03-20-2004, 10:37 PM
wow :) care to share that template?
Upgrade to v1.2. It's the default templates. There are upgrade instructions in the first post. Be sure that you're going in order. If you're using v1.0, you'll need to upgrade to v1.1 then to v1.2.
magnus
03-20-2004, 10:38 PM
Ok, here comes my suggestion.
What I would be using this for is to display member quotes....things that the members have posted and are "quote worthy."
I think it would be great to have a small icon in each postbit that allows you to add a member quote to the database.
You would copy the relevent part of a members post, and click an icon. The next screen would only have a textarea to paste in the quote, since the name would be the user who posted the comment you are quoting.
Additionally, in the actual displayed quote, I would like a link to the original post so people can view the quote in context.
Of course people could still add random quotes as well by clicking "add quote" in the quote display area. If they use this link, THEN they are allowed to add a name. If they add a quote via a post, then the name is generated automatically.
I can probably add this myself if needed, but I figured I'd post here in case you wanted to add it to your release. :)
Nice job, magnus.
Edit: Oh, and it would be nice if you re-worded your AdminCP. The current wording seems backwards and confusing:
Disable Quote Moderation? Selecting "No" will require all quotes to be approved before being displayed"
I would suggest using:
Moderate Quotes? Selecting "Yes" will require all quotes to be approved before being displayed"
VAN, that's a whole new level of functionality. It's not something I'll be adding soon, but it's possible for a future release.. I'll keep it in mind, thanks.
Acido
03-20-2004, 11:09 PM
I haven't upgrade to Gold, yet.. but I couldn't imagine why it wouldn't show. It's not like upgrading will remove entries from the 'settings' DB. Go and edit a phrase, then click save. You don't need to make any actual changes, just open and save. See if that fixes it.
Yup. That fix the problem.
Thanx :)
I cant see the Option "Display Random Quote?" in Admincp >> Forums Home Page Options. It's gone after Upgrade to Gold. Peharps i need run a manual query?
Same problem here.
Clicking on one of the phrases only made the moderation link show up.
magnus
03-20-2004, 11:25 PM
Same problem here.
Clicking on one of the phrases only made the moderation link show up.
You clicked on a phrase, then clicked Save? What is it that you're still missing.. ?
You clicked on a phrase, then clicked Save? What is it that you're still missing.. ?
I'm missing the "Display random quote?" part.
Now I can only moderate and decide if I'm going to disable moderation.
I'm missing the "Display random quote?" part.
Now I can only moderate and decide if I'm going to disable moderation.
It looks like I've somehow "lost" one of the "settingvalues".
When I go to phpmyadmin, I can't find showquote anywhere.
Funny, since I had the quoteIt up an running before the ungrade.
That was strange.
I ran the query for showquote from phpmyadmin and the option in admincp reappeared.
Azhrialilu
03-21-2004, 04:35 AM
You need to perform the file and template edits again. You don't need to run the installer, but view the README and do the file and template edits.
I have... twice LOL.... I haven't lost it due to upgrading to gold.. I didn't install it until I upgraded to gold, so it was a completely fresh install - on a clean database and on a clean version of gold. I've just gone thru them all again, and still nothing :)
Platinumgamer
03-21-2004, 04:55 AM
I have... twice LOL.... I haven't lost it due to upgrading to gold.. I didn't install it until I upgraded to gold, so it was a completely fresh install - on a clean database and on a clean version of gold. I've just gone thru them all again, and still nothing :)
I had a similar problem to what you're describing. I found that the install actually did work fine, but that nothing was showing up. To fix this, simply go to AdminCP -> Languages and Phrases -> Phrase Manager -> Edit any phrase you see, but don't change anything, just click 'Save' -> Refresh your browser -> Click 'Moderation' -> Voila...Moderate Quotes shows up and all is working fine.
Don't know why that happens, but it seems to be the common error.
NuclioN
03-21-2004, 08:48 AM
It only shows: "Disable Quote Moderation?" in the admincp and not "Display Random Quote?" after upgrading to gold. I've edit and saved a phrase as suggested but no quotes on forumhome. :(
--edit-- whooT..this is wierd. "setting etc.
VALUES ('showquote', 'forumhome whas gone (???)
Re-add it and now it's working
TheComputerGuy
03-21-2004, 11:51 AM
You have to go to Phrases and just click save on anything...it will work!
I know!
Azhrialilu
03-21-2004, 05:03 PM
I did that and it didn't work...... but then I went out shopping.. and when I came back it was working .. go figure lol
Acido
03-24-2004, 05:08 PM
Who's On Line Locations for Quote.php Functions:
in includes/functions_online.php
find:
case 'bugs.php':
$userinfo['activity'] = 'bugs';
break;
Below add:
case 'quotes.php':
if ($values['do'] == 'list')
{
$userinfo['activity'] = 'listaquotes';
}
else if ($values['do'] == 'addquote')
{
$userinfo['activity'] = 'agregaquotes';
}
else if ($values['do'] == 'delquote')
{
$userinfo['activity'] = 'borraquotes';
}
break;
Find:
case 'modcplogin':
$userinfo['action'] = $vbphrase['moderator_control_panel_login'];
break;
Below add:
case 'listaquotes':
$userinfo['action'] = '<a href="quotes.php?do=list">Quote List</a>';
break;
case 'agregaquotes':
$userinfo['action'] = '<a href="quotes.php?do=addquote">Adding Quotes</a>';
break;
case 'borraquotes':
$userinfo['action'] = 'Deleting Quotes';
break;
Done :squareeyed:
If you have skill, you can change the labels with custom phrases.
Hope Help ;)
magnus
03-24-2004, 07:20 PM
Acido, awesome! I've gone ahead and added a link to this on the first page. :)
djohn
03-25-2004, 12:42 PM
Thanks, Acido!
Magnus, will this be included in v.2?
Sal Collaziano
03-25-2004, 02:03 PM
This is all I get (how do I add the first quote?):
""
( | | ) -
Ravenheart
03-25-2004, 02:26 PM
You have to go into Phrases, select any of the quote phrases, edit it (don't touch the wording at all) and just click save. Worked for me.
magnus
03-26-2004, 02:45 PM
Thanks, Acido!
Magnus, will this be included in v.2?
Yes.
How can this be added to the Header? I'd like it displayed on all pages, not just Forumhome. :)
magnus
03-30-2004, 11:06 AM
How can this be added to the Header? I'd like it displayed on all pages, not just Forumhome. :)
Install the hack as normal, but instead of making changes to INDEX.PHP, make them to GLOBAL.PHP. Then, use $showrandomquote in your HEADER rather than FORUMHOME template.
Install the hack as normal, but instead of making changes to INDEX.PHP, make them to GLOBAL.PHP. Then, use $showrandomquote in your HEADER rather than FORUMHOME template.
Thats what I tried first, but it doesnt work. The only way I've been able to get it to work in the header is to paste the code from Step 1 into my phpinclude template.
BTW, I've managed to add in the things I mentioned in my suggestion post. If I get it cleaned up enough, I'll post it as an add-on. :)
Another suggestion for the next version...
Paging. Would be cool if we could set the # of quotes shown in the list via a setting in the admincp. :) I'm having a lot of fun tweaking this one. You've inspired me, magnus! :D
magnus
04-03-2004, 02:05 AM
Another suggestion for the next version...
Paging. Would be cool if we could set the # of quotes shown in the list via a setting in the admincp. :) I'm having a lot of fun tweaking this one. You've inspired me, magnus! :D
Too late. ;) Just append &perpage={x} to the request, for example:
http://www.yoursite.com/forum/quotes.php?do=list&perpage=10 will list only 10 quotes per page, etc.. ;)
I'm glad you're enjoying the hack, VAN. Version 2.0 should be out soon, I'm just working out some quirks with the rating system. :D
Geographic2
04-12-2004, 08:27 PM
*fingers tapping* *tap* *tap* tap*.... ;)
djohn
04-13-2004, 10:49 AM
Any news on the second version magnus?
You have to go into Phrases, select any of the quote phrases, edit it (don't touch the wording at all) and just click save. Worked for me.
yap. it is working
magnus
04-14-2004, 12:48 PM
Any news on the second version magnus?
It's there. Still quirky, but I haven't had too much time to work on it. I just released vBGarage as well, so now I have two hacks to tinker with, lol. :D
It'll get released, though. :)
NameWolf
04-15-2004, 10:40 AM
Hello,
I am getting the following error on the main page ;
Database error in vBulletin 3.0.0:
Invalid SQL:
SELECT * FROM quotes WHERE approved=1 ORDER BY rand() LIMIT 1
mysql error: Table 'talking_vbulletin.quotes' doesn't exist
mysql error number: 1146
Date: Thursday 15th of April 2004 02:32:20 PM
I installed the v1.2 on VB3 Gold. Do I still need to follow your upgrade instructions ?
Thanks,
NW
magnus
04-15-2004, 08:22 PM
Hello,
I am getting the following error on the main page ;
Database error in vBulletin 3.0.0:
Invalid SQL:
SELECT * FROM quotes WHERE approved=1 ORDER BY rand() LIMIT 1
mysql error: Table 'talking_vbulletin.quotes' doesn't exist
mysql error number: 1146
Date: Thursday 15th of April 2004 02:32:20 PM
I installed the v1.2 on VB3 Gold. Do I still need to follow your upgrade instructions ?
Thanks,
NW
You haven't created the quotes table in your database. Did you run the installer??
No, you're already running v1.2. You don't need to run any upgrades.
What about posiblity to EDIT quotes ? I use quoteIt as a NEWS sistem, so i may want to modify a "news" then delete it and then repost it again.
magnus
04-15-2004, 10:52 PM
What about posiblity to EDIT quotes ? I use quoteIt as a NEWS sistem, so i may want to modify a "news" then delete it and then repost it again.
Sure, I could implement an edit feature.
NameWolf
04-15-2004, 11:39 PM
magnus, installer has been run and the quotes table is there as far as I can see from phpmyadmin.
Thanks in advance.
NW
magnus
04-16-2004, 09:25 PM
magnus, installer has been run and the quotes table is there as far as I can see from phpmyadmin.
Thanks in advance.
NW
Well, then apparently your database has a problem with the " . TABLE_PREFIX . ". Go ahead and edit the quotes.php (and quoteadmin.php) and remove all occurances of " . TABLE_PREFIX . "
well...if you add the EDIT OPTIONS i will be very happy :)
paratek
04-21-2004, 10:50 AM
The only problem I am having, is the "view all" quotes. It will not list all the quotes, only the first one i entered. The link is calling correctly i believe
http://www.dmaclan.com/forums/quotes.php?do=list
**Update**
It appears i needed to moderate the quotes before they appeared in the "view all" This needed to be done even though i had moderate quotes set to off. All the added quotes randomly appeared anyway, just not in the "view all"
any ideas?
magnus
04-21-2004, 04:09 PM
The only problem I am having, is the "view all" quotes. It will not list all the quotes, only the first one i entered. The link is calling correctly i believe
http://www.dmaclan.com/forums/quotes.php?do=list
**Update**
It appears i needed to moderate the quotes before they appeared in the "view all" This needed to be done even though i had moderate quotes set to off. All the added quotes randomly appeared anyway, just not in the "view all"
any ideas?
If you have moderation off, and you still need to moderate quotes for them to show up, it would seem you have an invalid file/template edit somewhere. Without access to your forum and database, that's my best guess.
bioless
04-23-2004, 05:43 PM
I had a similar problem to what you're describing. I found that the install actually did work fine, but that nothing was showing up. To fix this, simply go to AdminCP -> Languages and Phrases -> Phrase Manager -> Edit any phrase you see, but don't change anything, just click 'Save' -> Refresh your browser -> Click 'Moderation' -> Voila...Moderate Quotes shows up and all is working fine.
Don't know why that happens, but it seems to be the common error.
Thank you for making that much clearer!
Eternal2u
04-25-2004, 05:07 AM
nice system..
i been wanting something like this for awhile...much prop's...
Chris-FH
04-25-2004, 07:34 PM
nice system..
i been wanting something like this for awhile...much prop's...
Great work... :)
But I have a problem. For testing, I added some quotes, but on forumhome, only one, always the same one, is shown...
Before you ask, I set the Disable Quote Moderation to yes, and all the quotes were shown on quotes.php?do=list... ;-)
Any suggestion to fix the problem?
C.
//Only the last Post I added is shown...
//I checked all the templates, I dropped the quotes table und created it new, now the first quote I added is shown...
sean289855
04-26-2004, 04:19 PM
Will this work in VB 3.0.1. The reaso I ask is I ma getting nothing to display.
Wifey
04-27-2004, 04:28 AM
I had added everything exactly as you've said to, and I'm having a problem. Everything works except I can't see any quotes. I do not have the moderate quotes option in my admincp and I have absolutely no idea why.
edit: Okay vB is really freakin' fickle, is it not? I logged out and relogged in and it's showing up.
magnus
04-27-2004, 01:40 PM
Great work... :)
But I have a problem. For testing, I added some quotes, but on forumhome, only one, always the same one, is shown...
Before you ask, I set the Disable Quote Moderation to yes, and all the quotes were shown on quotes.php?do=list... ;-)
Any suggestion to fix the problem?
C.
//Only the last Post I added is shown...
//I checked all the templates, I dropped the quotes table und created it new, now the first quote I added is shown...
What version of MySQL/PHP are you running?
magnus
04-27-2004, 01:41 PM
Will this work in VB 3.0.1. The reaso I ask is I ma getting nothing to display.
Yes. It should work fine. What's not showing up exactly? Are you seeing the Random Quote box, or are you just not seeing quotes? Etc..
Chris-FH
04-27-2004, 04:04 PM
Hey magnus... :)
PHP v4.3.1 and MySQL v3.23.53 is running. Last night, I got some help, and now, it works:
Find:
$result_quote = $DB_site->query("
SELECT * FROM quotes WHERE approved=1 ORDER BY rand() LIMIT 1
and change it to
srand((double)microtime()*1000000000);
$rand_v = rand();
$result_quote = $DB_site->query("
SELECT * FROM quotes WHERE approved = 1 ORDER BY rand($rand_v)
C.
magnus
04-27-2004, 04:11 PM
Hey magnus... :)
PHP v4.3.1 and MySQL v3.23.53 is running. Last night, I got some help, and now, it works:
Find:
$result_quote = $DB_site->query("
SELECT * FROM quotes WHERE approved=1 ORDER BY rand() LIMIT 1
and change it to
srand((double)microtime()*1000000000);
$rand_v = rand();
$result_quote = $DB_site->query("
SELECT * FROM quotes WHERE approved = 1 ORDER BY rand($rand_v)
C.
Yup. The earlier MySQL workaround. Good job! Glad you got it working. ;)
Wifey
05-02-2004, 09:35 PM
Hey :) When someone is looking at the quotes page in Who's Online, it shows them as being on a weird page - I'm pretty sure it said quotes.php? Any way to fix that? No hurry, it's not a big deal and I know you're busy :)
ryancooper
05-14-2004, 11:20 PM
I ran the script and did all the updates but I get no quote. Made sure it was turned on and everything. Looks like some phrases are missing. See pic..
Thanks for any help . ..
ryancooper
05-15-2004, 12:34 PM
I ran the script and did all the updates but I get no quote. Made sure it was turned on and everything. Looks like some templaes are missing. See pic..
Thanks for any help . ..
Just checked all phrases and templatyes and they are all there. Any ideas? I would really love to get this up an running<
thanks
djohn
05-15-2004, 05:59 PM
Magnus, maybe i could help you finish off the hack faster, if you shared what you have done so far. Or beta test it.
nineball
05-18-2004, 02:23 AM
Here is a module you can upload to your modules directory to add a quote block to the latest version of vbadvanced
You could adapt this hack very easily to make a comments hack, where users could add comments to the end of news articles and non-VB pages...! Any chance of making it happen or would you be offended if I altered it myself?
ryancooper
05-23-2004, 02:40 PM
I ran the script and did all the updates but I get no quote. Made sure it was turned on and everything. Looks like some phrases are missing. See pic..
Thanks for any help . ..
Any help with this ??
https://vborg.vbsupport.ru/showpost.php?p=512506&postcount=116
Thanks! ;)
tHe Rk
05-27-2004, 08:56 PM
Any help with this ??
https://vborg.vbsupport.ru/showpost.php?p=512506&postcount=116
Thanks! ;)
Same thing happened to me. :ermm: Help Please!
Edit Read this:
Originally Posted by Platinumgamer
I had a similar problem to what you're describing. I found that the install actually did work fine, but that nothing was showing up. To fix this, simply go to AdminCP -> Languages and Phrases -> Phrase Manager -> Edit any phrase you see, but don't change anything, just click 'Save' -> Refresh your browser -> Click 'Moderation' -> Voila...Moderate Quotes shows up and all is working fine.
Don't know why that happens, but it seems to be the common error.
Worked for me. Got the add quote stuff to show up, then I added a quote, but still couldn't see anything because you have to approve it before it goes up. All is well now though, so try that Ryan, and PS the search button goes a long way in solving problems;)
weaver
05-28-2004, 12:49 AM
My test quote is showing up on my forum page fine but it's not showing up on my main site page (which uses vbindex). I did the changes posted above for vbindex. I placed $showrandomquote beneath $home[navbar]. That shouldn't be a problem should it?
Btw, were there any quotes that came with this installation? I've created one myself and that seems to be the only one I have. Just want to double check on that.
seangworld
06-02-2004, 11:04 PM
My test quote is showing up on my forum page fine but it's not showing up on my main site page (which uses vbindex). I did the changes posted above for vbindex. I placed $showrandomquote beneath $home[navbar]. That shouldn't be a problem should it?
Btw, were there any quotes that came with this installation? I've created one myself and that seems to be the only one I have. Just want to double check on that.
thanks the rk, i had that same problem and your tip helped fix it.
http://www.seangworld.com/vbulletin
pjdaley
06-03-2004, 06:43 PM
anyway possible, a quote can be added from a starting thread? from lets say 5 seperate forums, and it randomly shows a quote, and its also viewed outside of the forum?
xQuEeNzNaZcHox
06-12-2004, 04:27 PM
I get this when loading my vB forumhome:
Database error in vBulletin 3.0.1:
Invalid SQL:
SELECT * FROM quotes WHERE approved=1 ORDER BY rand() LIMIT 1
mysql error: Table 'nymfans_vbulletin.quotes' doesn't exist
mysql error number: 1146
Date: Saturday 12th of June 2004 01:25:09 PM
Script: http://www.nymfans.com/
Referer:
Username: Noah
IP Address: --.---.---.---
The DB tables are there (vbulletin_quotes), everything is in the Admin CP. What is up here?
egyptsons
06-13-2004, 09:01 AM
:rolleyes:
ok
The Realist
06-13-2004, 09:46 AM
Installed and editing the phases does work, I had that problem as well.
Thanks.
Alien
06-18-2004, 03:21 PM
You could adapt this hack very easily to make a comments hack, where users could add comments to the end of news articles and non-VB pages...! Any chance of making it happen or would you be offended if I altered it myself?
Love this hack, wanted to know if there was any new updates on the new 2.0 version as it was coming out 'any day' 2 months ago. :) I'd love to see that EDIT feature and the other ideas you had implemented! Just wanted to let you know I can't wait!
Bush Music
06-23-2004, 11:15 AM
Is there a way to disable users from adding quotes except Admin's and Mod's?
Also is there a way to disble viewing all of the quotes thus only allowing users to view one quote at a time?
Thanks!
From my QuoteIt experience :
1. If you see no text, you need tu manualy re-enter the phrases.
2. If you upgrade from 3.0.0 to 3.0.1 and you see no QuoteIt, go to ADMIN CP > vB Options > Forum Home... > Dyspay Quote and set to YES.
If you don't have such an option you need to re-enter the setting to the database. Use this install file. It is the same install file only that i remove the CRATE TABLE QUOTE and THE PHRASES. You only need the SETTINGS thing.
Atleast, this is what i did and it worked. So, use my advices at your own risk :)
TopeeGuy
06-26-2004, 11:48 PM
Is it possible to edit submitted quotes before you authorise them?
Alien
06-29-2004, 07:39 PM
Nope, we're hoping for the edit functionality in 2.0 if he comes back and releases it. ;)
porouian
07-07-2004, 01:40 AM
From my QuoteIt experience :
1. If you see no text, you need tu manualy re-enter the phrases.
2. If you upgrade from 3.0.0 to 3.0.1 and you see no QuoteIt, go to ADMIN CP > vB Options > Forum Home... > Dyspay Quote and set to YES.
If you don't have such an option you need to re-enter the setting to the database. Use this install file. It is the same install file only that i remove the CRATE TABLE QUOTE and THE PHRASES. You only need the SETTINGS thing.
Atleast, this is what i did and it worked. So, use my advices at your own risk :)
thank you muchly for this easy fix! i was having the exact problem as listed in your point #2, and you've helped me fix it up in no time flat. thanks again!
Berethorn
07-07-2004, 10:53 AM
I get this when loading my vB forumhome:
Database error in vBulletin 3.0.1:
Invalid SQL:
SELECT * FROM quotes WHERE approved=1 ORDER BY rand() LIMIT 1
mysql error: Table 'nymfans_vbulletin.quotes' doesn't exist
mysql error number: 1146
Date: Saturday 12th of June 2004 01:25:09 PM
Script: http://www.nymfans.com/
Referer:
Username: Noah
IP Address: --.---.---.---
The DB tables are there (vbulletin_quotes), everything is in the Admin CP. What is up here?
I have this same problem - can anyone help?
Holidazed
07-08-2004, 08:12 PM
Wierdness. I installed this on my test board and it worked fine. However, when I put it on my real site, it displays no quotes, no links, no nothing. See for yourself.
It is obvious that I did something wrong but I cannot tell what?
Help.
P.S. There is also a line int he instructions that says to add
construct_nav_option($vbphrase['moderate_quotes'], "quoteadmin.php?do=moderate");
to the admincp/index.php file. It is strange that nowhere does it add the phrase "moderate_quotes" to the phrases or even tell me to do it.
Can somebody please give me the database queries to run that would completely remove this hack from my database? This way i can remove it then re-add it. Maybe that will help.
Holidazed
07-09-2004, 03:28 PM
Come on guys! I really need help here.
Holidazed
07-09-2004, 06:44 PM
Damn this is frustrating. I cannot even reinstall from scratch because I cannot determine how to remove this from the database. No uninstall option!!
Help!!!!
Sanity
07-10-2004, 09:49 PM
I would like to have an edit function. Quite often we have spelling mistakes so i have to correct it by phpmyadmin o_O
Milorad
07-13-2004, 02:21 PM
Yes, an edit function would be really great :)
... also, this would make a good (and simple) random links/ads display... all one needs to include is a linked image as the quote (and modify the template slightly to remove the submissions for normal users)
Dolamite
07-17-2004, 11:56 PM
it seems i have the same problem as bitg... running 3.0.3 .... i however did a database dump before i installed it on my test board... so it's easy to go back... i'd like to get this thing working though...
weaver
07-28-2004, 08:04 PM
From my QuoteIt experience :
1. If you see no text, you need tu manualy re-enter the phrases.
2. If you upgrade from 3.0.0 to 3.0.1 and you see no QuoteIt, go to ADMIN CP > vB Options > Forum Home... > Dyspay Quote and set to YES.
If you don't have such an option you need to re-enter the setting to the database. Use this install file. It is the same install file only that i remove the CRATE TABLE QUOTE and THE PHRASES. You only need the SETTINGS thing.
Atleast, this is what i did and it worked. So, use my advices at your own risk :)
beautiful :) Thanks for taking the time to do that for the rest of us. :)
xTerMn8R
08-05-2004, 05:32 PM
I'm having the exact same troubles as Bitg here and have gone over the install instructions several time checking all the edits... I've done everything correctly and still get a blank window with a couple ""'s at the top center and then on bottom left I have (||) and on the right bottom a - . I dont know what to do at this point I'm also running the 3.03 version of vb... Any help would be deeply appreciated as I know my users would really enjoy this as well. Thanks in advance ...
Peace...
Termi...
Update !!!
Did the Phrase edit and save (any phrase no changes) and now it works fine...
Sanity
08-11-2004, 07:50 PM
Hi there again. Could somebody hack an editfunction into the qoute.php? Would be pretty nice.
KW802
08-11-2004, 07:59 PM
What would the installation instructions be for somebody who only wants to use it as a vBa CMPS module? Would it just be a matter of skipping steps #4a and #5 or .... ?
Thanks,
Kevin
integra99
08-11-2004, 08:26 PM
I would like to have an edit function. Quite often we have spelling mistakes so i have to correct it by phpmyadmin o_O
Then it wouldn't be a quote :P
Sanity
08-11-2004, 09:05 PM
Then it wouldn't be a quote :P
Nope, I have a forum about audiobooks - users quote certain scenes and spellingmistakes or the wrong usage of "author" (meant is the audiobook) should be corrected.
Reeve of shinra
08-11-2004, 10:37 PM
Very handy hack, cant wait till the catagories are added as I plan to add different quotes in different forums. Thanks!
integra99
08-14-2004, 09:34 AM
Two things Magnus. First, I modified your hack a bit :) It moderates all new quotes except if they are entered by an admin/mod. Also, it'd be nice to have the number of new quotes to me modded appear in the admincp quick stats. I have everything for that worked out, except my SQL is a bit rusty and can't put togather the right query.
Great hack :)
* integra99 clicked install a few days ago
integra99
08-14-2004, 07:55 PM
Open admincp/index.php and find:
print_cells_row(array(
$vbphrase['new_threads_today'], vb_number_format($newthreads['count']),
$vbphrase['threads_awaiting_moderation'] . construct_link_code($vbphrase['view'], "../$modcpdir/moderate.php?$session[sessionurl]do=posts"), vb_number_format($threadcount['count']),
), 0, 0, -4, 'top', 1);
Add after
print_cells_row(array(
"", "",
"Quotes Awaiting Moderation" . construct_link_code($vbphrase['view'], "http://www.kydsm.com/admincp/quoteadmin.php?do=moderate"), vb_number_format($quotecount['total']),
), 0, 0, -4, 'top', 1);
Then find:
$threadcount = $DB_site->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "moderation WHERE type='thread'");
And add after:
$quotecount = $DB_site->query_first("SELECT count( * ) AS total FROM `quotes` WHERE approved =0");
turbidblue
08-14-2004, 09:31 PM
Okay, I was wondering if anyone could help me out with the "view all" page. Mine is all jumbled together and looks not so good.
Screenshot of the mess:
http://turbidblue.com/images/random.jpg
I saw Magnus posted that it was done with template edits, but what are the edits to get each quote in its own little box??
Thanks for any help/advice you can provide :)
xoxo
turbidblue
08-16-2004, 02:13 AM
boost for any help??
please!
KW802
08-16-2004, 02:10 PM
What would the installation instructions be for somebody who only wants to use it as a vBa CMPS module? Would it just be a matter of skipping steps #4a and #5 or .... ?
Thanks,
KevinFor anybody else in the same position as above, the steps I took/had to take on a VB 3.0.3 & vBadvanced CMPS 1.0.0 configuration were....
Do Step #1 from the installation instructions
Do Step #2 from the installation instructions
Do Step #3 from the installation instructions
Do Step #4b from the installation instructions
Do Step #6 from the installation instructions
Upload the PHP file from Nineball (https://vborg.vbsupport.ru/showpost.php?p=513478&postcount=119)
Do the phrase manager trick by Platinumgamer (https://vborg.vbsupport.ru/showpost.php?p=487527&postcount=78)
Modified the randomquote template to the look & feel of the rest of my generic vBa CMPS modules (essentially give it the outside border but not on the inside cells; accomplished by doing an inner table)....<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
<td class="tcat" colspan="2">
<a style="float:$stylevar[right]" 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>
$vbphrase[random_quote]
</td>
</tr>
</thead>
<tbody id="collapseobj_forumhome_randomquote" style="$vbcollapse[collapseobj_forumhome_randomquote]">
<tr>
<td class="alt1">
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" width="100%">
<tr>
<td class="alt1" align="left" colspan="2">
<i>"$randomquote[quote]"</i>
</td>
</tr>
<tr>
<td class="alt1 smallfont" align="left">
<if condition="$bbuserinfo['userid']">(<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></if> | <a href="$vboptions[bburl]/quotes.php?do=list">$vbphrase[view_all_quotes]</a>)</if>
</td>
<td class="alt1" align="right">
- <b>$randomquote[author]</b>
</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
<br />
I need to tweak the rest of the templates yet but that's minor. The above should only take about 10-15 minutes to get you up & running with vBa CMPS.
TopeeGuy
08-16-2004, 06:33 PM
Hope someone can help me on a problem I'm having...
I installed QuoteIt, but at the time I only had one template... now I've got three styles and need QuoteIt to run with all three styles.
Is there anyway to re-install it somehow or make it work with the two new styles? Even if I try to access the install script again, it just keeps on editing the original style but does nothing to the two new styles :ermm:
Help?
integra99
08-16-2004, 07:39 PM
Hope someone can help me on a problem I'm having...
I installed QuoteIt, but at the time I only had one template... now I've got three styles and need QuoteIt to run with all three styles.
Is there anyway to re-install it somehow or make it work with the two new styles? Even if I try to access the install script again, it just keeps on editing the original style but does nothing to the two new styles :ermm:
Help?
You don't need to reinstall it to work with your other two styles. Just copy over the $randomquote tag to wherever you want it to show up in your other template.
TopeeGuy
08-16-2004, 08:19 PM
You don't need to reinstall it to work with your other two styles. Just copy over the $randomquote tag to wherever you want it to show up in your other template.
That doesn't work... The install script adds some fata to the template table in the DB specific to the styles. It needs that (and any other DB entries?) for it to work on other styles...
Holidazed
09-02-2004, 05:54 PM
I ran the script and did all the updates but I get no quote. Made sure it was turned on and everything. Looks like some phrases are missing. See pic..I am running a totally unmodified version (except for this hack) of vb3.03 and I have the exact same problem. See my attachments for yourself.
In my ACP, It is not displaying the "Moderate Quotes" option until I told it to not pull from the phrase. Now when I click on it, I see the "Quote Manager" but there are no options. See my attachment.
On the front page of the site, I see no quotes. See the attachment.
Help?
venomx
09-04-2004, 06:00 AM
Open admincp/index.php and find:
print_cells_row(array(
$vbphrase['new_threads_today'], vb_number_format($newthreads['count']),
$vbphrase['threads_awaiting_moderation'] . construct_link_code($vbphrase['view'], "../$modcpdir/moderate.php?$session[sessionurl]do=posts"), vb_number_format($threadcount['count']),
), 0, 0, -4, 'top', 1);
Seems vB3.0.3 is different.. mine is
print_cells_row(array(
$vbphrase['new_posts_today'], vb_number_format($newposts['count']),
$vbphrase['new_threads_today'], vb_number_format($newthreads['count']),
$vbphrase['unique_registered_visitors_today'], vb_number_format($users['count']),
), 0, 0, -4, 'top', 1, 1);
Holidazed
09-04-2004, 04:01 PM
Is anybody going to address my issue?
Logician
09-07-2004, 09:32 AM
Is anybody going to address my issue?
Reading the thread first might help. It has been addressed a lot of times. Eg.
https://vborg.vbsupport.ru/showpost.php?p=540289&postcount=143
Logician
09-07-2004, 09:37 AM
Magnus thx for sharing the hack. It is a big hit which is always requested. :)
I have a technical suggestion though: Using
ORDER BY rand() LIMIT 1 in a SQL query is not the perfect way of getting a single quote (altough simplest). It may run fine in many instances but if your board has a heavy traffic (ie the query runs a lot) and your quote list is also long, it creates a big load on the server as rand() function attempts to create a copy of entire quote table on DB everytime it runs. Kurafire's vb2 version had the same problem and IMO it may be better if you implement a different algorithm to grab the quotes evertime it is called. My 2 cents.
calvin.krause
09-09-2004, 03:39 PM
I have modified this hack under vB 3.0.3 to allow administrators to edit a quote that is already in the database directly from the ForumHome.
I did it for my own forum, which uses a modified version of QuoteIt to post random lyrics in my forum, which is a discussion about Bob Dylan, so I would have to undo some changes to post it here. If you really really want it, PM me and I will post the intructions on how to add EDIT capability to this hack.
integra99
09-14-2004, 07:49 PM
Seems vB3.0.3 is different.. mine is
print_cells_row(array(
$vbphrase['new_posts_today'], vb_number_format($newposts['count']),
$vbphrase['new_threads_today'], vb_number_format($newthreads['count']),
$vbphrase['unique_registered_visitors_today'], vb_number_format($users['count']),
), 0, 0, -4, 'top', 1, 1);
That's fine, still addprint_cells_row(array(
"", "",
"Quotes Awaiting Moderation" . construct_link_code($vbphrase['view'], "http://www.kydsm.com/admincp/quoteadmin.php?do=moderate"), vb_number_format($quotecount['total']),
), 0, 0, -4, 'top', 1);After that.
alzibub
09-15-2004, 10:05 AM
I had the same issue as bitg - did the edit any phrase - save - then it was all there..
Awesome hack - thanks much to the creator :)
Warlord
09-15-2004, 04:50 PM
Looks like a good hack.. wasn't there a similiar one for vb 2 at one time?
I'll likely install this when I get home tonight.
Neutral Singh
09-16-2004, 04:16 AM
""
( | | ) -
I am getting this blank screen... :disappointed: and there seems to no option to edit or save. Is this version of hack incompatible with vB 3.0.3 ?
Warlord
09-18-2004, 07:46 PM
<font size="7">Magnus please update your instructions</font>.............
And let people that are too lazy to search the thread know they have to manually go in, select the phrases and save it for the hack to work. I've seen numerous people post about how the hack doesn't work for them and I've seen the answer posted again and again.
venomx
09-24-2004, 01:42 AM
Any Mod like this one
https://vborg.vbsupport.ru/showthread.php?t=66265 for this?
venomx
09-24-2004, 02:45 AM
Here is a module you can upload to your modules directory to add a quote block to the latest version of vbadvanced
Still new to adding Mods to CMPS, can you tell me what else Ill need to add this please?
nineball
09-24-2004, 04:12 AM
This is good as a center block. Just go into add a module, call it quote
use quote.php as the file
use randomquote as the template used
Neutral Singh
09-24-2004, 12:48 PM
it works gr8 !!! thanks
Tessa
09-25-2004, 12:12 AM
I finished the intructions but I don't see it anywhere on my homepage or forum...?
using vb version 3.0.3
Tessa
09-25-2004, 02:12 AM
I finished the intructions but I don't see it anywhere on my homepage or forum...?
using vb version 3.0.3
Clearifying a little, I don't see any thing where a user can add a quote anywhere. Nor any type of box where the quote would be shown.
And for the record, I went through all 12 pages of this thread to see if there already was an answer to my problem, I`m blind now but at least I`m not repeating anything.
KW802
09-27-2004, 06:37 PM
To allow your administrator group to bypass being moderated (assuming that you have quotes moderation turned on in your ACP) make the following changes to quotes.php......
Find....if (empty($author) OR empty($quote))
{
eval (print_standard_error('error_requiredfields'));
}
And below it add: if (!$bbuserinfo['permissions']['adminpermissions'])
{ // Use the moderation option set in the ACP
$moderate_quote = $vboptions[moderatequotes];
}
else
{ // Do not moderate administrator quotes
$moderate_quote = 1;
}
Right below that you should see.... $DB_site->query("
INSERT INTO " . TABLE_PREFIX . "quotes (quote, author, userid, approved) VALUES ('" . addslashes($quote) . "', '" . addslashes($author) . "', $bbuserinfo[userid], $vboptions[moderatequotes])
");
Change the word "$vboptions[moderatequotes]" to "$moderate_quote" and try it out.
58sniper
09-27-2004, 08:10 PM
To allow your administrator group to bypass being moderated (assuming that you have quotes moderation turned on in your ACP) make the following changes to quotes.php......
Find....if (empty($author) OR empty($quote))
{
eval (print_standard_error('error_requiredfields'));
}
And below it add:if ($bbuserinfo['usergroupid'] == 6)
{ // Do not moderate administrator quotes
$moderate_quote = 1;
}
else
{ // Use the moderation option set in the ACP
$moderate_quote = $vboptions[moderatequotes];
}
Right below that you should see.... $DB_site->query("
INSERT INTO " . TABLE_PREFIX . "quotes (quote, author, userid, approved) VALUES ('" . addslashes($quote) . "', '" . addslashes($author) . "', $bbuserinfo[userid], $vboptions[moderatequotes])
");
Change the word "$vboptions[moderatequotes]" to "$moderate_quote" and try it out.
Hmmm... that didn't seem to do it for me. No noticeable change. Entries by the admin (me) still are stuck in the moderate queue.
I haven't looked into this much, but.....
BTW - My account is a member of the administrators group, but that's NOT my primary usergroup. Dunno if that matters.
KW802
09-27-2004, 08:38 PM
BTW - My account is a member of the administrators group, but that's NOT my primary usergroup. Dunno if that matters.I haven't played around with the user being in multiple groups yet; when I get home tonight I'll check it out to see if there's a quick fix.
Edit: OK, I changed my first post above. I wasn't thinking abstract enough..... going by the explicit usergroup is too literal.... if you have permissions to moderate the quotes then there is no point in having your own submissions sent to moderation. Try the revised code above. :o
58sniper
09-27-2004, 09:50 PM
Okay, that didn't work either. But what did work was changing
if ($bbuserinfo['usergroupid'] == 6)
to this
if ($bbuserinfo['usergroupid'] == 6 || $bbuserinfo['usergroupid'] == 9)
Since 9 is the one that is the primary usergroup for my account.
KW802
09-27-2004, 10:59 PM
Okay, that didn't work either. But what did work was changing
if ($bbuserinfo['usergroupid'] == 6)
to this
if ($bbuserinfo['usergroupid'] == 6 || $bbuserinfo['usergroupid'] == 9)
Since 9 is the one that is the primary usergroup for my account.HHmm.... if that didn't work, have you tried deleting any quotes yet? ;) That command is the same command used in the rest of the script to determine if the person has access to moderate quotes or not. Did you change the entire block or just the first line?
58sniper
09-27-2004, 11:08 PM
HHmm.... if that didn't work, have you tried deleting any quotes yet? ;) That command is the same command used in the rest of the script to determine if the person has access to moderate quotes or not. Did you change the entire block or just the first line?
Just the first line. I can moderate, delete, etc with that same account. No problem.
KW802
09-27-2004, 11:58 PM
Just the first line.....I should've specified "copy, paste, & replace all of the lines otherwise the logic will be backwards, anybody who has moderation privileges would be controlled through the ACP and everybody else would've been un-moderated." :p
58sniper
09-28-2004, 01:50 AM
I should've specified "copy, paste, & replace all of the lines otherwise the logic will be backwards, anybody who has moderation privileges would be controlled through the ACP and everybody else would've been un-moderated." :p
Ah - what I mean was that was the only line that *I* changed that made it work. I did replace the code per your instructions. When THAT didn't work, I changed the one line I mentioned. Sorry I wasn't clear.
58sniper
09-29-2004, 02:38 AM
Okay, I seem to have hit a snag. Seems that the quotes aren't very random for me. I get the same quote each time. If I delete that quote, I'll get a new quote, but then that same new quote each time.
Anyone seen this?
KW802
09-29-2004, 05:36 PM
Okay, I seem to have hit a snag. Seems that the quotes aren't very random for me. I get the same quote each time. If I delete that quote, I'll get a new quote, but then that same new quote each time.
Anyone seen this?How many quotes have you entered so far? Might be just a low base number scenario.
58sniper
09-29-2004, 10:51 PM
I have about 35 entered so far.
KW802
09-29-2004, 11:06 PM
I have about 35 entered so far.OK, so much for my theory. :p Is there a URL to check it out?
Borgs8472
09-30-2004, 11:42 PM
I've got about 300 now.
I would like this system a little better if there wasn't a "Random Quote" bar, and the whole business took up less space. It's nice, but it's pushing my forum lists downwards. :(
58sniper
10-01-2004, 12:57 AM
I've got about 300 now.
I would like this system a little better if there wasn't a "Random Quote" bar, and the whole business took up less space. It's nice, but it's pushing my forum lists downwards. :(
You can always edit the template to display it however you want it. The first thing I did was rip out the table in the middle of the template and move things around a little. But the fact that it's in a template make modifying its appearance easy.
kizzmet
10-06-2004, 10:48 PM
To allow your administrator group to bypass being moderated (assuming that you have quotes moderation turned on in your ACP) make the following changes to quotes.php......
Find....if (empty($author) OR empty($quote))
{
eval (print_standard_error('error_requiredfields'));
}
And below it add: if (!$bbuserinfo['permissions']['adminpermissions'])
{ // Use the moderation option set in the ACP
$moderate_quote = $vboptions[moderatequotes];
}
else
{ // Do not moderate administrator quotes
$moderate_quote = 1;
}
Right below that you should see.... $DB_site->query("
INSERT INTO " . TABLE_PREFIX . "quotes (quote, author, userid, approved) VALUES ('" . addslashes($quote) . "', '" . addslashes($author) . "', $bbuserinfo[userid], $vboptions[moderatequotes])
");
Change the word "$vboptions[moderatequotes]" to "$moderate_quote" and try it out.
This worked for me, thank you!
kizzmet
10-06-2004, 10:54 PM
For anybody else in the same position as above, the steps I took/had to take on a VB 3.0.3 & vBadvanced CMPS 1.0.0 configuration were....
Do Step #1 from the installation instructions
Do Step #2 from the installation instructions
Do Step #3 from the installation instructions
Do Step #4b from the installation instructions
Do Step #6 from the installation instructions
Upload the PHP file from Nineball (https://vborg.vbsupport.ru/showpost.php?p=513478&postcount=119)
Do the phrase manager trick by Platinumgamer (https://vborg.vbsupport.ru/showpost.php?p=487527&postcount=78)
Modified the randomquote template to the look & feel of the rest of my generic vBa CMPS modules (essentially give it the outside border but not on the inside cells; accomplished by doing an inner table)....<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
<td class="tcat" colspan="2">
<a style="float:$stylevar[right]" 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>
$vbphrase[random_quote]
</td>
</tr>
</thead>
<tbody id="collapseobj_forumhome_randomquote" style="$vbcollapse[collapseobj_forumhome_randomquote]">
<tr>
<td class="alt1">
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" width="100%">
<tr>
<td class="alt1" align="left" colspan="2">
<i>"$randomquote"</i>
</td>
</tr>
<tr>
<td class="alt1 smallfont" align="left">
<if condition="$bbuserinfo['userid']">(<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></if> | <a href="$vboptions[bburl]/quotes.php?do=list">$vbphrase[view_all_quotes]</a>)</if>
</td>
<td class="alt1" align="right">
- <b>$randomquote[author]</b>
</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
<br />
I need to tweak the rest of the templates yet but that's minor. The above should only take about 10-15 minutes to get you up & running with vBa CMPS.
I am running CMPS and I followed this yet it still does not appear on the VB Homepage. I also added the module and designated ramdonquote for the template. Any help please?
I'm not sure if it's already mentioned, but when you set '$perpage = 10' or whatever number you want it should show that number per page, but it doesn't, it even skips some quotes to be projected while they are there in the database!!!
any solution for this?
Spookysalem
10-19-2004, 11:19 AM
i have installed this and it only works on one of my styles
i have edited the templates....i have the welcome panel installed too.
please help.
Spookysalem
10-29-2004, 03:12 PM
I need some help please..i sorted out my last post and all worked fine.
However i had some problems today on my forum and now it does not show at all. there is no option to turn it on in the admin panel options part. According to phpmyadmin all the tables are there....
please can anyone help me get it back...
thanks
pixelpunk
11-03-2004, 08:14 PM
Is there any chance of modifying this so when you are authenticating quotes it shows them in a editable box? Maybe I'm just a perfectionist but I hate it when a quote has words spelled wrong or has double quotations.
Spyke
11-04-2004, 12:47 AM
Hi, nice mod :)
Though, i'm having alittle trouble and i think it's with the phrases. I did all the edits and uploaded all the files but it's not displaying any text on the forum home page (http://eternal-realm.net/vb/ to see) and the option Moderate Quotes doesn't work. It's an empty slot and directs to an empty page.
Any Idea's?
thanks.
urmyantichrist
11-11-2004, 05:46 PM
Hi, nice mod :)
Though, i'm having alittle trouble and i think it's with the phrases. I did all the edits and uploaded all the files but it's not displaying any text on the forum home page (http://eternal-realm.net/vb/ to see) and the option Moderate Quotes doesn't work. It's an empty slot and directs to an empty page.
Any Idea's?
thanks.
I'm having this same problem... I went to your site and noticed you got it working, mind telling me how? Thanks!
venomx
11-11-2004, 09:31 PM
Try opening any phrases to edit it and then just save it. This worked for me when I had a few that wouldnt show.
Thanatos
11-22-2004, 05:09 AM
I needed Quotes added to my vBadvanced Moderation module and since I couldn't find it anywhere, I kinda hacked one together.
I'm not a coder..and don't really 'get' php too well...but it worked for me, so here ya go.
trackpads
11-22-2004, 10:05 AM
Excellent Hack! Installed
trackpads
11-22-2004, 10:37 AM
Quick question, is there a way to give users points for Ushop with this? I am unsure as to what the code would be to add +1 to the uttpoints column in the user table.
Thanks again,
-Jason
urmyantichrist
11-22-2004, 08:46 PM
vbindex integration..
in vbindex.php (or whatever you renamed it to) find:
'vbindex_customblock_6'
and change it to:
'vbindex_customblock_6',
'randomquote'
next find:
// ## USERS IGNORE ##
if (trim($bbuserinfo['ignorelist'])) {
$ignorelist = 'AND thread.postuserid NOT IN ('.str_replace(' ', ',', $bbuserinfo['ignorelist']).')';
}
and add BENEATH it:
$result_quote = $DB_site->query("
SELECT quotes.*,user.username AS quotename FROM quotes AS quotes
LEFT JOIN ".TABLE_PREFIX."user AS user ON (user.userid = quotes.userid)
ORDER BY rand() LIMIT 1
");
while ($quote = $DB_site->fetch_Array($result_quote)) {
$randomquote = $quote[quoteid];
$randomquote[quote] = $quote[quote];
$randomquote[author] = $quote[author];
$randomquote[userid] = $quote[userid];
$randomquote[username] = $quote[quotename];
$randomquote[approved] = $quote[approved];
}
$DB_site->free_result($result_quote);
eval('$showrandomquote .= "' . fetch_template('randomquote') . '";');
Then edit your VBINDEX template and place:
$showrandomquote
after:
$home[news]
You can actually place $showrandomquote anywhere you`d like the quotes to show up..
I can't get this to work... No errors, just not getting ANYthing! Any tips?
memobug
11-23-2004, 12:44 AM
This looks like fun. I'd like to see three additional fields for classic quotes
1) Who said it
2) Date of quote
3) Link to quote in context
Who submitted the quote doesn't matter so much to me...
Regards,
Matt
trackpads
11-23-2004, 01:29 AM
This looks like fun. I'd like to see three additional fields for classic quotes
1) Who said it
2) Date of quote
3) Link to quote in context
Who submitted the quote doesn't matter so much to me...
Regards,
Matt
Ditto.
Great Hack!
TwinsForMe
12-07-2004, 03:53 AM
* TwinForMe clicks install. :)
Love it!
I modified the global.php instead of the index.php, then changed the Forumdisplay, Forumhome, Showthread, and search_results templates. I also took out the 2 /br's at the end of the navbar template and I took out the final /br from the randomquote template so my forums and threads don't get too pushed down. Plus I took out the "Random Quote" bar in the table of the randomquote template.
You can take a look here:
http://www.twinteresting.com/forums/index.php?
nice job.
I think admin should be able to
- list all of quotes in AdminCP
- edit/delete quote in AdminCP
- set a quote status active/inactive (bring an active quote back to moderating list)
- select and delete multiple quotes in AdminCP
and, the quote manager in AdminCP right now, just list only one quote at a time? I think all quotes (waiting for moderated) should listed
Right now, you (admin) can delete quote in the quote list, but that shouldnt be the place where you manage things though :)
and, sometime, people just have some typo, or you want to change something, you should be able to change both quote and author
Okay, I was wondering if anyone could help me out with the "view all" page. Mine is all jumbled together and looks not so good.
Screenshot of the mess:
http://turbidblue.com/images/random.jpg
I saw Magnus posted that it was done with template edits, but what are the edits to get each quote in its own little box??
Thanks for any help/advice you can provide :)
xoxo
The quickest way is adding a horizontal line bellow each quote.
Edit template quotelistbit
add
<tr>
<td class="alt1" align="center" colspan="2"><hr></td>
</tr>
above the last </table>
I would suggest to use alt1 and alt2 for each quote too, just like they are for posts. :)
The Dok
12-11-2004, 12:36 AM
Is there anyway to have two different quote boxes pulling qoutes from separate databases of quotes?
Anyone got this working in 3.03?
trackpads
12-19-2004, 10:19 PM
Yes, works great on mine!
MTHA: Thanks for that!!
-Jason
CtrlAltDel
12-26-2004, 09:55 PM
i wrote my own quote hack for 2.x and i had a button that allowed people to submit a post for a quote. do you plan on adding this to your hack or should i just add it onto it?
CtrlAltDel
12-30-2004, 01:54 AM
ok after looking at this the code used to pick the random quote is flat out wrong
SELECT * FROM quotes WHERE approved=1 ORDER BY rand() LIMIT 1
change it to this
SELECT *, rand() AS r FROM quotes WHERE approved='1' ORDER BY r LIMIT 1
This is a more accurate and more server friendly query.
memobug
12-30-2004, 05:05 AM
What is wrong or inaccurate about it? ORDER BY RAND() has worked since MySQL 3.23.3 and initialization was dubugged in 3.23.56. Select RAND() might have some other issues:
http://www.sitepoint.com/forums/showpost.php?p=34501&postcount=3
What makes it more server friendly?
Regards,
Matt
CtrlAltDel
12-30-2004, 05:19 AM
I have added a to this addon and given it the ability to have a button in each post that will submit the post to the quote database for approval. What happens is that you see the button in the post, I have a button by the 'edit post' button and the user presses the button. They are then sent to the 'add quote' page with the username/quote text all filled in from the post. The user can then proofread the submission and then hit the submit button. All works great, and you dont have to worry about search bots automatically submitting quotes this way either.
Here is what you'll need to do.
Find this in quotes.php
?>
Add this above it
if ($_REQUEST['do'] == 'post')
{
$post_quote = $DB_site->query("SELECT username, pagetext FROM post WHERE postid=$postid");
while ($postinfo = $DB_site->fetch_Array($post_quote))
{
$author = $postinfo[username];
$quote = $postinfo[pagetext];
}
eval('print_output("' . fetch_template(quote_addquote) . '");');
}
You now need to make some template changes.
First open quote_addquote
Find
<input type="text" class="bginput" name="author" size="25" maxlength="75" /></td>
Replace it with
<input type="text" class="bginput" name="author" size="25" maxlength="75" value="$author" /></td>
Find
<td class="alt1"><textarea name="quote" rows="10" cols="50"></textarea>
Replace it with
<td class="alt1"><textarea name="quote" rows="10" cols="50">$quote</textarea>
Now open your postbit or postbit_legacy template, whichever you use. You can choose to put your button/text wherever you would like, but I'll show you where I put mine. My code also has a button that I put in there too, so dont be suprised if you just cut/paste/upload and there is a mysterious redx :) I know I should have added a phrase, but I didn't, you can if you would like as well.
Find
<if condition="$post['editlink']">
Add above it
<a href="/forum/quotes.php?do=post&postid=$post[postid]"><img src="$stylevar[imgdir_button]/quoteit.gif" alt="Submit post for quote database" align="middle" border="0">
And thats about it, now your users should have the abilty to automatically fill in an 'add quote' request form, straight from a post. A feature that is a huge hit on my website so I thought I'd share it.
Questions/Problems, shoot me a PM.
docvader
12-30-2004, 06:23 AM
Very well done. Also like CtrAltDel's addition, should be added into v2 in my opinion.
I have a problem; my add quote page does not put the input author box next to the author; for some reason, it sits above it. Here's the template code:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head><title>$vboptions[bbtitle] - $vbphrase[add_a_quote]</title>
$headinclude
</head>
<body>
$header
$navbar
<form action="quotes.php" method="post">
<input type="hidden" name="s" value="$session[sessionhash]" />
<table cellpadding="$stylevar[outerborderwidth]" cellspacing="0" border="0" class="tborder" width="$stylevar[tablewidth]" align="center"><tr><td>
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr>
<td class="thead" colspan="2"><b>$vbphrase[add_a_quote]</b></td>
</tr>
$logincode
<tr>
<td class="alt2"><b>$vbphrase[quote_author]</b></td>
<input type="text" class="bginput" name="author" size="25" maxlength="75" value="$author" /></td>
</tr>
<tr>
<td class="alt1" valign="top"><b>$vbphrase[quote_text]</b></td>
<td class="alt1"><textarea name="quote" rows="10" cols="50">$quote</textarea>
</tr>
</table>
</td></tr></table>
<br />
<table cellpadding="2" cellspacing="0" border="0" width="$stylevar[tablewidth]" align="center">
<tr>
<td align="center">
<input type="submit" class="button" value="Submit" accesskey="s" />
<input type="hidden" name="do" value="add" />
</td>
</tr>
</table>
</form>
$footer
</body>
</html>
Any reason why the "input author" box does not line up next to the "author" designation?? Stock install, did not hack this hack at all.
Thanks,
rich
http://x.russbo.com/vb/index.php
docvader
12-30-2004, 06:39 AM
ok after looking at this the code used to pick the random quote is flat out wrong
SELECT * FROM quotes WHERE approved=1 ORDER BY rand() LIMIT 1
change it to this
SELECT *, rand() AS r FROM quotes WHERE approved='1' ORDER BY r LIMIT 1
This is a more accurate and more server friendly query.
What file is this change in? Can't seem to find it in quote.php
CtrlAltDel
12-30-2004, 06:45 AM
What file is this change in? Can't seem to find it in quote.php
it'd be in index.php or wherever you decided to put that code from the install file.
docvader
12-30-2004, 07:02 AM
Thanks. That was fast. It was in the install file. Love your addition, with respect to the postbit. Do you have any idea why my tables are screwed up in the "add quote" section?
You can see it in action at http://x.russbo.com/vb/index.php
rich
CtrlAltDel
12-30-2004, 07:36 AM
I'd try and help but maybe you could post a screenshot of your issue, since you have to register to get to see that on your site.
docvader
12-30-2004, 12:30 PM
I believe that this:
<input type="text" class="bginput" name="author" size="25" maxlength="75" value="$author" /></td>
should be this:
<td class="alt1"><input type="text" class="bginput" name="author" size="25" maxlength="75" value="$author" /></td>
Otherwise, the author input box gets put above and out of the table.
And, to keep the colors consistent, I make this:
<td class="alt2"><b>$vbphrase[quote_author]</b></td>
td class="alt1". But that's my preference.
This seems to work for me.
Deyth
12-30-2004, 02:44 PM
Has anyone tried to use this with 3.0.3?
trackpads
12-30-2004, 02:59 PM
Has anyone tried to use this with 3.0.3?
Yup, works great on my 3.03
Deyth
12-30-2004, 03:50 PM
I added the hack, followed the instructions, turned it on, and I don't see anything. Is it because there are no quotes in the table? If so, how are quotes to be submitted?
Deyth
12-30-2004, 04:10 PM
It's showing up in one style but not the other yet I modified the FORUMHOME template in both the same way.
Edit:
Turns out the installation only put in custom templates for one style instead of all. Anyone know a quick fix for this?
Deyth
12-30-2004, 04:46 PM
I found a hack (https://vborg.vbsupport.ru/showthread.php?t=72288) that does this easily and am sharing it here for anyone else that will encounter this same problem later. You have to copy over quotelistbit, quote_addquote, quote_delquote, quote_listquote, randomquote.
Deyth
12-30-2004, 08:22 PM
Your query isn't checking quotes.approved = 1
Yeah just noticed that as I was looking at the code.. I changed your query to:
$result_quote = $DB_site->query("
SELECT quotes.*,user.username AS quotename FROM ".TABLE_PREFIX."quotes AS quotes
LEFT JOIN ".TABLE_PREFIX."user AS user ON (user.userid = quotes.userid)
ORDER BY rand() LIMIT 1
");
while ($quote = $DB_site->fetch_Array($result_quote)) {
$randomquote[quoteid] = $quote[quoteid];
$randomquote[quote] = $quote[quote];
$randomquote[author] = $quote[author];
$randomquote[username] = $quote[quotename];
}
$DB_site->free_result($result_quote);
eval('$showrandomquote .= "' . fetch_template('randomquote') . '";');
and then you can place $randomquote[username] where you want the submitters username to show :)
CtrlAltDel
12-31-2004, 04:17 AM
It's showing up in one style but not the other yet I modified the FORUMHOME template in both the same way.
Edit:
Turns out the installation only put in custom templates for one style instead of all. Anyone know a quick fix for this?
yeah just make your default style another style
run the install script and just install the templates and they'll get laid down
it runs on 3.0.3, thats what im running and my addon works with that too
yeah my addon wasnt perfect, thanks for the clean up guys
anarchystar
01-09-2005, 07:23 AM
I tried to install quote-it 1.2 in vB 3.0.5 into my test site and got the following error when I turned the option on.
Database error in vBulletin 3.0.5:
Invalid SQL:
SELECT * FROM quotes WHERE approved=1 ORDER BY rand() LIMIT 1
mysql error: Table 'database_-_test.quotes' doesn't exist
mysql error number: 1146
I turned it off again, and everything is fine. I'm wondering if this problem is specific to 3.0.5?
Deyth
01-09-2005, 03:27 PM
I tried to install quote-it 1.2 in vB 3.0.5 into my test site and got the following error when I turned the option on.
Database error in vBulletin 3.0.5:
Invalid SQL:
SELECT * FROM quotes WHERE approved=1 ORDER BY rand() LIMIT 1
mysql error: Table 'database_-_test.quotes' doesn't exist
mysql error number: 1146
I turned it off again, and everything is fine. I'm wondering if this problem is specific to 3.0.5?
It's saying the quotes table doesn't exist. I don't think any vBulletin upgrades would drop tables it doesn't even expect to be there.
Silverdawn222
01-09-2005, 03:31 PM
Edit: Never mind, fixed my own problem.
Deyth
01-09-2005, 04:29 PM
Looks like the upgrade from 3.0.3 to 3.0.5 knocked it out for me too although I can't figure out why yet. Did anyone else do the upgrade?
Deyth
01-09-2005, 04:39 PM
Ok it knocked out the settings. Just rerun these 2 queries:
INSERT INTO setting (varname, grouptitle, value, defaultvalue, optioncode, displayorder, advanced, volatile) VALUES ('showquote', 'forumhome', '0', '0', 'yesno', 5, 0, 1)
INSERT INTO setting (varname, grouptitle, value, defaultvalue, optioncode, displayorder, advanced, volatile) VALUES ('moderatequotes', 'forumhome', '0', '1', 'yesno', 6, 0, 1)
That will get them to display at least. I'm still getting errors when I try to add, it's missing the value for $vboptions[moderatequotes] even though I figured the above would insert it.
anarchystar
01-10-2005, 04:34 AM
I did'nt do an upgrade, I tried to install quote-it on a fresh copy of vb3.0.5 ... but for some reason, it looks like the install script did'nt insert the table into my database. ... weird ...
:rolleyes:
Mr.Monkey
01-10-2005, 02:30 PM
The database is there if you ran the script (try using phpmyadmin to see it), but the script appears unable to call it after the 305 patch is installed.
Deyth
01-10-2005, 02:57 PM
I still haven't figured out why the values in $vboptions aren't there. I can get the quotes to show up but when someone tries to do an add it fails because the $vboptions[moderatequotes] value is blank. Maybe that's all related.
Cap'n Steve
01-13-2005, 04:56 AM
I don't want to complain, but magnus hasn't posted in this thread in 8 months. Maybe it's time for someone else to try making a rating system?
anarchystar
01-13-2005, 06:20 AM
I eventually did get this to work just fine in 3.0.5, I just had to add the sql table prefixs, and correct one one line in quotes.php.
I am trying to find the the line now that redirects the user after the quote is added. i want to change it to go to my homepage, and not the forum index page. hav'nt found it yet though ... any ideas?
memobug
01-13-2005, 10:14 AM
I apologize for not knowing the ins and outs of your hack. However, I wanted to have a Quote of the Day that will remain the same throughout the day. I was thinking that this would allow people the opportunity to think about the quote, contemplate and reply to it rather than having different quotes fly by with every refresh.
I gather from the mysql I see that yours does not do this (from INDEX.PHP mod step 4a. in part:
SELECT * FROM quotes WHERE approved=1 ORDER BY rand() LIMIT 1
This appears to be a simple random query that would change on every refresh? Anyway, after researching this a little, I have the following suggestion as an alternative, using the date as a seed to give a consistent quote throughout the day:
SELECT * FROM quotes WHERE approved=1 ORDER BY RAND(TO_DAYS(NOW())) LIMIT 1
Which I believe will produce this result The problem I have found in other applications is: if someone adds a quote to the database, the quote of the day will shift because the total number of rows changes. At least that is what I have found to be true in another hack. This isn't necessarily a terrible result, but it is not the intended operation, and I would be interested if anyone knows a method to keep the quote random but changing daily.
Anyway if someone wants to try this it would be of interest to me. I am not currently using this hack, but would be interested in the result.
Regards,
Matt
Deyth
01-13-2005, 01:39 PM
I eventually did get this to work just fine in 3.0.5, I just had to add the sql table prefixs, and correct one one line in quotes.php.
I am trying to find the the line now that redirects the user after the quote is added. i want to change it to go to my homepage, and not the forum index page. hav'nt found it yet though ... any ideas?
Can you post the details of what you did? I still get errors when someone tries to add a quote.
docvader
01-14-2005, 05:27 AM
Can you post the details of what you did? I still get errors when someone tries to add a quote.
Yes, I wiped mine out too with the 3.05 upgrade. Would greatly appreciate a nicely detailed explanation as to how you fixed it anarchystar.
Nice name, by the way. You'll have to tell us how you came up with that one.
rich
I upgraded to vB 3.0.5 and lost Quoteit in part. I have made the changes to the php files as outlined in the quoteit_readme_txt file and have verified that the custom templates for QuoteIt are still present as well as the template changes necessary. But I'm still not getting a display of QuoteIt on the forum. Any idea what's missing? If I runa reinstall will I lose our database of quotes? Where are the quotes located?
nineball
01-16-2005, 01:58 PM
I had the same problem.
I went into the install script for quote php and copied and pasted the insert of the settings and put them into phpmysql and reinserted them. It seems that as part of the upgrade the settings get wriped out.
I then go into the forum home settings and set it to display on the forum home.
That is the only change I made and everything works fine
docvader
01-16-2005, 06:00 PM
I tried that (this method worked for the Webpage / Guestbook hack), but I'm getting mysql errors
An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: You have an error in your SQL syntax near '" . TABLE_PREFIX . "phrase (languageid, varname, text, phrasetypeid) VALUES (0, ' at line 1
Did you do something with the "table prefix" comment? Take it out? (I don't have prefixes in my database, as I was an upgrade from vb 2.xx)
docvader
01-16-2005, 06:25 PM
OK, maybe someone can figure this out.
My phrases and templates are all in there. However, when I add a quote directly to the quotes.php page, I get this response:
Database error in vBulletin 3.0.5:
Invalid SQL:
INSERT INTO quotes (quote, author, userid, approved) VALUES ('this is a test submission to get this working again.', 'xxxxx', 1, )
mysql error: You have an error in your SQL syntax near ')
' at line 2
mysql error number: 1064
Date: Sunday 16th of January 2005 12:15:45 PM
Script: http://x.russbo.com/vb/quotes.php
Referer:
Username: xxxx
IP Address:xxxxxxxxxxx
It's trying to call to $vboptions[moderatequotes], which is in quotes.php.
The quotes are all still in the database; the upgrade did not affect them.
Should we reinsert the sql queries like this:
INSERT INTO setting (varname, grouptitle, value, defaultvalue, optioncode, displayorder, advanced, volatile) VALUES ('moderatequotes', 'forumhome', '0', '0', 'yesno', 6, 0, 1)
instead of what's called for in the instructions:
INSERT INTO " . TABLE_PREFIX . "setting (varname, grouptitle, value, defaultvalue, optioncode, displayorder, advanced, volatile) VALUES ('moderatequotes', 'forumhome', '0', '0', 'yesno', 6, 0, 1)
Anyone have any idea?
well ok, I tried this once on a new install of 3.0.5 and it didn't work so I tried running the sql queries again. didn't change anything
so I completely removed my test forum and database
new install and fresh database.
same thing. any ideas? I"d really like this on my site.
has everyone given up on this?
Deviant++
01-21-2005, 06:32 PM
you mean this mod dosn't work on 3.0.6 ? :(
docvader
01-21-2005, 09:54 PM
you mean this mod dosn't work on 3.0.6 ? :(
It stopped working on 3.05, and we can't figure out how to get it to function. It's a shame, because it was one of the more popular hacks that I have on my site. I really wish someone would figure this out.
TurboTwoLiter
01-21-2005, 10:50 PM
same here, i had it on my old site, upgraded to 3.0.5 after server failure,
i wish it was compatable :(
I tried it on a fresh install of 3.0.5 twice with no luck.
CtrlAltDel
01-22-2005, 04:51 AM
I figured it out.
For some reason the VB 3.0.5/6 upgrade somewhere along the line kills the 'Forum Home Page Settings' database table...or at least nukes the entry needed for the quotes thing. So basically, nothing is broken, but its just like you check the 'off' button for the quotes.
You need to rerun this query.
INSERT INTO setting (varname, grouptitle, value, defaultvalue, optioncode, displayorder, advanced, volatile) VALUES ('showquote', 'forumhome', '0', '0', 'yesno', 5, 0, 1);
and this one
INSERT INTO setting (varname, grouptitle, value, defaultvalue, optioncode, displayorder, advanced, volatile) VALUES ('moderatequotes', 'forumhome', '0', '0', 'yesno', 6, 0, 1)
If your table has a prefix, put that on there.
Then go into your home page options and re-enable the settings.
Everything should be back to normal now.
docvader
01-22-2005, 05:45 AM
YOU ARE THE MAN!
Impressive...
(but the "add to quotes" funcition, in each postbit, draws a white page of death).
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.