test
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • Ing. Ervin Zatko EASY Friend
    #195131

    Hi

    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 Friend
    #524027

    I need to debug directly on your site, please PM me url, admin credentials of your site. I will help you out.

    MoonSailor Friend
    #524219

    I 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; ?>


    1. 7140555214
    2. 8766612019
    Ing. Ervin Zatko EASY Friend
    #524287

    Thank 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 Friend
    #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 Friend
    #524613

    Is 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 Friend
    #524686

    You 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;
    }
    }

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