Header - End of text "..."

Free responsive Joomla 2.5 and 3.x module to present your content with easy and intuitive way.
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Wed Sep 22, 2010 1:54 am
Hi!

I'm using the mod_news_pro_gk4 and I'm having some problems with the configuration.

In "Article Layout", I put a text limit of 20 chars for the header position, but if any title exceeds that amount of chars, I want to be shown the "..." as an end of text.

I can only put "..." for the Text introduction. What shoul I do?


Thanks in advance!
User avatar
Senior Boarder

GK User
Wed Sep 22, 2010 11:04 pm
I searched in "/modules/mod_news_pro_gk4" and there, in the helper.php file, I found this in line 107:

$this->config['more_text_value'] = $params->get('more_text_value','...'); // text overflow value

So I thought about adding the next line:

$this->config['more_title_value'] = $params->get('more_title_value','...');

But nothing happened. Any ideas?

Thanks!
User avatar
Senior Boarder

teitbite
Fri Sep 24, 2010 5:18 pm
Hi

You have added only a param, but You need to use it somewhere but I suggest to use "..." instead of the code You did. For example:

Code: Select all
               $news_header = $renderer->header($this->config, $this->content['ID'][$i], $this->content['CID'][$i], $this->content['SID'][$i], $this->content['title'][$i]) . "...";
User avatar
Moderator

GK User
Fri Sep 24, 2010 10:57 pm
Thanks Teitbite!

But now I need to ask you another question. Where should I put the code you suggest?

Cheers
User avatar
Senior Boarder

teitbite
Sat Sep 25, 2010 4:11 pm
benteveo wrote:
in "/modules/mod_news_pro_gk4" and there, in the helper.php file


Hi

In the same file You mentioned. Please look for the code I gave You. It differs only by the "..." at the end.
User avatar
Moderator

GK User
Sat Sep 25, 2010 9:41 pm
Thanks again. I tried your code but that is not exactly what I'm looking for.

What I want is to replace large titles. For example, if I want 8 chars as a limit, have this:

"Large Title" --> "Large Ti..."

Cheers
User avatar
Senior Boarder

teitbite
Tue Sep 28, 2010 2:33 pm
Hi

If You can determine the number of chars by Yourself in side the code so the line should look like this:

Code: Select all
$news_header = substr( $renderer->header($this->config, $this->content['ID'][$i], $this->content['CID'][$i], $this->content['SID'][$i], $this->content['title'][$i]), 0, 8 ) . "...";


The last number is the number of the chars to display.
User avatar
Moderator

GK User
Tue Sep 28, 2010 4:14 pm
Thanks again teitbite!

I have tried this new code, but I'm still having troubles with my k2 headers (I also tried "$news_header = substr( $renderer->header_k2($this->config..." considering this).

I have sent you an email with the helper.php file. I hope you don't bother.
User avatar
Senior Boarder

teitbite
Wed Sep 29, 2010 10:04 am
Hi

I've changed the concept a little bit, to make it simplier.

Code: Select all
               if($this->config['news_header_order'] == $j) $news_generated_content .= substr( $news_header, 0, 8 ) . "...";


This way You got to change only one line for standard and K2 articles.

Here's the file:
User avatar
Moderator

GK User
Sun Oct 03, 2010 9:04 am
Hello teitbite,

first of all: Keep your superb work up!

Now my problem: It seems, that your solution doesn´t work for K2-Integration...

When I use your code or helper-file, all Heads disappear ad the newstext is bigger. (see Image attached...)

I can´t do the trick... Any hints... ?

BTW: Template is your fantastic The World News...

THX and sorry for my poor english... ;o)
User avatar
Fresh Boarder

teitbite
Sun Oct 03, 2010 9:00 pm
Hi

Yes You're right. With this sulution the closing tag for the header is missing. Please show me Your site. I'll see what is happening that the header is not displayed at all and fix this fix :)
User avatar
Moderator

GK User
Sun Oct 03, 2010 9:13 pm
Hi teitbite,

thank you, i will E-Mail you the helper-file and access to the site.

Best!
User avatar
Fresh Boarder

GK User
Sun Oct 03, 2010 10:36 pm
Please, teitbite or colonication, let me know if you find a solution to this issue. Thanks!
User avatar
Senior Boarder

GK User
Mon Oct 04, 2010 9:28 am
I´m still rotating... :) I will share a solution, if I find it... ;o)
User avatar
Fresh Boarder

teitbite
Mon Oct 04, 2010 5:38 pm
Hi

I'm not sure if I'll be able to do this without the access to ftp :(. Please try this file and if this won't work please send me ftp details.
User avatar
Moderator

GK User
Thu Oct 07, 2010 7:49 am
Sorry, your solution didn´t work. Difference to previous version: The Text is now in right size, but the header still disapears... :(

The site ist hosted on a client server, so I can not give FTP-Access to thirt-party... :(

Any other hint?
User avatar
Fresh Boarder

teitbite
Thu Oct 07, 2010 11:27 pm
Hi

Can You install some ftp component to the panel for me ?
User avatar
Moderator


cron