How to move User rating

From Joomla! Documentation
(Difference between revisions)
Jump to: navigation, search
m (Added core hack notice)
m (Adjusted layout)
 
Line 1: Line 1:
 
{{CoreHackNotice}}
 
{{CoreHackNotice}}
  
Only real solution I found is a hack though, namely in file mambots/content/mosvote.php. Change
+
The only real solution for moving the user rating is a hack.
 +
 
 +
== Joomla! 1.5 {{JVer|1.5}} and newer ==
 +
 
 +
In version 1.5 mambots have become plugins, therefore you should look for the file <code>/plugins/content/vote.php</code> and change
 +
 
 +
<source lang="php">
 +
$mainframe->registerEvent( 'onBeforeDisplayContent', 'plgContentVote' );
 +
</source>
 +
to
 +
<source lang="php">
 +
$mainframe->registerEvent( 'onAfterDisplayContent', 'plgContentVote' );
 +
</source>
 +
 
 +
== Joomla! 1.0 {{JVer|1.0}} ==
 +
 
 +
You must hack a mambot, namely in file <code>mambots/content/mosvote.php<code>. Change
  
 
<source lang="php">
 
<source lang="php">
Line 15: Line 31:
 
[[Category:Tips and tricks]]
 
[[Category:Tips and tricks]]
 
[[Category:Tips and tricks 1.0]]
 
[[Category:Tips and tricks 1.0]]
 
+
[[Category:Tips and tricks 1.5]]
This is relevant to version 1, however for version 1.5 mambots have become plugins, therefore you should look for the file /plugins/content/vote.php
+
 
+
and change
+
 
+
<source lang="php">
+
$mainframe->registerEvent( 'onBeforeDisplayContent', 'plgContentVote' );
+
</source>
+
to
+
<source lang="php">
+
$mainframe->registerEvent( 'onAfterDisplayContent', 'plgContentVote' );
+
</source>
+

Latest revision as of 16:17, 2 February 2011

The only real solution for moving the user rating is a hack.

[edit] Joomla! 1.5 Joomla 1.5 and newer

In version 1.5 mambots have become plugins, therefore you should look for the file /plugins/content/vote.php and change

$mainframe->registerEvent( 'onBeforeDisplayContent', 'plgContentVote' );

to

$mainframe->registerEvent( 'onAfterDisplayContent', 'plgContentVote' );

[edit] Joomla! 1.0 Joomla 1.0

You must hack a mambot, namely in file mambots/content/mosvote.php. Change

$_MAMBOTS->registerFunction( 'onBeforeDisplayContent', 'botVoting' );

to

$_MAMBOTS->registerFunction( 'onAfterDisplayContent', 'botVoting' );
Personal tools
Namespaces

Variants
Actions