Welcome, Guest
Please Login or Register.    Lost Password?

Ordering Problem In Content Plugin Order
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Ordering Problem In Content Plugin Order
#740
Ordering Problem In Content Plugin Order 8 Months, 1 Week ago Karma: 0
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
devilboy_1989
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#743
Re:Ordering Problem In Content Plugin Order 8 Months, 1 Week ago 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:

Code:

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


Replace that with this:

Code:

function onPrepareContent( &$article, &$params )


Then, at the bottom of the php file, locate this:
Code:


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



And switch it to this:

Code:

    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.
alexlr
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#746
Re:Ordering Problem In Content Plugin Order 8 Months ago Karma: 7
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.
purplepomegranite
Administrator
Posts: 656
graph
User Offline Click here to see the profile of this user
Location: Winchester, UK Birthday: 06/04
The administrator has disabled public write access.
 
Go to topPage: 1
Copyright © 2009 www.cedit.biz. All rights reserved.