vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vB Survey (UCCASS Survey app integration) (https://vborg.vbsupport.ru/showthread.php?t=82384)

tamarian 06-01-2005 10:00 PM

vB Survey (UCCASS Survey app integration)
 
What this hack does:

This hack will add a full featured survey application system to your forum.

Credits:
John W. Holmes: Author of UCCASS Survey.

Application Features: See the UCCASS site for full details. After testing several survey apps, this one is 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:
Added anonymity option. If a survey is not anonymous, members can see how other members answered.
Added Hide/unhide survey option
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
Added in v1.5.4 (October, 17, 2005
Now checks primary and secondary permisisons.

Added in v1.5.3 (August 26, 2005
Don't show edit box unless user has permission.

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:
1. If you use FTP to upload the survey directory, you might have problems with subdirectories under /survey/smarty/template_c due to the directory names with % signs. In this case, you can delete all the directories under template_c (but not the template_c directory itself). Those subdirectories will be recreated automatically when the templates are read.

2. 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.

hollyboy 06-02-2005 07:51 AM

looks nice!
not even a file to be edited :)
very interesting hack I might need to use it ;)

TTG 06-02-2005 12:00 PM

Useful and installed with only one problem .. Images for results of survey don't appear and had to chmod all directory's in survery 777

Clicked install

tamarian 06-02-2005 01:32 PM

Quote:

Originally Posted by TTG
Useful and installed with only one problem .. Images for results of survey don't appear and had to chmod all directory's in survery 777

Try chmod -R 744 *

.Tim 06-02-2005 11:30 PM

Maybe I'm doing something wrong or I'm just stupid but are the folders supposed to look like this? If so I'm unable to upload them to my survery because of that. :ermm:

http://www.mywasteoftime.net/images/surveyproblem.jpg

tamarian 06-02-2005 11:35 PM

Quote:

Originally Posted by tim4902
Maybe I'm doing something wrong or I'm just stupid but are the folders supposed to look like this? If so I'm unable to upload them to my survery because of that. :ermm:

If you can't upload the zip file and uncompres it on the server, here's what you can do: Delete all those directories under template_c, but keep the template_c directory itself. Those directories will then by created by smarty when those templates are accessed the first time.

.Tim 06-02-2005 11:38 PM

That worked, thanks!

OrangeFlea 06-03-2005 12:08 AM

I did the 744 thing, but I keep getting permission errors.

EDIT: Am I supposed to manually chmod every directory under /survey 744? There are a lot of sub folders and files underneath there...

tamarian 06-03-2005 12:26 AM

Quote:

Originally Posted by OrangeFlea
I did the 744 thing, but I keep getting permission errors.

EDIT: Am I supposed to manually chmod every directory under /survey 744? There are a lot of sub folders and files underneath there...

Yes, the whole thing. You can type this command from your forum main directory:

chmod -R 744 survey

OrangeFlea 06-03-2005 12:42 AM

Just tried that, this is what I got:

COMMAND:> chmod -R 744 survey
550 Could not change perms on 744 survey: No such file or directory


I feel like such a n00b ;(

tamarian 06-03-2005 12:55 AM

Quote:

Originally Posted by OrangeFlea
Just tried that, this is what I got:

COMMAND:> chmod -R 744 survey
550 Could not change perms on 744 survey: No such file or directory


I feel like such a n00b ;(

You need to do this command while in your forum's main directory, where the survey directory is just below it.

Type pwd to find where you are in the directory structure:)

tamarian 06-03-2005 01:08 AM

I'v re-uploaded the zip file with some minor changes. No need to upgrade. If you already installed it, just make this edit in this file:

./survey/templates/Default/results_table.tpl

Find this:

Quote:

<tr class="alt1"<td>
Replace with this:
Quote:

<tr class="alt1"><td>
Also made template_c empty, to help those FTP'in. The content will be auto generated when the templates are first accessed.

TTG 06-03-2005 01:46 AM

Quote:

Originally Posted by tamarian
Try chmod -R 744 *

That produces an error

Code:

Warning: getimagesize(/usr/home/thetechg/public_html/retreat/survey/templates/Default/images/bar.gif): failed to open stream: Permission denied in /survey/classes/results.class.php on line 233

tamarian 06-03-2005 01:51 AM

Quote:

Originally Posted by TTG
That produces an error

Code:

Warning: getimagesize(/usr/home/thetechg/public_html/retreat/survey/templates/Default/images/bar.gif): failed to open stream: Permission denied in /survey/classes/results.class.php on line 233

Give me more details. Does this happen only when accessing results, but the rest is working?

TTG 06-03-2005 01:55 AM

Quote:

Originally Posted by tamarian
Give me more details. Does this happen only when accessing results, but the rest is working?

Only when accessing results .. everthing else works fine :)

tamarian 06-03-2005 02:06 AM

Quote:

Originally Posted by TTG
Only when accessing results .. everthing else works fine :)

O.k., try chmod -R 777 instead of 744 just to see if it's really a permission problem.

If that works, then it may just be a matter of changing the owner.

If the apache server is running as apache user (or whatver the user:groupname is), you can then do this:

chown -R apache:apache survey
Then chmod -R 744 survey

TTG 06-03-2005 02:26 AM

Problem solved .. I'd placed the survey directory in the same directory as forum, not below .. when I viewed page source to read the img src, I realised my error .. duh.

All works perfectly .. thanks for the help

OrangeFlea 06-03-2005 08:10 AM

