Post by jochems » Thu Nov 22, 2012 7:29 pm

Hello,

I want to change de character limit from the title when creating a new banner. This is set on a limit of 64 but i need a bit more. I was able to find the character limit what causes the error, so I can save a banner title with 64+ characters, only problem is that i won't be saved. Some script strips it to 64.

Anyone knows where to change this?

I know its possible by buying the Slideshow Caption Pro extension, but its for testing, playing and learning purposes only.

Newbie

Posts

Joined
Thu Nov 22, 2012 7:22 pm

Post by G470 » Fri Dec 07, 2012 9:00 am

Hi, I had the same problem.

Open your database with phpMyAdmin, fint the table "yourprefix_banner_image_description" and change the "title" Field Type from varchar to text. You can also use a this code in your sql field:

Code: Select all

ALTER TABLE  `yourprefix_banner_image_description` CHANGE  `title`  `title` TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
... the field should save long text now :)

User avatar
Newbie

Posts

Joined
Wed Sep 22, 2010 3:00 am


Post by MarketInSG » Fri Dec 07, 2012 2:14 pm

you need to remove the restrictions in the controller file too. There's a limit in the banner controller file


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by nytevizion » Sat Dec 14, 2013 12:53 am

I created a simple VQMOD xml file to edit the banner controller and language files. After you alter the database, this will change the limit to 1000. Edit as necessary if you need more. If you are shooting to add html content to the banner itself, don't forget to enable it in the

slideshow.css

Code: Select all

.nivo-html-caption {
	display:none;
}

VQMOD XML

Code: Select all

<modification>
  <id>Banner Character Limit</id>
  <version>
    <![CDATA[1]]>
  </version>
  <vqmver>
    <![CDATA[2]]>
  </vqmver>
  <author>sclaerhout@novainteractive.net</author>
  <file name="admin/controller/design/banner.php">
    <operation>
      <search position="replace">
        <![CDATA[if ((utf8_strlen($banner_image_description['title']) < 2) || (utf8_strlen($banner_image_description['title']) > 64)) {]]>
      </search>
      <add>
        <![CDATA[if ((utf8_strlen($banner_image_description['title']) < 2) || (utf8_strlen($banner_image_description['title']) > 1000)) {]]>
      </add>
    </operation>
</file>
<file name="admin/language/english/design/banner.php">
    <operation>
      <search position="replace">
        <![CDATA[$_['error_title']        = 'Banner Title must be between 2 and 64 characters!';]]>
      </search>
      <add>
        <![CDATA[$_['error_title']        = 'Banner Title must be between 2 and 1000 characters!';]]>
      </add>
    </operation>
</file>
</modification>

New member

Posts

Joined
Fri Jun 29, 2012 1:49 am
Who is online

Users browsing this forum: No registered users and 5 guests