Stemmen als bezoeker?

Hulp nodig bij een modificaties of op zoek naar een MOD? Bekijk ons archief. Support wordt helaas niet meer verleend.
Forumregels

Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
phpBB2.0.x
Gesloten
Khai
Berichten: 48
Lid geworden op: 16 sep 2003, 16:54
Locatie: Venray
Contacteer:

Stemmen als bezoeker?

Bericht door Khai » 10 aug 2003, 09:10

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?

jeroen234
Berichten: 154
Lid geworden op: 05 jun 2003, 18:40
Locatie: lelystad

Bericht door jeroen234 » 10 aug 2003, 10:12

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 


Khai
Berichten: 48
Lid geworden op: 16 sep 2003, 16:54
Locatie: Venray
Contacteer:

Bericht door Khai » 12 aug 2003, 10:17

is er ook een (extra) scriptje zodat je maar één keer kan stemmen.
Laatst gewijzigd door Khai op 12 aug 2003, 19:06, 1 keer totaal gewijzigd.


jeroen234
Berichten: 154
Lid geworden op: 05 jun 2003, 18:40
Locatie: lelystad

Bericht door jeroen234 » 13 aug 2003, 12:20

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

Khai
Berichten: 48
Lid geworden op: 16 sep 2003, 16:54
Locatie: Venray
Contacteer:

stemmen in portal?

Bericht door Khai » 22 aug 2003, 09:59

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?

Gebruikersavatar
WebSiteNet
Berichten: 6524
Lid geworden op: 20 okt 2003, 16:56
Locatie: Wieringerwerf
Contacteer:

Bericht door WebSiteNet » 22 aug 2003, 16:10

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">

Gesloten