hi, on my page, i let people to upload their own pictures and others can write comments about it,
how can i give the owner of the image the rights to modify the comments on his/her page?
for example.
i let mr ABC to upload his own picture. now if mr DEF goes to mr ABC's page and writes him a comment, how can mr ABC delet the comments that mr DEF writes him, ( usually because of bad words used in comments )
im pretty sure this can be done with the template.php file.
i was reading this post by vargha ( http://forum.coppermine-gallery.net/index.php?topic=31685.0 )
which shows how u can remove them,
but you should be able to also add a line to it,
i think it needs to be something like the following code
--------
if (GALLERY_ADMIN_MODE) {
$template_image_comments .= <<<EOT
<a href="javascript:;" onclick="blocking('cbody{MSG_ID}','', 'block'); blocking('cedit{MSG_ID}','', 'block'); return false;" title="{EDIT_TITLE}"><img src="images/edit.gif" border="0px" align="middle" alt="" /></a>
<a href="delete.php?msg_id={MSG_ID}&what=comment" onclick="return confirm('{CONFIRM_DELETE}');"><img src="images/delete.gif" border="0px" align="middle" /></a>
EOT;
}
elseif (GALLERY_USER_MODE) {
$template_image_comments .= <<<EOT
<a href="javascript:;" onclick="blocking('cbody{MSG_ID}','', 'block'); blocking('cedit{MSG_ID}','', 'block'); return false;" title="{EDIT_TITLE}"><img src="images/edit.gif" border="0px" align="middle" alt="" /></a>
<a href="delete.php?msg_id={MSG_ID}&what=comment" onclick="return confirm('{CONFIRM_DELETE}');"><img src="images/delete.gif" border="0px" align="middle" /></a>
EOT;
}
----
what this line of code does is that it checks to see if you are an admin, if so you'll have a full rights to edit/ delet comments and if you are the person who posted the comment, you will still have the rights to edit/delet the post...
now what i wanna do is to write a code that checks to see if you are the owner of the image. if you are, give you the same rights as an admin.
is it possible guys?
any idea on this guys? :-s
this should be very easy, i just cant figure it out :-s
This is not that simple a modification, since code needs to be altered in multiple places. It's also wide open to people abusing the system and putting whatever they like as comments 'by' someone. Coppermine already has a bad words filter, it would be easier to make good use of that than hack the code.