vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Major Additions - vB Survey: Add a full-featured survey tool to your forum (https://vborg.vbsupport.ru/showthread.php?t=131650)

Spikeman 11-14-2006 10:00 PM

vB Survey: Add a full-featured survey tool to your forum
 
What this hack does:

This hack will add a full featured survey application system to your forum. You can survey your members opinions on various topics, or allow usergroups to create their own surveys.

Credits: John W. Holmes: Author of UCCASS Survey.
tamarian: Who originally made this a vB hack for vB 3.5

Application Features: See the UCCASS site for full details.

http://www.bigredspark.com/survey.html

The UCCASS offers some advanced features such as branching conditionals (allows hiding/displaying questions based on specific answers), result filtrations and much more.

Integration features:
Replaced authentication with VB's user database
Set permissions per usergroup, for admin/edit/create/take and view results priviliges.
Replaced config files with vB admin settings
Applied vB style to the UCCASS templates (it uses Smarty)

vB Survey added features: (some will be ported back to UCCASS)
Added anonymity option. If a survey is not anonymous, members can see how other members answered.
Added Hide/unhide survey option. This is useful to send surveys to specific users or usergroups.
Added Date answer types (D), with dropdown lists for day, month, year to ensure correct date entry.
Added REGEX control for new answer types, to control the answer format.
Added size control for single like text answers and REGEX answers.

Liscense: The original UCCASS Survey application is released under a modified GPL Liscense (Aferro GPL) : http://www.bigredspark.com/survey/license.txt (or look under the /docs directory in the zip file)

Installation difficulty:
2 mins, all done via product file.

Installation:

* Unpack the included file
* Copy survey.php to your main forum directory
* Copy the survey directory into your forum directory (cannot change the directory name)
* Install the Product-Survey.xml
* The product file will also install all data for the 2 default surveys to get you started.
* Go to AdminCP => vBulletin Options => Survey System Options - and set the options for access and other settings
* If you get permission errors, change file permissions for the survey directory and its contents to 744, and the owner/group to apache:apache (or, some servers are setup to nobody:nobody):

cd /path/to/main/forum

chown -R apache:apache survey

chmod -R 744 survey

Notes:

The "do not remove" comment on the copyright link in the footer is from the original UCCASS footer template. You may contact the original author, John W. Holmes, for permission to remove the copyright notice, he's willing to talk according to their support forum.

Please click Install if you have installed this mod.

I personally do not claim credit for this hack, however this is what I have done to port over to 3.6.3 :-

1. All tables, templates, phrases etc are installed via product file.
2. Support for wol has been added.
3. Some bugs fixed with the UCCASS system

This hack is for 3.6.3 not 3.5, the 3.5 version can be seen and downloaded here this will not upgrade the 3.5 version.

I did obtain the permission from tamarian to port this to 3.6.

This is my first big hack here so I would grateful if you did click Install if you use it. Remember you only get notified of updates if you Install

Demo Here :- http://www.internetwatchers.co.uk/forums/survey.php please note the Demo may have restrictions as it is a live board. You may or may not be able to test the survey as a guest, this will not affect your sites as generally why would you want guests taking a survey on your site, you would never get a true survey result, I have only enabled this on my board so as to get the ball rolling and you guys can see it. you should all be able to see results page though.

If you have the older 3.5 Hack installed you MUST uninstall that before installing 3.6.3

vB Survey for vB 3.0 version by tamarian
vB Survey for vB 3.5 version by tamarian

Spikeman 11-15-2006 03:29 PM

Reserved for Additional Content

Changes to be completed:
1. Integrated FAQ's
2. Full vBsurvey Documentation
3. Updated UCCASS Documentation

Possible addons I am considering:
1. Ability to post final survey results directly to forum thread
2. Make some ready made surveys that you can import straight in and use

Why is this in beta? I believe that everything should be ok with vBsurvey, I have tested it extensivly on my own site and test site without error, I am just airing on the side of caution. Lets see what the comments bring :)

Floris 11-15-2006 04:12 PM

This is really cool! i've bookmarked this and will read up on this later and see if I can install it on one of my sites :)

COBRAws 11-15-2006 05:30 PM

Thanks for the portation!

Spikeman 11-15-2006 05:57 PM

Quote:

Originally Posted by COBRAws (Post 1118062)
Thanks for the portation!

My pleasure ;)

dutchbb 11-15-2006 07:13 PM

Great! One of the best hacks ever imo, i can finally use it :)

Spikeman 11-15-2006 07:17 PM

Quote:

Originally Posted by dutchbb (Post 1118118)
Great! One of the best hacks ever imo, i can finally use it :)

I would agree with you, that is why I just had to get it ported. Do not forget to click install :)

janpetterdale 11-15-2006 09:11 PM

Is it working for 3.6.0 ? Or do I have to upgrade forum to latest version?

I get this error when importing the product

Code:

Database error in vBulletin 3.6.0:

Invalid SQL:

                                INSERT INTO setting
                                        (varname, grouptitle, value, defaultvalue, datatype, optioncode, displayorder, advanced, volatile, validationcode, blacklist, product)
                                VALUES
                                        (
                                        'vb_survey_admin_groups',
                                        'vbsurvey',
                                        '5,6',
                                        '5,6',
                                        'free',
                                        '',
                                        10,
                                        0,
                                        1,
                                        '',
                                        0,
                                        'vbsurvey'
        ),
        (
                                        'vb_survey_create_groups',
                                        'vbsurvey',
                                        '5,6',
                                        '5,6',
                                        'free',
                                        '',
                                        20,
                                        0,
                                        1,
                                        '',
                                        0,
                                        'vbsurvey'
        ),
        (
                                        'vb_survey_take_groups',
                                        'vbsurvey',
                                        '5,6',
                                        '5,6',
                                        'free',
                                        '',
                                        30,
                                        0,
                                        1,
                                        '',
                                        0,
                                        'vbsurvey'
        ),
        (
                                        'vb_survey_result_groups',
                                        'vbsurvey',
                                        '5,6',
                                        '5,6',
                                        'free',
                                        '',
                                        40,
                                        0,
                                        1,
                                        '',
                                        0,
                                        'vbsurvey'
        ),
        (
                                        'vb_survey_edit_groups',
                                        'vbsurvey',
                                        '5,6',
                                        '5,6',
                                        'free',
                                        '',
                                        50,
                                        0,
                                        1,
                                        '',
                                        0,
                                        'vbsurvey'
        ),
        (
                                        'vb_survey_page_break',
                                        'vbsurvey',
                                        '%PAGE BREAK%',
                                        '%PAGE BREAK%',
                                        'free',
                                        '',
                                        60,
                                        0,
                                        1,
                                        '',
                                        0,
                                        'vbsurvey'
        ),
        (
                                        'vb_survey_text_results_perpage',
                                        'vbsurvey',
                                        '50',
                                        '50',
                                        'number',
                                        '',
                                        70,
                                        0,
                                        1,
                                        '',
                                        0,
                                        'vbsurvey'
        ),
        (
                                        'vb_survey_image_ext',
                                        'vbsurvey',
                                        'gif,jpg,jpeg,png',
                                        'gif,jpg,jpeg,png',
                                        'free',
                                        '',
                                        80,
                                        0,
                                        1,
                                        '',
                                        0,
                                        'vbsurvey'
        ),
        (
                                        'vb_survey_image_width',
                                        'vbsurvey',
                                        '200',
                                        '200',
                                        'number',
                                        '',
                                        90,
                                        0,
                                        1,
                                        '',
                                        0,
                                        'vbsurvey'
        ),
        (
                                        'vb_survey_filter_limit',
                                        'vbsurvey',
                                        '3',
                                        '3',
                                        'number',
                                        '',
                                        100,
                                        0,
                                        1,
                                        '',
                                        0,
                                        'vbsurvey'
        ),
        (
                                        'vb_survey_track_ip',
                                        'vbsurvey',
                                        '0',
                                        '0',
                                        'number',
                                        '',
                                        110,
                                        0,
                                        1,
                                        '',
                                        0,
                                        'vbsurvey'
        ),
        (
                                        'vb_survey_text_filter',
                                        'vbsurvey',
                                        'none, na, n/a, no, nothing, nope, asdf',
                                        'none, na, n/a, no, nothing, nope, asdf',
                                        'free',
                                        '',
                                        120,
                                        0,
                                        1,
                                        '',
                                        0,
                                        'vbsurvey'
        ),
        (
                                        'vb_survey_text_mode',
                                        'vbsurvey',
                                        '0',
                                        '0',
                                        'number',
                                        '<select name=\\\"setting[$setting[varname]]\\\" tabindex=\\\"1\\\" class=\\\"bginput\\\">\r\n<option value=\\\"0\\\" \" . iif($setting[\'value\']==0,\'selected=\"selected\"\') . \">Text only</option>\r\n<option value=\\\"1\\\" \" . iif($setting[\'value\']==1,\'selected=\"selected\"\') . \">Limited HTML</option>\r\n<option value=\\\"2\\\" \" . iif($setting[\'value\']==2,\'selected=\"selected\"\') . \">Full HTML</option>\r\n</select>',
                                        130,
                                        0,
                                        1,
                                        '',
                                        0,
                                        'vbsurvey'
        ),
        (
                                        'vb_survey_user_text_mode',
                                        'vbsurvey',
                                        '0',
                                        '0',
                                        'number',
                                        '<select name=\\\"setting[$setting[varname]]\\\" tabindex=\\\"1\\\" class=\\\"bginput\\\">\r\n<option value=\\\"0\\\" \" . iif($setting[\'value\']==0,\'selected=\"selected\"\') . \">Text only</option>\r\n<option value=\\\"1\\\" \" . iif($setting[\'value\']==1,\'selected=\"selected\"\') . \">Limited HTML</option>\r\n<option value=\\\"2\\\" \" . iif($setting[\'value\']==2,\'selected=\"selected\"\') . \">Full HTML</option>\r\n</select>',
                                        140,
                                        0,
                                        1,
                                        '',
                                        0,
                                        'vbsurvey'
        ),
        (
                                        'vb_survey_date_format',
                                        'vbsurvey',
                                        'Y-m-d H:i',
                                        'Y-m-d H:i',
                                        'free',
                                        '',
                                        150,
                                        0,
                                        1,
                                        '',
                                        0,
                                        'vbsurvey'
        ),
        (
                                        'vb_survey_default_template',
                                        'vbsurvey',
                                        'Default',
                                        'Default',
                                        'free',
                                        '',
                                        160,
                                        0,
                                        1,
                                        '',
                                        0,
                                        'vbsurvey'
        );

MySQL Error  : Duplicate entry 'vb_survey_admin_groups' for key 1
Error Number : 1062
Date        : Thursday, November 16th 2006 @ 12:06:58 AM
Script      : /forum/admincp/plugin.php?do=productimport
Referrer    : /forum/admincp/plugin.php?do=productadd
IP Address  : 192.168.0.100
Username    : hidden
Classname    : vb_database

Script and referer domain edited out for security reasons.

This mod seems awesome, and would love to implement it :)

Thanks :)

Spikeman 11-15-2006 09:19 PM

Quote:

Originally Posted by janpetterdale (Post 1118186)
Is it working for 3.6.0 ? Or do I have to upgrade forum to latest version?

It should work although, i could not test as I only have 3.6.3 goto into your database and drop all tables vbsurvey_ and try the install again ( it looks from your IP listed in the error that you are on a localhost so I am presuming that you can do that easy enough :) did you have the older 3.5 version installed previous to this?

janpetterdale 11-15-2006 09:28 PM

Quote:

Originally Posted by Spikeman (Post 1118192)
It should work although, i could not test as I only have 3.6.3 goto into your database and drop all tables vbsurvey_ and try the install again ( it looks from your IP listed in the error that you are on a localhost so I am presuming that you can do that easy enough :)

Thanks for fast response :)

I did have tables called survey_ and vbsurvey_ already in the database from
old addons. I probably tried the 3.5 version earlier.

Those tables are deleted now, but it still gives me the exact same error :(

Delw 11-15-2006 09:32 PM

Spikeman Thank your very much for this, I was holding off upgrading until this mod was avail for 3.6.3, but couldnt wait any longer. got an email this am saying it was ready so now I can install it. ;)
I will install it later today and try it out

Again thanks alot.
Delw

Spikeman 11-15-2006 09:34 PM

Quote:

Originally Posted by janpetterdale (Post 1118196)
Thanks for fast response :)

I did have tables called survey_ and vbsurvey_ already in the database from
old addons. I probably tried the 3.5 version earlier.

Those tables are deleted now, but it still gives me the exact same error :(

Ok the easiest way to do this is to load the old script and uninstall it, otherwise you will need to go into other vb tables and I do not think you want to do that at this stage. If the uninstall does fail try to install the older version and then uninstall again. Then install vB3.6.3 version. Hope that makes sense.

janpetterdale 11-15-2006 09:44 PM

Quote:

Originally Posted by Spikeman (Post 1118201)
Ok the easiest way to do this is to load the old script and uninstall it, otherwise you will need to go into other vb tables and I do not think you want to do that at this stage. If the uninstall does fail try to install the older version and then uninstall again. Then install vB3.6.3 version. Hope that makes sense.

I ran the vbsurvey_install.php script from 3.5 version, uninstalled it.
That worked, now 3.6 version is installed.

Thanks a lot :)

Spikeman 11-15-2006 09:47 PM

Quote:

Originally Posted by janpetterdale (Post 1118209)
I ran the vbsurvey_install.php script from 3.5 version, uninstalled it.
That worked, now 3.6 version is installed.

Thanks a lot :)

