andy's php projects
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Script and site usage:
All of the scripts on this site are provided free for non-commerical, personal or non-profit use. If you find these scripts useful to you, appreciate the free support, or are just an all round nice person, then why not donate a little dosh? If you wish to use any of these in a commercial system, please refer to the payment plan.


can i do this?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php.amnuts.com Forum Index -> MadLibs
View previous topic :: View next topic  
Author Message
tommy
Newbie


Joined: 24 Sep 2005
Posts: 1

PostPosted: Sat Sep 24, 2005 10:38 am    Post subject: can i do this? Reply with quote

hi, I like your script! i want to be able to have more than one word for a box. this is what i mean, your story, so for the first box i can type in different things like cool,fun,great in the same box

then it would be cool if there was a button on the story page called switch that everytime you click it, it uses the next word, and do that for all the boxes!

everytime i press switch it looks like:

I've bought a new printer. It's so cool that I've named
I've bought a new printer. It's so fun that I've named
I've bought a new printer. It's so great that I've named

then it goes back to

I've bought a new printer. It's so cool that I've named

the next itme i push it

how can I do that?

tommy
Back to top
View user's profile Send private message
amnuts
Site Admin


Joined: 01 Sep 2002
Posts: 662
Location: East Sussex, England

PostPosted: Mon Sep 26, 2005 5:44 am    Post subject: Reply with quote

Hi, and welcome to the board.

Hmm.. Well, I would probably start by adding new tags for the multi words, such as MULTI_NOUN, MULTI_VERB and so on. This will allow you to give instructions about how to enter the words (what delimiters to use, etc.) to the user.

Then in the displayMadlib() method, check to see if any of the MULTI_x tags were used. If so, add a form down the bottom of the story with various hidden elements. You'd basically replicate the form in showForm() but have everything as type="hidden", and then show a submit button. Also included in the form would be a counter to show how many times it's been displayed.

Then also update the displayMadlib() method so that it checks for the counter form variable and shows the desired word.

Something like that, anyway. Smile

Andy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php.amnuts.com Forum Index -> MadLibs All times are GMT - 5 Hours
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 © 2001, 2005 phpBB Group