vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   [BBCODE] How to play with {param} (%1$s) and {option} (%2$s) in php ? (https://vborg.vbsupport.ru/showthread.php?t=220360)

cclaerhout 08-06-2009 10:07 PM

[BBCODE] How to play with {param} (%1$s) and {option} (%2$s) in php ?
 
Request description:
This message deals about my hack Advanced BB Codes. The fellow one imports some custom BB code tags in vBulletin BB Code Manager. So these BB Codes are of course using {param} (%1$s) and {option} %2$s".

I would like to know how check in php and modify the value of %1$s and %2$s.

Exemple:
Let's take the example of BIMGX, a resizing picture BBCODE with the option for user to set the width. I would like to control the inserted value (with regex for example) and to modify it if it's too high.

To do that I need to catch %1$s and %2$s values per BBCODE.

Where and how can I call the variables ?

Things I know
I know $tag_list variable and might play with it in "bbcode_fetch_tags" hook of class_bbcode.php, but I don't see how.

Thanks to this tutorial, I know how to rewrite my hack to make what I want. But I would prefer to keep the BB Codes in BB Code manager. So that's why I'm asking for your help :)

C?dric


All times are GMT. The time now is 10:44 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.01043 seconds
  • Memory Usage 1,709KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete