class CKunenaPolls


Located at : UKNOWVA_ROOT/components/com_kunena/lib/kunena.poll.class.php

Properties

$config
$my
$document

Methods

getInstance()

No description

mixed
escape(mixed $var)

Escapes a value for output in a view script.

array
get_poll_data($threadid)

Get the datas for a poll

array
get_users_voted($threadid)

Get the users which have voted for a poll

int
get_number_total_voters($pollid)

Get the total number of voters in a poll

int
get_total_options($pollid)

Get the number options of an poll

get_poll_allowed($id, $parent, $kunena_editmode, $allow_cat)

Get if the poll is allowed to be displayed

call_javascript_vote()

Insert javascript and ajax for vote

get_input_poll($kunena_editmode, $id, $polldatasedit)

Get poll input when you are in editmode

call_js_poll_edit($kunena_editmode, $id)

Insert javascript for form for editing a poll

call_javascript_form()

Insert javascript for form of new post

save_new_poll($polltimetolive, $polltitle, $pid, $optionvalue)

Save a new poll

array
get_data_poll_users($userid, $threadid)

Save the results of a poll to prevent spam

int
get_top_five_votes($PopPollsCount)

Get the five better votes in polls

Array
get_top_five_polls($PopPollsCount)

Get the five better polls

save_results($pollid, $userid, $vote)

Save the results of a poll

save_changevote($threadid, $userid, $vote)

Update poll during edit

update_poll_edit($polltimetolive, $threadid, $polltitle, $optionsnumbers, $poll_optionsID)

Update poll during edit

get_last_vote_id($userid, $pollid)

To get the last vote id from the user

reset_vote($userid, $threadid)

For the user can vote a new once, need to remove one vote

delete_poll($threadid)

Delete a poll

polldo()

No description

showPollbox()

Show pollbox

display()

No description

Details

at line 39
getInstance()

at line 59
mixed escape(mixed $var)

Escapes a value for output in a view script.

If escaping mechanism is one of htmlspecialchars or htmlentities, uses {@link $_encoding} setting.

Parameters

mixed $var The output to escape.

Return Value

mixed The escaped value.

at line 67
array get_poll_data($threadid)

Get the datas for a poll

Parameters

$threadid

Return Value

array

at line 83
array get_users_voted($threadid)

Get the users which have voted for a poll

Parameters

$threadid

Return Value

array

at line 99
int get_number_total_voters($pollid)

Get the total number of voters in a poll

Parameters

$pollid

Return Value

int

at line 111
int get_total_options($pollid)

Get the number options of an poll

Parameters

$pollid

Return Value

int

at line 122
get_poll_allowed($id, $parent, $kunena_editmode, $allow_cat)

Get if the poll is allowed to be displayed

Parameters

$id
$parent
$kunena_editmode
$allow_cat

at line 143
call_javascript_vote()

Insert javascript and ajax for vote

at line 163
get_input_poll($kunena_editmode, $id, $polldatasedit)

Get poll input when you are in editmode

Parameters

$kunena_editmode
$id
$polldatasedit

at line 191
call_js_poll_edit($kunena_editmode, $id)

Insert javascript for form for editing a poll

Parameters

$kunena_editmode
$id

at line 208
call_javascript_form()

Insert javascript for form of new post

at line 222
save_new_poll($polltimetolive, $polltitle, $pid, $optionvalue)

Save a new poll

Parameters

$polltimetolive
$polltitle
$pid
$optionvalue

at line 243
array get_data_poll_users($userid, $threadid)

Save the results of a poll to prevent spam

Parameters

$userid
$threadid

Return Value

array

at line 258
int get_top_five_votes($PopPollsCount)

Get the five better votes in polls

Parameters

$PopPollsCount

Return Value

int

at line 275
Array get_top_five_polls($PopPollsCount)

Get the five better polls

Parameters

$PopPollsCount

Return Value

Array

at line 291
save_results($pollid, $userid, $vote)

Save the results of a poll

Parameters

$pollid
$userid
$vote

at line 366
save_changevote($threadid, $userid, $vote)

Update poll during edit

Parameters

$threadid
$userid
$vote

at line 401
update_poll_edit($polltimetolive, $threadid, $polltitle, $optionsnumbers, $poll_optionsID)

Update poll during edit

Parameters

$polltimetolive
$threadid
$polltitle
$optionsnumbers
$poll_optionsID

at line 484
get_last_vote_id($userid, $pollid)

To get the last vote id from the user

Parameters

$userid
$pollid

at line 496
reset_vote($userid, $threadid)

For the user can vote a new once, need to remove one vote

Parameters

$userid
$threadid

at line 521
delete_poll($threadid)

Delete a poll

Parameters

$threadid

at line 542
polldo()

at line 588
showPollbox()

Show pollbox

at line 592
display()