Results 1 to 2 of 2

Your way to include vBSEO-scripts can lead to errors

This is a discussion on Your way to include vBSEO-scripts can lead to errors within the General Discussion forums, part of the vBSEO SEO Plugin category; Hi, i habe discovered a slight incompatibility between vBSEO and another modification speeding up my plugins. This other modification (from ...

  1. #1
    Member
    Real Name
    Gérome M.
    Join Date
    Dec 2007
    Posts
    41
    Liked
    0 times

    Question Your way to include vBSEO-scripts can lead to errors

    Hi,

    i habe discovered a slight incompatibility between vBSEO and another modification speeding up my plugins.

    This other modification (from Andreas @ vbulletin-germany.org) moves the plugin-codes from database to filesystem. This way, the execution of plugin-code can benefit from PHP-Caches like APC. In my case vBulletin gets really faster this way.

    The files containing the plugin-codes are located in /includes/plugins/{hookname}.php.

    Now comes vBSEO into play. It does not work anymore after activating the mentioned modification. Why? Well ... in several hooks you use the following code to include other parts of vBSEO:

    PHP Code:
    @include_once(dirname(__FILE__).'/functions_vbseo.php'); 
    The statements "dirname(__FILE__).'/functions_vbseo.php'" normally resolves to "{path}/includes/functions_vbseo.php", which is correct. Having the code in an sub-directory as mentioned above, the same statement resolves to "{path}/includes/plugins/functions_vbseo.php" and represents an invalid path. The result is a completely disabled vBSEO - not even the copyright notice comes up in the footer.

    Is this your problem? I think so. If you'd followed the vBulletin-Codingstandards, you'd included the scripts like this:

    PHP Code:
    @include_once(DIR '/includes/functions_vbseo.php'); 
    which is always correct and works like a charm.


    The question is: Why did you decide to take this unconventional approach using "dirname(__FILE__)" to include scripts? To offer a wide interoperability with other modifications is a / can be a significant quality-feature for vBSEO. In this case you can achieve this just by following the vB-Codestandards.

    Please take this into consideration.


    kind regards,
    Gérome

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

    This other modification (from Andreas @ vbulletin-germany.org) moves the plugin-codes from database to filesystem.
    Thank you for your comments, that will be supported in the next vBSEO build (current is 3.2.0RC5).
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


Similar Threads

  1. What not to include in Sitemap (and what to include in Robots.txt)
    By Marvin Hlavac in forum General Discussion
    Replies: 2
    Last Post: 03-21-2008, 11:35 AM
  2. Can vbSEO work on custom scripts? If so how?
    By Antivirus in forum Pre-Sales Questions
    Replies: 8
    Last Post: 01-20-2008, 11:46 AM
  3. best way to use vbseo for different scripts?
    By Jonathan in forum General Discussion
    Replies: 0
    Last Post: 09-17-2005, 12:41 AM

Posting Permissions

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