Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

edit postings of other users

11 years 3 months ago
  • Dominik's Avatar
    Topic Author
  • Dominik
  • Offline
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 2
Licenses:
JomSocial Expired Socialize Expired

When user A post something on the wall and user B leave a comment to his posting, user A have the button "edit" under user B comment. It´s possible to klick on "edit" but not possible to change the message.
How can i remove the "edit" button? It´s good when user A can delete the comment from user B, but it´s not necessery to edit someones comment. Only when someone want to edit his own comment.
Regards Dominik

Attachments:
11 years 3 months ago
Licenses:

Hi Dominik,

here the steps:
/components/com_community/templates/jomsocial/layouts/stream/single-comment.php at line 85
change the code from

<?php
    // edit and remove has the same checking
    if($canEdit)
    {
        ?>
    <a href="javascript:" class="joms-button--edit" onclick="joms.api.commentEdit('<?php echo $wall->id; ?>', this);">
        <svg viewBox="0 0 16 16" class="joms-icon"><use xlink:href="#joms-icon-pencil"></use></svg>
        <span><?php echo JText::_('COM_COMMUNITY_EDIT'); ?></span>
    </a>
    <a href="javascript:" class="joms-button--remove" onclick="joms.api.commentRemove('<?php echo $wall->id; ?>');">
        <svg viewBox="0 0 16 16" class="joms-icon"><use xlink:href="#joms-icon-remove"></use></svg>
        <span><?php echo JText::_('COM_COMMUNITY_WALL_REMOVE'); ?></span>
    </a>
<?php } ?>
to
<?php
    // edit and remove has the same checking
    if($canEdit)
    {
        if($wall->post_by == $my->id) { ?>
    <a href="javascript:" class="joms-button--edit" onclick="joms.api.commentEdit('<?php echo $wall->id; ?>', this);">
        <svg viewBox="0 0 16 16" class="joms-icon"><use xlink:href="#joms-icon-pencil"></use></svg>
        <span><?php echo JText::_('COM_COMMUNITY_EDIT'); ?></span>
    </a>
        <?php } ?>
    <a href="javascript:" class="joms-button--remove" onclick="joms.api.commentRemove('<?php echo $wall->id; ?>');">
        <svg viewBox="0 0 16 16" class="joms-icon"><use xlink:href="#joms-icon-remove"></use></svg>
        <span><?php echo JText::_('COM_COMMUNITY_WALL_REMOVE'); ?></span>
    </a>
<?php } ?>

Regards

The following user(s) said Thank You: Dominik
Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW