vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   How do you edit default bbcode? (https://vborg.vbsupport.ru/showthread.php?t=219359)

doob 04-13-2012 07:18 PM

Seems to be working, might be version dependent though? Interstingly it doesn't seem to entirely replace the default IMG behavoir, but puts mods on top of it.

Any idea what code snippit is responsible for the popup url browser generated by the insert link or insert image default buttons? And can that code be inserted in the custom bb code interface or does it have to be coded into the php doc?

I'm still looking into use of the {option} use and syntax so my answer may lie there...

kh99 04-14-2012 03:53 PM

Quote:

Originally Posted by doob (Post 2319842)
Seems to be working, might be version dependent though? Interstingly it doesn't seem to entirely replace the default IMG behavoir, but puts mods on top of it.

I think you're allow one with an option and one without - maybe that's what's going on?


Quote:

Any idea what code snippit is responsible for the popup url browser generated by the insert link or insert image default buttons?
I believe that's a ckeditor custom extension, and so is probably somewhere under the clientscript directory.


Quote:

And can that code be inserted in the custom bb code interface or does it have to be coded into the php doc?
Not sure what you're asking, but it sounds like I wouldn't be sure of the answer either. Maybe someone else will know...

demonlord 09-20-2012 02:21 AM

anyone know how to change "alt" attribute in default img bbcode?

kh99 09-20-2012 10:40 AM

Quote:

Originally Posted by demonlord (Post 2366891)
anyone know how to change "alt" attribute in default img bbcode?

You should look at the code in function handle_bbcode_img(), in file includes/class_bbcode.php. In some cases the contents of the alt attribute comes from the phrases image_larger_version_x_y_z or image_x_y_z, so you may be able to do what you want by translating those phrases. Otherwise you'd probably need to edit the php code in that file.

demo7up 09-23-2012 09:49 PM

I actually just did this in includes/class_bbcode.php look for the following function I added the red part to fit my forums fixed width.

Code:

function handle_bbcode_img_match($link, $fullsize = false)
        {
                $link = $this->strip_smilies(str_replace('\\"', '"', $link));

                // remove double spaces -- fixes issues with wordwrap
                $link = str_replace(array('  ', '"'), '', $link);

                $retval = ($fullsize ? '<div class="size_fullsize">' : '')  . '<img width="920px" src="' .  $link . '" border="0" alt="" />' . ($fullsize ? '</div>' : '');

                ($hook = vBulletinHook::fetch_hook('bbcode_img_match')) ? eval($hook) : false;

                return $retval;
        }



All times are GMT. The time now is 12:39 AM.

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.02897 seconds
  • Memory Usage 1,726KB
  • 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
  • (1)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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