Report Abuse Link - How to disable/remove?

Hello,


For the life of me I cannot figure out why the ability to hide/remove/disable the 'Report Abuse' link for photo gallery and video gallery is NOT easily findable or visible in the Dolphin admin area.

Can anyone shed some light on how to remove this darn thing? We are getting users clicking and submitting regular comments through it.  As if 'Report Abuse' was not indicative of its nature!


I've looked in BxDolSharedMedia.php and see that the action area is dynamically generated from an array.  I'm not sure how to eliminate the report abuse variable from the array.

ANY help is greatly appreciated.

Thanks!

Quote · 11 Mar 2010

I figured it out, and unlike most people, I'm going to post how I did it:


The following is to hide/remove the Report Abuse link of the Actions block.  This will take it out from the photo gallery and video gallery pages.


1. Open:

  • mediaActions.php (located in root directory)
  • BxDolSharedMedia.php (located in root\inc\classes)

2. in mediaActions.php at about line 72 you will see a switch($sAct) statement.  Comment out the case: 'report': line like so:

if (isset($_GET['action']) && isset($_GET['fileID'])) {
$sAct = htmlspecialchars_adv($_GET['action']);
$aAction['fileID'] = (int)$_GET['fileID'];
switch ($sAct) {
case 'favorite': $sCode = $oMedia->addToFavorites($aAction['fileID']); break;
case 'edit':      $sCode = $oMedia->displayMediaEditForm($aAction['fileID']); break;
//case 'report':
case 'share':    $aAction['action'] = $sAct; $aAction['fileUrl'] = urlencode($_GET['fileUrl']); $sCode = $oMedia->showSubmitForm($aAction); break;
}
}

save.

3. open BxDolSharedMedia.php and at about line 50 you will see var $aMainActions = array - you want to comment out the 'Report' line.  Like so:

var $aMainActions = array(
'Fave'  => array('icon'=>'action_fave.gif',  'link'=>'javascript:void(0);', 'onClick'=>'action=favorite__fileID__'),
'Share' => array('icon'=>'action_share.gif', 'link'=>'javascript:void(0);', 'onClick'=>'action=share__fileID____fileUrl__'),
//'Report'=> array('icon'=>'action_report.gif','link'=>'javascript:void(0);', 'onClick'=>'action=report__fileID____fileUrl__')
);

4. save both files and upload.

Hope this helps the next guy!

Quote · 11 Mar 2010
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.