Keyword

How to increase title character limit?

More
13 years 4 months ago #96705 by abe
Increase title character limit

I've tried to search if this was previously answered but I couldn't find it anywhere.


I'm trying to increase max character limit to 350 characters for the k2 items.


Can somebody help me how to achieve this?

Many thanks

Please Log in or Create an account to join the conversation.

More
13 years 4 months ago #96706 by abe
Replied by abe on topic How to increase title character limit?
Bump.

Anyone?

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #96707 by abe
Replied by abe on topic How to increase title character limit?
No one knows the answer?

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #96708 by Andrea Vigato
Replied by Andrea Vigato on topic How to increase title character limit?
go to your DB in phpmyadmin, edit the jos_k2_items, choose structure, edit title, change length from 255 to 350....

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #96709 by abe
Replied by abe on topic How to increase title character limit?
I did it like you described it but it doesn't work. It seems that the form is now allowing input of more than 255 Chars.

any ideas what is controlling that?

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #96710 by Andrea Vigato
Replied by Andrea Vigato on topic How to increase title character limit?
Have you tried to input a new title after editing item table?

 

I've done it the same way for introtext field and was ok....try to use mediumtext instead of varchar(n) if you still have problem.

 

For what i know there isn't something else controlling that. 

 

abe said:

I did it like you described it but it doesn't work. It seems that the form is now allowing input of more than 255 Chars.

any ideas what is controlling that?

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #96711 by abe
Replied by abe on topic How to increase title character limit?
I've tried mediumtext but it doesn't work for me. The title has been cut after 255 chars. When I paste the text in K2 title in the Joomla backend I can't see the rest of the text after 255 chars even before I save it?

 

I've found simmilar problems on the other forum with one guy using phocagallery.

www.phoca.cz/forum/viewtopic.php?f=31&t=3732

 

Hi, varchar can get at the most 255 chars, so you need to set TEXT there then you should be able save there more then 255 characters... Title is not save in textarea type but in input type text, so you need to change the values there too:E.g. line 60administrator\components\com_phocadownload\views\phocadownload\tmpl\form.php

<span class="syntaxhtml">&lt;input class="text_area" type="text" name="title" id="title" size="32" maxlength="250" value="<span class="syntaxdefault">&lt;?php </span></span>
There has to be the same thing for the K2? What do you think?

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #96712 by abe
Replied by abe on topic How to increase title character limit?
Guys I've found it!

 

You have to edit administrator\components\com_k2\views\item\tmpl\default.php file and there is a code at line 178

&lt;td&gt;&lt;input class="text_area k2TitleBox" type="text" name="title" id="title" maxlength="250" value="&lt;?php echo $this-&gt;row-&gt;title; ?&gt;" /&gt;&lt;/td&gt;

 

that needs to be changed to :

 

&lt;td&gt;&lt;input class="text_area k2TitleBox" type="text" name="title" id="title" maxlength="350" value="&lt;?php echo $this-&gt;row-&gt;title; ?&gt;" /&gt;&lt;/td&gt;


Do the same for the alias at line 184:

&lt;td&gt;&lt;input class="text_area k2TitleBox" type="text" name="alias" id="alias" maxlength="350" value="&lt;?php echo $this-&gt;row-&gt;alias; ?&gt;" /&gt;&lt;/td&gt;

 


 

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #96713 by Andrea Vigato
Replied by Andrea Vigato on topic How to increase title character limit?
oh :) yes, stupid maxlength....nice one :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum