Solved

JomSocial Activity Comments add-on question

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

733 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