Pagina 1 van 1

Stemmen als bezoeker?

Geplaatst: 10 aug 2003, 09:10
door Khai
Ik kan de bezoekers van mijn site (dus de niet-geregistreerden) niet laten stemmen op mijn poll.

Ik heb in de admin-panel 'stemmen' op 'ALL' gezet, maar hij springt automatisch terug naar 'REG'. Hoe kan ik dit verhelpen?

Geplaatst: 10 aug 2003, 10:12
door jeroen234
dan moet je effe deze mod er op zetten
maar ze kunnen dan als ze willen 10000000000 keer stemmen

note:
After you have applied this MOD, to allow guest voting you must go to the Forum Permissions
## section of the phpBB Admin Control Panel and set the voting permission for a forum to ALL.
## That will be the last step in enabling guest voting in that particular forum. Guests will only
## be able to vote in a forum if you set this permission.

Code: Selecteer alles



############################################################## 
## MOD Title: Allow Unlimited Guest Voting 
## MOD Version: 1.0.0 
## Author: Thoul < tempshad@hotmail.com >
## Description: Allows administrators to enable voting by users that are not logged in. 
## 
## Installation Level: Easy
## Installation Time: 5 Minutes 
## Files To Edit: admin/admin_forumauth.php, 
##                     posting.php
## Included Files: n/a
############################################################## 
## This MOD is released under the GPL License. 
## Intellectual Property is retained by the MOD Author(s) listed above 
############################################################## 
## Authors Notes: 
## Before using this MOD, you should be aware that it allows *unlimited* guest voting on a per
## forum basis. When I say unlimited, I do mean unlimited: someone could very easily skew the
## voting in a poll by voting repeatedly. If you feel that this is likely to happen and you do
## not want it to happen, using this MOD is not a good idea unless you add some sort of IP or
## cookie tracking system. Even then, voting could still be skewed as IP and cookie tracking
## systems would not be perfect. If you feel that your poll is too important to allow unlimited
## voting, then you can simply put your poll in a forum whose voting permissions are set to REG
## or higher in the Admin Control Panel of phpBB. This MOD is intended for those who simply want
## to have some relaxing, fun poll(s) and don't need to worry about someone skewing the voting.
## I have no intention of adding any form of IP, cookie, or other tracking to this MOD, as I
## don't feel it necessary for my own use (which is what I made this MOD for in the first place).
## If anyone would like to expand on this MOD and add some form of tracking, be my guest.
##
## After you have applied this MOD, to allow guest voting you must go to the Forum Permissions
## section of the phpBB Admin Control Panel and set the voting permission for a forum to ALL.
## That will be the last step in enabling guest voting in that particular forum. Guests will only
## be able to vote in a forum if you set this permission.
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

# 
#-----[ OPEN ]------------------------------------------ 
# 
admin/admin_forumauth.php

# 
#-----[ FIND ]------------------------------------------ 
# 

	if ( $forum_auth_fields[$i] == 'auth_vote' ) 
	{
		if ( $HTTP_POST_VARS['auth_vote'] == AUTH_ALL ) 
		{
			$value = AUTH_REG; 
		}
	}

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 


	#	if ( $forum_auth_fields[$i] == 'auth_vote' ) 
	#	{
	#		if ( $HTTP_POST_VARS['auth_vote'] == AUTH_ALL ) 
	#		{
	#			$value = AUTH_REG; 
	#		}
	#	}


# 
#-----[ OPEN ]------------------------------------------ 
# 
posting.php


# 
#-----[ FIND ]------------------------------------------ 
# 

	$sql = "INSERT INTO " . VOTE_USERS_TABLE . " (vote_id, vote_user_id, vote_user_ip) 
		VALUES ($vote_id, " . $userdata['user_id'] . ", '$user_ip')"; 
	if ( !$db->sql_query($sql, END_TRANSACTION) ) 
	{ 
		message_die(GENERAL_ERROR, "Could not insert user_id for poll", "", __LINE__, __FILE__, $sql); 
	}

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

if ($userdata['user_id'] != ANONYMOUS)
{
	$sql = "INSERT INTO " . VOTE_USERS_TABLE . " (vote_id, vote_user_id, vote_user_ip) 
		VALUES ($vote_id, " . $userdata['user_id'] . ", '$user_ip')"; 
	if ( !$db->sql_query($sql, END_TRANSACTION) ) 
	{ 
		message_die(GENERAL_ERROR, "Could not insert user_id for poll", "", __LINE__, __FILE__, $sql); 
	}
}


# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM 


Geplaatst: 12 aug 2003, 10:17
door Khai
is er ook een (extra) scriptje zodat je maar één keer kan stemmen.

Geplaatst: 12 aug 2003, 12:04
door WebSiteNet

Geplaatst: 13 aug 2003, 12:20
door jeroen234
een gast is niet bekend dus wordt er geen info van opgeslagen
bij de vote staat nu alles onder 1 naam voor gasten vandaar dat je 1111100000 keer kan vote

stemmen in portal?

Geplaatst: 22 aug 2003, 09:59
door Khai
Oké. Het is me gelukt om de bezoekers te laten stemmen. Maar dit kan alleen als ze naar de forum index gaan.
In de portal kunnen de bezoekers (nog) niet stemmen. Hoe kan ik dit oplossen?

Geplaatst: 22 aug 2003, 16:10
door WebSiteNet
OPEN portal_body.tpl
find:

Code: Selecteer alles

				<!-- BEGIN switch_user_logged_out -->
				<center>{L_LOGIN_TO_VOTE}</center>
				<!-- END switch_user_logged_out -->
				<!-- BEGIN switch_user_logged_in -->
				<center><input type="submit" class="mainoption" name="submit" value="{L_VOTE_BUTTON}" {DISABLED}></center>
				<input type="hidden" name="topic_id" value="{S_TOPIC_ID}">
				<input type="hidden" name="mode" value="vote">
				<!-- END switch_user_logged_in -->
en vervan dat met dit

Code: Selecteer alles

				<center><input type="submit" class="mainoption" name="submit" value="{L_VOTE_BUTTON}" {DISABLED}></center>
				<input type="hidden" name="topic_id" value="{S_TOPIC_ID}">
				<input type="hidden" name="mode" value="vote">