Scontent Howto Display Votes on The Module J1.5 - Joomla! Forum - community, help and support


hi,

this plugin/module found here:

http://extensions.joomla.org/extensions/social-web/social-display/toolbars/13803?qh=ytoxontpoja7czo4oijzy29udgvudci7fq%3d%3d

to display number of votes on scontent voting module joomla 1.5 following. backup of scontent module if want.

edit helper.php file found under these folders:

modules/mod_scontent/helper.php

scroll bottom of helper.php file until find piece of code:

}
$lists[$i]->text = htmlspecialchars( $row->title );
$i++;
}


replace following:

}
$lists[$i]->rankvote = htmlspecialchars( $row->total_count );
$lists[$i]->text = htmlspecialchars( $row->title );
$i++;
}


save.

now open default.php file found here:

modules/mod_scontent/tmpl/default.php

find

<a href="<?php echo $item->link; ?>" class="scontent<?php echo $params->get('moduleclass_sfx'); ?>"><?php echo $item->text; ?></a>


replace this:

<div style="float: left; color: #ffffff; line-height: 1.3em; min-width: 40px; padding: 10px; text-align: center; font-size: 17px; background: #5caf03; border-radius: 5px 5px 5px 5px; margin: 4px 16px 8px 0;">+<?php echo $item->rankvote; ?></div>

<a href="<?php echo $item->link; ?>" class="scontent<?php echo $params->get('moduleclass_sfx'); ?>"><?php echo $item->text; ?></a>


save.

and should have vote count displayed on module scontent. can modify vote style deleting css elements placed on code , adding own.

thanks developer making great plugin/module :)

thanks share.. once needed such feature in 1 of site, didn't have time hack. in future, if come across such things again, surely use it.





Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support