Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
Poll / Advanced poll suggestion & tips
  • Posted: 19.05.2003, 22:46
     
    stepper
    rank:
    Helper Helper
    registered:
     May 2003
    Status:
    offline
    last visit:
    04.08.04
    Posts:
    223
    Hi all,

    The poll title and options are limited to 75 resp. 50 characters. Personally, I needed more... as I didn't find any post on this topic on the forum, but did find out how to change this I figured I'd share it here.

    It would be nice if in the future one could define this from the admin backend ;)

    For Advanced Poll you need to apply the following changes ;

    (DB changes)
    - in nuke_advanced_polls_data set pn_optiontext varchar(250)
    - nuke_advanced_polls_desc set pn_title to varchar(250)
    (this in case you want to go up to 250 chars. could be less of course. You might just as well set it to the max. 255 for VARCHAR, but oh well :D)

    in pnadmin.php change

    $row[] = $output->FormText('pollname', '', 75, 75);
    to $row[] = $output->FormText('pollname', '', 75, 250);

    (the first figure defines the inputfield size, the second the maxlength)

    $row[] = $output->FormText('polloption1', '', 50, 50);
    to $row[] = $output->FormText('polloption1', '', 75, 250);

    (repeat for all polloptions)

    This should allow you to enter up to 250 characters . I wonder why this was kept so low, possibly for security reasons?

    Stepper
  • Posted: 19.05.2003, 22:50
     
    rank:
    Moderator Moderator
    registered:
     March 2002
    Status:
    offline
    last visit:
    26.08.08
    Posts:
    7720
    I set it that 'low' in my advanced polls module as it fufilled the needs I had when writing the original version of the module. As with all thingd open source they start to fufill one persons own needs and expand from there.

    I will be upping the question length and including a further description field in a future version.

    If you have no objection i'll put this in the tutorials and solutions forum and post it as a FAQ on my site.

    Thanks for taking the time to document this.

    -Mark
  • Posted: 19.05.2003, 22:56
     
    stepper
    rank:
    Helper Helper
    registered:
     May 2003
    Status:
    offline
    last visit:
    04.08.04
    Posts:
    223
    Of course, that's what I put it here for... :)
  • Posted: 19.05.2003, 23:19
     
    stepper
    rank:
    Helper Helper
    registered:
     May 2003
    Status:
    offline
    last visit:
    04.08.04
    Posts:
    223
    as I was working with an older advanced poll version indeed, the above is inaccurate. For advanced_poll v. 1.1 b2 the code has been changed quite a bit.... but the principle is the same, just search for the 75, 75 figures (for title) and for the 50, 50 (for options) and change them accordingly your needs.

    stepper

Extensions Moderation

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula