Solved

JomSocial Activity Comments add-on question

Posted on 2010-11-08
1
851 Views
Last Modified: 2012-05-10
I am using the Activity Comments add-on with a JomSocial / Joomla installation and
need to customize the functionality.

Currently, if a person is an admin, they can delete any comment. This is all well and good.

What I need, however, is ALSO the ability for the person who posted the comment to delete their own comments.

From what I can tell, the bit of code below enables the Remove button if the person is an admin.

How would I enable the Remove button if the user id matches the user id of a given comment?

Best,

Cynthia
<?php
					if( PactivityComments::isSiteAdmin() || $my->id != $act->actor )
					{
					?>
					 | <span class="coc-remove"><a href="javascript:void(0);" onclick="jax.call('providers','plugins,pactivitycomment,removecomment','<?php echo $row->id;?>');"><?php echo JText::_('REMOVE COMMENT');?></a></span>
					<?php
					}
					?>

Open in new window

0
Comment
Question by:cturcotte
1 Comment
 
LVL 13

Accepted Solution

by:
StormITSolutions earned 500 total points
ID: 34099977
Hi

JS Activity Comments & Likes plugin from Dan

It seems to have what you need or at least he was developing the ability to do so.

It's on the jomsocial forums about the extra features.

If you are trying this, you want to create a php function which is similar to the one with isSiteAdmin.

Look through the code to see how PactivityComments works and isSiteAdmin and look at examples of code which is for user check interation.


It wouldnt be too difficult, its just a database check on the usernames and id matching.

Storm

0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MySQL Sub-Select Query Returning Duplicate Result 7 45
Un-Indent Setting Notepad++ 3 18
Accessing specific element - DOM PHP HTML 8 34
asp Google Map 2 23
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question