PDA


View Full Version : vBA Dynamics Rating Options/Box Revisited


aproape
08-31-2008, 01:37 PM
Good morning everyone,

Time for more presents.. :-)

We have modified the current voting/rating options on Dynamics so that is:

1. using a very complex rating algorithm
2. the rating/voting options are displayed very clearly on the top of each article - no need to fiddle with menus and unnecessary options / permissions / already voted / etc

[rating box idea has been inspired from vb.org voting box style]

This post addresses the 2nd enhancement - if there is enough interest we can publish 1. as well.

For this enhancement, the following are the changes:

- changes the rating options to be presented in a yellow[ish] box at the top of each article/page.
- removes the 'vb-style' drop-down voting option/'Rate article'
- hides the rating options from guest users or other groups that are not allowed to vote [I mean.. really]
- shows the vote[d] value right away as well as the total number of votes and final rating on each page and presents the user from voting again [I mean.. really]
- the rated value[s] are shown in numbers, not stars [better understanding of the actual value]


Please check the attached archive for all the required files - instructions are inside as well as below.

--- CUT HERE ---

vBA Dynamics Rating Options/Box Revisited

1. Create [if it doesn't exist already] a folder called 'plugins' in the vBulletin main folder [your forum folder, _not_ dynamics!] and copy rating_process.php and set_user_entry_rating.php files into it.

2. Replace the content of the template of "vBadvanced Dynamics Templates »", ADV_DYNA _SHOWENTRY with the content of the file ADV_DYNA_SHOWENTRY.tpl
(from VBulletin Admin Control Panel, go to "Styles & Templates", select "Style Manager" and then the "Edit Templates" option)

-- OR --

if you have this template modified from the original, compare the contents with the original and make the modifications manually.


3. Add the following plugins:
(VBulletin Admin Control Panel => Plugins & Products => Plugin Manager => Add New Plugin)

3a.
Product: vBadvanced Dynamics
Hook Location: vba_dyna_functions_saveentry_rate_entry
Title: Enhanced Rating Process (modifies the actions on the entry rating)
Execution Order: 5
Plugin PHP Code: require_once('./plugins/rating_process.php');
Plugin Active: Yes

3b.
Product: vBadvanced Dynamics
Hook Location: vba_dyna_showentry_start
Title: Enhanced Set User Rating
Execution Order: 5
Plugin PHP Code: require_once('./plugins/set_user_entry_rating.php');
Plugin Active: Yes


4. That's all folks! Enjoy.

--- CUT HERE ---


Cheers,
aproape

deathemperor
09-02-2008, 02:03 AM
demo plz
and thanks

aproape
09-02-2008, 03:22 PM
Hi there deathemperor,

Unfortunately I cannot supply a demo however I can attach a sample of how the box looks like - with all the information removed [doesn't look nice but.. hmm - not much of a choice for now].

Hope it's a bit clearer.. if you or anyone else needs more information or example let me know - thanks!


Cheers,
aproape

trigatch4
10-06-2008, 06:48 PM
What does it look like for someone who has already voted? How about to guests?

Is it possible to move the ".16 (1 Vote)" part to a different area of the SHOW_ENTRY template?

aproape
10-07-2008, 08:07 PM
Hi there trigatch4!

For someone who voted there is only one box [yellow/configurable] - that shows you the total votes/score and your own vote.

There is no option to vote again [we thought that's redundant].

Guests - they have a message similar to 'in order to vote on this article please login/register..'

Yes, it is possible - just insert those rating variables somewhere else.. where would you like to have them?


Cheers,
aproape