Loading...
JoomlaJoomla 2.5Joomla Tutorials

Joomla 2.5 Tutorial – How to Move Article Rating Voting to Bottom of Article

Joomla 2.5 Tutorial – This tutorial will show you how to move the Article User Rating Voting to appear at the bottom of the article instead of at the top right after the title.  This was created in response to Zahid who asked me how to do this in a previous post.

Article User Rating Voting at the Top BEFORE the code change:

Joomla 2.5 - Article Voting Appears At the Top Under The Title
Joomla 2.5 - Article Voting Appears At the Top Under The Title

Article User Rating Voting at Bottom AFTER code change:

Joomla 2.5 - Article Voting Appears at the bottom of Article After Code Change
Joomla 2.5 - Article User Rating Voting Appears at the bottom of Article After Code Change

Sorry there is no easy way to accomplish this and you will have to access your backend files via FTP manager or SSH access.  High level overview of what you need to change:

  • Access your backend files via FTP Manager or SSH
  • Change Directory to vote plugin folder
  • Edit the vote plugin php file
  • Make code change to move article voting to bottom of article

Steps:

1.  Access your backend files via FTP Manager or SSH

  • Access your Joomla 2.5 website backend files, you can use Filezilla FTP Manager or SSH.
  • If you don’t know your username/password for FTP, you can contact your web hosting for more information.

2.  Change Directory to Vote Plugin Folder

  • Access your voting plugin files which are located in your plugin folder
  • Change Directory to:

../plugins/content/vote

3.  Edit the vote plugin php file

  • Edit the file:

vote.php

4.   Make code change to move article voting to bottom of article

Here you will make some code changes to the vote.php file.  If you are using SSH, easiest is to use PICO. But FTP manager of course you can use notepad.

Joomla 2.5 - Code to move voting to bottom of article
Joomla 2.5 - Code to move user rating voting to bottom of article
  • Search for the following code:

public function onContentBeforeDisplay($context, &$row, &$params, $page=0)

  • Replace this code with:

// commented by Elaine CmsMind.com Apr 5, 2012 To Move Voting to Below Article
//public function onContentBeforeDisplay($context, &$row, &$params, $page=0)
public function onContentAfterDisplay($context, &$row, &$params, $page=0)

  • Save the file

After you upload the file back to your fileserver or save the file in unix, you can refresh you site.  You will see the voting now at the bottom of the article instead of at the top under the article title.

Hope that helps,

Elaine

4 comments
  1. muriel

    Fine ! it work ! but now I have both plugins ‘page-navigation’ and ‘rating’ at the same place ! Changing order of plugins does nothing ! How can I change it ?

Leave a Reply

Your email address will not be published. Required fields are marked *

Captcha Captcha Reload