Important announcements from CouchCMS team
38 posts Page 2 of 4
@wizardradio, clonable won't make any difference, I am afraid.

Coming to the way you are using editable type 'message' to display the poll results within admin-panel, I think you'll find the following thread useful -
viewtopic.php?f=4&t=5095&p=14311
Is there any way to change the limit of 10 questions for the poll? There can be a lot of situations when 10 questions are not enough.
Thanks.
@atisz,

For now, the only recourse would be to make changes to the code itself.

For example, to make the number of options 15 instead of the default 10, try making changes to the following two locations in 'votes.php' -
Line 515
if( $FUNCS->is_natural($val) && $val<10){

make it
if( $FUNCS->is_natural($val) && $val<15){


Line 576
$vars = $this->_get_named_vars(
array(
'count'=>'0',
'count_0'=>'0',
'count_1'=>'0',
'count_2'=>'0',
'count_3'=>'0',
'count_4'=>'0',
'count_5'=>'0',
'count_6'=>'0',
'count_7'=>'0',
'count_8'=>'0',
'count_9'=>'0',
),
$rs);

// values in percentage
for( $x=0; $x<10; $x++ ){
$vars['percent_'.$x] = ( $vars['count'] ) ? sprintf( "%d", $vars['count_'.$x] / $vars['count'] * 100 ) : 0;
}

make it -
$vars = $this->_get_named_vars(
array(
'count'=>'0',
'count_0'=>'0',
'count_1'=>'0',
'count_2'=>'0',
'count_3'=>'0',
'count_4'=>'0',
'count_5'=>'0',
'count_6'=>'0',
'count_7'=>'0',
'count_8'=>'0',
'count_9'=>'0',
'count_10'=>'0',
'count_11'=>'0',
'count_12'=>'0',
'count_13'=>'0',
'count_14'=>'0',

),
$rs);

// values in percentage
for( $x=0; $x<15; $x++ ){
$vars['percent_'.$x] = ( $vars['count'] ) ? sprintf( "%d", $vars['count_'.$x] / $vars['count'] * 100 ) : 0;
}

Does this help?
KK wrote: @atisz,
Does this help?


Yessssssss! As I can see, it's working fine.
Thank You!
What is the status of this addon? I've been eyeballing a rating system for my client proof galleries. Is the addon stable?
@cardmaverick, please feel free to use it in production. Never said it was a 'beta'.
Is it possible to generate a list of the top 10 most visited pages? (sorted by number of views or unique views). Like what has been asked before here: viewtopic.php?f=3&t=7722

Also another thing I couldn't figure out. I've created a poll, and I've managed to list the options with radioboxes next to them. But how do I actually make the "Submit" button that when you click it show the result? Is it also possible to make this without a new page load (ajax maybe?). Sorry for the noob questions, I can't actually figure this out
@Datsun
Is it possible to generate a list of the top 10 most visited pages?
We are working on a dedicated addon for this purpose.

But how do I actually make the "Submit" button that when you click it show the result?
The polls module has been deliberately made with almost no GUI so you can put in your own. One way of showing the results could be to output the results with the poll itself but keep it in a hidden DIV. A button nearby ('Show results') would then use JS to unhide the div and expose the results. I've seen this kind of solution being used in websites.

Hope this helps.
KK wrote: @Datsun
Is it possible to generate a list of the top 10 most visited pages?
We are working on a dedicated addon for this purpose.


Awesome!
HELLO!

I created a poll to vote button and see results.
this running smoothly.

wanted a doubt, I would like, when you click vote at the index.php page go to resultado.php of the page to show the result without having to click the button to see results.

forgive new on the couch :D
38 posts Page 2 of 4

Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 3 guests