Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

JomSocial Activity Comments add-on question

Posted on 2010-11-08
1
Medium Priority
?
855 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 2000 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

Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

Question has a verified solution.

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

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…
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
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…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

618 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