Actions

J1.5

Difference between revisions of "How to move User rating"

From Joomla! Documentation

m
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Only real solution I found is a hack though, namely in file mambots/content/mosvote.php. Change
+
{{CoreHackNotice}}
  
<source lang="php">
+
The only real solution for moving the user rating is a hack.
$_MAMBOTS->registerFunction( 'onBeforeDisplayContent', 'botVoting' );
+
</source>
+
  
to
+
== Joomla! 1.5 {{JVer|1.5}} ==
 +
 
 +
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">
 
<source lang="php">
$_MAMBOTS->registerFunction( 'onAfterDisplayContent', 'botVoting' );
+
$mainframe->registerEvent( 'onBeforeDisplayContent', 'plgContentVote' );
 +
</source>
 +
to
 +
<source lang="php">
 +
$mainframe->registerEvent( 'onAfterDisplayContent', 'plgContentVote' );
 
</source>
 
</source>
  
[[Category:Tips and tricks]]
+
== Joomla! 1.0 {{JVer|1.0}} ==
[[Category:Tips and tricks 1.0]]
+
  
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
+
You must hack a mambot, namely in file <code>mambots/content/mosvote.php</code>. Change
 
+
and change
+
  
 
<source lang="php">
 
<source lang="php">
$mainframe->registerEvent( 'onBeforeDisplayContent', 'plgContentVote' );
+
$_MAMBOTS->registerFunction( 'onBeforeDisplayContent', 'botVoting' );
 
</source>
 
</source>
to  
+
 
 +
to
 +
 
 
<source lang="php">
 
<source lang="php">
$mainframe->registerEvent( 'onAfterDisplayContent', 'plgContentVote' );
+
$_MAMBOTS->registerFunction( 'onAfterDisplayContent', 'botVoting' );
 
</source>
 
</source>
 +
 +
[[Category:Tips and tricks 1.0]]
 +
[[Category:Tips and tricks 1.5]]
 +
[[Category:Archived version Joomla! 1.5]]

Latest revision as of 19:48, 19 June 2013

Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.
Stop hand nuvola.svg.png
Warning!

This is a core hack. Files you change as described on this page will be overwritten during updates of Joomla!. For more information, see Core hack.

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

Joomla! 1.5 Joomla 1.5

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' );

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' );