Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Cel PHP in Custom BBCode Details »»
Cel PHP in Custom BBCode
Version: 4.001, by cellarius cellarius is offline
Developer Last Online: Apr 2022 Show Printable Version Email this Page

Category: BB Code Enhancements - Version: 4.x.x Rating:
Released: 06-07-2011 Last Update: Never Installs: 24
Uses Plugins
 
No support by the author.

This addon allows for PHP-Code to be used in Custom BBCodes

It offers a framework for the easy integration and sharing of custom BBCodes that are based on PHP processing of the data entered by the user. It could, for example, be used to develop BBCodes that use multiple options or to poll database information. It does allow for the Admin to use PHP in the Backend - it does, of course, not allow this to forum visitors.

You need to know PHP to use this Addon to develop your own PHP based bbcodes, however it would be possible to share them as an extension to this addon.


Installation:
- install the product file - done.


Using PHP in Custom BBCodes:
Create your Custom BBCode as always, and just put your PHP into the Replacement box (where the HTML used to go).
Just remember two things:
  • Your code needs to start with <?php
  • You need to return the result of your code.
If you're unsure what that means, read the php manual on eval() and look at the evaltest example in the second post.


For coders: include instead of eval

If you'd rather store the PHP for your new BBCodes in the file system for ease of development, that's possible, too:
  • create a folder called "custombbcodes" in your forum root
  • in that folder, create a php file that copies your BBCode Tag Name (ie. if your tag name is "includetest", the file needs to be called "includetest.php"). That's where your PHP goes.
  • in the Replacement box in the Custom BBCode Dialog, just put the word "include", nothing else
  • Since there's no eval() here, no need to return the result. Instead, it needs to go into $parsed.There's also an includetest example in the second post.
No Support for your PHP-Code!

### See the example BBCodes in the second post (click)! ###


### Don't forget to click install! ###
(No support if you don't)

Download Now

File Type: zip product-cel_php_bbcodes-4.001.zip (1.0 KB, 194 views)

Screenshots

File Type: png admincp_evaltest.PNG (53.5 KB, 0 views)
File Type: png admincp_includetest.PNG (42.4 KB, 0 views)
File Type: png editor_41.PNG (23.1 KB, 0 views)
File Type: png parsed_41.PNG (18.6 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
jowshany

Comments
  #12  
Old 07-09-2012, 06:35 AM
Kyojii Kyojii is offline
 
Join Date: Jun 2008
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I checked it, and it appears it is.
Reply With Quote
  #13  
Old 04-30-2013, 06:07 PM
Divvy Divvy is offline
 
Join Date: Nov 2008
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello guys,

Can someone please help me?
I need to use this php code in my custom bbcode:

PHP Code:
$(".my-content").sociallocker({ 
text: { 
header"Any message here!"
message"Yes, this is test. Just try it, click on one of buttons." 
}
}); 
How to do it correctly?

Thanks!
Reply With Quote
  #14  
Old 04-30-2013, 07:13 PM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think you should be posting this in the programming forum. This post does not apply to Cel's MOD.

I am trying to help, but I need to see the other part of this JavaScript / jquery code you are working with. You did not post PHP. Unfortunately it doesn't look like valid JavaScript or jquery either. So I am at a little bit of a loss to assist you.

Re-post as a new thread in the programming forum and post your source references, including function 'sociallocker'. Once we see the full picture it should be easy enough to help you.
Reply With Quote
  #15  
Old 04-02-2016, 11:07 PM
grey_goose grey_goose is offline
 
Join Date: Jun 2009
Posts: 284
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm a little late to the party, but finally ended up using this for a multi-variable bbcode.

Fantastic mod, it's got a lot more potential that has my imagination fired up
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05270 seconds
  • Memory Usage 2,273KB
  • Queries Executed 20 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (5)post_thanks_box
  • (1)post_thanks_box_bit
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (5)post_thanks_postbit_info
  • (4)postbit
  • (5)postbit_attachment
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete