Page 3 of 3
Only "30 caracters" to the article title links
Posted: Sat 3. Dec 2005, 11:35
by Jakim José
How to do to appear only "x" letters in article links?
Example:
Only 30 caracters
The original titles are:
- "Michael Jordan is on fire, but chicago bulls loose".
- "Chicago Bulls loose the championship on the last minute".
The desired result is:
2005/02/23 - Michael Jordan is on fire, but ...
2005/02/24 - Chicago Bulls loose the cham ...
Re: new improve ?
Posted: Mon 30. Jan 2006, 19:30
by isac
snezko wrote:is it possible change the second variable in this tag by something more dynamic ? for example CURRENT how is it in menu ?
because than i need only one implementation of tag in the template for all the web.
That's what i'm waiting for soo loooong
Posted: Mon 30. Jan 2006, 20:34
by Kosse
That's what i'm waiting for soo loooong
It has been there for long too ... didn't see this post before
look into config/phpwcms/conf.template_default.inc.php
find // new articles (around line 223)
Code: Select all
// new articles
$template_default["news"]["before"] = '<div class="news">';
$template_default["news"]["after"] = '</div>';
$template_default["news"]["link_before"] = '<p>';
$template_default["news"]["link_after"] = '</p>';
$template_default["news"]["link_symbol"] = '';
$template_default["news"]["link_target"] = '';
$template_default["news"]["link_length"] = 0; //if 0 no limit
The ["link_length"] gives you that you can put 30... or whatever.
Code: Select all
$template_default["news"]["link_length"] = 30; //if 0 no limit
Cheers
Posted: Mon 30. Jan 2006, 21:03
by isac
@kosse
you quote the wrong post

you should quote Jakim José
How to do to appear only "x" letters in article links?
Example:
Only 30 caracters
The original titles are:
- "Michael Jordan is on fire, but chicago bulls loose".
- "Chicago Bulls loose the championship on the last minute".
The desired result is:
2005/02/23 - Michael Jordan is on fire, but ...
2005/02/24 - Chicago Bulls loose the cham ...
It's an different thing what I want!
Let's say you have category NEWS with 5 articles in it:
+ NEWS
++ article 1
++ article 2
++ article 3
++ article 4
++ article 5
If you use this RP like a menu (like i do) when you go page 2 (article 2)
you should get the same menu but with current link in different style
+ NEWS
++ article 1
++ article 2
++ article 3
++ article 4
++ article 5
You know how to do it? post here and you be my hero (kidding)
Thanks
Isac
Posted: Mon 30. Jan 2006, 22:12
by Kosse
isac wrote:@kosse
you quote the wrong post

you should quote Jakim José
...
You know how to do it? post here and you be my hero (kidding)
Thanks
Isac

sorry, my bad (broke my glasses yesterday <-- funny part is that it's true

...
Well, as for the RT used as menu... mmmm...
1) half a solution: maybe just a:link with css... but that would apply to all the page, except if u put a special a with a class to your menu, then at least it would highlight the article you clicked on (but it's half a solution because if u click more then one, you have 2 a:linked highlighted).
Maybe...
2) I thought about this before because I stummmmbled on the same thing, so what I thought is a bit complicated but might work (but never did it and maybe there's an easier solution): a little php code that gets the url, something like $QUERY_STRING then compare this string (var1) to the a href of your link(var2). If var1 = var2 then apply another css if not, do nothing. Off course, in order to get this working we have to modify function get_new_articles in front.func.inc.php ... anyway not an easy job

but ... possible, if I try I'll spend hours and hours on it (maybe finding a solution) but honestly my php skills are too few to be of a real help. Maybe some guys here can do that or have better solutions?
So, I guess I won't be your hero
Good luck
Cheers
Posted: Tue 31. Jan 2006, 13:54
by isac
Sorry for your glasses.
I really hope someone develop an RT for this purpose! I think it's very usefull for sub article navigation. Don't you?