×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me

TOPIC: display AFTER content?

display AFTER content? 16 years 3 months ago #351

  • Shaiful
  • Shaiful's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 72
Alright,

I really need assistance on this too. This is not a problem in J!1.0 but once using J!1.5 I simply have no idea how to execute the comment system after the "Written By" text. Playing around with onAfterDisplayContent also didn't help

Thanks

display AFTER content? 16 years 3 months ago #536

  • Jeroen Jacobs
  • Jeroen Jacobs's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 16
Same issue here ...

I want to display the "write comment" line AFTER(!) the "Read more" line.

Every blog does it that way, so I don't understand why JoomlaComment decides to do it otherwise ...

There must be a way to accomplish this, right ?

display AFTER content? 16 years 3 months ago #586

  • Jeroen Jacobs
  • Jeroen Jacobs's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 16
Is there any way to hack the html, so the joomla-comment stuff is displayed after "Read more" line ?

Which files should I modify then ?

display AFTER content? 16 years 3 months ago #599

  • carsten888
  • carsten888's Avatar
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 46
  • Thank you received: 32
Shaiful wrote:

This is not a problem in J!1.0 but once using J!1.5 I simply have no idea

How to do this in Joomla 1.0.15 ?

display AFTER content? 16 years 3 months ago #600

  • Shaiful
  • Shaiful's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 72
carsten888 wrote:

How to do this in Joomla 1.0.15 ?


In ijoomlacomments admin settings, under Mambot Content Function, define your own event name such as IJoomlaComments

Then edit the core file components/com_content/content.html.php

Look up for function show()

Paste this line anywhere within the function where you want to trigger iJoomlaComment
$results = $_MAMBOTS->trigger( 'IJoomlaComments', array( &$row, &$params, $page ), true );
echo trim( implode( "\n", $results ) );

Take note that IJoomlaComments is the name you register in the admin

display AFTER content? 16 years 3 months ago #601

  • carsten888
  • carsten888's Avatar
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 46
  • Thank you received: 32

In ijoomlacomments admin settings, under Mambot Content Function, define your own event name such as IJoomlaComments

Then edit the core file components/com_content/content.html.php

Look up for function show()

Paste this line anywhere within the function where you want to trigger iJoomlaComment

Code:
$results = $_MAMBOTS->trigger( 'IJoomlaComments', array( &$row, &$params, $page ), true ); echo trim( implode( "\n", $results ) );
Take note that IJoomlaComments is the name you register in the admin

I did all this, and its not showing.

Also changing it to 'onAfterDisplayContent' does not show. (which by the looks of it, would be fine for switching 'read more' and the joomla-comment-output).

i placed it right underneath
$results = $_MAMBOTS->trigger( 'onAfterDisplayContent', array( &$row, &$params, $page ) );
		echo trim( implode( "\n", $results ) );
just to make sure it is in a place where the mambots have been loaded.

display AFTER content? 16 years 3 months ago #602

  • carsten888
  • carsten888's Avatar
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 46
  • Thank you received: 32
just to make sure the mambot-location is loaded I made a mambot just to test and it loads fine in that position at the frontend.:
$_MAMBOTS->registerFunction( 'IJoomlaComments', 'test' );
 
function test( $published, &$row, &$params, $page=0 ) {
	echo 'soup';	
}

why won't joomlacomment load there?

I did enter 'IJoomlaComments' in the joomlacomment > content settings at 'Mambot content function:'.

I even tried to override the config in the bot itself by changing:
$_MAMBOTS->registerFunction(($joscbotfunc ? $joscbotfunc : 'onPrepareContent'), $joscplugin);
to:
$_MAMBOTS->registerFunction( 'IJoomlaComments', $joscplugin );

still nothing :(

display AFTER content? 16 years 3 months ago #603

  • Shaiful
  • Shaiful's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 72
To tell you the truth, I did this back in Dec07 or Jan08 using version 3.12b of iJoomlaComments

display AFTER content? 16 years 3 months ago #609

  • Shaiful
  • Shaiful's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 72
I think I might have this problem solved, both for J1.0 and J1.5. Please read on and verify this.

After a quick look at the file mambots/content/joscomment.php I noticed a block of code that looked like this


$joscbottag = "::JOSCusereturn";
$joscbotfunc = $joscommentconfig->_mambot_func;
if (!strpos($joscbotfunc, $joscbottag)===false) {
$joscbotfunc = str_replace($joscbottag, '', $joscbotfunc );
$joscplugin .= "_UseReturn";
}


Note that ::JOSCusereturn was used to perform some sort of string comparison against $joscbotfunc, which is actually the value of Mambot Content Function in the comment admin. If this comparison returns true, the function called by the mambot/plugin will be the one with the suffix _UseReturn

FOR JOOMLA 1.0
These instructions are 90% similar to my previous post a few steps above.

In ijoomlacomments admin settings, under Mambot Content Function, define your own event name and append it with the string ::JOSCusereturn so it will look like this IJoomlaComments::JOSCusereturn

Then edit the core file components/com_content/content.html.php

Look up for function show()

Paste this line anywhere within the function where you want to trigger iJoomlaComment


$results = $_MAMBOTS->trigger( 'IJoomlaComments', array( &$row, &$params, $page ), true );
echo trim( implode( "\n", $results ) );


Take note that IJoomlaComments is the name you registered in the comment admin.

FOR JOOMLA 1.5

In ijoomlacomments admin settings, under Mambot Content Function, simply use the default handler onAfterDisplayContent and append it with the string ::JOSCusereturn so it will look like this onAfterDisplayContent::JOSCusereturn

And that's all, no fiddling with code.

TESTED ON
Joomla 1.0.15
Joomla 1.5.6
!JoomlaComment 3.26

display AFTER content? 16 years 3 months ago #611

  • carsten888
  • carsten888's Avatar
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 46
  • Thank you received: 32

Please read on and verify this.

YES! that works for 1.0.15

Allow me to make that more specific:
1--- set in the joomla-comment configuration (joomlacomment > content settings > tab general) at 'Mambot comment function:' as 'IJoomlaComments::JOSCusereturn'.
2--- Then edit the core file components/com_content/content.html.php
on line 544.
change:
<span class="article_seperator">&nbsp;</span>
to
<?php
//trigger bots for event IJoomlaComments		 
		$results = $_MAMBOTS->trigger( 'IJoomlaComments', array( &$row, &$params, $page ), true );
		echo trim( implode( "\n", $results ) );
?>
		<span class="article_seperator">&nbsp;</span>

Thanks a bunch!:)

display AFTER content? 16 years 2 months ago #862

  • Lilith Nerevarine
  • Lilith Nerevarine's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 24
Hello, it works perfectly in Joomla 1.5, but I'm not really sure how to make the "write comment" part appear before the article separator.
I tried exchanging these two lines:

<?php echo $this->article->event->afterDisplayContent; ?>
<span class="article_separator"> </span>

but it does not have any kind of effect.
Probably its pretty noob approach, isn't it XD

display AFTER content? 16 years 2 months ago #865

  • Shaiful
  • Shaiful's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 72
That method is correct and it should work. If it doesn't check your template files, maybe it was overriden somewhere and you need to edit the overridden one.

display AFTER content? 16 years 6 days ago #1592

  • neo
  • neo's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 8
Hi,

I can't find components/com_content/content.html.php in Joomla1.5.7, could you please provide the path.

thanks

display AFTER content? 16 years 4 days ago #1612

  • Shaiful
  • Shaiful's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 72
FOR JOOMLA 1.5

In ijoomlacomments admin settings, under Mambot Content Function, simply use the default handler onAfterDisplayContent and append it with the string ::JOSCusereturn so it will look like this onAfterDisplayContent::JOSCusereturn

And that's all, no fiddling with code.

TESTED ON
Joomla 1.0.15
Joomla 1.5.6
!JoomlaComment 3.26

display AFTER content? 16 years 2 days ago #1631

  • Richard Stubbington
  • Richard Stubbington's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 16
In Joomla 1.5 I can't find the file with the article seperator code in it - can you help me out with which file it is in?

Thanks.

display AFTER content? 16 years 2 days ago #1633

  • Shaiful
  • Shaiful's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 72
components/com_content/views/article/tmpl/default.php

scroll to the last line

display AFTER content? 16 years 22 hours ago #1651

  • Lilith Nerevarine
  • Lilith Nerevarine's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 24
Well I still have not been able to work out a solution, but many thx for the help and reply Shaiful! :))

display AFTER content? 16 years 20 hours ago #1652

  • Richard Stubbington
  • Richard Stubbington's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 16
I've just managed to get this working now for me Lilith - what's your site address and maybe I can assist having just done it myself?!

display AFTER content? 15 years 9 months ago #2457

  • shikar
  • shikar's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 8
I tried this change of code and it works but also there is some white space above the contentheading since the change. Is there a way to prevent this from happening?

display AFTER content? 15 years 9 months ago #2504

  • Lilith Nerevarine
  • Lilith Nerevarine's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 24
Oooops, I forgot to say thanks for the reply :)
I have started another project meanwhile, didnt have the time to meddle with this matter, so my problem still exists. :huh:
Would be interested in a solution still.

Nice day, guys!
Time to create page: 0.203 seconds