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: Treeview only 1 Level. Possible?
Pages: [1]   Go Down
  Print  
Author Topic: Treeview only 1 Level. Possible?  (Read 2007 times)
0 Members and 1 Guest are viewing this topic.
Devil
Newbie
*

Karma: 4
Offline Offline

Posts: 39



WWW
« on: May 19, 2010, 20:53:10 »

Hi,

is it possible that the tree view is only one level depth?

best reagrds,
Markus



JComments Version : 2.2.0.0
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #1 on: May 19, 2010, 21:04:06 »

Hi, Markus! Do you want to disable reply to replies?
Logged

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

Karma: 4
Offline Offline

Posts: 39



WWW
« Reply #2 on: May 19, 2010, 21:08:40 »

Hmmm,


 let me that times graphic represent:

1.comment (A)
  --reply to comment1 (A1)
  --reply to comment1 (A2)
  --reply to (A-1)
2.Comment (B)
  --reply to comment2 (B1)
  --reply to comment2 (B2)
  --reply to (B2)


Hope this helps to understand.

Here  a website that do this:
http://winfuture.de/news,55494.html

Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #3 on: May 19, 2010, 21:16:24 »

I think this could be implemented via template...

Open /components/com_jcomments/tpl/default/tpl_comment.php and add after line:

Code: (php)
$comment = $this->getVar('comment');
next code:
Code: (php)
if ($comment->parent != 0) {
  $this->setVar('button-reply', 0);
}

This modification will hide Reply button from comments that have parent...
Logged

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

Karma: 4
Offline Offline

Posts: 39



WWW
« Reply #4 on: May 19, 2010, 21:25:14 »

Hi Smart,

thanks for fast answer. It works, but not "correctly".

Here u can see a picture:
http://imm.io/wlq

The last comment is a qoute from comment 3. The Problem is: the last comment is level0 but it must be level1.


greetings
Markus
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #5 on: May 20, 2010, 00:36:43 »

Why not correctly? You talk about tree depth... And with this modification you couldn't make more than one level depth... We don't talk about any restriction with quoting Wink
Logged

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

Karma: 4
Offline Offline

Posts: 39



WWW
« Reply #6 on: May 20, 2010, 01:53:14 »

Hi,

sure u are right  Wink

But i need it more "special".

i added:
Code:
$this->setVar('button-quote', 0);
to the line that u told me.

Now, i search for a way to reply to the 1  level and the reply come up under the reply in the sam 1 level.


i will take a look in the tree librarie...

greetings
Markus

Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #7 on: May 20, 2010, 13:50:53 »

Now, i search for a way to reply to the 1  level and the reply come up under the reply in the sam 1 level.
Sorry but I don't understand what do you want Wink Could you illustrate it?
Logged

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

Karma: 4
Offline Offline

Posts: 39



WWW
« Reply #8 on: May 20, 2010, 20:57:16 »

Hi Smart,

i will try it Smiley



The Comment in red should be level1,too.

So when someone reply to a reply to a reply from Level 0 Comment it would be the same level (here level1)


greetings
Markus


Image URL: http://imm.io/wJi


                
Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #9 on: May 20, 2010, 21:09:16 »

I don't see any solution for that... Easiest solution I'm already posted - disable reply on replies.

BTW, it could be resolved by creation custom JComments plugin for onBeforeCommentAdded event and if comment has parent comment and parent comment also has parent (so we've more then 1 level) - replace parent comment with grandparent... In this case even you reply on 1 level replay it will be saved as 1 level replay instead 2nd... But for this you need additional plugin...
Logged

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

Karma: 4
Offline Offline

Posts: 39



WWW
« Reply #10 on: May 20, 2010, 23:35:33 »

Hi smart,

thx for the tip, i will try it. 

When it will not work i call loud:  Huh   Grin


best regards
Markus
Logged
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    General discussion    Topic: Treeview only 1 Level. Possible?
 
Jump to: