Solved

JomSocial Activity Comments add-on question

Posted on 2010-11-08
1
846 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now