We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

How to Remove Blog and Photo Rating [Solution available] | Forum

Henrik
Henrik Oct 29 '11
The following hack has been tested on platform version 1.2.5.

To remove the possibility to rate blogs, remove the line
   $this->addComponent('rate',$rateInfo);
in the file
   ow_plugins->blogs->controllers->view.php.

To remove the highest rated tab on the blog page, remove the line
   'top-rated'==>array('iconClass'=>'ow_ic_star'),
in the file
   ow_plugins->blogs->controllers->blog.php.

To remove the possibility to rate photos, remove the line
   $this->addComponent('rate',$photoRates);
in the file
   ow_plugins->photo->controllers->photo.php.

To remove the highest rated tab on the photo page, remove the text 'toprated' in
   $validLists=array('featured','latest','toprated','tagged');
both in functions getMenu() and viewList(), and remove the text 'ow_ic_star' in
   $classes=array('ow_ic_push_bin','ow_ic_clock','ow_ic_star','ow_ic_tag');
in function getMenu(). These functions can be found in the file
   ow_plugins->photo->controllers->photo.php.


Edit: For the latest version of this hack, see the end of this thread.

The Forum post is edited by Alia Aug 11 '14
Keelan Leader
Keelan Oct 31 '11
All updates will overwrite these FYI.
Henrik
Henrik Nov 1 '11
True.
Purusothaman Ramanujam
How can I apply these through plugin without code modifications?
Henrik
Henrik May 27 '12
I don't think you can. The code needs to be prepared with a hook that your plugin can catch, and it isn't.
Henrik
Henrik Jun 22 '12

With the new photo viewer in platform version 1.4.0, the line

   $this->addCompontent('rate',$photoRates);

has been moved to the file

   ow_plugins->photo->components->photo_floatbox.php.

Removing this line removes the possibility to rate photos.

Henrik
Henrik Sep 14 '12
If you would like this functionality to be implemented in Oxwall, so that the rating system could be turned off from the admin panel instead of using a hack, please vote for it here.
The Forum post is edited by Henrik Sep 14 '12
Michael I.
Michael I. Dec 18 '12
Topic was moved from Hacks.
Dave S
Dave S May 21 '13
It's good, but not good because the images don't show up after removing the codes.
Henrik
Henrik May 21 '13
It still works for me.
Dave S
Dave S May 21 '13
Henrik, you're right. I missed the text 'toprated' and i removed it. It works. Thank you for sharing this topic. :)
Jonathan
Jonathan Aug 2 '14
Someone knows what file to edit to remove the possibility to rate photos in the new version 1.7 ??? Thank you :-)
Henrik
Henrik Aug 5 '14
Here's a modified hack that seems to work on platform version 1.7.0:


To remove the possibility to rate blogs, remove the line
   $this->addComponent('rate',$rateInfo);
in the file
   ow_plugins->blogs->controllers->view.php.


To remove the highest rated tab on the blog page, remove the line
   'top-rated'
=>array('iconClass'=>'ow_ic_star'),

in the file
   ow_plugins->blogs->controllers->blog.php.


To remove the possibility to rate photos,

1) set OW_DEV_MODE to true in the file ow_includes->config.php,

2) insert the line

      .ow_rates_wrap {display: none;}

    in the file 

       ow_plugins->photo->static->css->photo_floatbox.css,

3) load some page with photos in your browser, and

4) set OW_DEV_MODE to false in the file ow_includes->config.php.


To remove the highest rated menu option on the photo page, remove the line

   $menu->additem('toprated',$language->text('photo', 'menu_toprated'),

                OW::getRouter()->urlForRoute('view_photo_list', array('listType'=>'toprated')));

in the file

   ow_plugins->photo->components->page_head.php.

Alia Team
Alia Aug 11 '14
Thank you for sharing Henrik.
Henrik
Henrik Jan 16 '15
Replace

   .ow_rates_wrap {display: none;}

with

   .ow_rates_wrap {visibility: hidden;}

and the hack still works for platform version 1.7.2.

Megan
Megan Jun 15 '15
 I've followed the above directions but If I click on a picture in someone's profile, the rating option appears.  Do you know how to remove this?   thanks
Henrik
Henrik Jun 16 '15
Do you mean opening an album page by clicking on an album cover picture in the photo album widget? The hack works for me on such pages.
Aleksandr
Aleksandr Jan 13 '16
Thanks for the solution!