-
AuthorPosts
-
mikel2004 Friend
mikel2004
- Join date:
- January 2012
- Posts:
- 201
- Downloads:
- 0
- Uploads:
- 51
- Thanks:
- 24
- Thanked:
- 3 times in 1 posts
March 14, 2014 at 6:58 pm #195794Hi!
I wish to modify the size of the titles in JA Bulletin module, and I wish the font: “Arial Narrow, Arial, sans-serif” too.
What can I do?Thanks!
timtecsa Friendtimtecsa
- Join date:
- October 2009
- Posts:
- 1382
- Downloads:
- 86
- Uploads:
- 327
- Thanks:
- 197
- Thanked:
- 132 times in 34 posts
March 15, 2014 at 12:59 am #526781Hi Mikel,
Are you using Chrome or Firefox browser? In Chrome, for example, you can right click on the JA Bulletin title and select “Inspect Element”. In Firefox you select “Inspect Element with Firebug”. Both of these browser extensions help you to find the CSS you wish to modify and to try it out before your eyes and before you commit to editing the actual CSS in Teline IV.
http://superuser.com/questions/4640/what-is-the-inspect-element-feature-in-google-chrome
http://www.wikihow.com/Use-the-Inspect-Element-in-Mozilla-FirefoxGood luck.
mikel2004 Friendmikel2004
- Join date:
- January 2012
- Posts:
- 201
- Downloads:
- 0
- Uploads:
- 51
- Thanks:
- 24
- Thanked:
- 3 times in 1 posts
March 15, 2014 at 3:16 am #526784I don’t understad this.
I wish to modify the size of the titles in JA Bulletin module, and I wish the font: “Arial Narrow, Arial, sans-serif” too.
What can I do?Thanks
<em>@timtecsa 416434 wrote:</em><blockquote>Hi Mikel,
Are you using Chrome or Firefox browser? In Chrome, for example, you can right click on the JA Bulletin title and select “Inspect Element”. In Firefox you select “Inspect Element with Firebug”. Both of these browser extensions help you to find the CSS you wish to modify and to try it out before your eyes and before you commit to editing the actual CSS in Teline IV.
http://superuser.com/questions/4640/what-is-the-inspect-element-feature-in-google-chrome
http://www.wikihow.com/Use-the-Inspect-Element-in-Mozilla-FirefoxGood luck.</blockquote>
timtecsa Friendtimtecsa
- Join date:
- October 2009
- Posts:
- 1382
- Downloads:
- 86
- Uploads:
- 327
- Thanks:
- 197
- Thanked:
- 132 times in 34 posts
March 15, 2014 at 11:27 am #526814Clue: Start here with font change in megamenu.css
or here: /css/mod_jabulletin.css” in template “ja_teline_iv_t3”.
mikel2004 Friendmikel2004
- Join date:
- January 2012
- Posts:
- 201
- Downloads:
- 0
- Uploads:
- 51
- Thanks:
- 24
- Thanked:
- 3 times in 1 posts
March 15, 2014 at 3:17 pm #526825Wooooooooow!! Superbe!!
Any two thing please…
1) How can I have only 30 maximum characters of the titles?
2) I try to reduce the spacing between the lines of the same title, with this code: line-height: 95%;
but nothing change. What can I do?Thanks about your help!
timtecsa Friendtimtecsa
- Join date:
- October 2009
- Posts:
- 1382
- Downloads:
- 86
- Uploads:
- 327
- Thanks:
- 197
- Thanked:
- 132 times in 34 posts
March 16, 2014 at 12:26 am #526840It looks to me like you have got the hang of it 🙂
I’ve no idea how to limit the title length but I guess someone at Joomlart might.Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
March 18, 2014 at 4:43 am #527092In order to limit the character in the title of JA Bulletin module, you can open this file: templatesja_teline_iv_t3htmlmod_jabulletindefault.php
Underneath this line of code:
[PHP] defined(‘_JEXEC’) or die(‘Restricted access’); [/PHP]
Add this function:
[PHP]
if(!function_exists(‘cut_string’)){
function cut_string($title, $max)
{
if($title!=”){
if(is_array($title)) list($string, $match_to) = $title;
else { $string = $title; $match_to = $title{0}; }$match_start = stristr($string, $match_to);
$match_compute = strlen($string) – strlen($match_start);if (strlen($string) > $max)
{
if ($match_compute < ($max – strlen($match_to)))
{
$pre_string = substr($string, 0, $max);
$pos_end = strrpos($pre_string, ” “);
if($pos_end === false) $string = $pre_string.”…”;
else $string = substr($pre_string, 0, $pos_end).”…”;
}
else if ($match_compute > (strlen($string) – ($max – strlen($match_to))))
{
$pre_string = substr($string, (strlen($string) – ($max – strlen($match_to))));
$pos_start = strpos($pre_string, ” “);
$string = “…”.substr($pre_string, $pos_start);
if($pos_start === false) $string = “…”.$pre_string;
else $string = “…”.substr($pre_string, $pos_start);
}
else
{
$pre_string = substr($string, ($match_compute – round(($max / 3))), $max);
$pos_start = strpos($pre_string, ” “); $pos_end = strrpos($pre_string, ” “);
$string = “…”.substr($pre_string, $pos_start, $pos_end).”…”;
if($pos_start === false && $pos_end === false) $string = “…”.$pre_string.”…”;
else $string = “…”.substr($pre_string, $pos_start, $pos_end).”…”;
}$match_start = stristr($string, $match_to);
$match_compute = strlen($string) – strlen($match_start);
}return $string;
}else{
return $string =”;
}
}
}
[/PHP]
Then you navigate to the div tag which displays the title:
[PHP]
<div class=”box-right”>
<a href=”<?php echo $item->link; ?>” class=”mostread”><?php echo $item->text; ?></a>
[/PHP]and replace it with:
[PHP]
<div class=”box-right”>
<a href=”<?php echo $item->link; ?>” class=”mostread”><?php echo cut_string($item->text, 30); ?></a>
[/PHP]For your convenience, I attached the ‘default.php’ file here so you can have a closer look.
AuthorPostsViewing 7 posts - 1 through 7 (of 7 total)This topic contains 7 replies, has 3 voices, and was last updated by Saguaros 10 years, 9 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum