sheep04
Results 1 - 1 of 1
bysheep04, February 8, 2009
Hi, I've been working around Mini Frontpage module for a while for my client's site. It's still have to be developed but overall it was good for display thumbnail and title.
I've been working all this day to find how to limit title text, and finally I've found :D
Note that I'm a web designer so I've never learn PHP and have no idea about programing, so this solution make me very proud TwT~
To limit title text..
In "helper.php" add this line..
- - - - - - - - - - - - - - - - - - - - - - - -
$limit_title = intval( $params->get( 'limit_title', 50 ) );
- - - - - - - - - - - - - - - - - - - - - - - -
above or after this line..
- - - - - - - - - - - - - - - - - - - - - - - -
$limit = intval( $params->get( 'limit', 200 ) );
- - - - - - - - - - - - - - - - - - - - - - - -
And add this line..
- - - - - - - - - - - - - - - - - - - - - - - -
if($limit_title > 0) {
$rows[$r]->title = fptn_limittext($rows[$r]->title,$allowed_tags,$limit_title);
}
- - - - - - - - - - - - - - - - - - - - - - - -
Above or after this line..
- - - - - - - - - - - - - - - - - - - - - - - -
if($limit > 0) {
$rows[$r]->introtext = fptn_limittext($rows[$r]->introtext,$allowed_tags,$limit);
}
- - - - - - - - - - - - - - - - - - - - - - - -
Then edit "mod_minifrontpage.xml"
Add
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - -
After this
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - -
Hehe... :D
I've been working all this day to find how to limit title text, and finally I've found :D
Note that I'm a web designer so I've never learn PHP and have no idea about programing, so this solution make me very proud TwT~
To limit title text..
In "helper.php" add this line..
- - - - - - - - - - - - - - - - - - - - - - - -
$limit_title = intval( $params->get( 'limit_title', 50 ) );
- - - - - - - - - - - - - - - - - - - - - - - -
above or after this line..
- - - - - - - - - - - - - - - - - - - - - - - -
$limit = intval( $params->get( 'limit', 200 ) );
- - - - - - - - - - - - - - - - - - - - - - - -
And add this line..
- - - - - - - - - - - - - - - - - - - - - - - -
if($limit_title > 0) {
$rows[$r]->title = fptn_limittext($rows[$r]->title,$allowed_tags,$limit_title);
}
- - - - - - - - - - - - - - - - - - - - - - - -
Above or after this line..
- - - - - - - - - - - - - - - - - - - - - - - -
if($limit > 0) {
$rows[$r]->introtext = fptn_limittext($rows[$r]->introtext,$allowed_tags,$limit);
}
- - - - - - - - - - - - - - - - - - - - - - - -
Then edit "mod_minifrontpage.xml"
Add
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - -
After this
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - -
Hehe... :D


