vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Members Choice voting hack - V2 with usergroup permissions (https://vborg.vbsupport.ru/showthread.php?t=74183)

trafix 01-10-2005 10:00 PM

Members Choice voting hack - V2 with usergroup permissions
 
I have eventually got around to porting and releasing this hack on vborg for vb 3.0.5 :)

1 file edit
3 template edit
3 new db table

This hack uses and includes a copy of the [HIS] Hack Installer System (Build 3)
released by Link14716 and can be found here --> https://vborg.vbsupport.ru/showthread.php?t=71542


This is similar to the earlier version however i have mane some changes including the ability to run more that one polling booth at a time :)

The member who nominates another can give reason for nominating the person.
and then the nominee can add an acceptance speech.
Avatars are also displayed for both nominee and nominator.

A Tutorial for manual install can be found here https://vborg.vbsupport.ru/showthread.php?t=76050

UPDATE V1.1

missing phrases added
changed wrong phrase call in template
fixed db quirie to add the table prefix


UPDATE V1.2

Changed phrasegroup id due to conflict with another hack

Update V2
1. Booth auto close.
2. Add option for nominate to be able to vote for the person they nominated
3. Add option to deny admin from nomination.
4. Added usergroup permissions for
-- Who can vote
-- Who can nominate
-- who can remove nominees
-- who can see votes.
5) fixed some phrases
If you are upgrading please be sure to remove the "1" folder before starting the install of v2

Johnny 01-11-2005 11:57 AM

This is one very interesting hack. I might use this one.

NuclioN 01-11-2005 01:12 PM

Trafix can you provide a 'non HIS' install file for this? Tnx in advance.

MikaK 01-11-2005 02:21 PM

Interesting. Does this work for 303?

=M=

shadiguy1 01-11-2005 03:36 PM

yah id like a non his Version as well.

rinkrat 01-11-2005 03:41 PM

Yeah I just want to install it without this other hack. Looks like a perfect "Player of the Month" hack for my site though. Please hook us up with the proper procedures for hacking without HIS.

docvader 01-11-2005 03:52 PM

I think we've used this HIS system a few times before however, even though I prefer text files. i'm going to try it to see what happens.

yinyang 01-11-2005 06:41 PM

ooh. i've been waiting for something like this for an organization. 1) a non-HIS installer instructions would be awesome!! if possible. 2) is there a way in the next generation to set the member choice via usergroups?

for example, i have a directors board that nominates and votes on the best members of the month. we don't have the members vote, so if you could restrict or allow only certain usergroups, that'd be great!

trafix 01-11-2005 08:11 PM

Quote:

Originally Posted by yinyang
ooh. i've been waiting for something like this for an organization. 1) a non-HIS installer instructions would be awesome!! if possible. 2) is there a way in the next generation to set the member choice via usergroups?

for example, i have a directors board that nominates and votes on the best members of the month. we don't have the members vote, so if you could restrict or allow only certain usergroups, that'd be great!

Yep, i will look at usergroups for you

Quote:

Trafix can you provide a 'non HIS' install file for this? Tnx in advance.
I can ... but to do it manually will take a lot of time as there are a lot of phrases and templates

Quote:

Interesting. Does this work for 303?
Yep it should work on 3.0.3 ... i actually coded it for 3.0.0 and i didnt have to change any code for 3.0.5

Quote:

non his Version
Can i ask the problem with the HIS?

The way i see it the HIS is stable and dosnt require and file or template edits, all it needs is one new db table that is added the first time that you run the script .... is it realy that big of a deal?


Trafix

alkatraz 01-11-2005 09:05 PM

Great idea for a hack!! Sorting through nominations and votes is such a pain in the ass.
Quote:

Can i ask the problem with the HIS?
Nothing wrong with it, but a lot of peeps like to do things manualy "just in case" something could affect their heavily modded board.

trafix 01-11-2005 09:44 PM

Quote:

Originally Posted by alkatraz
Great idea for a hack!! Sorting through nominations and votes is such a pain in the ass.

Nothing wrong with it, but a lot of peeps like to do things manualy "just in case" something could affect their heavily modded board.

Hmm manually ..... its not my idea of fun sitting there adding heaps of templates and phrases one at a time :(

vB trader manually .... i dont think so .... over 70 templates and like over 400 new phrases ...... manual is not going to happen .. lol

kall 01-11-2005 09:57 PM

In the text file you mention installing vB Jukebox... :)

paulmjno 01-11-2005 11:07 PM

This is confusing. I have installed the hack, but have no idea how to use it. Where can I add voting booths? And why does the install text have info about vB Jukebox in it?

trafix 01-12-2005 02:19 AM

Quote:

Originally Posted by paulmjno
This is confusing. I have installed the hack, but have no idea how to use it. Where can I add voting booths? And why does the install text have info about vB Jukebox in it?

ooops ... i used the jukebox readme as a template for this readme .... mentally substatute ;)

MikaK 01-12-2005 02:20 AM

Quote:

Originally Posted by yinyang
2) is there a way in the next generation to set the member choice via usergroups?

Would be very cool:up:

trafix 01-12-2005 02:23 AM

ummm you will find the settings in the vb options .... and to set up a polling booth .... setect the polling booth manager and click on "add"

MikaK 01-12-2005 04:15 AM

Seems like very cool! and fun:D Definately finds the small, very deep hiding politician even in me!

I think I found a small bug creating a db error when clickin at the "Leader Board" link. In mc_pollbooth.php around line 333
PHP Code:

$topresult $DB_site->query("
SELECT * FROM mc_nominee 
WHERE boothid = 
$boothid 
ORDER BY votes 
DESC 

needs a TABLE_PREFIX, like in my case: scll as the tableprefix
PHP Code:

$topresult $DB_site->query("
SELECT * FROM scllmc_nominee 
WHERE boothid = 
$boothid 
ORDER BY votes 
DESC 

Further, I think it would be nice if bbcode and smilies were present available for the speeches.

Cheers,
-Mika

trafix 01-12-2005 04:32 AM

Quote:

Originally Posted by MikaK
Seems like very cool! and fun:D Definately finds the small, very deep hiding politician even in me!

I think I found a small bug creating a db error when clickin at the "Leader Board" link. In mc_pollbooth.php around line 333
PHP Code:

$topresult $DB_site->query("
SELECT * FROM mc_nominee 
WHERE boothid = 
$boothid 
ORDER BY votes 
DESC 

needs a TABLE_PREFIX, like in my case: scll as the tableprefix
PHP Code:

$topresult $DB_site->query("
SELECT * FROM scllmc_nominee 
WHERE boothid = 
$boothid 
ORDER BY votes 
DESC 

Further, I think it would be nice if bbcode and smilies were present available for the speeches.

Cheers,
-Mika

hmmm, i will take a look .... maybe i didnt add the "table prefix" bit

MikaK 01-12-2005 04:41 AM

Quote:

Originally Posted by trafix
hmmm, i will take a look .... maybe i didnt add the "table prefix" bit

This might be dependent on my server mail options. When nominating my test member the test member receives a notification email with the message:
Could not find phrase 'mc_nomination_email'.

Regards,
-Mika

trafix 01-12-2005 05:02 AM

Quote:

Originally Posted by MikaK
This might be dependent on my server mail options. When nominating my test member the test member receives a notification email with the message:
Could not find phrase 'mc_nomination_email'.

Regards,
-Mika

hmmm ... i will check the phrases have been added to the phrases.php .... they should have

trafix 01-12-2005 05:10 AM

Damn ... liiks like the email body phrases didnt import properly with the his ... so i will have to edit that a.s.a.p

but for now open your phraes manager goto email body pheases and add the following 2 phrases

mc_nomination_email

PHP Code:

$bbuserinfo[usernamehas nominated you for $booth[title].
        
        
Please take the time to add your acceptance speech$bbuserinfo.
        
        
Click Here $vboptions[bburl]/mc_pollbooth.php?$session[sessionurl]do=showbooth&boothid=$boothid

AND

mc_pollbooth_closed

PHP Code:

Congrats goes to $winner[username] for winning $pollinfo[title].
        
        
We would like to thank everyone who nominated and voted in this Members Choice Award.
        
        
To see the full results
Click 
[url="$vboptions[bburl]/mc_pollbooth.php?$session[sessionurl]do=showbooth&boothid=$list[mc_pollboothid]"]HERE[/url

let me know if it works :)

paulmjno 01-12-2005 05:31 AM

Quote:

Originally Posted by trafix
ummm you will find the settings in the vb options .... and to set up a polling booth .... setect the polling booth manager and click on "add"

There is no link to the page where you add new booths...

trafix 01-12-2005 05:52 AM

See attached image

Quote:

Originally Posted by paulmjno
There is no link to the page where you add new booths...


paulmjno 01-12-2005 06:06 AM

Quote:

Originally Posted by trafix
See attached image

It is that page I am unable to get to. There is no link to it.

MikaK 01-12-2005 06:06 AM

Quote:

Originally Posted by trafix
See attached image

I think "paulmjno" refers to the left side navlinks. I also had that "problem" untill I noticed I didn?t run the last stage of the installer:)

-Mika

paulmjno 01-12-2005 06:24 AM

Quote:

Originally Posted by MikaK
I think "paulmjno" refers to the left side navlinks. I also had that "problem" untill I noticed I didn?t run the last stage of the installer:)

OK, I tried to re-install the hack (using override) and at the last part, I received this error:
Quote:

Warning: main(../upgrade_queries.php): failed to open stream: No such file or directory in /index.php on line 49

Fatal error: main(): Failed opening required '../upgrade_queries.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/username/public_html/board/install/hacks/Members Choice/1/index.php on line 49
Edit: The problem here is that there is no upgrade_queries.php file in the distribution. Also: you might wanna know that you've shipped your WS_FTP logs with the distro.

trafix 01-12-2005 06:55 AM

the last stage of the installing is to di the file / template edits .... these are listed in the readme file

kall 01-12-2005 07:09 AM

Quote:

Originally Posted by trafix
the last stage of the installing is to di the file / template edits .... these are listed in the readme file

The AdminCP option is blank for me, I see the "Polling Booth manager" but the bit that heads that is blank.

Also, for some reason in mc_BOOTH, the wrong phrase is getting called.

Find
PHP Code:

$vbphrase[ms_rule_1_3

Change to
PHP Code:

$vbphrase[mc_rule_1_3

*edit* But that phrase isn't there either. :(

trafix 01-12-2005 07:46 AM

Quote:

Originally Posted by kall
The AdminCP option is blank for me, I see the "Polling Booth manager" but the bit that heads that is blank.

Also, for some reason in mc_BOOTH, the wrong phrase is getting called.

Find
PHP Code:

$vbphrase[ms_rule_1_3

Change to
PHP Code:

$vbphrase[mc_rule_1_3

*edit* But that phrase isn't there either. :(

tnx for he bug reports ... i will upload v1.1 with fixes to date ... including missing phrases

trafix 01-12-2005 07:59 AM

mc_rule_1_3
PHP Code:

1You may not vote or nominate yourself.<br />2You may not vote for the person that you nominated.<br />3You may not vote more than once for the same nominee.<br /> 


trafix 01-12-2005 08:25 AM

Is there any problems that i havnt addressed yet?

kall 01-12-2005 08:47 AM

Quote:

Originally Posted by trafix
Is there any problems that i havnt addressed yet?

Line 111 of mc_vote.php:
PHP Code:

eval(print_standard_error('mc_cant_vote_you_niminated')); 

Nominated?

trafix 01-12-2005 08:58 AM

sorry ... i mis understood .... i will change it in the zip but it should be ok for you to leave it spelt that way as the phrase var name was spent the same way
up to you if you want to change them both in the script and the phrase manager

kall 01-12-2005 09:34 AM

Quote:

Originally Posted by trafix
sorry ... i mis understood .... i will change it in the zip but it should be ok for you to leave it spelt that way as the phrase var name was spent the same way
up to you if you want to change them both in the script and the phrase manager

The AdminCP menu item is still showing blank for me.

trafix 01-12-2005 09:36 AM

can you get a screenie of the admin menu pls

kall 01-12-2005 10:02 AM

Quote:

Originally Posted by trafix
can you get a screenie of the admin menu pls

Here you go...

MikaK 01-12-2005 11:53 AM

Quote:

Originally Posted by kall
Here you go...

I reinstalled the updated 1.1 and have the same problem. This time the mc_nomination_email didn?t add properly so the email topic says "Could not find phrase 'mc_nomination_email'."

Otherwise all seems smooth.

Regs,
-Mika

trafix 01-12-2005 12:19 PM

Hmmm.....interesting, I wonder why? At this stage I suggest entering them manually, via the phrase manager in your admin area.

I will try and work out why this is happening.

kall 01-12-2005 06:49 PM

Quote:

Originally Posted by trafix
hmmm ... i will check the phrases have been added to the phrases.php .... they should have

I'm getting this as a nomination email:
Quote:

nih has nominated you for Member of the Month - January 2005.

Please take the time to add your acceptance speechArray.

Click Here http://forums.nzboards.com/mc_pollbo...oth&boothid=1]

trafix 01-12-2005 08:28 PM

ok i found the error in the mc_nomination_email


PHP Code:

$bbuserinfo[usernamehas nominated you for $booth[title]. 
 
Please take the time to add your acceptance speech $bbuserinfo
 
Click Here $vboptions[bburl]/mc_pollbooth.php?$session[sessionurl]do=showbooth&boothid=$boothid 

and for the admin the phrase should be there but check control panel global and

mc_ members_ choice

Members Choice


All times are GMT. The time now is 05:35 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01620 seconds
  • Memory Usage 1,863KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (13)bbcode_php_printable
  • (25)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete