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

Status
Not open for further replies.

Brivium

Well-known member
******* submitted a new resource:

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

INFORMATION:
This product will allow you to apply pre-defined text to individual resources which is placed at the beginning of the Resources title.

FEATURES:
- Admin can manage (add/edit/delete) resource prefix and prefix group.
- Admin can setting which prefixes can be used in which resource categories can be done via the Applicable categories configuration page.
- Admin can setting which prefixes can be used by usergroups.\
- Admin can set style and custom style for prefix...

Read more about this resource...
 
******* updated ******* - Xenforo Resource Prefixes with a new update entry:

Version 1.0.1

07/06/2013: Version 1.0.1
- Fixed bug when deleting prefix

Read the rest of this update entry...
 
******* updated ******* - Xenforo Resource Prefixes with a new update entry:

Version 1.1.0

05/08/2013: Version 1.1.0
- XenForo 1.2 compability

Read the rest of this update entry...
 
It would be great if the discussion thread would have the same prefix like the ressource. Then I would buy the addon :)
 
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) "********"
}
}
 
@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;
    }
}

?>
 
@*******

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.
 
@*******

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.

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