This is killing me. I did everything. The folders are in the right directory, I even manually changed all the permissions to 744, and I still get this:

Code:

Warning: main(survey/classes/main.class.php): failed to open stream: Permission denied in /survey.php on line 8

Warning: main(survey/classes/main.class.php): failed to open stream: Permission denied in /survey.php on line 8


tamarian 06-03-2005 10:15 AM

Quote:

Originally Posted by OrangeFlea
This is killing me. I did everything. The folders are in the right directory, I even manually changed all the permissions to 744, and I still get this:

Code:

Warning: main(survey/classes/main.class.php): failed to open stream: Permission denied in /survey.php on line 8

Warning: main(survey/classes/main.class.php): failed to open stream: Permission denied in /survey.php on line 8


Try this:

https://vborg.vbsupport.ru/showpost....0&postcount=16

tamarian 06-03-2005 02:08 PM

There are a couple of template changes. One causes not updating edited questions. I've changed the zip file. For those who already installed it, you just need to re-upload the .tpl files in this directory: ./survey/templates/Default/

Lionel 06-04-2005 03:30 AM

I know this has nothing to do with your hack, but maybe you can help and give me some explanation or solution. When I try to run the install file from admincp, the page times out on first step and cannot be found...

OrangeFlea 06-04-2005 08:59 AM

Hey, everything is working almost perfectly. Only issue is that when I look at the results, the images come up as red x's. I checked and it seems to be looking for the survey folder from the root directory, not the forum directory. How do I change this?

tamarian 06-04-2005 10:42 AM

Quote:

Originally Posted by Lionel
I know this has nothing to do with your hack, but maybe you can help and give me some explanation or solution. When I try to run the install file from admincp, the page times out on first step and cannot be found...

Is it in the admincp directory?

OrangeFlea 06-04-2005 11:15 AM

All problems fixed.

I found a bug, though. It seems that when you erase the results of a survey, members who took it before it was erased are still blocked from taking the survey again.

tamarian 06-04-2005 11:18 AM

Quote:

Originally Posted by OrangeFlea
Hey, everything is working almost perfectly. Only issue is that when I look at the results, the images come up as red x's. I checked and it seems to be looking for the survey folder from the root directory, not the forum directory. How do I change this?


Edit the file main.class.php find this line:

Quote:

if(!$this->set_template_paths($this->CONF['default_template']))
Add above it:
Quote:

$this->CONF['html'] = $vboptions['bburl'];
Let me know if this fixes it.

tamarian 06-04-2005 11:38 AM

Quote:

Originally Posted by OrangeFlea
All problems fixed.

I found a bug, though. It seems that when you erase the results of a survey, members who took it before it was erased are still blocked from taking the survey again.

What did you change to get the images working?

To fix the "already taken" thing, Edit editsurvey.class.php

Find:
Quote:

$tables = array('results','results_text','ip_track','time_li mit');
Replace with:
Quote:

$tables = array('results','results_text','ip_track','time_li mit', 'completed_surveys');
OR, wait till later today, I'll make an update with a few added features.

tamarian 06-04-2005 12:51 PM

Just uploaded the new version, 1.1 No upgrade script needed, just re-upload the files. Here's what's changed:
  • 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

dsboyce8624 06-04-2005 02:58 PM

Thaks for the update.

OrangeFlea 06-04-2005 09:19 PM

Quote:

What did you change to get the images working?
LOL, I just created a new folder at the area the hack was looking at and uploaded the images there. :P

Awesome hack, man.

tamarian 06-05-2005 12:16 AM

Another update :)

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.

Lionel 06-05-2005 04:40 AM

Quote:

Originally Posted by tamarian
Is it in the admincp directory?

yes it is

Lionel 06-05-2005 04:43 AM

I am able to add the steps individually, except for the first one

tamarian 06-05-2005 05:23 PM

Quote:

Originally Posted by Lionel
I am able to add the steps individually, except for the first one

The first step adds a single phrase not currently used, so you should be fine.
This may be a browser issue.

tamarian 06-05-2005 05:25 PM

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.

Lionel 06-05-2005 05:29 PM

yes it works, thank you. I could not figure out why it was displaying all phrases since they were not installed :-)

tamarian 06-05-2005 05:57 PM

Quote:

Originally Posted by tamarian
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.

Forgot to add, to upgrade, just re-upload the files in the "classes" and "template" directory.

tamarian 06-05-2005 05:59 PM

Quote:

Originally Posted by Lionel
yes it works, thank you. I could not figure out why it was displaying all phrases since they were not installed :-)

I've only done phrasing for the admincp. The rest is ahrcoded, or in the templates. :)

dsboyce8624 06-05-2005 06:51 PM

Quote:

Originally Posted by tamarian
I've only done phrasing for the admincp. The rest is ahrcoded, or in the templates. :)

Dude, love the work, but need the update emails. I dunno if they're automatic or you have to do them by hand, but they sure do help us keep up with you.

Dennis

yoyoyoyo 06-05-2005 07:25 PM

installed easily, and works great! thanks much!

tamarian 06-05-2005 07:54 PM

Quote:

Originally Posted by dsboyce8624
Dude, love the work, but need the update emails. I dunno if they're automatic or you have to do them by hand, but they sure do help us keep up with you.

I just did that, for the first time :)


All times are GMT. The time now is 04:49 PM.

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.02030 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
  • (4)bbcode_code_printable
  • (25)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