Fantastic ;) please hit that install button.

TTG 11-15-2006 09:59 PM

uh oh .. 13th click of the installed button ... is that gonna be good for me.

Spikeman 11-15-2006 10:03 PM

Quote:

Originally Posted by TTG (Post 1118223)
uh oh .. 13th click of the installed button ... is that gonna be good for me.

lol, well I almost finished coding this on the 13th but i did not do the final touches until 14th! Superstitious! nah not me :)

Delw 11-15-2006 11:05 PM

Spikeman,
so far it works perfectly on my test board. I had a few permission problems but just for testing I changed them to 777.
took less than 10 mins to install with figureing out the permission problems.

I dont understand permissions that well so if someone can help me out on them I would appreciate it.
it wouldnt work for me under 744 but it could be cause I didnt have all my files at 744? Will try it later.

Didnt take long to install either.

one suggestion for us non coders and somewhat dence at time people ( like me ;) )
you might want to put in your instructions that the survery folder needs to go into the forum dir and not below it

Quote:

Unpack the included file
Copy survey.php to your main forum directory
Copy the survey directory below your forum directory (cannot change the directory name)

Again nice job
Delw

Spikeman 11-15-2006 11:17 PM

Quote:

Originally Posted by Delw (Post 1118259)
Spikeman,
one suggestion for us non coders and somewhat dence at time people ( like me ;) )
you might want to put in your instructions that the survery folder needs to go into the forum dir and not below it

Changed that now ;) you will need to add userid to your permissions to allow users to take surveys and view results, default is 5,6 which is Admins and supermods, adding 2 will allow registered users, I shall change that in next update.

Delw 11-15-2006 11:44 PM

Thanks,
Forum permissions I dont have a problem too much with ,its server permissions lol

StarBuG 11-16-2006 06:47 AM

I get

Table 'dbname.vbsurvey_surveys' doesn't exist

when I try to call survey.php

In my db only survey_ tables exist, not vbsurvey.
I don't use prefixes for tables

StarBuG

Datenpapst 11-16-2006 08:37 AM

Don't know why, but I get this message in the example surveys:


Quote:

Warning: chmod(): Operation not permitted in /survey/smarty/Smarty.class.php on line 1454

Warning: chmod(): Operation not permitted in /survey/smarty/Smarty.class.php on line 1454

Datenpapst 11-16-2006 08:46 AM

Another thing I noticed:
When you delete a survey this message comes:

e.g. Survey #5 does not exist.

You may should create a text that tells the admin that the survey has been deleted.

Spikeman 11-16-2006 11:39 AM

Quote:

Originally Posted by StarBuG (Post 1118439)
I get

Table 'dbname.vbsurvey_surveys' doesn't exist

when I try to call survey.php

In my db only survey_ tables exist, not vbsurvey.
I don't use prefixes for tables

StarBuG

Open survey/classes/mainclass.php find this
Code:

//fix after setting tables in install script
        $this->CONF['db_tbl_prefix'] = TABLE_PREFIX . 'survey_';

and replace with this
Code:

//fix after setting tables in install script
        $this->CONF['db_tbl_prefix'] = TABLE_PREFIX . 'vbsurvey_';


Spikeman 11-16-2006 11:46 AM

Quote:

Originally Posted by Datenpapst (Post 1118481)
Another thing I noticed:
When you delete a survey this message comes:

e.g. Survey #5 does not exist.

You may should create a text that tells the admin that the survey has been deleted.

I have seen this before and will look into it, although you receive this message is the survey still deleted?

Kihon Kata 11-16-2006 11:47 AM

I've installed this on my board here...running 3.6.3

When I click on "edit questions" and/or "preview survey" I get this:

Code:

Error selecting questions: Unknown column 'q.aid' in 'field list'

Spikeman 11-16-2006 11:57 AM

Quote:

Originally Posted by Kihon Kata (Post 1118540)
I've installed this on my board here...running 3.6.3

When I click on "edit questions" and/or "preview survey" I get this:

Code:

Error selecting questions: Unknown column 'q.aid' in 'field list'

Can you PM a url for me to see this? <-- sorry did not see the url there!!! Can you PM me some login and admin perms please :)

Spikeman 11-16-2006 12:04 PM

Quote:

Originally Posted by Datenpapst (Post 1118476)
Don't know why, but I get this message in the example surveys:

Have you tried to change the server permissions on the directory?

Kihon Kata 11-16-2006 12:31 PM

PMed you some login info....

Quote:

Originally Posted by Spikeman (Post 1118541)
Can you PM a url for me to see this? <-- sorry did not see the url there!!! Can you PM me some login and admin perms please :)


