View Full Version : The Ultimate Quote Hack!!
KuraFire
05-21-2002, 10:00 PM
IF THIS HACK DOESN'T RANDOMIZE WELL FOR YOU, DO THIS:
(by Boofo)
"You need to change the RAND() to RAND(NOW()) to make it more random with the new versions of mySQL since version .54
The NOW will seed it and make it more random that it was before. "
That should fix the problem for a lack of randomized quotes.
ALSO NOTE THIS:
There's a bit of code going around that's 'unofficial' (ie. looks like it's from this hack, but it's adjusted and now flawed), saying "ORDER BY id" in the Query that gets the random quote. This is BAD CODE as it doesn't randomize anything at all. It should say "ORDER BY RAND(NOW())" instead.
</end Hack Issue Fix>
*drumroll*
It's here! :D
What does this hack do:
* it's an extension (big time!) on the Admin-only controlled hack I released earlier. If you installed that hack already, it should be pretty clear for you which steps you should ignore in the Instructions for this hack. What you Cannot ignore is the step about your Admin Panel, and the lines to add to admin/index.php !
* It lists a random quote either on your Forum Home, or in your Header. Next to that, it adds a Quote List, which is just a massive database of quotes that works just like the Memberlist, but with your quotes. It's searchable, and with the Add-on (see post #2!) users can also add quotes in it (which need moderation, before showing up online).
* Quotes can be added, edited and deleted from your Admin Panel. With the add-on, you can moderate quotes from your AP as well.
* There are no hard-coded colors. All colors are taken from your style, so all pages will appear in concordance of whatever style it is you're using.
Install instructions are in the zipfile: uqh_instructions.txt
For the add-on, see the second post, instructions file: w-add_instructions.txt
Have fun!
KuraFire
05-22-2002, 08:22 AM
Attached is the zipfile with the Add-on which allows Users to add quotes themselves. Those will then fall in the moderation queue and won't appear on the site until you've moderated them in your Admin Panel.
*edit* There was one query left out in the instructions file, it's included now. See post #15 in this thread for the query, it's all you need to do if you upgraded from my former hack to this one.
KuraFire
05-22-2002, 08:22 AM
This is a screenshot of what the Quotes List looks like WITHOUT the add-on:
KuraFire
05-22-2002, 08:22 AM
This is a screenshot of what the Quotes List looks like WITH the add-on:
KuraFire
05-22-2002, 08:22 AM
This is a screenshot of the Search page for quotes:
KuraFire
05-22-2002, 08:23 AM
This is a screenshot of the Moderate Quotes page in your admin panel:
KuraFire
05-22-2002, 08:23 AM
This is a screenshot of the Add a Quote page for your users, which is part of the Add-on!
scsa20
05-22-2002, 08:25 AM
seems cool, I'll install it when I wake up this morring (oh no, forgot there's school :eek: )
afterlab
05-22-2002, 10:31 AM
Pretty kinky hack ya got there KuraFire ;). I'll install it when I get home. :D
KuraFire
05-22-2002, 10:41 AM
Sweet, the FFR is gonna have my hack?! :D
Kick-ass! ^_^
btw, I will be back to the FFR pretty soon, now that Project 3.5 is nearly done and all. :)
Heard you got the battle system working, good job man. :):up:
Boofo
05-22-2002, 10:50 AM
I just noticed after upgrading the hack, that if you try to edit a quote that has quotes around it, it does not show up in the editor. The quoter will and the letter, just not the quote. Also, it is now impossible to save a quote or edit one without filling in the quoter variable. It says that all variables must be completed. I would like to be able to save it without the quoter or letter if possible, since I will not be adding the part to my board for the listing of the quotes. Can this be done?
KuraFire
05-22-2002, 11:07 AM
Ah, yes, I haven't htmlspecialchar'd the inputs, since on my own board I use no ""s around quotes. If you want them to display around each quote (ie. "this is a quote") you should better just add " in your templates. Much easier to take them off again if you decide to, at one point.
To fix that problem though, find in your admin/quotes.php this line:
$quote=$DB_site->query_first("SELECT * FROM quotes WHERE id=$quoteid");
And add below it:
$quote[quote] = htmlspecialchars($quote[quote]);
(if you use ""s in your name input as well, add `$quote[name] = htmlspecialchars($quote[name]);` below that).
The other issue: if you save without a letter, the quote will not show up in the Quotes List, Ever. And if you intend to disband the Quoter (Name) part, you can just fill in a dash ( - ) or so for the quoter name, or "Unknown" or whatever. Filling in nothing is a bad idea.
Database error in vBulletin Control Panel 2.2.4:
Invalid SQL: SELECT * FROM quotes WHERE mod='N'
mysql error: Unknown column 'mod' in 'where clause'
mysql error number: 1054
Database error in vBulletin 2.2.4:
Invalid SQL: SELECT *
FROM quotes
WHERE 1=1 AND mod!='N'
ORDER BY letter,name ASC
LIMIT 0,30
mysql error: Unknown column 'mod' in 'where clause'
mysql error number: 1054
Help! (These errors are from when I installed the second addon hack) The first hack worked fine :(
KuraFire
05-22-2002, 11:30 AM
Hmmm. The zipfile didn't update my new query it seems..
John, run this query on your quotes table:
ALTER TABLE quotes ADD mod VARCHAR(1) NOT NULL;
That should fix it. *goes update the zipfile again, hoping it WILL add the new query file this time*
KuraFire
05-22-2002, 11:50 AM
I updated the second post, with the instructions for the Moderation add-on. It now includes the query in post #15 in its instructions. The original file is untouched though, since the original hack doesn't need the mod column. :)
Glad it works, JW :):up:
Kura, I've love to see something on the front page of the AdminCP like "There are currently [number] quotes awaiting moderation." - I can see myself forgetting tha people have added quotes :(
KuraFire
05-22-2002, 12:10 PM
Erm, I'll see what I can do.
If you prefer, I can also write a line of code that will e-mail you whenever a user adds a new quote... though this could become quite tedious & annoying if you have a lot of users. :)
I'll let you know in this thread once I have it done, okay? :)
Originally posted by KuraFire
Erm, I'll see what I can do.
If you prefer, I can also write a line of code that will e-mail you whenever a user adds a new quote... though this could become quite tedious & annoying if you have a lot of users. :)
I'll let you know in this thread once I have it done, okay? :)
How about a PM that is sent to a specified user (i.e. the admin) at a set time each day to inform of new quotes?
So, at the time "6.00pm" a PM is sent to the admin "John" if there are any new quotes for moderation.
e.g.
"Hi [admin's name], there are [number of new quotes] new quotes waiting to be moderated. Click here to moderate them"
KuraFire
05-22-2002, 12:28 PM
That's WAY more complex than the admin panel home thingy! :eek:
Too ****ing complex, for my taste. :)
This is what to do if you installed Freddie's Quick Stats hack, for your admin panel home:
Find in admin/index.php :
$mysqlversion = $DB_site->query_first("SELECT VERSION() AS version");
ADD BELOW:
$quotesmod = $DB_site->query_first("SELECT count(*) AS count FROM quotes WHERE mod='N'");
FIND:
makelabelcode('New Posts Today:', $newposts['count']);
ADD BELOW:
makelabelcode("Quotes awaiting <a href=\"quotes.php?s=$session[sessionhash]&action=moderate\">moderation</a>:", $quotesmod['count']);
(edited: I turned "moderation" into a link, even easier now ^_^)
Again, this is if you have Freddie's hack already installed. If not, then you'll have to do a manual output of some kind. The query to add doesn't need changing, though the output will probably need changing if you don't have Freddie's hack.
And with this, it'll display "Quotes awaiting moderation: [number]" in your Admin Panel Home. :)
Boofo
05-22-2002, 12:35 PM
Thanks, that fixed my problem. It might not be a bad idea to add that to the quotes.php in your hack in case someone esle runs into that. :)
As far as having to put a name or letter in, with the editing capabilites, that is something that could always be done later if someone decided to go that route. I will never use that on my site as I will not doing the quote listing for the users. :)
Originally posted by KuraFire
Ah, yes, I haven't htmlspecialchar'd the inputs, since on my own board I use no ""s around quotes. If you want them to display around each quote (ie. "this is a quote") you should better just add " in your templates. Much easier to take them off again if you decide to, at one point.
The other issue: if you save without a letter, the quote will not show up in the Quotes List, Ever. And if you intend to disband the Quoter (Name) part, you can just fill in a dash ( - ) or so for the quoter name, or "Unknown" or whatever. Filling in nothing is a bad idea.
KuraFire
05-22-2002, 12:51 PM
to add _what_ to quotes.php ?
The Admin Panel Home moderation queue? That's an admin/index.php hack...
if not, then what? :)
Boofo
05-22-2002, 01:14 PM
The fix you gave me in Post #12, remember? :)
Originally posted by KuraFire
to add _what_ to quotes.php ?
The Admin Panel Home moderation queue? That's an admin/index.php hack...
if not, then what? :)
KuraFire
05-22-2002, 01:19 PM
Ah, yes, well, since it's a bad idea to have ""s in quotes themselves, why bother, really?
And for those who think their users will accidentally add quotes, there's two things to do: read the whole of this thread (it won't hurt them), or edit that template so that it says "Don't add ""s to your quote!" or whatever. :)
Boofo
05-22-2002, 01:24 PM
Well, whatever you think is fine by me. It was just a suggestion to avoid a lot of questions later. :) I only wanted it for the editor anyway.
MrLister
05-22-2002, 01:27 PM
Thanks, looks great
Floris
05-22-2002, 01:28 PM
Ah, very cool, .. Does this also show in the profile of a member the total amount of quotes they have added? And .. does this also show on the frontpage, the total amount of quotes in the database, and maybe on top, top quoter:
Would be nice (no, it would be sweet)
This probably is the reason I haven't seen you on IRC for a while :P You were coding leetnez
KuraFire
05-22-2002, 01:49 PM
boofo, btw, that htmlspecialchars fix isn't necessary in this hack. The hack has a TEXTAREA field for the Quote, the former hack (which you have) still used a Text Input field for the quote, but with TEXTAREA ""s don't matter anymore. So people who install this from scratch won't have a problem at all...
Boofo
05-22-2002, 01:54 PM
Do I need to upgrade anything then? Or will it work the same after adding what you told me to add? I uploaded the new quote.php (with your fix added) and did the admin/index.php, but other than that I didn't add anything else. Is there anything I should replace?
KuraFire
05-22-2002, 02:12 PM
Xiph: no, this hack does not, in any way, keep track of what user submits which and how many quotes. If you want that, use Lesane's hack. Mine is a more neutral, unbiased hack with an add-on that makes it a bit less neutral and unbiased, but still more than Lesane's.
If you want the total amount of quotes on forumhome, you should be able to easily add a query for that. Something like this:
in root/index.php find:
// get total posts
ADD ABOVE:
$quotetotal=$DB_site->query_first('SELECT COUNT(*) AS count FROM quotes');
(or, to include only quotes that are moderated, if you use the Add-on hack: )
$quotetotal=$DB_site->query_first("SELECT COUNT(*) AS count FROM quotes WHERE mod!='N'");
And I've not been in IRC much because of this and other things. Project 3.5 is 99% done, I'm almost ready to send everything online and do the online debugging before opening up. ^_^
Boofo: No, not really. The only difference really, is that the old hack used a Text Input field for Quote, and the new (this) hack uses a Textarea field for Quote, in the Edit page. That, and the new hack doesn't allow empty entries...
Roxie
05-22-2002, 04:37 PM
I don't have
// ###################### Start templates #######################
in my global.php
Roxie
05-22-2002, 04:46 PM
Nevermind. :/
Roxie
05-22-2002, 05:08 PM
Is there away to delete the quotes that come with the hack?
Thanks :)
Roxie
05-22-2002, 05:16 PM
Nevermind :/
I really should think before I ask these dumb questions.
KuraFire
05-22-2002, 07:28 PM
That's a valuable lesson in life, don't forget it. :)
;)
KuraFire
05-28-2002, 01:59 PM
Okay, out of boredom I added user-submission-tracking to this hack. It tracks which quotes a user submits, and shows the total number of quotes on their profile (only moderated quotes, not unmoderated submissions), and lastly, it uses the quotelist.php to display all the quotes that one particular user submitted, but in a silent way.
So in the end, it's got the same basic things as Lesane's hack, but taken to a whole new level with better code and a big searchable listing. :/
Instructions for user-tracking only on request by PM/mail, btw.
Kalen
05-29-2002, 02:37 AM
this may sound stupid but what is phpmyadmin? =\ thats the only part of the instructions i havent finished because i dont know what it is
KuraFire
05-29-2002, 08:26 AM
phpMyAdmin is a 3rd Party Program to run on your server. It's a graphical interface for Database control.
You can find it at www.phpwizards.net I believe, or at phpmyadmin.scourgeforge.net - most webservers have phpMyAdmin pre-installed for you anyway, so check that first!
Basically, it allows you to edit, alter, and add to your database(s). Much easier than doing all that through the mysql command prompt.
Floris
06-02-2002, 09:03 PM
Database error in vBulletin 2.2.6:
Invalid SQL: SELECT COUNT(id) AS usertotal FROM quote WHERE ok='Y'
mysql error: Table 'baz.quote' doesn't exist
mysql error number: 1146
Date: Sunday 02nd of June 2002 11:07:11 PM
Script: http://www.marietje.nl/vbb/vbb/userquote.php
Everytime a google searches my site, I get that error. I installed that extra query + result of array to display the quotetotal on the frontpage.
KuraFire
06-02-2002, 10:38 PM
Change this query in index.php
SELECT COUNT(id) AS usertotal FROM quote WHERE ok='Y'
to:
SELECT COUNT(*) AS usertotal FROM quote WHERE mod='Y'
and try again?
KuraFire
06-03-2002, 01:52 PM
Originally posted by Russ
We edited this hack ALOT on our site and now it's alot more managable by the Admins.
You're confusing my hack with Lesane's. Mine is perfectly manageable.
Originally posted by Russ
* Allow approval of quotes from one link on the Admin list, without going into the quote, checking yes, and hitting ok.
You don't have to do that with my hack. If you see a quote that needs editing, you edited, if not, you have to hit only 1 single button to moderate all new quotes at once.
So, again, I think you're looking at Lesane's hack...
Originally posted by Russ
* Allows viewing of only the quotes that need approving on the admin list, as well as still the full list.
So does mine, no need to alter that....
Originally posted by Russ
* Displays how many quotes are waiting approval directly underneath the quote on the frontpage - to admins only.
Erm, I have that for admin/index.php - can be added just as easily to ForumHome, of course...
Originally posted by Russ
That, and we've made it's size alot smaller because I didn't think it needed an entire category box for it :) - check it out on http://forums.buffydownunder.com
Attached a screenie of the admin versions...
And now I'm Quite sure that you are using Lesane's hack, since you're listing 577 quotes on a SINGLE page (that takes quite a while to load) whereas I have a searchable, paged database with an index by letter.
Sorry, but even your hacked version of Lesane's hack is something I wouldn't trade in for my own, Ever. And I really don't see how it's "more manageable" than my hack. I Really don't see it, all I see is that mine is still better, no offense.
And what do you mean by "an entire category box" ???
gulp :) wwhoopsies,
* Russ rushes to remove previous post :)
OK :)
So now that my attention has been drawn..
any quick way to ditch Lesane's one and install this one?
KuraFire
06-04-2002, 08:57 AM
well, just remove the files and file-hacks from Lesane's hack, and install this one including the 2nd post addition And the Admin Panel Extra hack that is on the first page in this thread. However, you'll want to preserve your current quotes table, so you'll have to modify that.
hmm, well that'll take too long :)
Thanks though.
KuraFire
06-04-2002, 09:18 AM
Your loss man. :p
Warlord
06-06-2002, 06:37 AM
*Hits the install button*
Nice hack bro. :D
KuraFire
06-10-2002, 12:22 PM
Okay, I'm gonna put it like this:
if you want the user-tracking add-on (to see which user added what quote(s), and the total being visible in their profile), please e-mail me at:
faruk AT kurafire DOT com
and do not, I repeat, do NOT PM me about it. I can hardly keep track of PM's, let alone any requests made in PM's.
I have one counter-demand though: I'll need to see your board before I send you the add-on instructions. So please include your board URL in the mail.
Marshalus
06-19-2002, 07:25 AM
Question, I have vBPortal on my site, and want to run this hack on all pages. I added the required code to global.php, but it doesn't display on vBPortal pages, just normal vBulletin pages.
Anyone know what I need to edit in vBPortal to get this to work?
http://www.federationstudios.net (no quotes)
http://www.federationstudios.net/forums (with quotes)
KuraFire
06-20-2002, 08:42 PM
at the end of the first page we already encountered problems with that... :/
Don't think that he (whoever he was - can't remember right now) managed to get it working, though....
Bro_Joey_Gowdy
06-23-2002, 04:28 AM
This hack works great !!
First go here and see the problem :
(note: you may need to refresh until you see the longer quotes)
http://www.joeygowdy.com/forum/
How can I get them to 'carriage return' or 'break' occasionally ?
Not sure - but I believe the error is on my behalf -
I edited the header template and changed a few things around to display the quotes on the top right side of the forum.
(note: listed in bold is what I modified)
<!-- logo and buttons -->
<center>
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" align="left" background="http://www.joeygowdy.com/forum/images/menu_background.gXX"><a href="index.php?s=$session[sessionhash]"><img src="http://www.joeygowdy.com/forum/images/logo_JesusBridgestheGap.gif" border="0" alt="$bbtitle"></a></td>
<td valign="bottom" align="right" nowrap background="http://www.joeygowdy.com/forum/images/menu_background.gif">
<center><font face="verdana,arial,helvetica" size="1" class="sf"> <BR><b><font color="#red">$thequote $thequoter </font></b><br><br><br><br><br><br><br></font></center>
<!-- toplinks -->
$register_or_controlpanel
<a href="calendar.php?s=$session[sessionhash]"><img src="http://www.joeygowdy.com/forum/images/top_calendar.gif" alt="Calendar" border="0"></a>
<a href="memberlist.php?s=$session[sessionhash]"><img src="http://www.joeygowdy.com/forum/images/top_members.gif" alt="Find other members" border="0"></a>
<a href="misc.php?s=$session[sessionhash]&action=faq"><img src="http://www.joeygowdy.com/forum/images/top_faq.gif" alt="Frequently Asked Questions" border="0"></a>
<a href="search.php?s=$session[sessionhash]"><img src="http://www.joeygowdy.com/forum/images/top_search.gif" alt="Search" border="0"></a>
<a href="index.php?s=$session[sessionhash]"><img src="http://www.joeygowdy.com/forum/images/top_home.gif" alt="Home" border="0"></a>
<!-- <a href="member.php?s=$session[sessionhash]&action=logout"><img src="http://www.joeygowdy.com/forum/images/top_logout.gif" alt="Logout" border="0"></a> -->
<!-- /toplinks -->
</td>
</tr>
</table>
<!-- /logo and buttons -->
<!-- content table -->
<table bgcolor="#FFFFFF" width="100%" cellpadding="6" cellspacing="0" border="0">
<tr>
<td>
<!-- kaotixVIBEinc -->
<script>
<!--
function jumpPage(newLoc) {
newPage = newLoc.options[newLoc.selectedIndex].value
if (newPage != "") { window.location.href = newPage }
}
// -->
</script>
<!-- /kaotixVIBEinc -->
KuraFire
06-23-2002, 06:49 PM
just put <br /> inside the longer quotes wherever you want it to start on a new line.
Bro_Joey_Gowdy
06-23-2002, 07:09 PM
Works great !!
Thanks !!
Knew it was an error on my behalf.
:D
Night Owl
06-24-2002, 12:44 AM
I originally installed this hack and the addon while running vbulletin 2.2.5. It worked great! Then I upgrade to 2.2.6 and installed vbportal.
So, I reinstalled this hack. The quote list is working, the admin cp quote add section is working (both on vbulletin and vbportal. My ONLY trouble is that the quotes aren't showing. Wugh
Any ideas?
http://www.sybermoms.com/forums/index.php
Here is the link to my vbportal main page:
http://www.sybermoms.com/index.php
KuraFire
06-29-2002, 08:07 AM
Where are your quotes to appear? And also, where did you put the quote extraction query? (in which file)
Night Owl
07-03-2002, 08:13 AM
OK, I figured out how to make the quotes appear.
However, I have had to restrict who's online access to certain groups on my board because of a security problem. But I want those restricted groups to be able to view the quoter list. How can I change the code to enable that?
Marshalus
07-04-2002, 06:34 AM
Did you get it working in vBPortal?
Night Owl
07-04-2002, 06:58 AM
I gave up on getting it to work in vbportal. Don't really want it there anyway. But I would really like to be able to let all my members submit quotes, even if they can't view the who's online.
Mathiau
07-07-2002, 06:30 PM
hey all
i simply put my quotes in a table, and the words wrap with no probs!
working on adding this add-on to it now :D
http://66.207.199.6/forums/index.php
http://66.207.199.6/matts%20stuff/quotes.gif
(hhe, keep posting that, took me forever to figure out how to make a simple table..lol still a rather newbie to this php stuff)
<!-- quotes panel -->
<table cellpadding="0" cellspacing="0" border="0" bgcolor="#000000" width="95%"
align="center"><tr><td>
<table cellpadding="4" cellspacing="1" border="0" width="100%">
<tr>
<table cellpadding="4" cellspacing="1" border="1" width="100%">
<tr id="cat">
<td bgcolor="#6D1F15" colspan="" border="1" bordercolor="#42130D" width="50%" align="center"> <normalfont color="#FFF788"><b>Random Quotes
</font></b></a></td></normalfont>
</tr>
<tr>
<td bgcolor="#F1F1F1" colspan="5">
<font face="verdana,arial,helvetica" size="2" align="center" >
<center>
$thequote<br>
$thequoter<br>
</center>
</font>
</td>
</tr>
</table>
</td></tr></table>
<!-- end quotes panel -->
KuraFire
07-17-2002, 08:15 PM
Night Owl, you can just change the permission check in quotelist.php so that ALL users can add quotes, y'know :)
Night Owl
07-18-2002, 12:05 AM
aha! Duh. Thank you!. :lol
ForKmaN
07-22-2002, 08:45 AM
I was wondering what I need to do to make it so people can see that others are browing the Quotes when they look at the 'Whoose Online' ???
Please? :D
ForKmaN
07-22-2002, 09:16 AM
Also, can we make it so its not in Alphabetical order? But isntead in the order they were submited and added?
ForKmaN
07-22-2002, 10:13 AM
Heres how i have it setup on my forums.
Combined with the Welcome Panel Hack.
KuraFire
07-22-2002, 06:58 PM
Forkman: yes, all is possible.
For making it so that the Who's Online shows it when users are looking at the Quotes List, use FireFly's excellent "Add Who's Online Locations from your Admin Panel" hack - I'm using that and it works great with the quote list.
For making the default order go by ID rather than alphabetical, just find this bit of code (around line 92 in the default quotelist.php):
if ($orderby=="") {
$orderby="letter,name";
}
And replace "letter,name" with "id". That way it'll sort by ID by default. If you want to reverse the order from what you get now, look at the three lines below these in quotelist.php, for they will define your default ORDER DIRECTION.
G'luck! :up:
ForKmaN
07-23-2002, 05:06 AM
Thank ye!
Works a charm, where is Fireflys hack? I cant seem to find it .. :(
ForKmaN
07-23-2002, 05:24 AM
Found it! :)
Works Well!
Excellent hack!
speedway
09-30-2002, 01:35 PM
If anybody is watching this thread I have a question.
What would be the easiest way to add "[All]" to the letter list? I ask because if you select a letter you cannot get back to the entire listing without clicking the link to get to the list in the first place. It would be much easier to use an "all" link.....
Any ideas? :ermm:
Cheers
KuraFire
10-02-2002, 09:42 AM
Speedway: just make a template adjustment and put a link to quotelist.php?s=$session[sessionhash] with a linktext "All" or "[all]" or whatever, somewhere in the template of the Quotelist where you want it. :)
GZ_Tanis
10-29-2002, 10:50 PM
Kura I REALLY want to add this to our forum but i noticed all your files are php we use php3. Will it still work for me? I dont want to go and add all these and not have it work :)
KuraFire
10-30-2002, 10:11 AM
GZ_Tanis: I have no idea at all if it will work. I've never written any php3 code in my life, I started learning it when they just released php 4.0.4; I never bothered to go back since I run my vBulletin on a php 4.1.2 :)
All I can say is try it out but make good, solid, _verified_ (that they work) backups first. You may have to adjust the code though, but I don't know if I can help you with that....
bahamut0
12-14-2002, 04:31 PM
hi there i have a problem i think or mabye another templeat mod/hack is interferring with this not sure.
but ill ask anyways.
everything works fine except for the fact that noone can post because the javascript won't pop -up not sure when this happened but a user informed me and i checked it if u try to post says error on page :disappointed: i can add fropm the admin cp and u can still check and veiw all quotes made but u just can't add anymore from the forumhome .
any thoughts on mabye whats stopping the javascript from loading.
KuraFire
12-15-2002, 06:47 PM
bahamut, there is no javascript in my hack, you're mixing it up with Lesane's hack.
With my hack, you go to the Quote List and then to Add Quote to add quotes. :p
bahamut0
12-15-2002, 10:13 PM
i think mabye i described that wrong :) i ment when u need to post a new qoute u press the link (add a new quote) on the message bar it says javascript: Openquote() when u press it it says error on page.
would another hack or template mod interfere with this. or should i just rehack the whole thing.
KuraFire
12-16-2002, 01:14 AM
I don't know where you got that template from, but it AIN'T FROM MY HACK!
My Hack Does Not Include Any Javascript, At All!
so if you have a javascript link to add a quote, it's either LESANE's or you made it up yourself COS IT AIN'T FROM THIS HACK!
bahamut0
12-16-2002, 03:39 AM
wow mabye me thinks i should rehack i think i may have added some lines from another hack to this by accd :( ahh well .
tweak
12-18-2002, 10:41 PM
I installed this hack but My quotes started to go random on refresh then Stopped???? Now it sits on the same one.
KuraFire
12-19-2002, 10:36 AM
No clue how to help that, sorry :)
nnjj.net
02-03-2003, 04:36 PM
thanx allllllllllllot
its great :)
KuraFire
02-04-2003, 09:08 PM
Glad you like ^_^
geniuscrew
03-05-2003, 11:44 AM
Originally posted by tweak
I installed this hack but My quotes started to go random on refresh then Stopped???? Now it sits on the same one.
You're not alone -_-
Mine just sits on ID 1 and once in a blue moon changes to ID 2
Edited: Well it changed to all of them after loads of refreshing.
I know this may sound stupid but how do I get it to get a quote in order?
// random quote hack by KuraFire
$quot=$DB_site->query_first("SELECT id,quote,name FROM quotes ORDER BY id");
$thequote = $quot['quote'];
$thequoter = $quot['name'];
doesn't work :/
Boofo
03-05-2003, 12:32 PM
You need to change the RAND() to RAND(NOW()) to make it more random with the new versions of mySQL since version .54
The NOW will seed it and make it more random that it was before.
geniuscrew
03-05-2003, 12:54 PM
Well it's changed - but now it's sitting on a different one -_-
Alien
04-09-2003, 10:37 PM
Any confirmed resolution to the above problems before I install this on my new update? I love it, I just want to make sure it randomizes properly. :)
-Jason
KuraFire
04-10-2003, 07:28 AM
It should work just fine - if it doesn't, it's more likely a problem with your server than the script, really :)
Alien
04-10-2003, 09:47 PM
Okay I shall test and report back!
-Jason
ForKmaN
04-13-2003, 01:38 PM
Wheres the latest file for this?
LilDragonWings
04-13-2003, 09:13 PM
I'm having the stuck on a quote problem as well.
At first I had the template called only for users who were logged in (I had done this inadvertantly by putting the call for the home_randomquote template right after the IF statement to test for users.) When it was setup this way, the quote was perfectly random ... However, When I discovered this, I moved the call out side of the user logged in conditional, and it no longer randoms. It stays on the first quote for both logged in and logged out users. I've tried moving it throughout my index.php
Any ideas?
**I FIXED MY PROBLEM**
Changed the random seed by using the following:
srand((double)microtime()*1000000);
$random_number = rand(1,147);
$quot=$DB_site->query_first("SELECT quote,name FROM quotes WHERE id = '$random_number'");
**************
however, you should change the 1,147 to represent the number of quotes you have (this is the range of the random number selected I believe).
I think you can stick in a query to get the number, but i just hard code it...
Good luck !
KuraFire
04-14-2003, 09:43 AM
It's a mysql issue of poor randomizing in some cases, sometimes this is fixed by flushing mysql or rebooting the server, sometimes nobody has a clue why it doesn't randomize (anymore).
There is no real need to hardcode your quote count and seed on that using PHP instead, but it's an alternative escape method I guess....
LilDragonWings
04-14-2003, 01:30 PM
I'm glad it was a mysql issue :) I only have ftp access to my server space, although my webhost will perform anything I ask them to, which is really great. Since I'm learning php/mysql as I go--glad I don't have to learn unix at the same time.
The php method was the only work around I found that worked for me, and I needed something that was reliable, and wouldn't hang without me knowing.
Thank you very much for a wonderful hack Kurafire !
KuraFire
04-14-2003, 05:42 PM
You're welcome :)
Exactly what I was looking for
/me clicks install
TheComputerGuy
07-06-2003, 06:10 PM
ever find a way to convert LEsanes over to yours?
Gutspiller
07-08-2003, 05:35 AM
Did anybody get this problem in their profile once they added this hack: http://www.theforumz.com/forumz/member.php?s=&action=getinfo&userid=1
I think it may have been caused by this hack, but I'm not completely sure. I tried removing the lines that the instructions added into the member.php file, but the problems were still there. Did the query run anything that automatically added tables into that page?
If somebody can help me out or check their own profiles on their board if they've installed this hack, it would be a great help to me.
Thanks a bunch!
Boofo
07-08-2003, 05:51 AM
The link takes you to the unregistered page. Maybe post a picture? ;)
KuraFire
07-09-2003, 09:46 PM
07-06-03 at 09:10 PM TheComputerGuy said this in Post #95 (https://vborg.vbsupport.ru/showthread.php?postid=415732#post415732)
ever find a way to convert LEsanes over to yours?
not really bothered with it, but know this: I Will be looking into it all for when I create the ultimate quote Hack for vB3. It will contain an upgrade script to upgrade either from Lesane's quote hack (or any other if one exists and is popular) and this version of the hack, so that NO quotes you have will be lost, nor will you have to re-enter all quotes manually for when you upgrade to vBulletin 3. :)
That good enough for ya? :D
Gutspiller
07-10-2003, 12:09 AM
Yesterday at 12:51 AM Boofo said this in Post #97 (https://vborg.vbsupport.ru/showthread.php?postid=416125#post416125)
The link takes you to the unregistered page. Maybe post a picture? ;)
I fixed it. I think I followed the instructions right, but I had the hacks that display "Percent of Total Views" and "Last Post Date".
I think the instructions were messed up for anybody that may have those hacks installed. I got it working by simply reorganizing some of the basic html.
Thanks though.
BTW are profiles regularly only for registered members? :confused:
Gutspiller
07-22-2003, 02:29 AM
For some reason, my quote rotation rarely rotates quotes and most of the time it will only display the very first quote that was submitted. (which was mine)
Is anybody else having this problem? I don't have that many quotes submitted, but it should still be fairly random shouldn't it?
Can somebody please help me get it so that they are more random instead of showing the same one over and over? I really want to get this hack working. :(
KuraFire
07-22-2003, 10:23 AM
Should be in this thread somewhere, already mentioned etc...
Gutspiller
07-22-2003, 04:23 PM
Seems to be working now. Not as random as I'd like, but it's working. I was looking closer in the code and it said the hack is from Lesane. I... umm... don't know it says that because you used part of a hack he did or if I now somehow have his hack mixed up with yours, but changing the the random code in my index.php fixed the hack... whos ever it was. :surprised:
KuraFire
07-22-2003, 07:46 PM
*slaps forehead and rolls eyes*
Lesane's hack is COMPLETELY different and (sorry Lesane) known to be really poorly coded, buggy, etc. etc. and overall just not work.
My hack is completely different from Lesane's, and just so you know: when I recreate my hack for vBulletin 3, there will be an install script that can insert your quotes from Lesane's hack into the new Ultimate Quote Hack (mine) for vB3, if you want.
Gutspiller
07-22-2003, 07:57 PM
Well I doubt I will be updating to VB3 since from what I've heard there will be no updating possible from any previous versions of VB. I'm not completely restarting over. Plus my forum prolly already has all the hacks that VB3 does. ;)
Thanks though. It seems to be working now.
However I did have an idea that might get me to switch to your hack. If it would be possible to comment on quotes, that would be cool. I was thinking it would be cool to have who the quote was by hidden to regular members and members had to try and guess where the quote was from. So they could be like movie quotes and it would get some discussion going. The way the hack is going right now, it seems to be working fine, but we don't have many quotes, so as we get more if I notice problems, I may switch over to yours. I think I might have tried yours and had problems with it and my VB version, but I can't remember if it was this hack or another hack.
KuraFire
07-22-2003, 08:09 PM
Commenting on quotes will be an admin-settable option for the Ultimate Quote Hack for vB3.
Hiding the Submitted By will be a usergroup setting, so you can say that usergroup X's quotes will always show the member who submitted, but people from usergroup Y who submit a quote will remain 'hidden'. :)
Gutspiller
07-22-2003, 08:44 PM
Today at 03:09 PM KuraFire said this in Post #105 (https://vborg.vbsupport.ru/showthread.php?postid=419823#post419823)
Commenting on quotes will be an admin-settable option for the Ultimate Quote Hack for vB3.
Hiding the Submitted By will be a usergroup setting, so you can say that usergroup X's quotes will always show the member who submitted, but people from usergroup Y who submit a quote will remain 'hidden'. :)
Do you think it will be possible to use it on a 2.x board? or is it completely different code wise? :(
KuraFire
07-23-2003, 06:51 AM
it'll be vBulletin 3 only, as the code will be 100% different.
DB8 MissingLink
08-04-2003, 10:23 PM
Forgive me... I'm a bit of a newbie at this. I've got everything installed and it seems to be working but I can't seem to make it randomize. I know this has been addressed above, but I spent hours trying to figure out what the solution was and couldn't figure it out. I really want to make this work!
So could someone please post a walk-through on fixing the randomizer? Ideally, with a querry instead of a hard-coded random number range.
Thank you, and great hack (if I can get it to work!)
jEd
www.net-benefits.net
KuraFire
08-05-2003, 08:27 PM
03-05-03 at 03:44 PM geniuscrew said this in Post #83 (https://vborg.vbsupport.ru/showthread.php?postid=361446#post361446)
You're not alone -_-
Mine just sits on ID 1 and once in a blue moon changes to ID 2
Edited: Well it changed to all of them after loads of refreshing.
I know this may sound stupid but how do I get it to get a quote in order?
// random quote hack by KuraFire
$quot=$DB_site->query_first("SELECT id,quote,name FROM quotes ORDER BY id");
$thequote = $quot['quote'];
$thequoter = $quot['name'];
doesn't work :/
that bit of PHP code is NOT from my hack, entirely. "ORDER BY id" did NOT come from _my_ instructions!
It should be ORDER BY RAND(NOW())
KuraFire
08-05-2003, 08:28 PM
Today at 01:23 AM DB8 MissingLink said this in Post #108 (https://vborg.vbsupport.ru/showthread.php?postid=423250#post423250)
So could someone please post a walk-through on fixing the randomizer? Ideally, with a querry instead of a hard-coded random number range.
Read the first post, or the post above this one, or Boofo's post a bit earlier in this thread (about 15 posts up). You have to use ORDER BY RAND(NOW()) in the query to make it work better.
07-22-03 at 10:57 PM Gutspiller said this in Post #104 (https://vborg.vbsupport.ru/showthread.php?postid=419819#post419819)
Well I doubt I will be updating to VB3 since from what I've heard there will be no updating possible from any previous versions of VB. I'm not completely restarting over. Plus my forum prolly already has all the hacks that VB3 does. ;)
You can update from 2.2.9 or 2.3.0.
I was running older than that myself, but I just took the queries out of the update scripts, ran those manually, and then I upgraded to vB3. Worked like a charm. It's just a few minor database adjustments that need to be made before you upgrade to vB3 :)
DB8 MissingLink
08-05-2003, 08:49 PM
Ok, just to make sure:
In global.php or index.php (depending on where you put the quote) instead of:// random quote hack by KuraFire
$quot=$DB_site->query_first("SELECT quote,name FROM quotes ORDER BY rand() LIMIT 1");
$thequote = $quot['quote'];
$thequoter = $quot['name'];you should put// random quote hack by KuraFire
$quot=$DB_site->query_first("SELECT quote,name FROM quotes ORDER BY RAND(NOW()) LIMIT 1");
$thequote = $quot['quote'];
$thequoter = $quot['name'];.
If that's right, I did it and I'm still not getting randomization.
KuraFire
08-06-2003, 12:11 AM
Yesterday at 11:49 PM DB8 MissingLink said this in Post #111 (https://vborg.vbsupport.ru/showthread.php?postid=423547#post423547)
Ok, just to make sure:
In global.php or index.php (depending on where you put the quote) instead of:you should put.
If that's right, I did it and I'm still not getting randomization.
That's right. And you should be getting randomization. Check with your webhost to see about what version MySQL they are running, and whether they shouldn't upgrade it....
DB8 MissingLink
08-06-2003, 07:39 AM
Ok, I've added NOW() to the Rand query and it's still not working. I'm running SLQ version 3.23.54 although the The client API built into PHP is only 3.23.49.
Could that be the problem? If not, any other workarounds?
jEd
KuraFire
08-06-2003, 09:16 AM
It could well be because of that, yes. Two versions of MySQL might be conflicting in areas....
Ask your host if they could synchronize that :)
Bro_Joey_Gowdy
02-16-2006, 10:42 PM
Is the available for vb3.5.3 ?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.