Welcome, Guest
Username Password: Remember me

Ordering Problem In Content Plugin Order
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Ordering Problem In Content Plugin Order

Ordering Problem In Content Plugin Order 2 years, 1 month ago #740

First I Would Like To Thanks CEDIT For Creating This Plugin This Is Very Useful For Me....But I'm Facing little problem..

I'm Using Disqus Comment Plugin (by JoomlaWorks) Which coming just below the articles..But Add Article Footer Plugin coming below the discus comment system I have change the Content plugin orders in the plugin manager...but its not working....still its showing below the comment system..

Thanks

Re:Ordering Problem In Content Plugin Order 2 years, 1 month ago #743

  • alexlr
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
I had the same problem (I'm using DISQUS as well). Here's your solution.

You'll need to edit the cedit_articlefooter.php file located in the content (which is inside plugins) – /plugins/content/cedit_articlefooter.php.

On line 28 (approximately) you'll find this function:

function onAfterDisplayContent( &$article, &$params, $limitstart )


Replace that with this:

function onPrepareContent( &$article, &$params )


Then, at the bottom of the php file, locate this:
      if ( $user->get('username') == '' ) {
         // Guest user
         return $guest_msg;
      } else {
         // Registered user
         return $reg_msg;
      }


And switch it to this:

    if ( $user->get('username') == '' ) {
         // Guest user
         $article->text .= $guest_msg;
      } else {
         // Registered user
         $article->text .= $reg_msg;
      }


Assuming your plugin order is set correctly (so that this plugin is set to display before the DISQUS plugin) you'll be in business. Hope this helps.

Re:Ordering Problem In Content Plugin Order 2 years, 1 month ago #746

Alex, thanks very much for posting your solution to this problem.

I will look into it in more depth when I have the time, and update the plugin appropriately. I used onAfterDisplayContent as for my purposes, I wanted the footer to ALWAYS be displayed as the last item. It makes sense that not everyone would want this, so I will look into updating with your changes so that the appearance can be chosen by the site admin.
  • Page:
  • 1
Time to create page: 0.26 seconds
Copyright © 2009 www.cedit.biz. All rights reserved.