Solved

JomSocial Activity Comments add-on question

Posted on 2010-11-08
1
853 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 14

Accepted Solution

by:
Allan Nisbet 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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

707 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