Hello. How I can show the text of "Read Comments... >>" in the same line than Author and Date of article, on frontpage?
I know how to add the code on template and the place, but I don't know what code would be...
For example, I was testing other component of comments a few days ago. And solution was:
<?php if ($this->item->params->get('show_create_date')) : ?>
<?php echo JHTML::_('date', $this->item->created, JText::_('DATE_FORMAT_LC2')); ?>
<?php endif; ?>
<?php if (isset($this->item->comments)) : ?>
<?php echo $this->item->comments; ?>
<?php endif; ?>
</td>
</tr>
Sorry for my english...
I know how to add the code on template and the place, but I don't know what code would be...
For example, I was testing other component of comments a few days ago. And solution was:
<?php if ($this->item->params->get('show_create_date')) : ?>
<?php echo JHTML::_('date', $this->item->created, JText::_('DATE_FORMAT_LC2')); ?>
<?php endif; ?>
<?php if (isset($this->item->comments)) : ?>
<?php echo $this->item->comments; ?>
<?php endif; ?>
</td>
</tr>
Sorry for my english...
I don't recommend messing with code you didn't write yourself.
The plugin shows the link AFTER every article you select in your config of the component, which I think is a logical choice.
It is not a parameter for now so Max? the author, didn't intend for you to change that.
But since you're asking for it; here's some Help for Today's Problems :wink: :
OPEN {joomla}\plugins\content\ChronoComments.php
FIND on line 5 and REPLACE $mainframe->registerEvent( 'onAfterDisplayContent', 'plgContentChronocomments' );
BY
$mainframe->registerEvent( 'onBeforeDisplayContent', 'plgContentChronocomments' );
----
edit: and maybe read this too:
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=17&t=11270
The plugin shows the link AFTER every article you select in your config of the component, which I think is a logical choice.
It is not a parameter for now so Max? the author, didn't intend for you to change that.
But since you're asking for it; here's some Help for Today's Problems :wink: :
OPEN {joomla}\plugins\content\ChronoComments.php
FIND on line 5 and REPLACE $mainframe->registerEvent( 'onAfterDisplayContent', 'plgContentChronocomments' );
BY
$mainframe->registerEvent( 'onBeforeDisplayContent', 'plgContentChronocomments' );
----
edit: and maybe read this too:
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=17&t=11270
issue fixed in V1.2 already out, thanks Sadowskin!
Hi derok, if so then it will appear after the article separator which is not good for blog pages!
Cheers
Max
Cheers
Max
Hi there,
Not sure where I'm going wrong here, but I'm using both ShareThis and ChronoComments.
I'm not using the Joomla plugin version of ShareThis as it creates too many validation errors, just the script straight off the ShareThis site.
I'm trying to make a bar at the bottom of each article that looks like this (not visually, just structurally) :
ShareThis | Comments | Continue Reading
So far, I've got it looking like this:
Comments
ShareThis | Continue Reading
I just can't seem to figure out how to get ChronoComments to display in the same containing element as the other two. My template override for com_content/frontpage/default_item.php so far looks like this:
Any help would be appreciated.
Not sure where I'm going wrong here, but I'm using both ShareThis and ChronoComments.
I'm not using the Joomla plugin version of ShareThis as it creates too many validation errors, just the script straight off the ShareThis site.
I'm trying to make a bar at the bottom of each article that looks like this (not visually, just structurally) :
ShareThis | Comments | Continue Reading
So far, I've got it looking like this:
Comments
ShareThis | Continue Reading
I just can't seem to figure out how to get ChronoComments to display in the same containing element as the other two. My template override for com_content/frontpage/default_item.php so far looks like this:
<?php echo JFilterOutput::ampReplace($this->item->text); ?>
<p>
<script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=ea400d0c-edaa-4f99-9234-2ad52a994f42&type=website"></script>
<?php if ($this->item->params->get('show_readmore') && $this->item->readmore) : ?>
<a href="<?php echo $this->item->readmore_link; ?>" class="readon<?php echo $this->item->params->get('pageclass_sfx'); ?>">
<?php if ($this->item->readmore_register) :
echo JText::_('Register to read more...');
elseif ($readmore = $this->item->params->get('readmore')) :
echo $readmore;
else :
echo JText::_('Read more...');
endif; ?></a>
<?php endif; ?>
</p>
<?php echo $this->item->event->afterDisplayContent; ?>
Any help would be appreciated.
Hi kbrookes,
the read x comments link is just the same as the read more link but has an #comments anchor at the end of the link, so add this to your read more link string and it will work fine!
Cheers
Max
the read x comments link is just the same as the read more link but has an #comments anchor at the end of the link, so add this to your read more link string and it will work fine!
Cheers
Max
I think I understand what you mean, but I'm not sure how to implement it.
On line 144 of plugins/content/ChronoComments.php I see the following code:
Are you saying I can move this code to my html/com_content/frontpage/default_item.php template override?
If so, how do I handle ChronoComment's conditional statements that regulate its appearance?
I'm not much of a php guy, any more specific help would be great....
Thank you!
K
On line 144 of plugins/content/ChronoComments.php I see the following code:
$language = '<a class="comments" href="'.$page_link.'#comments">'.JText::_( 'READ N COMMENTS' )."</a>";
Are you saying I can move this code to my html/com_content/frontpage/default_item.php template override?
If so, how do I handle ChronoComment's conditional statements that regulate its appearance?
I'm not much of a php guy, any more specific help would be great....
Thank you!
K
Hi K,
no I mean that you use this code :
this will be the href part of the comments link, just as the read more link BUT with comments anchor!
if you want to regulate when it appears then you need to use this code:
Max
no I mean that you use this code :
<?php echo $this->item->readmore_link."#comments"; ?>
this will be the href part of the comments link, just as the read more link BUT with comments anchor!
if you want to regulate when it appears then you need to use this code:
$configs = JComponentHelper::getParams('com_chronocomments');
if((in_array($row->sectionid, (array)$configs->get('comment_sections')))||(in_array($row->catid, (array)$configs->get('comment_categories')))||(in_array($row->id, (array)$configs->get('comment_articles')))){
//show the link
}
Max
Hi Max, I really appreciate the help. Unfortunately, I'm just not that php-savvy. HTML, CSS, no probs, but I'm only good for very basic changes.
So I'm not sure whether I haven't explained myself properly or if I'm just not capable of finding the right way to insert the code you've provided.
Here's what I've currently got on the page:

Here's what I'd like to make it look like:

My existing code looks like this:
I tried doing this, but it wound up looking like this:

Sorry to be such a pain, I feel like I'm close, but that I'm failing to understand something fairly basic.
So I'm not sure whether I haven't explained myself properly or if I'm just not capable of finding the right way to insert the code you've provided.
Here's what I've currently got on the page:

Here's what I'd like to make it look like:

My existing code looks like this:
<?php echo JFilterOutput::ampReplace($this->item->text); ?>
<div class="actions">
<script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=ea400d0c-edaa-4f99-9234-2ad52a994f42&type=website"></script>
<?php if ($this->item->params->get('show_readmore') && $this->item->readmore) : ?>
<a href="<?php echo $this->item->readmore_link; ?>" class="readon<?php echo $this->item->params->get('pageclass_sfx'); ?>">
<?php if ($this->item->readmore_register) :
echo JText::_('Register to read more...');
elseif ($readmore = $this->item->params->get('readmore')) :
echo $readmore;
else :
echo JText::_('Read more...');
endif; ?></a>
<?php endif; ?>
</div>
<?php echo $this->item->event->afterDisplayContent; ?>
I tried doing this, but it wound up looking like this:

Sorry to be such a pain, I feel like I'm close, but that I'm failing to understand something fairly basic.
Hi,
this code you have:
you will need to make it with:
this will create the anchor item for the comments link, so it takes you to the comments part, lets get this done first!
Max
this code you have:
<a href="<?php echo $this->item->readmore_link; ?>" class="readon<?php echo $this->item->params->get('pageclass_sfx'); ?>">
you will need to make it with:
<a href="<?php echo $this->item->readmore_link."#comments"; ?>" class="readon<?php echo $this->item->params->get('pageclass_sfx'); ?>">
this will create the anchor item for the comments link, so it takes you to the comments part, lets get this done first!
Max
Thanks Max.
That's now done and working as you suggest: my read more link now takes the user to the new page at the comments anchor.
Live site is here, btw:
http://tvproductionforum.com/
Ready for your next step....
That's now done and working as you suggest: my read more link now takes the user to the new page at the comments anchor.
Live site is here, btw:
http://tvproductionforum.com/
Ready for your next step....
Good, next step is to use this code:
around the link we created so it controls if the link will be shown or not depending on if this content item has comments enabled or not!
Regards
Max
$configs = JComponentHelper::getParams('com_chronocomments');
if((in_array($row->sectionid, (array)$configs->get('comment_sections')))||(in_array($row->catid, (array)$configs->get('comment_categories')))||(in_array($row->id, (array)$configs->get('comment_articles')))){
//show the link
}
around the link we created so it controls if the link will be shown or not depending on if this content item has comments enabled or not!
Regards
Max
Hi Max,
Thanks for the reply, but I'm not sure we're on the right track here.
My code now looks like this:
And the page displays like this:

The comments link above everything else (that I want to get rid of) is being generated by Chrono.
Is there another step to get it to here?:

Thanks for your help so far...
Thanks for the reply, but I'm not sure we're on the right track here.
My code now looks like this:
<?php echo JFilterOutput::ampReplace($this->item->text); ?>
<div class="actions">
<script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=ea400d0c-edaa-4f99-9234-2ad52a994f42&type=website"></script>
<?php if ($this->item->params->get('show_readmore') && $this->item->readmore) : ?>
<?php $configs = JComponentHelper::getParams('com_chronocomments');
if((in_array($row->sectionid, (array)$configs->get('comment_sections')))||(in_array($row->catid, (array)$configs->get('comment_categories')))||(in_array($row->id, (array)$configs->get('comment_articles')))){ ?>
<a href="<?php echo $this->item->readmore_link."#comments"; ?>" class="readon<?php echo $this->item->params->get('pageclass_sfx'); ?>">
<?php } ?>
<?php if ($this->item->readmore_register) :
echo JText::_('Register to read more...');
elseif ($readmore = $this->item->params->get('readmore')) :
echo $readmore;
else :
echo JText::_('Read more...');
endif; ?></a>
<?php endif; ?>
</div>
<?php echo $this->item->event->afterDisplayContent; ?>
And the page displays like this:

The comments link above everything else (that I want to get rid of) is being generated by Chrono.
Is there another step to get it to here?:

Thanks for your help so far...
Hi,
sorry but I was crazy busy with Chronoforms the last few days, I think you have already solved the issue but its a layout issue and I can't help much with it anyway!
Regards
Max
sorry but I was crazy busy with Chronoforms the last few days, I think you have already solved the issue but its a layout issue and I can't help much with it anyway!
Regards
Max
hey,
how can i get the item (read n comments) to the top of the article?
Unfortunately this doesn´t help:
I tried to get it working for some hours yesterday, but i got no solution for this issue ?
Moreover i tried to edit the com_content/frontpage/default_item.php file but whatever i did the link with
the comments was on the bottom.
I hope you can help me with this issue.
Thanks in advance
marco
how can i get the item (read n comments) to the top of the article?
Unfortunately this doesn´t help:
OPEN {joomla}\plugins\content\ChronoComments.php
FIND on line 5 and REPLACE $mainframe->registerEvent( 'onAfterDisplayContent', 'plgContentChronocomments' );
BY
$mainframe->registerEvent( 'onBeforeDisplayContent', 'plgContentChronocomments' );
I tried to get it working for some hours yesterday, but i got no solution for this issue ?
Moreover i tried to edit the com_content/frontpage/default_item.php file but whatever i did the link with
the comments was on the bottom.
I hope you can help me with this issue.
Thanks in advance
marco
This topic is locked and no more replies can be posted.