boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Random Quotation Generator

 
Post new topic   Reply to topic    boardom Forum Index -> Hacks
View previous topic :: View next topic  
Author Message
Joseph



Joined: 28 Oct 2002
Posts: 27
Location: Waterloo, Canada

PostPosted: Wed Jan 01, 2003 12:11 pm    Post subject: Random Quotation Generator Reply with quote

This isn't a complex hack, but I thought I'd post if for those of you who aren't experienced enough, or are too lazy to do it yourself Smile It simply shows a random quote in your template.

Take a look at http://joseph.hyrum.net on the left near the top left to see what I mean.

You can get the file at http://joseph.hyrum.net/b2quotes.php.txt

Cheers.
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Joseph



Joined: 28 Oct 2002
Posts: 27
Location: Waterloo, Canada

PostPosted: Sat May 31, 2003 5:51 am    Post subject: Update Reply with quote

I was asked to update these links.

You can see it in action at http://www.redpointlife.com/joseph/index.php and you can get the source code at http://www.redpointlife.com/joseph/b2quotes.php.txt
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
xytx



Joined: 24 May 2003
Posts: 48

PostPosted: Sat May 31, 2003 3:22 pm    Post subject: Reply with quote

looks like a really nice, i'm gonna download it and try it! but can it be somewhere besides the left side? bottom of your blog maybe?
Back to top
View user's profile Send private message
alison



Joined: 20 May 2003
Posts: 38
Location: Madison, WI

PostPosted: Sat May 31, 2003 10:57 pm    Post subject: Reply with quote

Thanks! You rock.

Sorry for being dopey and just leaving a comment asking you to update this, but that me: dopey.

-a
Back to top
View user's profile Send private message Visit poster's website
grumm3t



Joined: 31 May 2003
Posts: 4

PostPosted: Thu Jun 05, 2003 12:32 am    Post subject: Reply with quote

You can also do this really simply with a MySQL database, using the query as such:

$query = "SELECT * FROM b2quotes ORDER BY RAND() LIMIT 1";
$sql = mysql_query($query) or die(mysql_error());
$row = mysql_fetch_array($sql);
echo '"'.stripslashes($row['quote']).'" -- '.stripslashes($row['name']);

that last line works if your quote column is 'quote' and the sayer column is 'name'.
Back to top
View user's profile Send private message
anportiale



Joined: 22 Jul 2003
Posts: 6
Location: Pennsylvania

PostPosted: Wed Jul 23, 2003 3:05 pm    Post subject: Thanks :) Reply with quote

I was surprised to see this on here mainly because I have looked at your website numerous times now haha. I am just begining to work on my blog and I have been looking at random ones for inspiration, and I must say I like yours a lot.

Thanks very much for the code... sure beats me writing it hahaha. Smile
Back to top
View user's profile Send private message Visit poster's website AIM Address
Mizkie



Joined: 19 Mar 2003
Posts: 51
Location: Bloomington, IN

PostPosted: Wed Jul 23, 2003 7:18 pm    Post subject: Reply with quote

that's nice... Now I just wish I had some quotes to use.
_________________
Mick

HSS = High School Sucks
Back to top
View user's profile Send private message Visit poster's website AIM Address
XianghuaALPHA



Joined: 05 Aug 2003
Posts: 79
Location: Tulsa, OK

PostPosted: Wed Aug 20, 2003 8:01 pm    Post subject: Reply with quote

Hah. I was sooo at your site for the Book listing hack demonstration and went "damn I need a good reliable hack for this whole random quote generation thing - something b2 friendly because I suxor at php still - and would need something simple" - all these pages pulling up to me trying to find via a search to get a hack for a _targetBlank hack btw - and BAM - this is the next browser window I have open...


Your tut. looks to = too good. I think I shall [try to] use this and hopefully can make it through this one haha - thanks!
_________________
[ [ - - There can be only 2 or 3 - - ]]

You know what. On a quite board - you end up talking to yourself alot....


Friends don't let friends play Tekken™
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Hacks All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2 © 2001, 2002 phpBB Group