HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Please upgrade here. These earlier versions are no longer being updated and have security issues.

Increase Description length, at the moment it's 500 characters i want to make it 1000 or more.

DenisSDenisS My brain hurts Buriram ✭✭
edited January 2015 in Vanilla 2.0 - 2.8

Category > Farang Bars Western Food

Description Staffords Foods - Acorn Foods <<<< these are links to local suppliers >>>>

I want to use the description to put Ad links, relevant to the category and have a page width of links maybe 12 links.

Also when viewing the Category list the links are "live" but when viewing the category, the links are "dead" is there anyway of making them live and click-able when viewing the category?

Comments

  • The database field is limited to 500 characters, so this is not really possible. You could increase it, but it will be overwritten with the next update.

    You post was kind of confusing, but it looks to me like you are using the category description for something it wasn't made for. Maybe a link collection would be better on a custom page or in an announcement inside of the category.

    You could use a link shortener to pack in more links.

  • DenisSDenisS My brain hurts Buriram ✭✭
    edited January 2015

    Thanks I never head of a links shortener, but i'll look it up. I don't have the skills to write these bit's of code, so I use what's there and description was there when i can ;-) It just made sense to me if you have a category then put links relevant to that category.

  • hgtonighthgtonight ∞ · New Moderator
    edited January 2015

    @Bleistivt said:
    The database field is limited to 500 characters, so this is not really possible. You could increase it, but it will be overwritten with the next update.

    Wrap the increased limit in a plugin Structure() method and it won't be overwritten on update:

    <?php if (!defined('APPLICATION')) exit();
    /*  Copyright 2015 Zachary Doll
    *   This program is free software: you can redistribute it and/or modify
    *   it under the terms of the GNU General Public License as published by
    *   the Free Software Foundation, either version 3 of the License, or
    *   (at your option) any later version.
    *
    *   This program is distributed in the hope that it will be useful,
    *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    *   GNU General Public License for more details.
    *
    *   You should have received a copy of the GNU General Public License
    *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
    */
    $PluginInfo['CategoryDescriptionUnleashed'] = array(
        'Name' => 'Category Description Unleashed',
        'Description' => 'Increases the character limit on the category description field allowing MASSIVE gains in descriptability.',
        'Version' => '0.1',
        'RequiredApplications' => array('Vanilla' => '2.1.8'),
        'MobileFriendly' => TRUE,
        'Author' => 'Zachary Doll',
        'AuthorEmail' => '[email protected]',
        'AuthorUrl' => 'http://www.daklutz.com',
        'License' => 'GPLv3'
    );
    
    class CategoryDescriptionUnleashed extends Gdn_Plugin {
        public function Structure() {
            $Structure = Gdn::Structure();
            $Structure->Table('Category')
              ->Column('Description', 'text', TRUE)
              ->Set();
        }
    
        public function Setup() {
            $this->Structure();
        }
    }
    

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

    BleistivtAnonymooseShadowdare
  • DenisSDenisS My brain hurts Buriram ✭✭
    edited January 2015

    Thanks, for the advice and the code," Wrap the increased limit in a plugin " sorry I don't know how to do a plugin, not a clue ;-( I can follow what the code is doing, but that's about it. I have looked at this post but don't understand it: http://vanillaforums.org/docs/pluginquickstart

Sign In or Register to comment.