-
BB code generator?
I'm really needing some sort of script that will generate BB code when some one fills in the form with the image name. Does that make sense to any of you? It would only need one text entry field and only need to generate one line of code around the submitted text.
I appreciate any help 
Monica
-
-
So you can it to write the BB code, not parse it?
That's pretty easy.
However, you'll need to give a bit more information:
What, exactly, does this BB code do? Is it just an image tag?
Secondly, and more importantly, what BB code should it generate?
Using PHP (or another similar language-- even, though not preferably, Javascript) you can generate a line of text with variables without much trouble at all. It's just a matter of fill in the blanks.
As an example,
<?php echo '[img='.$_POST['img'].']'; ?>
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
The Following User Says Thank You to djr33 For This Useful Post:
-
Yes, just a basic image tag...
[ IMG ]http://www.mywebsite.com/theimage.jpg [ /IMG ]
Basically I am wanting my users to be able to copy and paste an image name into a form input field, click submit, then be able to copy the generated code.
I am allowing my users to hot link images for forum posts (phpbb, IPB, vBulletin) and I thought a code generator on the page would save me time and space... That way I wouldn't have to write each code and place it below each image.
Thank you
-
-
I really need help guys. I have no clue how to create this myself. 
Um, I found a table generator that is sorta comparable to what I am needing. http://www.2createawebsite.com/build...generator.html
OK, users fill in info, click generate, and voila... code. I need something with one text entry field, to generate the appropriate code around the text entered. Which in this case would be a file name. It would generate the same code each time, just with the users file name.
-
-
I gave you the information already, in general terms.
<?php echo '[img]'.$_POST['img'].'[/img]'; ?> will fit what you need.
Now, just submit a form using method="post", and a field with the image's url as name="img".
OR you can replace $_POST['img'] with another variable like $img, if you can get the data another way.
But I don't know what you're using to get the img's url, so I'm not sure how to output it.
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
-
You must think I am smarter than I am... heh, heh... 
I do appreciate your help, Thanks
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks