13
Kellymac send me a PM about this thread, so i'll post it here:
Quote:
Kellymac, i sure did figure it out. What exactly do you want to do? If you want to remove everything but the 'post reply' button as i wanted, it's a matter of hack&slash. I simply removed everything i didn't have any use for:
(this is XOOPS 2.0.10 don't know if anything changed here, i assume not)
original:
// assign comment nav bar
$navbar = '
';
$xoopsTpl->assign(array('commentsnav' => $navbar, 'editcomment_link' => 'comment_edit.php?com_itemid='.$com_itemid.'&com_order='.$com_order.'&com_mode='.$com_mode.''.$link_extra, 'deletecomment_link' => 'comment_delete.php?com_itemid='.$com_itemid.'&com_order='.$com_order.'&com_mode='.$com_mode.''.$link_extra, 'replycomment_link' => 'comment_reply.php?com_itemid='.$com_itemid.'&com_order='.$com_order.'&com_mode='.$com_mode.''.$link_extra));
// assign some lang variables
$xoopsTpl->assign(array('lang_from' => _CM_FROM, 'lang_joined' => _CM_JOINED, 'lang_posts' => _CM_POSTS, 'lang_poster' => _CM_POSTER, 'lang_thread' => _CM_THREAD, 'lang_edit' => _EDIT, 'lang_delete' => _DELETE, 'lang_reply' => _REPLY, 'lang_subject' => _CM_REPLIES, 'lang_posted' => _CM_POSTED, 'lang_updated' => _CM_UPDATED, 'lang_notice' => _CM_NOTICE));
}
}
My version:
// assign comment navbar
$navbar = '
';
$xoopsTpl->assign(array('commentsnav' => $navbar, 'editcomment_link' => 'comment_edit.php?com_itemid='.$com_itemid.'&com_order='.$com_order.'&com_mode='.$com_mode.''.$link_extra, 'deletecomment_link' => 'comment_delete.php?com_itemid='.$com_itemid.'&com_order='.$com_order.'&com_mode='.$com_mode.''.$link_extra, 'replycomment_link' => 'comment_reply.php?com_itemid='.$com_itemid.'&com_order='.$com_order.'&com_mode='.$com_mode.''.$link_extra));
// assign some lang variables
$xoopsTpl->assign(array('lang_from' => _CM_FROM, 'lang_joined' => _CM_JOINED, 'lang_posts' => _CM_POSTS, 'lang_poster' => _CM_POSTER, 'lang_thread' => _CM_THREAD, 'lang_edit' => _EDIT, 'lang_delete' => _DELETE, 'lang_reply' => _REPLY, 'lang_subject' => _CM_REPLIES, 'lang_posted' => _CM_POSTED, 'lang_updated' => _CM_UPDATED, 'lang_notice' => _CM_NOTICE));
}
}
But be careful in using it. for example, i removed the
tags containing the form, This will screw up your templates. So according to your needs, change it accordingly (like adding tables).
I am the BEST.......... at overstating things! -
14
Actually. What I am trying to accomplish is that registered users could post a comment but not replies.
15
then, just remove the 'REPLY' button from your template.
16
Lol Kellymac, this is the most streched topic i've ever seen
![](https://xoops.org/uploads/smil42e7a3d4c7b9f.gif)
What you want to do has nothing to do with this thread whatsoever. The reply button is integrated in the commenttemplate. As stated above just remove the button.
go to your templates admin -> system -> 'system_comment.html' find this line:
<a href="<{$replycomment_link}>&com_id=<{$comment.id}>"><img src="<{$xoops_url}>/images/icons/reply.gif" alt="<{$lang_reply}>" />a>
and remove it. It's in there more then once, so remove where you want it (if user or if admin etc.)
I am the BEST.......... at overstating things! -
17
That's great! It worked!
Now I wonder if theres a way to only allow 10 comments, newest first and the older ones droping off as new ones are added?
18
impossible is nothing
I was hoping i could do this by using smarty, but that doesn't seem quite that easy. A quick and dirty way to do this is by doing the following:
Make sure that in admin->settings comment order is set to newest first. (this won't apply to registered users, but an SQL update statement should cure that).
Then, the ugly part: go to file /kernel/comnment.php and look for 'function &getByItemId'. In the parameters change '$limit = null' to '$limit = 10'.
I am the BEST.......... at overstating things! -
19
Close. It does only allow 10 comments. But, after that no new ones can be added. The goal is to only allow 10 at a time with new comments to be added and the oldest to purge.
20
NEVERMIND. It works just fine for users and annonymous. Just not for admin and that's fine. Thanks!!!
187 user(s) are online (87 user(s) are browsing Support Forums)
Members: 0
Guests: 187
more...
Stats |
Goal: |
$100.00 |
Due Date: |
Aug 31 |
Gross Amount: |
$0.00 |
Net Balance: |
$0.00 |
Left to go: |
$100.00 |
|