Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

JoomlaTune Support Forum    JComments component    Bug-reports    Topic: Your current site template doesn't have afterDisplayContent event!
Pages: [1] 2   Go Down
  Print  
Author Topic: Your current site template doesn't have afterDisplayContent event!  (Read 17320 times)
0 Members and 1 Guest are viewing this topic.
fanho
Newbie
*

Karma: 0
Offline Offline

Posts: 1


« on: June 18, 2010, 09:58:16 »

Hello,
I got this error message at install and on every articles of my template:
Your current site template doesn't have afterDisplayContent event!

The funny thing is that Jcomments is working properly  Smiley

I looked in the forum and found people having the problem that Jcomment doesn't display and the fix is to add this ligne to the default.php file.
<?php echo $this->article->event->afterDisplayContent; ?>

If i add this line of code the error message disapears but than I have two Jcomments modules displaying, that's not good!!!

Any idea about how i can get rid of that error message?
My template is Ja ores from Joomlart.

Here is the code of the /templates/templatename/html/com_content/article/default.php

Code:
<?php

defined
('_JEXEC') or die('Restricted access');
$cparams JComponentHelper::getParams ('com_media');

// Get layout extra setting from template parameter
$content  file_get_contentsJPATH_THEMES.DS."ja_ores".DS.'params.ini');
$params  = new JParameter($content);
$blog_theme  $params->get('default_page_layouts'"");
$defaultLayout  "default_";

if(
$blog_theme != ""){
$blog_theme str_replace(" """$blog_theme);
$blog_theme explode("\n"$blog_theme);
if( is_array($blog_theme) )
foreach ($blog_theme as $blt){
$blt str_replace(" """$blt);
$blt trim($blt);
if( strpos($bltJRequest::getVar("Itemid")."=") !== false ){
$blog_theme str_replace(JRequest::getVar("Itemid")."="""$blt);
break;
} else $blog_theme "";
}
else $blog_theme "";
}else 
$blog_theme "default";

$blog_tmpl dirname(__FILE__).DS.$defaultLayout.$blog_theme.'.php';

if (!
is_file ($blog_tmpl)) 
$blog_tmpl dirname(__FILE__).DS.$defaultLayout.'default.php';

include (
$blog_tmpl);
?>

Thank you
Other than that the component is really great  Cheesy

Stephane
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #1 on: June 18, 2010, 14:55:28 »

This message is shown for Super Administrator only and warns him what JComments couldn't found such event in your current template. If all works - don't worry and skip thi s message. In next JComments version I'm going to add an option to suppress this message.
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #2 on: June 23, 2010, 03:28:41 »

Quick fix:

Open file /administrator/components/com_jcomments/admin.jcomments.php
Replace code:
Code: (php)
if (strpos($tmpl, 'afterDisplayContent') === false) {
with
Code: (php)
if (strpos($tmpl, 'afterDisplayContent') === false && !(strpos($tmpl, 'include') !== false || strpos($tmpl, 'require') !== false)) {

Open /plugins/content/jcomments.php and make next modification:

Replace:
Code: (php)
if (strpos($tmpl, 'afterDisplayContent') === false) {
with
Code: (php)
if (strpos($tmpl, 'afterDisplayContent') === false && !(strpos($tmpl, 'include') !== false || strpos($tmpl, 'require') !== false)) {
« Last Edit: December 02, 2010, 02:28:19 by smart » Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
TTom911
Newbie
*

Karma: 0
Offline Offline

Posts: 16


« Reply #3 on: September 29, 2010, 19:39:32 »

I have the same problem with my new template (Galleria Plazza from  TemplatePlazza). I added the lines as sugested but still have the same error message (an jcomments does not show).

Any suggestions?

THANKS!
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #4 on: September 29, 2010, 19:57:38 »

I have the same problem with my new template (Galleria Plazza from  TemplatePlazza)
Do you've any problems with comments displaying? Or just this message?
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
TTom911
Newbie
*

Karma: 0
Offline Offline

Posts: 16


« Reply #5 on: September 30, 2010, 10:38:58 »

as I said in the post already ...  Wink ...  the comments don't show

Must have something to do with the TemplatePlazze template I am using, because jComments works on other templates ok.

P.S.: I had a jQuery conflict issue between the template and another component (Jomres) which I fixed and that work seems to work ok (I switched off some jquery.js in the template folder which come with the template and I am using the SC jQuery plugin to provide for the jQuery library as a substitute). I do not see any errors after the fix. But just so you know.... No idea if that can be related somehow!?

P.S.S. Site is on localhost at the moment
« Last Edit: September 30, 2010, 10:55:17 by TTom911 » Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #6 on: September 30, 2010, 14:24:17 »

Must have something to do with the TemplatePlazze template I am using, because jComments works on other templates ok.
I've sent you PM with my email - just send me this template and I'll check it myself.
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
TTom911
Newbie
*

Karma: 0
Offline Offline

Posts: 16


« Reply #7 on: October 03, 2010, 07:52:21 »

ahhh, I see, it has to do with java conflicts and working or non-working ways to solve these conflicts...

I see that this is the cause of the "jComments problem" (which is NOT a "jComments problem" at the end") when looking back at what I did to the site to solve a conflict with another essential site component.

I see that what solves the problem for another component now caused jComments to "disappear".... Conflicts can be nightmares....  But who does not know that already.... Sad
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #8 on: October 04, 2010, 15:16:00 »

As I wrote you by email - I've installed template you've sent to me and test it with JComments (Joomla 1.5.20, JComments 2.2.0.2) and it works fine for me.
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
TTom911
Newbie
*

Karma: 0
Offline Offline

Posts: 16


« Reply #9 on: October 04, 2010, 15:23:23 »

Yes, I also figured out it was a conflict problem which I am close to getting solved, I hope....

Not that you can solve this, but I would just be interested what your experience is;

While conflicts look solved in some browsers (all looks fine in my Safari and Chrome) but Firefox still has a problem.

Is it possible that such conflicts occur in some browsers but not in others? Did you see that happening?

Thanks for sharing !
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #10 on: October 04, 2010, 15:31:43 »

Yes, it could be so (what in some browsers JavaScript could work another way or produce an error).
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
honestloez
Newbie
*

Karma: 0
Offline Offline

Posts: 1


Email
« Reply #11 on: October 08, 2010, 01:00:17 »

Hi, i also have the same problem with this one.

JComments are not showing at the front-end and i always have this error message in the frontend and the back-end:
Your current site template doesn't have afterDisplayContent event!

And same with him, i also using the template from TEMPLATEPLAZZA communa 4.

Do you have any suggestions?

Many thanks before.
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #12 on: October 08, 2010, 01:06:52 »

Do you have any suggestions?
1. Read this: JComments and templates without afterDisplayContent (like Artisteer)
2. Or you could open Content - JComments plugin's settings and change Content event to onPrepareContent.

p.s. Don't create duplicate topics. I've removed second one.
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
alexio
Newbie
*

Karma: 0
Offline Offline

Posts: 1


« Reply #13 on: March 18, 2011, 12:52:21 »

A quick note to those using a YooTheme template:

Specifically:  YooTheme's 'YooAir' ...

smart's "Quick fix"... (... Open file /administrator/components/com_jcomments/admin.jcomments.php
Replace code: ...  etc.)

found in post #3 at the top of this thread worked PERFECTLY.

Thanks for the fix, smart, and thanks for the wonderful component!

;-)
Logged
GandalfGrey
Newbie
*

Karma: 0
Offline Offline

Posts: 1


Email
« Reply #14 on: March 19, 2011, 03:58:48 »

For YOOThemes that are using WARP5 framework, just add //afterDisplayContent at the end of the file /templates/templatename/html/com_content/article/default.php

Cheers.
Logged
Pages: [1] 2   Go Up
  Print  
JoomlaTune Support Forum    JComments component    Bug-reports    Topic: Your current site template doesn't have afterDisplayContent event!
 
Jump to: