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

Login with username, password and session length

JoomlaTune Support Forum    JComments component    General discussion    Topic: [solved] move the add comment link
Pages: [1]   Go Down
  Print  
Author Topic: [solved] move the add comment link  (Read 2148 times)
0 Members and 1 Guest are viewing this topic.
alekks
Newbie
*

Karma: 0
Offline Offline

Posts: 4


« on: June 21, 2012, 19:21:19 »

Hi,

I'm using the leading article layout of joomla's standard category blog layout. I'm using an override for my selfmade template making the leading article show the whole article text even if there's a page break/read more-break in the article.

I need to be able to move the add comment link, I've found some people saying that I should move the afterDisplayContent in the override, but this is at the last line but the Add comment link appears in the middle of the text anyway, in other words where the read more link should have been if the override didn't remove it.


So the code looks like this in my override:
Code:
<?php echo $this->item->introtext?>
<?php echo $this->item->fulltext?>
And the output gets like this:
Code:
<?php echo $this->item->introtext?>
[Add comment link]
<?php echo $this->item->fulltext?>

But I want the Link to be:
Code:
<?php echo $this->item->introtext?>
<?php echo $this->item->fulltext?>
[Add comment link]

I hope you can help me with this!

Thanks!
« Last Edit: June 26, 2012, 13:20:21 by smart » Logged
smart
Administrator
Hero Member
*****

Karma: 163
Offline Offline

Gender: Male
Posts: 2161



WWW
« Reply #1 on: June 21, 2012, 20:58:27 »

Yes, you're right. The field 'text' is not filled here...

Change code to:

Code: (php)
<?php 

$text 
$this->item->introtext;
$position JString::strpos($text'<div class="jcomments-links">' );
$jcomments JString::substr($text$position);
$this->item->introtext JString::substr($text0$position 1);

echo 
$this->item->introtext
echo 
$this->item->fulltext
echo 
$jcomments;
?>
« Last Edit: June 26, 2012, 13:19:16 by smart » Logged

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

Karma: 0
Offline Offline

Posts: 4


« Reply #2 on: June 26, 2012, 02:59:21 »

THANKS A LOT! Smiley)

I'm really happy and glad that you helped me with this!

One note though, you'd miss the dollar sign on the "position" on line 5 in your example Wink

Everything works exactly as I wish now Smiley thank you.
Logged
hawa147
Newbie
*

Karma: 0
Offline Offline

Posts: 1


« Reply #3 on: October 01, 2012, 13:57:22 »

Hi,

I am also having similar problem. I also want to change the position of comment link. I read the replies in the post but I don't understand. Please give me more detail info. Where should I change that code. I mean in which folder?

I want to position comment link together with authors and date at the beginning of the intro. Like this in the picture.



Is this possible to do like this.
Please help me.
and sorry for my english.

- ashaa777@yahoo.com   Huh
« Last Edit: October 01, 2012, 13:59:06 by hawa147 » Logged
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    General discussion    Topic: [solved] move the add comment link
 
Jump to: