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 » 4 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.
    Sociable | Surveys | 
    CjForum | Polls | Answers | Quizzes | Quotes | GPS ToolsCjFit | CjBlog


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

    by » 4 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 » 4 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.
    Sociable | Surveys | 
    CjForum | Polls | Answers | Quizzes | Quotes | GPS ToolsCjFit | CjBlog


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

    by » 4 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

Trending Topics

Athor and category hide
  • 0 replies
Hello, I am new to Community Polls. I already come that far to...

Several issues identified in the Groups Create/Edit
  • 14 replies
Hi, Today I logged into my Sociable front end, clicked on Groups...

community polls - no vote possible
  • 2 replies
Dear all, I face a problem with polls. If I create a poll e.g. with...

500 error when trying to create a poll in Community Polls
  • 5 replies
I just installed Community Polls and cannot even create a poll. I...

Sending email to people who have subscribed to a topic
  • 15 replies
If a user has subscribed to a category, then they are supposed to...