vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   BBCode issues again... Getting another error. (https://vborg.vbsupport.ru/showthread.php?t=202582)

MTGDarkness 01-24-2009 12:26 PM

I found that in the class_bbcode file as well, and it's gibberish to me. At least, the
Code:

        * @param        string        Value for the tag
        * @param        string        Option for the tag (if it has one)
        *
        * @return        string        HTML representation of the tag

Part.

King Kovifor 01-24-2009 08:09 PM

That means that your function is getting this:

PHP Code:

your_function('param''option')
{
 
return 
'return';
 


That basically tells you what parameters it takes and what it expects (strings) and what the fuction is to return (a string).

MTGDarkness 01-24-2009 10:24 PM

Wait. So I should just replace every instance of $body and $name with 'param' and 'option' respectively, and turn the final output variable into 'return'?
I'm stuill really confused...

Dismounted 01-25-2009 02:31 AM

Please read the description properly:
PHP Code:

/*
* Your function will receive 3 parameters:
*    A reference to this BB code parser
*    The value for the tag
*    The option for the tag
* Ensure that you accept at least the first parameter by reference!
*/ 


MTGDarkness 01-25-2009 08:08 AM

Parameters tells me nothing. How do I add the parameter to reference the BBCode parser?

Dismounted 01-25-2009 11:47 AM

Read it again, carefully. Your custom function ("bbcode_deck()") will receive three parameters.

MTGDarkness 01-26-2009 01:47 PM

I still don't get it. Can someone please just give me a straight answer?

Dismounted 01-27-2009 03:22 AM

PHP Code:

function bbcode_deck(&$parser$value$option)
{
    
// some code here


I hope you get it know...

MTGDarkness 01-27-2009 02:48 PM

Ah-So the
Code:

&$parser
calls back to the bbcode parser? I think I do get it... Thanks.

Dismounted 01-28-2009 04:29 AM

The BB code parser calls your function, and provides three parameters for you to use. $parser is the reference for the BB code parser, in case you need it.
PHP Code:

/*
* Your function will receive 3 parameters:
*    A reference to this BB code parser
*    The value for the tag
*    The option for the tag
* Ensure that you accept at least the first parameter by reference!
*/ 



All times are GMT. The time now is 05:34 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.01077 seconds
  • Memory Usage 1,735KB
  • 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
  • (2)bbcode_code_printable
  • (4)bbcode_php_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
  • (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