0
Welcome Guest! Login
0 items Join Now

Gantry & jFusion

    • Antony Doyle's Avatar
    • Antony Doyle
    • Jr. Rocketeer
    • Posts: 38
    • Thanks: 0
    • Web designer, developer.

    Gantry & jFusion

    Posted 12 years 11 months ago
    • Hi all.

      I was unsure where to post this, but given that the error seems to crop up only when using Gantry based templates, I though it best to post here.

      I'm using Joomla (1.5.23) and phpBB3 (3.0.8 - latest) bridged with jFusion.

      The bridging part is working fine, everything works as it should, the problem I'm having is with jFusion's frameless integration.

      Here's the error I get;
      Fatal error: Cannot redeclare class GantryBrowser in /home/mydomain/public_html/components/com_gantry/core/gantrybrowser.class.php on line 19

      That line is nothing more than;
      class GantryBrowser {

      Though my understanding of PHP is somewhat limited, so maybe that covers the entire class?

      I searched the jFusion forums and this is all I found - www.jfusion.org/forums/viewtopic.php?t=6568 , but I followed the instructions, and even tried the premade fix supplied, but it still kicks out the same error.

      Can anyone shed some light on the subject? I'd use RokBridge, but I really need the discuss bot function between phpbb3 and Joomla and I don't seem to be able to find a standalone plugin.

      Unfortunately, I can't provide URL's or access because it's running on a local server.

      Thanks guys! :)
    • Antony Doyle's Avatar
    • Antony Doyle
    • Jr. Rocketeer
    • Posts: 38
    • Thanks: 0
    • Web designer, developer.

    Re: Gantry & jFusion

    Posted 12 years 10 months ago
    • Just thought I'd post the solution incase anyone else was having this problem.

      It was quite simple really...

      In yoursite.com/components/com_gantry/core/gantrybrowser.class.php, find this;
      class GantryBrowser {
          var $_ua;
       
          var $name;
          var $version;
          var $shortversion;
          var $platform;
          var $engine;
          var $_checks = array();
       
          function GantryBrowser() {
              $this->_ua = $_SERVER['HTTP_USER_AGENT'];
              $this->_checkPlatform();
              $this->_checkBrowser();
              $this->_checkEngine();
                      
              // add short version
              if ($this->version != 'unknown') $this->shortversion = substr($this->version, 0, strpos($this->version, '.'));
              else $this->shortversion = 'unknown';
       
              $this->_createChecks();
          }

      and replace with this:
      if (!class_exists('GantryBrowser')) {
      class GantryBrowser {
          var $_ua;
       
          var $name;
          var $version;
          var $shortversion;
          var $platform;
          var $engine;
          var $_checks = array();
       
          function GantryBrowser() {
              $this->_ua = $_SERVER['HTTP_USER_AGENT'];
              $this->_checkPlatform();
              $this->_checkBrowser();
              $this->_checkEngine();
                      
              // add short version
              if ($this->version != 'unknown') $this->shortversion = substr($this->version, 0, strpos($this->version, '.'));
              else $this->shortversion = 'unknown';
       
              $this->_createChecks();
          }
      }

      Adding the if (!class_exists('GantryBrowser')) { part stopped Gantry from redeclaring the GantryBrowser class.

      The first time I read the fix posted on the JFusion forums, I must have misread it. But anyway, yeah. 'Tis fixed and everything now :)

      Hope this is of help to someone.
    • Antony Doyle's Avatar
    • Antony Doyle
    • Jr. Rocketeer
    • Posts: 38
    • Thanks: 0
    • Web designer, developer.

    Re: Gantry & jFusion

    Posted 12 years 10 months ago
    • Oops, sorry. The above is wrong.

      You need to delete the last } from the above, and add it at the very end of the file, else it kicks out even more errors :)

Time to create page: 0.038 seconds