vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Members Choice Voting Hack (https://vborg.vbsupport.ru/showthread.php?t=50819)

trafix 03-25-2003 10:00 PM

Members Choice Voting Hack
 
I built this hack at the request of one of my members before reading many requests for it on vb.org.
I have not added an auto award sequence as I have Lesane's awars/medals/card hack. However you can use this as a stand alone addition, I have a forum called "Spotlight" where I announce a member, product and service of the month.
This hack also makes use of my Links To Us hack if you have it installed.

The member who nominates another can give reason for nominating the person.
Each nominee will see a red "You have been nominated." on their home page, they then go to the members choice area to add a nomination acceptance speech.
Avatars are also displayed for both nominee and nominator, (Defult included)

As a member is nominated he is added to the nominee list.
For each nominee, members can:
1) See who voted for each.
2) Vote for a nominee if permitted, they can also add a reason for their vote
3) Read the nomination reasons and acceptance speeches etc
4) view their forum stats, this includes: amount of new posts, amount of new threads, amount of member votes, amount of new member refferals and if you have my "Links To Us" hack it will also display the amount of people that have clicked on their website banner. These stats start from the time of nomination.

Nomination and voting rules:
1) You may not vote or nominate yourself.
2) You may not vote for the person that you nominated.
3) You may not vote more than once for the same nominee.
4) Only X nominations will be accepted. (can change from admin)
5) You may nominate more than one member. (can change to one only from admin)
6) You may vote for more than one nominee. (can change to one only from admin)
7) You may only nominate members from their posts.

DEMO: www.atmyparty.com

SCREENSHOT: Next posts

REQUIREMENTS:

6 X php file alteration
1 X database query
23 X new templates
1 X template modifications

INSTALATION TIME: aprox. 20 min

Includes a php file to do database changes.

Please click "Install" if you use it.

This update includes the following new features:
1) Leader board link from main page as requested by DPoole .
2) Limiting the viewing of "Who Voted" to selected user groups as requested by USODJA.

~ This hack is Copyright ~
Please note that I reserve the right to code and release this hack for VB3, I have not and will not grant permission for anyone else to code this hack for VB3.

trafix 03-26-2003 12:12 AM

not nominated

trafix 03-26-2003 12:13 AM

member nominated

trafix 03-26-2003 12:14 AM

nomination accepted

trafix 03-26-2003 12:15 AM

nomination screen

trafix 03-26-2003 12:16 AM

voting screen

trafix 03-26-2003 12:17 AM

last...admin

Koutaru 03-26-2003 12:20 AM

This looks very interesting :) I'll definately try to install it onto my testboard and try it out

trafix 03-26-2003 12:25 AM

ok thanks..please let me know how you go

DPoole 03-26-2003 02:24 AM

easy to install - took 15mins

i ran the query in admin as stated and everything went fine until i went to the config in admin cp

then whenever i enter the title of the vote or swich any setting on i get this

Database error in vBulletin Control Panel 2.2.8:

Invalid SQL: UPDATE memberschoiceadmin set status='1', statusreason='yes', nomineesmax='10', awardname='member', nominateone='1', voteone='1' WHERE event=1
mysql error: Unknown column 'status' in 'field list'

mysql error number: 1054

LangTuDaTinh 03-26-2003 03:27 AM

PHP Code:

$DB_site->query("CREATE TABLE memberschoiceadmin (
  event smallint(1) unsigned DEFAULT '0' NOT NULL auto_increment,   
  nominees smallint(4) DEFAULT '0',
  nomineesmax smallint(5) DEFAULT '10',
  awardname varchar(255) NOT NULL,
  nominateone smallint(2) DEFAULT '0',
  voteone smallint(2) DEFAULT '0',
  PRIMARY KEY (event)
)"
); 


look like status and statusreason is missing from install script

trafix 03-26-2003 03:41 AM

Yep, your right! ok i will update the zip file asap.

if you know how to enter queries manually

ALTER TABLE memberschoiceadmin ADD status smallint(2) AFTER `event`

and then

ALTER TABLE memberschoiceadmin ADD statusreason varchar(225) AFTER `status`

I will edit first post once i get a Chance to update it, again my apponlgies

DPoole 03-26-2003 03:57 AM

Perfect - cheers

DPoole 03-26-2003 04:01 AM

well i not getting no error LOL

even after adding them queries - this happens

