-
AuthorPosts
-
activha Friend
activha
- Join date:
- July 2012
- Posts:
- 114
- Downloads:
- 17
- Uploads:
- 6
- Thanks:
- 5
- Thanked:
- 1 times in 1 posts
December 24, 2012 at 10:04 am #183387Upgrading to 1.0.7 changed the size of intro text which is now way too important and not limited as in previous versions.
Is there a new setting somewhere ?
When my intro text is say 100 words, it was limited to 30 characters only in 1.0.6 and with 1.0.7 the whole 100 words are displayed
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
December 25, 2012 at 7:12 am #477472I’m not sure what you are implying. Just for better clarification, please include screenshot and your site URL here for further investigation.
activha Friendactivha
- Join date:
- July 2012
- Posts:
- 114
- Downloads:
- 17
- Uploads:
- 6
- Thanks:
- 5
- Thanked:
- 1 times in 1 posts
January 4, 2013 at 10:01 pm #478474Well try to go to http://activ-ha.com/économie to see the problems :
– first introtext is not limited
– a post is always loaded at each cron job ( numbers 11, 12, 13, 14 & 15 for these last hours, it will be repeated endly if I dont stop the plugin)Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
January 5, 2013 at 4:29 am #478490Thanks for contacting to us. You can fix it with my suggestion:
<blockquote>templates/ja_wall/template_tools.php</blockquote>
find this script
public static function extractFirstParagraph($text){
static $regex = '#<p[^>]*>(.*)</p>#i';
static $allowtag = '<a><b><strong><br>';$result = '';
if (preg_match_all ($regex, $text, $matches)) {
$p = array();
$c = 0;foreach ($matches[1] as $match) {
$t = trim(strip_tags ($match, $allowtag));
if ($t) $p[] = $t;
$c += strlen($t);
if ($c > 50) break;
}
$t = implode ('<br/>', $p);$result = (strlen($t) > 7) ? $t : trim(strip_tags ($text, $allowtag));
} else {
$result = trim(strip_tags ($text, $allowtag));
}return $result;
}
change to
public static function extractFirstParagraph($title, $max=100)
{
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 ='';
}
}
Let me know if it helpsactivha Friendactivha
- Join date:
- July 2012
- Posts:
- 114
- Downloads:
- 17
- Uploads:
- 6
- Thanks:
- 5
- Thanked:
- 1 times in 1 posts
January 5, 2013 at 11:53 am #478538Well this code replaces completely the first one that we use on other areas of the website.
Is this possible to combine both ? (For now I have deactivated introtext in the category activations)
And do you have a suggestion for the repeated items retrieved by JA Social plugin on the same page
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
January 7, 2013 at 7:55 am #478667I have checked on new version JA Wall Template, i see it apply this function extractFirstParagraph many time on customize template, see the screenshot
You can apply this fixes with only home page on your site by:
1) Download and extract this my attachment file, copy it to this path
<blockquote>templates/ja_wall/template_tools.php</blockquote>
2) <blockquote>Open templates/ja_wall/html/com_content/featured/default_item.php file</blockquote>
find
$introtext = WallHelper::extractFirstParagraph($this->item->introtext);
change to
$introtext = WallHelper::DropText($this->item->introtext);
activha Friendactivha
- Join date:
- July 2012
- Posts:
- 114
- Downloads:
- 17
- Uploads:
- 6
- Thanks:
- 5
- Thanked:
- 1 times in 1 posts
January 7, 2013 at 11:32 am #478714Thanks I’ll do it this way !
Could you help us solve the second problem i.e. the repeated item always retrieved by JA Social ?
It always retrieve one item each cron job and I cannot figure why ?
See http://activ-ha.com/économieNinja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
January 8, 2013 at 3:38 am #478858About the problem of duplicate item when JA Social Feed get data from social networks you can upgrade the plugin to latest version : http://www.joomlart.com/forums/downloads.php?do=cat&id=20440
Let me know if it helps
activha Friendactivha
- Join date:
- July 2012
- Posts:
- 114
- Downloads:
- 17
- Uploads:
- 6
- Thanks:
- 5
- Thanked:
- 1 times in 1 posts
January 8, 2013 at 8:59 am #478889No this is already the latest version 1.0.7 this is why I am asking your help on this
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
January 9, 2013 at 9:21 am #479048<em>@activha 354045 wrote:</em><blockquote>No this is already the latest version 1.0.7 this is why I am asking your help on this</blockquote>
I would need to take a closer look at your site. Please pm me with admin access and ftp account. I shall check itactivha Friendactivha
- Join date:
- July 2012
- Posts:
- 114
- Downloads:
- 17
- Uploads:
- 6
- Thanks:
- 5
- Thanked:
- 1 times in 1 posts
January 10, 2013 at 10:58 am #479252I sent PM yesterday, did you have time to have a look ?
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
January 11, 2013 at 3:57 am #479353<em>@activha 354511 wrote:</em><blockquote>I sent PM yesterday, did you have time to have a look ?</blockquote>
I have received your pm but I need to check the source code on your site. Please pm me ftp account on your site. I shall check itactivha Friendactivha
- Join date:
- July 2012
- Posts:
- 114
- Downloads:
- 17
- Uploads:
- 6
- Thanks:
- 5
- Thanked:
- 1 times in 1 posts
January 15, 2013 at 8:47 am #479806I cannot PM ftp account as we use AWS with ssh only.
but on the website you have access to extplorer for the source code.
Can you help me on this ?
Duplicates items are really frustrating.
By the way, I still have problem with the introtext code. Droptext function does not work very well for all introtext and I cannot use one or the other function, we need both on a page.
Unless we found a way to put some ja social retrieved introtext in full text only ?Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
January 15, 2013 at 10:06 am #479823I have tried to access com_extplorer component on your site but no success, see the screenshot.
I can not help you more as i do not have access on your site.
activha Friendactivha
- Join date:
- July 2012
- Posts:
- 114
- Downloads:
- 17
- Uploads:
- 6
- Thanks:
- 5
- Thanked:
- 1 times in 1 posts
January 16, 2013 at 5:08 pm #480053Well I just tried now with chrome and safari and had no problem with Extplorer to browse files and folder on my macbook air !
Could you try with another browser maybe ?
AuthorPostsThis topic contains 20 replies, has 2 voices, and was last updated by Ninja Lead 11 years, 10 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum