vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Complex BB Code Creation - including conditions (https://vborg.vbsupport.ru/showthread.php?t=248249)

jezza101 08-09-2010 09:42 AM

Complex BB Code Creation - including conditions
 
The custom bb code admin panel is easy to use, however is it possible to create more complicated bb codes that use PHP?

I am replicating a bb code plugin from my previous forum software that used php to manipulate the {param} string, and a second one that made a db call.

What is the best way to implement bb codes like this?

Many thanks.

BirdOPrey5 08-09-2010 04:00 PM

You can't use 'real' bb codes to do anything with PHP or the Database. That said people have released products like the [you] hack or the [table] bb code that LOOK LIKE bb code to the users but are actually full products with plugins.

jezza101 08-10-2010 08:30 AM

Thanks for the reply, having spent some time yesterday downloading other bb code plugins (including the table one) I had reached the same conclusion.

I guess I am a bit disappointed as other forum software I have used have allowed us to easily create rich functional bb codes and I was under the impression vBulletin had everything covered.

Still, it looks like what I want to do will be possible by creating a plugin that acts on the right hooks, it just means that I've got to work out how to parse the input correctly and work out which hooks to hook into!

Unfortunately other authors don't seem to agree on which hooks need to be used, so far i've found bb code plugins that use:
  • postbit_display_complete
  • newpost_preview
  • printthread_post
  • newreply_form_reviewbit

BirdOPrey5 08-10-2010 09:15 AM

I've heard that if you use global_start it should work everywhere, there is another [you] hack that only uses that hook- at least that is what i was told once, never confirmed it but it made sense.


All times are GMT. The time now is 08:22 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.01055 seconds
  • Memory Usage 1,710KB
  • 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
  • (4)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