When i add title to the Award name in Admin CP and enter no of nominees etc and press submit i get this `Action is succesfully updated!

but when i check it again all boxes are blank so i cant nominate on main board as its not available as it resets to nothing.

trafix 03-26-2003 04:18 AM

Zip file updated

trafix 03-26-2003 04:20 AM

so all is ok now??

could you post of pm me a link to your forum please?

snyx 03-26-2003 04:54 AM

this is a very cool idea, but just not what my members were asking for. they wanted to be able to nominate users based on categories. (ie. best avatar, funniest replies, worst signature, ect..) so im going to wait on this one, see where it goes :)

trafix 03-26-2003 05:04 AM

you can call the award what ever you want....dosnt have to be member of the month...you can change each month if you want to.

You can nominate the name of the award from your config admin

DPoole 03-26-2003 05:11 AM

I have tested this on Local machine and also on Active web and i get the same prob

as soon as i enter any details into the admin cp for it : example Member of the month the boxes go blank once i press Submit

So cause of this the hack aint activated but besides this the rest went well

will wait to see if anyone else has same prob

I gone over the hack line by line - been at since 5am so im pretty sure i aint missed anything.

trafix 03-26-2003 05:25 AM

did you do the table alterations in post no.12?

partang2 03-26-2003 05:29 AM

Does this work now?

DPoole 03-26-2003 05:31 AM

did a total new install using your new upload zip as i presumed it was all complete in their now.

I aint getting no database errors or anything - only prob im getting is when i go to add details in CP they dont stay for some reason they just revert back to orginal setting which are blank

partang2 03-26-2003 05:40 AM

Guess not...

DPoole 03-26-2003 05:41 AM

<a href="https://vborg.vbsupport.ru/attachment.php?s=&postid=373376" target="_blank">this pic </a>

you see how yours are filled in - in the above pic well when i do it (twice now and 2 seperate installs as well) it says Updated etc and then the boxes go blank as if i aint entered anything.

trafix 03-26-2003 06:04 AM

zip file updated again...i uploaded the admin file from the original zip and ....yep.....i wouldnt work....i have replaced the file with the operating one from my server,

Sorry for stuffing you around and thanks for your help persistance and understanding

DPoole 03-26-2003 06:10 AM

trafix i feel really bad about saying thi sand i can see that you have gone out of your way to help on this problem.
I have deleted the admin file and replaced it with yours and still get exactly same prob.

Best thing is to leave it and see if others can install it as id hate to thing it may be me and you running around trying to fix a problem that may not exist.

trafix 03-26-2003 06:37 AM

ok, after tea i will completly bebuild the zip folder from my server...cos it does work

trafix 03-26-2003 07:01 AM

zip now rebuilt completley from my server

trafix 03-26-2003 07:07 AM

ok i downloaded the v1.5 zip and uploaded the admin php to my server....works here

anybody else??

DPoole 03-26-2003 07:26 AM

its as if something is misisng

like why is the admin cp restting as soon as i press Submit ?

should it store the details that i entered into it.

I just re-done your zip and nothing changes - just goes all blank boxes once again.

Need to suzz out why its not storing the details.

trafix 03-26-2003 08:55 AM

Click cklick....bang bang......run this quiry and all will be ok

$DB_site->query("INSERT INTO memberschoiceadmin VALUES (1,'1', 'Voting for the next award will start soon', '1', '10', 'Member of the Month', '1', '1')");


i am just about to update zip......for the final time....lol :)

partang2 03-26-2003 09:05 AM

You are a hardworking hacker m8! Looking forward to try this thing. :)

trafix 03-26-2003 09:08 AM

i think most of the problem is that i am still learning.....database stuff isnt my strong point.

Thanks for your support and let me know how you get on.

partang2 03-26-2003 09:10 AM

Will try it right now. Will let you know soon....

partang2 03-26-2003 11:17 AM

Well, I have tested it now and it worked ok. The reason I don't wanna use this (even if I liked it) is that you have put links in the templates back to your own forum registation so that peoples who clicks the nick to the nominated member's at my forum are beeing redirected straight to your place...! God knows where else there are links like that... NOT GOOD!!! :angry:

trafix 03-26-2003 11:21 AM

i cant see the last post here but i did get it in my mail,

are you talking about the "members choice hack by trafix" bit at the bottom?????

i can assure you that there is no other links, hidden or otherwise.

trafix 03-26-2003 11:49 AM

i see what you are talking about......whoops another bug..thank you for pointing it out,
will update zip to 1.7 soon

replace entire memberschoice_bit template with

partang2 03-26-2003 12:29 PM

Ok that's fine, but I can't get the same colors as the rest of my forum in the memberschoice_nominate_member template:

__________________________________________________ __
<p align="center"><normalfont><br>What is your reason for nominating <b>$nominatemember?</b></p><p align="center">
<TEXTAREA cols=80 name=nomreason rows=8 wrap=Virtual></TEXTAREA></p><br></td>
</tr>

<tr>

<td bgcolor="#000ec0" colspan='2' align='middle'><p id='submitrow'><input type="submit" value=" Nominate Now " accesskey="s">

</p></td>

</tr></table></form></TD>
</TR>
</TABLE>

$footer

</body>

</html>

__________________________________________________ __

Maybe I am tired here, but what is wrong with this?
All the others are ok...

DPoole 03-26-2003 12:35 PM

$DB_site->query("INSERT INTO memberschoiceadmin VALUES (1,'1', 'Voting for the next award will start soon', '1', '10', 'Member of the Month', '1', '1')")

You have an error in your SQL syntax near '$DB_site->query("INSERT INTO memberschoiceadmin VALUES (1,'1', 'Voting for the n' at line 1

trafix 03-26-2003 12:40 PM

damn damn damn

try

$DB_site->query("INSERT INTO memberschoiceadmin VALUES (NULL,'1', 'Voting for the next award will start soon', '1', '10', 'Member of the Month', '1', '1')")


All times are GMT. The time now is 04:02 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.01277 seconds
  • Memory Usage 1,811KB
  • 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
  • (1)bbcode_php_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