vB3 Cel PHP in Custom BBCode

  • Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

Radio

    ven0m

    Administrator
    Staff member
    Administrator
    Moderator
    Platinum
    xenForo 2.x.x
    xenForo 1.x.x
    Contributor
    vBulletin All Access Pass
    The Chest
    Verified
    Ultra Platinum VIP
    Platinum VIP
    Gold VIP
    Silver VIP
    Premium
    Member
    Jul 17, 2005
    20,503
    7,742
    321
    localhost
    Heisenberg submitted a new resource:

    - Cel PHP in Custom BBCode

    vB Version: 3.8.x

    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 work with multiple options or to poll database information. It does allow for the Admin to use PHP in the Backend - it does, of course, not...​

     
    Last edited:

    ven0m

    Administrator
    Staff member
    Administrator
    Moderator
    Platinum
    xenForo 2.x.x
    xenForo 1.x.x
    Contributor
    vBulletin All Access Pass
    The Chest
    Verified
    Ultra Platinum VIP
    Platinum VIP
    Gold VIP
    Silver VIP
    Premium
    Member
    Jul 17, 2005
    20,503
    7,742
    321
    localhost
    PHP BBCode Examples:

    To test them, go to AdminCP->Custom BB Codes->Add new BB Code and fill in the form:


    • Title: evaltest
    • BBCode Tag Name: evaltest
    • Replacement:

    Code:
     <?php
    /* 
    Please note: 
      
    - available variables: 
        param => $value, option => $option
        remember: [bbcode=option]param[/bbcode] 
    
    - pass your result via return (as needed for PHP eval)
        so end your code with return $my_result */
    
    $my_result = "Test per eval (here no option was used):  "; 
    $my_result .= "Parameter: <strong>" . $value . "</strong>";
    
    return $my_result; ?>


    • Example: [evaltest]Hello World![/evaltest]
    • Use {option}: No


    • Title: includetest
    • BBCode Tag Name: includetest
    • Replacement:
    Code:
    include[code]
    [LIST]
    [*]Example: [includetest="World!"]Hello![/includetest]
    [*]Use {option}: Yes
    [/LIST]
    [U]Additionally[/U], you need to create a [U]directory called custombbcodes[/U], and in it create a [U]file called includetest.php[/U] with the following code:
    
    [CODE][COLOR=#000000] [/COLOR]<?php
        /* 
    Please note:
       
    - available variables: 
        param => $value, option => $option
        remember: [bbcode=option]param[/bbcode] 
    - all output needs to go to $parsed
        no return statement needed (different from direct eval method)
        so don't use echo "Hello World", but $parsed = "Hello World"
    */
    
    $parsed = "Test per include (here option was used): ";
    $parsed .= "Parameter = <strong>" . $value . "</strong>, ";
    $parsed .= "Option = <strong>" . $option . "</strong>"; [COLOR=#000000][/COLOR]

    Please note that there will be no further updates to my addons, especially they will not be upgraded for vB5. I'm leaving vB, since IB choose to go the banana-way yet again.
     
    Thread starter Similar threads Forum Replies Date
    ven0m vB3 Cel Show Primary Usergroups Only on showgroups.php [3.8.x] Addons 0
    ven0m vB3 Cel Update your Browser Nagger (unobtrusive) [3.8.x] Addons 0
    ven0m vB3 Cel Social Groups Notifications [3.8.x] Addons 0
    ven0m vB3 Cel Sponsors/Subscribers on Forumhome [3.8.x] Addons 0
    ven0m vB3 Adding subforums option for external.php [3.8.x] Addons 0
    ven0m vB3 Add Radio Page to your site with last.fm! (radio.php) [3.8.x] Addons 0
    ven0m vB3 BBCode CSS wrap, version php.net [3.8.x] Addons 0
    ven0m vB3 Insert objects or Ads anywhere using php [3.8.x] Addons 0
    ven0m vB3 Anti-spambot: disallow registration if referer page = register.php [3.8.x] Addons 0
    ven0m vB3 Facebook Connect - Update for Facebook PHP SDK (v.3.0.0) [3.8.x] Addons 0
    ven0m vB3 Easy Forms - Create a form or multiple forms without php or html knowledge [3.8.x] Addons 0
    ven0m vB3 Custom User Pages - Users make pages using html/bbcode on any template safely [3.8.x] Addons 0
    ven0m vB3 Custom Spoiler Code [3.8.x] Addons 0
    ven0m vB3 vBTemplates - Custom templates anywhere [3.8.x] Addons 0
    ven0m vB3 Custom Announcements [3.8.x] Addons 0
    ven0m vB3 FXI Gravatars - Automatically Replace Avatars (all, custom, or empty) with Gravatars! [3.8.x] Addons 0
    ven0m vB3 EW - Custom Affiliates Page With Product [3.8.x] Addons 0
    ven0m vB3 MyQueries - Save custom SQL for future use [3.8.x] Addons 0
    ven0m vB3 Custom Tag Cloud for Forums, Threads, vbAdvanced & Social Groups [3.8.x] Addons 0
    ven0m vB3 Custom Spoiler [3.8.x] Addons 0
    ven0m vB3 MARCO1 Google Custom Search [3.8.x] Addons 0
    ven0m vB3 Custom HTTP Error Pages [3.8.x] Addons 0
    ven0m vB3 Custom Title Spoiler Button [3.8.x] Addons 0
    ven0m vB3 DnP AJAX Custom News Link - Offer the best news to your forum visitors [3.8.x] Addons 0
    ven0m vB3 Custom Per-Forum No Permission Messages [3.8.x] Addons 0
    ven0m vB3 AiONets : Custom Forum Status Icons [3.8.x] Addons 0
    ven0m vB3 Custom Meta Keywords in forumdisplay (3.6/3.7/3.8) [3.8.x] Addons 0
    ven0m vB3 Custom Spoiler [3.8.x] Addons 0
    Similar threads