vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   BB Code Enhancements - Simple [img] word wrap bbcode (https://vborg.vbsupport.ru/showthread.php?t=220610)

smokey 08-10-2009 10:00 PM

Simple [img] word wrap bbcode
 
1 Attachment(s)
I saw a few threads in the modification graveyard where you can add a bbcode to align an image left or right, did not see any newer threads that accomplish this correctly and without messing up the signature and other things.

This is what I've done:

First lets add some CSS entries to each style.
In admin cp, go to Styles & Templates -> Style Manager -> Main CSS Options
Scroll down to the Additional CSS Definitions and add the following at the bottom:
Code:

img.alignright {
        padding: 4px;
        margin: 0 0 2px 7px;
        display: inline;
        }

img.alignleft {
        padding: 4px;
        margin: 0 7px 2px 0;
        display: inline;
        }

.alignright {
        float: right;
        }

.alignleft {
        float: left
        }


Second lets add the bbcodes:

Title: Image Align Left
BB Code Tag Name: IMGLEFT
Replacement:
Code:

<img class="alignleft" border="0" alt="" src="{param}" />
Description: Simple left image alignment with text wrap
Use {option}: no

Title: Image Align Right
BB Code Tag Name: IMGRIGHT
Replacement:
Code:

<img class="alignright" border="0" alt="" src="{param}" />
Description: Simple right image alignment with text wrap
Use {option}: no


Lastly, lets edit the postbit templates for each style:

Find:
Code:

$template_hook[postbit_signature_start]
Right below it add:
Code:

<TABLE width="100%" style="border-collapse: collapse; border: none;">
        <tr>
        <td class="alt1">

Find:
Code:

            $template_hook[postbit_controls]
                        <!-- / controls -->
                </div>

Right below it add:
Code:

            </td>
            </tr>
</table>


Thats it! You're done. I'll attach some buttons I made which you can use when adding your new bbcode if you wish.

erel34 08-11-2009 12:44 AM

thanks

Tilly 08-27-2009 01:40 AM

doesn't work just replaces image with " />

smokey 08-30-2009 07:07 PM

Quote:

Originally Posted by Tilly (Post 1875119)
doesn't work just replaces image with " />

That's odd. Did you copy all the code and follow the directions 100%? What version of vb?

KrU$ty 10-05-2009 11:33 PM

Quote:

Originally Posted by Tilly (Post 1875119)
doesn't work just replaces image with " />

I'm getting the same issue. VB 3.8.4

ricardoNJ 10-09-2009 02:16 PM

Example?

Trana 10-20-2009 02:21 AM

Does this work?

segwayon 10-20-2009 03:50 AM

Nice mod! Is there one which aligns an image as yours does, but also allows for a caption underneath?

mbc100 10-20-2009 11:24 AM

Example?

Trana 10-21-2009 12:33 AM

Quote:

Originally Posted by segwayon (Post 1902449)
Nice mod! Is there one which aligns an image as yours does, but also allows for a caption underneath?

Good mod, working on my 3.8.4 board, but can anyone help with the question above? We really need this.


All times are GMT. The time now is 06:57 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01220 seconds
  • Memory Usage 1,737KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete