Results 1 to 2 of 2

Problematic vBulletin Version detection

This is a discussion on Problematic vBulletin Version detection within the Bug Reporting forums, part of the vBSEO SEO Plugin category; Hey, Some of DragonByte Tech's customers have reported issues with our products when used in conjunction with vBSEO . After ...

  1. #1
    Junior Member
    Real Name
    Fillip Hannisdal
    Join Date
    Jun 2010
    Posts
    3
    Liked
    0 times

    Problematic vBulletin Version detection

    Hey,

    Some of DragonByte Tech's customers have reported issues with our products when used in conjunction with vBSEO. After some investigation, it's been determined to be the cause of this function:
    PHP Code:
    function vbseo_fetch_tpl($tplname)
    {
        return 
    class_exists('vB_Template') ? vB_Template::fetch_template_raw($tplname) : fetch_template($tplname);

    Our products are made to work with vBulletin 3 and vBulletin 4 and by implementing an "emulated" vB_Template class, our codebases remain the same between the 2 versions to allow seamless updates and very little chance of vB version-specific bugs. Now on a multi-platform product we use vBulletins stock version number to determine what we're running on and it allows the code to work - something which not many modifications do as new modifications aren't made towards vB3 compat aswell as vB4 compat.

    Using the following function as a replacement for the above one, however, our customers have reported no problems:
    PHP Code:
    function vbseo_fetch_tpl($tplname)
    {
        global 
    $vbulletin;
        return 
    intval($vbulletin->versionnumber) != vB_Template::fetch_template_raw($tplname) : fetch_template($tplname);

    Could this please be incorporated into the full release?
    Thanks in advance


    Fillip
    - DragonByte Tech CEO

  2. #2
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,744
    Liked
    168 times
    Hello,

    the following will be used in vBSEO to maintain compatibility:
    Code:
    (class_exists('vB_Template') && method_exists(vB_Template, 'fetch_template_raw')) ? vB_Template::fetch_template_raw($tplname) : fetch_template($tplname);

Similar Threads

  1. vBSEO version incorrect
    By 1QuickSI in forum Bug Reporting
    Replies: 2
    Last Post: 07-11-2008, 04:22 PM
  2. vBulletin® Version 3.7.0
    By Britmovie in forum Pre-Sales Questions
    Replies: 3
    Last Post: 04-14-2008, 02:36 PM
  3. vBulletin version 3.0.7
    By greecemonkey in forum Pre-Sales Questions
    Replies: 3
    Last Post: 03-03-2007, 12:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •