-
AuthorPosts
-
Ing. Ervin Zatko EASY Friend
Ing. Ervin Zatko EASY
- Join date:
- September 2014
- Posts:
- 127
- Downloads:
- 406
- Uploads:
- 16
- Thanks:
- 19
- Thanked:
- 6 times in 1 posts
February 23, 2014 at 10:25 pm #195131Hi
I use template JA Muzic and I need display bookmark plugin before article (after title). But it not work.
How I can correct these probelm???Thank you for your quick reply.
Ervin
MoonSailor FriendMoonSailor
- Join date:
- November 2011
- Posts:
- 1106
- Downloads:
- 0
- Uploads:
- 245
- Thanks:
- 89
- Thanked:
- 248 times in 223 posts
February 24, 2014 at 7:07 am #524027I need to debug directly on your site, please PM me url, admin credentials of your site. I will help you out.
MoonSailor FriendMoonSailor
- Join date:
- November 2011
- Posts:
- 1106
- Downloads:
- 0
- Uploads:
- 245
- Thanks:
- 89
- Thanked:
- 248 times in 223 posts
February 25, 2014 at 4:23 am #524219I checked your site and see that with plugin position “afterDisplayTitle”, it only shows when setting “Show Intro Text” as “Hide”
[PHP]
<?php if (!$params->get(‘show_intro’)) : ?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php endif; ?>
[/PHP]Menu configuration:
Content component configuration:
In the case, you can:
– Set param “Show Intro Text” as “Hide”
– Or open the “/templates/ja_muzic/html/com_content/article/default.php” file, find
[PHP]
<?php if (!$params->get(‘show_intro’)) : ?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php endif; ?>
[/PHP]
Replace it with:
<?php echo $this->item->event->afterDisplayTitle; ?>-
Ing. Ervin Zatko EASY Friend
Ing. Ervin Zatko EASY
- Join date:
- September 2014
- Posts:
- 127
- Downloads:
- 406
- Uploads:
- 16
- Thanks:
- 19
- Thanked:
- 6 times in 1 posts
February 25, 2014 at 11:27 am #524287Thank you for you reply, but it is not a good solution for me, because on some articles I dont need display these plugin.
No other solution?
MoonSailor FriendMoonSailor
- Join date:
- November 2011
- Posts:
- 1106
- Downloads:
- 0
- Uploads:
- 245
- Thanks:
- 89
- Thanked:
- 248 times in 223 posts
February 26, 2014 at 7:05 am #524406<blockquote>
because on some articles I dont need display these plugin.
</blockquote>
In this case, you need to customize the plugin, open the file “plugins/content/jabookmark/jabookmark.php”, find this function:
function onContentAfterTitle($context, &$article, &$params, $limitstart = 0){if ($this->params->get('location') == 'onContentAfterTitle' && $this->params->get('mode') == 'auto') {
$text = $this->render($this->params, $context,$article);
return $text;
}
}
then change it to:
function onContentAfterTitle($context, &$article, &$params, $limitstart = 0){
$allowid = array('1','2','3');
if ($this->params->get('location') == 'onContentAfterTitle' && $this->params->get('mode') == 'auto' && in_array($article->id,$allowid)) {
$text = $this->render($this->params, $context,$article);
return $text;
}
}
with $allowid – id array of article.
Ing. Ervin Zatko EASY FriendIng. Ervin Zatko EASY
- Join date:
- September 2014
- Posts:
- 127
- Downloads:
- 406
- Uploads:
- 16
- Thanks:
- 19
- Thanked:
- 6 times in 1 posts
February 27, 2014 at 10:14 am #524613Is there a way set category id, not article id? Because is there a lot of articles in category where I dont need display plugin.
MoonSailor FriendMoonSailor
- Join date:
- November 2011
- Posts:
- 1106
- Downloads:
- 0
- Uploads:
- 245
- Thanks:
- 89
- Thanked:
- 248 times in 223 posts
February 28, 2014 at 2:29 am #524686You can try this tweak (the same file above):
function onContentAfterTitle($context, &$article, &$params, $limitstart = 0){
//Array id of articles allow show plugin
$allowid = array('1','2','3');
//Array category id allow show plugin
$allowcatid = array('1','2','3');
if ($this->params->get('location') == 'onContentAfterTitle' && $this->params->get('mode') == 'auto' && in_array($article->id,$allowid) && in_array($article->catid,$allowcatid) ) {
$text = $this->render($this->params, $context,$article);
return $text;
}
}1 user says Thank You to MoonSailor for this useful post
-
AuthorPosts
Viewing 7 posts - 1 through 7 (of 7 total)This topic contains 7 replies, has 2 voices, and was last updated by MoonSailor 10 years, 9 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum