1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

******* - XenForo Resource Prefixes [Paid] [Deleted]

Discussion in 'Add-on Releases' started by Brivium, May 22, 2013.

Thread Status:
Not open for further replies.
  1. Brivium

    Brivium Well-Known Member

    ******* submitted a new resource:

    Xenforo Resource Prefixes - This product will allow you to apply pre-defined text to individual resources.

    Read more about this resource...
     
    Bellinis and Wartazan like this.
  2. IcEWoLF

    IcEWoLF Well-Known Member

    Oh, I like this idea a lot! Very nice work!
     
    Brivium likes this.
  3. Dynamic

    Dynamic Well-Known Member

    Hi there,

    Will this be updated to xF 1.2 when it is released?

    Thanks.
     
  4. Binu

    Binu Member

    Do i need to pay 15$ for every 6 months.
     
  5. Brivium

    Brivium Well-Known Member

  6. Brivium

    Brivium Well-Known Member

  7. Scharesoft

    Scharesoft Active Member

    It would be great if the discussion thread would have the same prefix like the ressource. Then I would buy the addon :)
     
  8. santamo

    santamo Active Member

    I have a problem with upgrading RM. But I cannot remove the addon. How do I do this?


    ErrorException:Fatal Error: Call to undefined method *******_XenResourcePrefix_Installer::_getDb() -library/*******/XenResourcePrefix/Installer.php:52
    Сгенерирована пользователем:админ,только что
    Трассировка стэка
    #0 [internal function]: XenForo_Application::handleFatalError()
    #1 {main}
    Содержимое запроса
    array(3) {
    ["url"] => string(75) "http://forum.xxx.su/admin.php?add-ons/*******_XenResourcePrefix/delete"
    ["_GET"] => array(1) {
    ["add-ons/*******_XenResourcePrefix/delete"] => string(0) ""
    }
    ["_POST"] => array(2) {
    ["_xfConfirm"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    }
    }
     
  9. Brivium

    Brivium Well-Known Member

    @santamo Replace all content at library/*******/XenResourcePrefix/Installer.php by following content and Uninstall Xen Resource Prefix
    Code:
    <?php
    class *******_XenResourcePrefix_Installer
    {
        public static function addColumn($table, $field, $attr)
        {
            if (!self::checkIfExist($table, $field)) {
                $db = XenForo_Application::get('db');
                return $db->query("ALTER TABLE `" . $table . "` ADD `" . $field . "` " . $attr);
            }
        }
    
        public static function checkIfExist($table, $field)
        {
            $db = XenForo_Application::get('db');
            if ($db->fetchRow('SHOW columns FROM `' . $table . '` WHERE Field = ?', $field)) {
                return true;
            }
            else {
                return false;
            }
        }
        public static function install()
        {
            $creditsAddon = XenForo_Model::create('XenForo_Model_AddOn')->getAddOnVersion('XenResource');
            if (!$creditsAddon) {
                throw new XenForo_Exception('XenForo Resource Manager Addon required', true);
            }
           
            $db = XenForo_Application::getDb();
            $db->query("
                CREATE TABLE IF NOT EXISTS `xf_resource_category_prefix` (
                  `resource_category_id` int(10) unsigned NOT NULL,
                  `prefix_id` int(10) unsigned NOT NULL,
                  PRIMARY KEY (`resource_category_id`,`prefix_id`),
                  KEY `prefix_id` (`prefix_id`)
                ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
            ");
            if (!self::checkIfExist('xf_resource', 'prefix_id')) {
                self::addColumn('xf_resource', 'prefix_id', " int(10) unsigned NOT NULL DEFAULT '0'");
            }
            if (!self::checkIfExist('xf_thread_prefix', 'is_resource')) {
                self::addColumn('xf_thread_prefix', 'is_resource', " tinyint(3) unsigned NOT NULL DEFAULT '0'");
            }
            return true;
        }
       
        /**
        * So sad. Delete all the data used by this addon
        */
        public static function uninstall()
        {
            $db = XenForo_Application::getDb();
            if (self::checkIfExist('xf_thread_prefix', 'is_resource')) {
                $db->query("ALTER TABLE `xf_thread_prefix` DROP `is_resource`");
            }
            $db->query("DROP TABLE IF EXISTS  `xf_resource_category_prefix`");
            return true;
        }
    }
    
    ?>
     
    santamo likes this.
  10. Tefka

    Tefka Member

    @*******

    This add-on is doing some wonky stuff. Installed, but returned an error. Deactivated the add-on, but now it works! Very weird.

    I'm on the latest version of Xenforo, using the UI.X theme.
     
  11. Brivium

    Brivium Well-Known Member

    Because XFRM 1.1.x support this feature, therefore you don't need to install it.
     
Thread Status:
Not open for further replies.

Share This Page