MyBB Community Forums

Full Version: Image caption.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I got this from http://www.phpbb3bbcodes.com/ and... i couldn't make it work like i wanted it to but it works pretty good Big Grin what it does is it adds a caption to the bottom of your pictures so you don't have to add text size code and all that so it saves a bit of time HAHA Toungue but i hope you like it.


Title:
Image Caption

Short Description:
Adds a little description or caption to your pictures

Regular Expression:
\[caption=(.*?)\](.*?)\[/caption\]

Replacement:
<img src="$1"><p style="font-size:.8em;line-height:.95em;text-align: justify;">$2</p></div>

It will look like:
[attachment=15121]


Live Demo:
http://demo.mycodecorner.cz.cc/showthread.php?tid=4

http://MyCodeCorner.cz.cc -- The best place for all you MyCode needs.
What's the difference to the following?



[Image: logo.png]
My site logo lawl don't forget to visit http://mybbsource.com/



Can be done with existing MyCodes alright. Rolleyes
you used... [size] right? thats the whole point of this is to save a bit of time and not use [size] but instead just use [caption]

LOL But as a n00b thats the best i could do Toungue
Sorry dude but like what do you mean? You want the image to be at the top of the post?
@JohnMartin.... Surely, unless i'm missing the point here, if you want the image above the caption then upload the attachment, then use the caption below the image. Similarly use the caption first and the image will show below it :p
thanks for sharing this information. i am in need of this. thanks again.
Image Caption is a WordPress plugin that extracts the title or alt attribute from images within your blog post and generates a neat caption.
A single-cell table with caption element need following HTML code.
<table class="image">
<tr><td><img ...></td></tr>
<tr><td class="caption">caption text</td></tr>
</table>