[MOD-DB]tabulated survey at topic head

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Post by asinshesq »

dccb wrote: ...
Also, if you turn off the display nonresponder option. The caption People who haven't yet answered still shows up

So I added an ELSE statement

Code: Select all

# 
#-----[ FIND ]------------------------------------------ 
#
	if($nonresponders && $survey_info['show_nonresponders'])
	{
		$template->assign_vars(array('L_NONRESPONDERS' => $lang['Nonresponders']));
	}

# 
#-----[ AFTER ADD]------------------------------------------ 
#
	else
	{
		$template->assign_vars(array('L_NONRESPONDERS' => ''));
	}


This one seems odd to me. It doesn't happen on my board (when I turn off the nonresponders list that entire line disappears at the top of the topic). And just looking at the code you added, it isn't clear to me why that else statement would do anything, since the first if statement you quote is supposed to be the only place where L_NONRESPONDERS gets defined for the template. In other words, if the if statement fails and the assignment of $lang['Nonresponders'] to L_NONRESPONDERS gets skipped, the template will not have anything in L_NONRESPONDERS and nothing will get shown on the screen for that line. Is it possible that somehow your viewtopic file sets L_NONRESPONDERS more than once? Maybe you inadvertently repeated a line from the mod?
dccb
Registered User
Posts: 51
Joined: Mon Jul 15, 2002 9:06 am

Post by dccb »

Hmm, I went back and check and recheck viewtopic.php, and still only find one instance of L_NONRESPONDERS being assigned to the template. But that's OK since I got that taken care of.

A little request, is it possible to add a check box in the survey posting body to disallow user from editing their answers after they have responsed to the survey :?:

For example, a little check box above Display Nonresponder. If the box is checked, then user can not edit their answers.

Thanks :D
dccb
Registered User
Posts: 51
Joined: Mon Jul 15, 2002 9:06 am

Post by dccb »

found another bug.

When you click on Change your answers it doesn't pull your answers from the database. And it insert your changed responses as a new entry.
dccb
Registered User
Posts: 51
Joined: Mon Jul 15, 2002 9:06 am

Post by dccb »

Hmm..server lagged.

Sorry for the double post.
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Post by asinshesq »

dccb wrote: found another bug.

When you click on Change your answers it doesn't pull your answers from the database. And it insert your changed responses as a new entry.


You've got an installation issue or a conflict with another mod...when mu users click change your answers, their form comes up with their old answers filled in. If they then change any answers and click submit, their old answers get updated to the new ones...no double entry. Sounds like you missed some code that tells survey.php you are there to edit old answers rather than putting in new answers for the first time. If I have time tonight I will try to tell you where you might look to pinpoint hte error.
Thallium
Registered User
Posts: 395
Joined: Mon Aug 30, 2004 12:30 am
Contact:

Post by Thallium »

I've removed this one from the site I had it on for now, decided that it was too difficult for the people who would be using it to use well. Things like adding widths for each question and the issue with the groups (which seems to be what my original problem was) are a little more customisation than they need.

I like the mod and will probably use it on another board when its a little further in the dev process. Thanks for all your work to date, you do some interesting and unique stuff. :D

---Thallium
Complete phpBB powered websites, Mods/Hacks installed, unique templates, updates and repairs... reasonable. Email, PM or IM.
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Post by asinshesq »

Thallium wrote: I've removed this one from the site I had it on for now, decided that it was too difficult for the people who would be using it to use well. Things like adding widths for each question and the issue with the groups (which seems to be what my original problem was) are a little more customisation than they need....


I don't disagree with you on that. I needed all that power in designing new surveys for my board but I didn't want to confuse my users either so the compromise: I allow only admins to design surveys. That only takes a change in one line (just change the line that checks to see if the user is authorized to post polls so that it instead checks to see if the user is an admin).

By the way, the issue with groups is all solved (see above) and users can certainly leave the width blank (in which case the browser will automatically do what it thinks makes sense which usually looks pretty good).

Thanks for giving it a try and thanks for the feedback.
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Post by asinshesq »

I made a few more changes. The most important one is that it now allows you to design an anonymous survey where the tabulated results have no username column. The designer of the survey specifies that by filling in -1 in the blank for username width.

Anyway, here are all the changes since version 1.0.3 (including those I already posted earlier):

[edit: code deleted since the zip file you can download from teh first link in this post contains upgrade scripts]

By the way, for those hoping to squeeze more than 7 questions in there, I think if you leave out the username column for a given survey there's now enough room for 8 questions. For that reason, I've gone ahead and changed the '7' to '8' where it appears so that the mod will allow you to design a survey for up to 8 questions.
Last edited by asinshesq on Thu Mar 24, 2005 3:22 pm, edited 1 time in total.
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Post by asinshesq »

I just got validation comments and reflected them in a new version 1.0.5 that you can download from the first post in this topic. The changes are to protect against sql injection. The download zip includes an upgrade script allowing you to easily upgrade from version 1.0.4 to 1.0.5.
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Post by asinshesq »

I just uploaded a new version (1.0.6) that preserves skipped lines in questions, answers and survey captions. You can download that latest version from the first post in this topic. I included an upgrade script in the download files so you can easily upgrade from version 1.05 to 1.06.
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Post by asinshesq »

This mod has now been validated so further discussion about it belongs here: http://www.phpbb.com/phpBB/viewtopic.php?t=278888

Moderators, please lock this topic. Thanks.
User avatar
smithy_dll
Former Team Member
Posts: 7630
Joined: Tue Jan 08, 2002 6:27 am
Location: Australia
Name: Lachlan Smith
Contact:

Post by smithy_dll »

locked, cheers 8)
Locked

Return to “[2.0.x] MODs in Development”