change for making about text variable
change for making about text variable
Hi,
made some adjustments in cjblog to better fit our needs. Would really like to see some of these adjustments to be part of the distributed package: this extends the functionality of the component and saves me the redoing (and retesting) of the changes manually every time I update cjblog / cjlib :woohoo:
use case:
currently the length of the about text of an author is (hard coded) limited to 180 characters. On our site this is to short (taking into account that all formatting strings also are part of the 180 characters).
proposed change:
Make the length of the about text below the article variable and configuarble via the cjblog config screen.
Changes:
based on cjblog version 1.2.2, cjlib version 2.0.20
in ./administrator/language/en-GB/en-GB.com_cjblog.ini add:
in /administrator/components/com_cjblog/config.xml add at the end of <fieldset name="articles" label="JGLOBAL_ARTICLES">:
in /component/com_cjlib/framework/functions.php add the lines with #add:
made some adjustments in cjblog to better fit our needs. Would really like to see some of these adjustments to be part of the distributed package: this extends the functionality of the component and saves me the redoing (and retesting) of the changes manually every time I update cjblog / cjlib :woohoo:
use case:
currently the length of the about text of an author is (hard coded) limited to 180 characters. On our site this is to short (taking into account that all formatting strings also are part of the 180 characters).
proposed change:
Make the length of the about text below the article variable and configuarble via the cjblog config screen.
Changes:
based on cjblog version 1.2.2, cjlib version 2.0.20
in ./administrator/language/en-GB/en-GB.com_cjblog.ini add:
COM_CJBLOG_ABOUT_LENGTH="About text Character Limit"
COM_CJBLOG_ABOUT_LENGTH_DESC="Limits the number of characters (approx) to limit in the about author text shown below articles."
in /administrator/components/com_cjblog/config.xml add at the end of <fieldset name="articles" label="JGLOBAL_ARTICLES">:
<field name="about_length" type="text" label="COM_CJBLOG_ABOUT_LENGTH" description="COM_CJBLOG_ABOUT_LENGTH_DESC" default="180"/>
in /component/com_cjlib/framework/functions.php add the lines with #add:
public static function substrws( $text, $len=180, $tags=array()) {
$params = JComponentHelper::getParams(CJBLOG); #add
$len = $params->get('about_length', 180); #add
if(function_exists('mb_strlen')){
Access to viewing replies is restricted.
Showing 6 of 6 replies
You do not have permissions for replying to this topic.