Hi,

We are currently using a new feature of Easy Profile to display the author's linked social media accounts in his author profile.

This is done via the code {user socialconnect xyz} which is then parsed via the Easy Profile content plugin.

 

Works (almost) perfect: the follow me buttons show up nice under the blog, but they do not show up in the authors user-profile-layout page (see attached image)

 

I can adjust the code for this page to also be subject to content plugins, but wanted to check here first.

  1. Is this a good idea?
  2. should it be always on (easiest)
  3. Should it be a configuration option: 'Prepare content': Yes / No? (like the custom html module)
problem.docx (You do not have access to download this file.)
15603_1_contentplugincjblog.png (You do not have access to download this file.)

Sharing = Caring ㋛

Like it on Facebook, Tweet it or share this topic on other bookmarking websites.
  • Re: parse user-profile-layout page thru content plugins

    by » 3 years ago


    I suggest only option 3 as the content plugins usually mess up entire layout on multiple articles page. A simple code like this in views/blog/view.html.php will do

    // Compute the survey slugs and prepare description (runs content plugins).
    foreach ($this->articles as &$item)
    {
    $item->event = new stdClass();
    $dispatcher = JEventDispatcher::getInstance();

    // Old plugins: Ensure that text property is available
    if (! isset($item->text))
    {
    $item->text = $item->description;
    }

    JPluginHelper::importPlugin('content');
    $dispatcher->trigger('onContentPrepare', array('com_cjblog.blog', &$item, &$item->params, 0));

    // Old plugins: Use processed text as description
    $item->description = $item->text;

    $results = $dispatcher->trigger('onContentAfterTitle', array('com_cjblog.blog', &$item, &$item->params, 0));
    $item->event->afterDisplayTitle = trim(implode("\n", $results));

    $results = $dispatcher->trigger('onContentBeforeDisplay', array('com_cjblog.blog', &$item, &$item->params, 0));
    $item->event->beforeDisplayContent = trim(implode("\n", $results));

    $results = $dispatcher->trigger('onContentAfterDisplay', array('com_cjblog.blog', &$item, &$item->params, 0));
    $item->event->afterDisplayContent = trim(implode("\n", $results));

    $item->tags = new JHelperTags;
    $item->tags->getItemTags('com_content.article' , $item->id);
    }

    Follow me on twitter: https://twitter.com/corejoomla
    If you use our extensions, please post a rating and a review at the Joomla! Extensions Directory.
    CjFitCjForum | Polls | Answers | Quizzes | Quotes | Surveys | GPS Tools | CjBlog


  • Re: parse user-profile-layout page thru content plugins

    by » 3 years ago


    Hi Maverick,

    sorry for the late reply. was unable to login on your site seems that has been fixed :)

    Just had a look at your suggestion, would like do propose a different approach.

     

    Only place the content plugin is not triggered where it should in my case in is the user profile page.

    It is possible to parse specific text via the content plugins by using the following function:

    JHtml::_('content.prepare', $text);

    (see: https://docs.joomla.org/Triggering_content_plugins_in_your_extension)

     

    so when I change views/profile/tmpl/default.php

    <div class="user-about">
                            <?php echo JHtml::_('content.prepare', CJFunctions::preprocessHtml($this->profile['about'], false, $bbcode));?>
    </div>

    the content plugins get triggered on only the about text in the user profile page.

    Next thing is to make this conditional with a back-end parameter.

     

    Would this solution work for you?


    Sharing = Caring ㋛


  • Re: parse user-profile-layout page thru content plugins

    by » 3 years ago


    That should work.

    Just would like to let you know that I am already started working on v4 and have already completed most of the coding part. Also there are significant amount of changes (end-to-end) in this version. I will include this particular change in that version.


    Follow me on twitter: https://twitter.com/corejoomla
    If you use our extensions, please post a rating and a review at the Joomla! Extensions Directory.
    CjFitCjForum | Polls | Answers | Quizzes | Quotes | Surveys | GPS Tools | CjBlog


  • Re: parse user-profile-layout page thru content plugins

    by » 3 years ago


    Maverick wrote:

    That should work.

    Just would like to let you know that I am already started working on v4 and have already completed most of the coding part. Also there are significant amount of changes (end-to-end) in this version. I will include this particular change in that version.

    Thanks Maverick for the update, was wondering what the status was and I am very pleased that you are actively working on the new version. Can't wait to test :)


    Sharing = Caring ㋛


You do not have permissions to reply to this topic.

Powered by CjForum

Site Search

Trending Topics

GPX Tracks Module
  • 1 reply
- Add cluster to  GPX Tracks Module - When a category is...

Default marker for all categories
  • 1 reply
Hi, In GPS tools / Category / GPS Options I can select the default...

Translation of "Topic-Date
  • 2 replies
Hi Maverick I found another translation issue and that is the...

plg cbcjforum
  • 4 replies
Hi How can I translate the plugin cbcjforum in to my language?

Upload Track button not working
  • 5 replies
Hallo, I have a problem uploading new gps tracks. Clicking on the...

Subscribe Newsletter