![]() |
|
#1
|
|||
|
|||
|
This prolly have been done before but here is how I added a custom BB code that will wrap text around a picture.
Might be useful in news forum etc Also made a little image/button to go with it Just save the wrap.gif and upload it to your forum/images/editor folder. Go to forum/admincp/bbcode.php? and add the new BB code... Title: Code:
Wrap text around image Code:
wrap Code:
<table border="0" align="left" valign="top">
<tr>
<td><img src="{param}" border="0" align="left"></td>
</tr>
</table>
Code:
[wrap]imgurl[/wrap] Code:
This will wrap text around a picture of your choice. Just add the url to the img you wish to use. Code:
No Code:
images/editor/wrap.gif Last edited by ZnARk; 11-02-2004 at 08:08 AM. |
|
#2
|
|||
|
|||
|
Button
|
|
#3
|
|||
|
|||
|
Thanks , man this is exactly what I need. Awsome.
|
|
#4
|
|||
|
|||
|
Cool, thnx, needed this
|
|
#5
|
||||
|
||||
|
Easier way of doing this...
![]() Go into ACP --> Custom BB Codes --> Add New BB Code
Last edited by KW802; 04-21-2005 at 04:27 PM. |
|
#6
|
||||
|
||||
|
Thanks to you both, very much
|
|
#7
|
|||
|
|||
|
I think there may be a bit of a security issue with the methods suggested so far...
I discovered one drawback to creating a custom <img> BBCode, and that is that the security option that allows the admin to filter out any image urls with dynamic elements does not work on custom BB codes that use <img src=""> (that security option is under Admin Panel > vBulletin Options > Message Posting and Editing Options) Even when enabled, that security setting does not work on any custom BB codes that are based on the <img> tag. I am a security nut (paranoid), so what I came up with was two custom BBcodes that will float any block-level element, image or otherwise. These BB codes can then be nested AROUND the [IMG][/IMG] BB code so that the image floats but the security setting still works. So my BB code useage looks something like this: Code:
[FLOATLEFT][IMG]imageurl[/IMG][/FLOATLEFT] Code:
Title: FLOATLEFT
Usage: [FLOATLEFT]{param}[/FLOATLEFT]
Replacement: <div style="float: left">{param}</div>
Code:
Title: FLOATRIGHT
Usage: [FLOATRIGHT]{param}[/FLOATRIGHT]
Replacement: <div style="float: right">{param}</div>
Last edited by coolegg; 01-25-2005 at 02:57 PM. |
|
#8
|
||||
|
||||
|
sweet, I used KW802's way. Quick and Easy!
|
|
#9
|
|||
|
|||
|
Quote:
I have use the KW802 way before I read this thread, it is simple and good way to implement |
|
#10
|
||||
|
||||
|
Quote:
Ok, Huge Duh to me.. You place "left" or "right" in the popup... DUH DUH DUH Last edited by mholtum; 04-15-2005 at 11:50 AM. |
|
#12
|
||||
|
||||
|
Quote:
|
|
#13
|
|||
|
|||
|
KW802, I'm using your code and when I type [img2=left]http://www.....gif[/img], the image doesn't show up, it just display the text [img2=left]http://www.....gif[/img]. I wonder why???
mholtum: Ok, Huge Duh to me.. You place "left" or "right" in the popup... DUH DUH DUH <<< I'm still confused. What do you mean by "the popup" ?
|
|
#14
|
||||
|
||||
|
Because it needs to be closed with an "[/img2]" tag instead of a "[/img]" tag.
|
|
#15
|
|||
|
|||
|
Oh ok got it, thanks KW802. By the way, you need to edit your instructions so people don't get errors like I did. Thanks for the quick reply!
|
|
#16
|
||||
|
||||
|
Quote:
|
|
#17
|
||||
|
||||
|
Quote:
I fixed the post.
|
|
#19
|
|||
|
|||
|
thanks
|
|
#20
|
|||
|
|||
|
If you want a resize parameter (like an 80X80 picture that you want posted at width="40")...
Could you set that up in the setup? That'd be easier than resizing all the pictures I want to use. ***EDIT*** I figured out how to do it to a fixed size (like if I wanted all pics 150 width..(you just put width="150" in the code box. But how can I make it to where for each individual post I can put width=?? and it works? Last edited by aggiefan; 05-21-2005 at 02:39 AM. |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Image Uber Friendly Front Page News Displaying Template | Alex@i-Club | Add-On Modules & Modifications | 103 | 08-02-2006 11:23 PM |
| How do I add the following 'Display Random Image' Code? | baptizer | Add-On Modules & Modifications | 5 | 07-14-2004 03:37 PM |