Kihon Kata 11-16-2006 01:59 PM

Thanks Spikeman for the personal help on my forum. He fixed my issue.

Thanks again

Spikeman 11-16-2006 02:22 PM

Quote:

Originally Posted by Kihon Kata (Post 1118633)
Thanks Spikeman for the personal help on my forum. He fixed my issue.

Thanks again

[Resolved]You are welcome, error was caused by corruption in db tables, uninstalled the product and reinstalled, works fine now.

dutchbb 11-16-2006 02:23 PM

Hm so since there are no phrases , where can we translate most of the system please?

Spikeman 11-16-2006 02:31 PM

Quote:

Originally Posted by dutchbb (Post 1118653)
Hm so since there are no phrases , where can we translate most of the system please?

The admin phrases are easy enough todo, the UCCASS system uses smarty templates which can be edited to suit your language.

dutchbb 11-16-2006 02:40 PM

Can't find the right files though :o

edit: Nevermind I found it

StarBuG 11-16-2006 02:57 PM

Hi

I need to know where to define the background for the survey itself and the results page.

My forum uses a background image but on long surveys this breaks the design, so I need to replace it with a color.

Also it seems that guests can't take the survey, even though I have set permissions to allow usergroup 1 (not registered) to take surveys.

Any ideas?

Spikeman 11-16-2006 03:27 PM

Quote:

Originally Posted by StarBuG (Post 1118677)
Hi
I need to know where to define the background for the survey itself and the results page.
My forum uses a background image but on long surveys this breaks the design, so I need to replace it with a color. Can i ask where you normally define the image?

vBsurvey uses smarty templates that are located at survey/templates/Default there is also the vbsurvey template within the style manager if you have added your background as a custom style. However your default color that is defined within vB should be displayed?

Quote:

Originally Posted by StarBuG (Post 1118677)
Also it seems that guests can't take the survey, even though I have set permissions to allow usergroup 1 (not registered) to take surveys.

If you take a look in survey.php
Code:

if ($vbulletin->userinfo['userid']==0) { // override permissions for guests, since userid zero is messy
                                // They can only see the results, if allowed in the admincp settings
        $vbulletin->userinfo['can_admin_surveys'] = 0;
        $vbulletin->userinfo['can_take_surveys'] = 0;
        $vbulletin->userinfo['can_create_surveys'] = 0;
        $vbulletin->userinfo['can_edit_surveys'] = 0;

change to
Code:

if ($vbulletin->userinfo['userid']==1) { // override permissions for guests, since userid zero is messy
                                // They can only see the results, if allowed in the admincp settings
        $vbulletin->userinfo['can_admin_surveys'] = 0;
        $vbulletin->userinfo['can_take_surveys'] = 1;
        $vbulletin->userinfo['can_create_surveys'] = 0;
        $vbulletin->userinfo['can_edit_surveys'] = 0;

That should work

StarBuG 11-16-2006 05:06 PM

Hi

If I change that, I can't admin nor take the survey anymore.

It uses the css definitions for the background of the survey, but that is the problem.
I need to define the color by hand in this place because the background image from css breaks if the survey is to long.

Any idea where the background is defined?

Great hack by the way.
Thank you for getingit to run on 3.6 ;)

StarBuG

Spikeman 11-16-2006 08:25 PM

Quote:

Originally Posted by StarBuG (Post 1118767)
Hi
If I change that, I can't admin nor take the survey anymore.

I had to play with those setting to get guests set up to test the survey, although it is not foolproof as some guests still get refused. The problem with letting guests take a survey is they could keep taking the same survey and you would not get accurate results.

Quote:

Originally Posted by StarBuG (Post 1118767)
It uses the css definitions for the background of the survey, but that is the problem.
I need to define the color by hand in this place because the background image from css breaks if the survey is to long.
Any idea where the background is defined?

Ok, I understand now, leave it with me and let me see if i can find a solution.

Spikeman 11-16-2006 08:49 PM

Quote:

Originally Posted by StarBuG (Post 1118767)
Hi
I need to define the color by hand in this place because the background image from css breaks if the survey is to long.
Any idea where the background is defined?

I belive the best approach would be to add an additional css definition, then do a search in your smarty template files for "panel" and replace with new, example:- "surveypanel" with you new color declared in "surveypanel" to test I would edit display_answers.tpl first.

drdeathuk69 11-17-2006 12:24 AM

i have an admincp folder with nothing in it is that right?

hoangminh 11-17-2006 12:27 AM

Thank you very much. I have waited for this for long time.

Love you!


All times are GMT. The time now is 04:17 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04099 seconds
  • Memory Usage 1,949KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (23)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete