vb.org Archive

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

tamarian 06-13-2005 10:00 PM

vB Survey: Add a full-featured survey tool to your forum
 
A 3.6.x version by spikeman is posted here:
https://vborg.vbsupport.ru/showthread.php?t=131650



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.

Application Features: See the UCCASS site for full details. After testing several survey apps, I find this one to be the best:

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:
o File changes: None
o DB changes: No changes, 19 new tables

Installation:
  • Unpack the included file
  • Copy vbsurvey_install.php to your admincp directory
  • Copy survey.php to your main forum directory
  • Copy the survey directory below your forum directory (cannot change the directory name)
  • run the vbsurvey_install.php script in the admincp directory
  • Go to AdminCP => vBulletin Options => vB Survey (UCCASS) and set the toptions for acess 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
Upgrade Instructions:
If you are upgrading from vB 3.0.x to vB 3.5 and already had this hack installed, all you need to do is download the zip file, and re-uploade all the files to over-write the old ones.

Added in v1.7.1 (August 26th, 2005
  • Hide edit menu if user not allowed to edit surveys.

Added in v1.7 (August 7th, 2005
  • Bug fix in editing answer types.

Added in v1.6 (June 12th, 2005
  • Upgraded for vB 3.5 beta
  • Upgrad instructions: If you already have vB Survey 1.5 installed, you just need to upload all files, but no need to run the upgrade script.

Added in v1.5 (June 7th, 2005
  • Added a new answer type R, for Regular Expressions (REGEX). This will allow new types to be defined for answers, with controlled format. If the question is required, users will receive an error messages, until they enter the proper format. If the question is optional, the users will only get an error if they try to answer the question, but with the wrong format.
    Note: You can disable REGEX type questions by editing the templates.
  • The Size of type 'S' (Sentence) can now be changed, and no longer hardcoded as 50 characters.
  • To upgrade, you will need to run the upgrade option in the installation script and re-upload all the files.

Added in v1.3 (June 5th, 2005
  • Added a new answer type D, for Dates. This will show 3 dropdown lists for day, month, year, to ensure a uniform formate for dates entered by the user, instead of a text box.
  • Fixed a bug in the anonymous message display. It would state survey is not anonymous, when it actually is.
  • To upgrade, just re-upload the files (classes and templates directories)


Added in v1.2 (June 4th, 2005)
  • Removed the "Previous page" button, if the page is the first page of a survey.
  • Answers in the new/edit answer page are sorted by the numeric value. This allows you to add a later value, but set the order higher, without re-editing the whole list to arrange it.
  • Fixed a bug in quotes and escapes in the answer types edit.
  • Upgrade instructions: Just re-upload the classes directory.

Added in v1.1 (June 4th, 2005)
  • Added anonymity option. This is decided when creating the survey. Once set, it cannot be changed. If the survey is not anonymous, users will see on the survey intro a message that they survey is not anonymous, and that their usernames will show in the results table. The results table will show the usernames and a link to their profile.
  • Added Hidden option: By default, all active surveys show up on the main page as available surveys. If you set the survey propert to hidden, the survey can still be active, but not show up for members. This can be useful if you want to email the link to a selected user group. Admins and the survey author will still be able to see hidden surveys.
  • Navbar update to list the various locations in the survey pages.
  • The previous version showed the "no permission" to guests. Now you can allow guests to view the surveys and results by putting usergoup 0 in the admin panel in usergroups who may see the results. But other priviliges will be ignored.
  • A couple of bug fixes
  • Upgrade instructions: Just re-upload all the files, including survey.php

Notes:
The "do not remove" comment on the copyright link in the footer is from the original UCCASS footer template. You may contac 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.

FleaBag 06-14-2005 03:42 PM

Truly oustanding - I look forward to installing this! :D

Beermonster 06-14-2005 04:16 PM

I'm sure I can find a use for this, thanks

BLykMik 07-03-2005 05:22 AM

Anyone know why I'd get a:

"Call to a member function on a non-object Fatal error: Call to a member function on a non-object in /home/www/mydomain/forums/admincp/vbsurvey_install.php on line 20

Error?

Lines 15-23 look like this:
Code:

require_once('./global.php');
require_once('./includes/adminfunctions_template.php');
require_once('./includes/adminfunctions_language.php');
 
$vbulletin->input->clean_array_gpc('r', array(
        'do' => TYPE_STR,
        'step' => TYPE_STR));


Marco van Herwaarden 07-03-2005 06:08 AM

What vB version are you running?

BLykMik 07-03-2005 06:11 AM

I'm running 3.0.7....

From reading the release notes, I was under the impression that the ability to support 3.5beta was *added*...

Will it not work at all on 3.0.7? Is there an older hack that I would install instead?

Marco van Herwaarden 07-03-2005 06:26 AM

None of the vB3.5 hacks will work on 3.0.x.

There have been too many internal changes.

tamarian 07-03-2005 11:36 AM

[QUOTE=BLykMik]I'm running 3.0.7..../QUOTE]

There is a version for 3.0.7:

https://vborg.vbsupport.ru/showthrea...threadid=82384

BLykMik 07-03-2005 02:43 PM

Thanks... sorry for my confusion.

tamarian 07-03-2005 04:09 PM

Quote:

Originally Posted by BLykMik
Thanks... sorry for my confusion.

No problem. Enjoy :)

BLykMik 07-04-2005 02:31 AM

I have a question about the operation of the survey...

Actually, before I ask, is there vBulletin specific documentation anywhere?

I'm trying to figure out how to make surveys only visible (taking and viewing results) by specified groups.

tamarian 07-04-2005 03:11 AM

Quote:

Originally Posted by BLykMik
I have a question about the operation of the survey...

Actually, before I ask, is there vBulletin specific documentation anywhere?

No, just the default UCCASS documentation. Anyone interested in writing vB-specific documentation is welcome :)

Quote:

I'm trying to figure out how to make surveys only visible (taking and viewing results) by specified groups.
That's available through the admincp, "can take survey" and "can view results" options.

Neutral Singh 07-10-2005 12:50 PM

Dear tamarian, you are truly awesome, love your all hack/extensions. Gives me another reason to upgrade to vB 3.5!! :devious:

Great Work !!

Best Regards

Neutral Singh 07-10-2005 01:16 PM

I have not checked, is there any option where the completed survey can be posted to thread so that members can comment on these surveys. That would be awesome is the answers could directly ported to a new thread or an already posted thread.

Regards

tamarian 07-10-2005 01:58 PM

Quote:

Originally Posted by Neutral Singh
I have not checked, is there any option where the completed survey can be posted to thread so that members can comment on these surveys. That would be awesome is the answers could directly ported to a new thread or an already posted thread.

No, not yet. But it does make sense. Might be worth making it as an addon for those who would like it to behave like a regular poll thread on vB.

subnet_rx 08-02-2005 06:06 PM

Quote:

Originally Posted by tamarian
No, not yet. But it does make sense. Might be worth making it as an addon for those who would like it to behave like a regular poll thread on vB.

thanks for porting this over to 3.5. I haven't upgraded yet, but I do use this system on 3.0.7 and would like to know if the surveys I have currently will stay in the system after the upgrade. If not, I'm going to hold off creating any new surveys till after the upgrade to 3.5

tamarian 08-02-2005 06:42 PM

Quote:

Originally Posted by subnet_rx
thanks for porting this over to 3.5. I haven't upgraded yet, but I do use this system on 3.0.7 and would like to know if the surveys I have currently will stay in the system after the upgrade. If not, I'm going to hold off creating any new surveys till after the upgrade to 3.5

You should be fine. Once you upgrade to vB 3.5, you just need to download the zip file here, and upload it to over-write the existing vB Survey code files. Existing surveys will not be impacted.

I'll update the first post to reflect this.

subnet_rx 08-02-2005 07:43 PM

Quote:

Originally Posted by tamarian
You should be fine. Once you upgrade to vB 3.5, you just need to download the zip file here, and upload it to over-write the existing vB Survey code files. Existing surveys will not be impacted.

I'll update the first post to reflect this.

ok, sounds good, thanks.

Neal-UK 08-02-2005 10:16 PM

Quote:

Originally Posted by subnet_rx
ok, sounds good, thanks.

will this work on rc1?

tamarian 08-02-2005 10:21 PM

Quote:

Originally Posted by nealparry
will this work on rc1?

Yes, it should. I have not tested on RC1 since I'm busy at the moment, but there's nothing new in RC1 that should affect it.

TTG 08-02-2005 11:10 PM

Confirm it works well on 3.5.0 RC1 .. installed with no problems.
Clicked install.

tamarian 08-02-2005 11:11 PM

Quote:

Originally Posted by TTG
Confirm it works well on 3.5.0 RC1 .. installed with no problems.

Cool, I've update the vB version tag accordingly :up:

Neal-UK 08-02-2005 11:18 PM

Quote:

Originally Posted by tamarian
Cool, I've update the vB version tag accordingly :up:

working well, it's amazing. Could use this as a quiz hack too!

Neal-UK 08-02-2005 11:40 PM

Quote:

Originally Posted by nealparry
working well, it's amazing. Could use this as a quiz hack too!

One little problem, when i've created a survey, saved it and then gone to the survey listing, I choose the survey, answer it but it is showing no results.

I am then able to take the survey again and the 2nd time it saves the results and wont let me take it again.

Will this happen to those who take the survey or would it just happen to the person who created the survey?

tamarian 08-02-2005 11:51 PM

Quote:

Originally Posted by nealparry
One little problem, when i've created a survey, saved it and then gone to the survey listing, I choose the survey, answer it but it is showing no results.

I am then able to take the survey again and the 2nd time it saves the results and wont let me take it again.

Will this happen to those who take the survey or would it just happen to the person who created the survey?

When you create the survey, you can preview the questions and anwer them. The preview mode will not save the results.

When you click on the survey from the main page, it's not a preview and the answers will be save upon completion. Once you have completed the survey, it will not allow you to re-take it.

However, you can reset the survey, which will remove all ansswers, and allow you an others to take it again. This is good for testing.

Neal-UK 08-02-2005 11:56 PM

Quote:

Originally Posted by tamarian
When you create the survey, you can preview the questions and anwer them. The preview mode will not save the results.

When you click on the survey from the main page, it's not a preview and the answers will be save upon completion. Once you have completed the survey, it will not allow you to re-take it.

However, you can reset the survey, which will remove all ansswers, and allow you an others to take it again. This is good for testing.

I'll see how things go thanks, but I have done all the preview stuff etc. It was when I went to the main survey listing page, clicked the survey, answered, the results were not there. I had to take it again.

Drakah 08-06-2005 11:28 PM

Just installed fresh on 3.5.0 RC2. I have this error:

Warning: Smarty error: problem writing './survey/smarty/templates_c/Default^available_surveys.tpl.' in /survey/smarty/Smarty.class.php on line 589

..what to do? :(

Also, I did have a writing error for template_c, but in order for it to write I had to change the chmod to 777 /shrug.

Drakah 08-06-2005 11:42 PM

Well I think I fixed it. Had to make all the TPL files to 777.

tamarian 08-06-2005 11:46 PM

Quote:

Originally Posted by Drakah
Just installed fresh on 3.5.0 RC2. I have this error:

Warning: Smarty error: problem writing './survey/smarty/templates_c/Default^available_surveys.tpl.' in /survey/smarty/Smarty.class.php on line 589

..what to do? :(

Also, I did have a writing error for template_c, but in order for it to write I had to change the chmod to 777 /shrug.

No need for 777, follow the steps for 744:

Quote:

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

Drakah 08-06-2005 11:49 PM

I did, I changed it to 744 and didnt work, and when I did try and do that command for apache, my ftp program did not recognize the command.

tamarian 08-07-2005 12:19 AM

Quote:

Originally Posted by Drakah
I did, I changed it to 744 and didnt work, and when I did try and do that command for apache, my ftp program did not recognize the command.

Yes, 744 won't work unless you change the file owner. Not sure how to do this with FTP. Anyway, glad you got it working, enjoy :)

Drakah 08-07-2005 12:33 AM

Thanks :) I love this :)

Drakah 08-07-2005 01:04 PM

Just a small comment, visual idea... I deleted a survey and the next page said "Survey #2 does not exist.". Would like to see maybe the next screen asking me if "Are you sure you want to delete Survey #2: (title of survey here)?" If not a confirmation box, perhaps just "Survey #2: (title of survey here) has been deleted - Click here to go back to the Survey Listings". ... or something. :)

Oh and a little type I found :)
"Anonymous Survey?
Select no, if you want to displaye the usernames in the results next to their answers."

Drakah 08-07-2005 02:04 PM

Got a problem.

I went to edit an answer type.
Choose Answer Type [ Edit Answer Type] [ View Answer Types ]

And when I clicked on the button for Edit Answer Type, it just refreshed the listing and did not allow me to actually edit anything.

tamarian 08-07-2005 02:50 PM

Quote:

Originally Posted by Drakah
Got a problem.

I went to edit an answer type.
Choose Answer Type [ Edit Answer Type] [ View Answer Types ]

And when I clicked on the button for Edit Answer Type, it just refreshed the listing and did not allow me to actually edit anything.

Yes, I was able to reproduce it. Will make an update later today :)

tamarian 08-07-2005 03:18 PM

Quote:

Originally Posted by Drakah
Got a problem.

I went to edit an answer type.
Choose Answer Type [ Edit Answer Type] [ View Answer Types ]

And when I clicked on the button for Edit Answer Type, it just refreshed the listing and did not allow me to actually edit anything.

O.k., download the new version, 1.7, and just upload survey.php to replace the old one.

Drakah 08-07-2005 07:20 PM

Thank you much :)

hydrostatic 08-07-2005 08:53 PM

How do you do that apache command? I can't seem to get it working. It always says no permission.

It won't work at all if CHMOD to 744, it works when I CHMOD to 777.

Drakah 08-07-2005 09:02 PM

Quote:

Originally Posted by hydrostatic
It won't work at all if CHMOD to 744, it works when I CHMOD to 777.

Same thing with me, had to do the 777 and it worked fine.

Though I found another bug, yay me! :)

I get this error when I click on the "Values" link.
".../forums/display_answers.php?sid=28
could not be found."

See screenie :)

Drakah 08-07-2005 10:08 PM

The setting for when users complete the page, I clicked on the [?] and the document told me there is a place to put in your own URL as a thank-you page. Where is the field to add this?

Also, I would like to figure out how to have a "If Statement" to display on the home page whether they have taken the survey or not. I am thinking of creating a survey graphic to display on my CMPS (vbadvanced) portal home page saying to take the survey, and when they do, it would disappear. Any ideas?


All times are GMT. The time now is 01:32 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.01528 seconds
  • Memory Usage 1,852KB
  • 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
  • (1)bbcode_code_printable
  • (20)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