tabulated survey at topic head

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
manic2
Registered User
Posts: 435
Joined: Thu Jun 12, 2008 9:16 pm

Re: tabulated survey at topic head

Post by manic2 »

Think I've answered my own question!
In survey_answer.html
I had:-

Code: Select all

<form action="{S_ANSWER_ACTION}" method="post">
replaced with:-

Code: Select all

<form action="{S_ANSWER_ACTION}" method="post" id="answer_survey">
& all seems to work!
Sorry to have bothered you.
Take care.
manic

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: tabulated survey at topic head

Post by asinshesq »

manic2 wrote:If you remember I actually have two of your survey mods running at the same time & each thread shows two separate surveys. From memory I am running versions 1.06 & 1.07. I can't (easily) just update to 1.08 as I have heavily modified your mod.
Sorry, but you'll need to in order to get that feature working properly. You were correct that the upgrade from 1.0.7 to 1.0.8 fixed the FIND.

But even with a heavily modded mod, the upgrade should be easy since I include in the contrib folder upgrade scripts to take you each step of the way. The upgrade from 1.0.6 to 1.0.7 only involves two changes to the regular phpbb3 files and the upgrade from 1.0.7 to 1.0.8 has none at all. So if you can make the two changes to the regular phpbb3 files that appear in the upgrade_from_1-0-6_to_1-0-7.txt file all you will have left is to replace the files this mod adds with the new versions. And if you have already changed the old versions and want to retain those changes. just run a comparison of the versions you have versus the latest ones and it should be easy to merge the two.

[edit: I see you figured this out. But while you are at it, it probably makes sense to properly upgrade as I describe above]

manic2
Registered User
Posts: 435
Joined: Thu Jun 12, 2008 9:16 pm

Re: tabulated survey at topic head

Post by manic2 »

asinshesq wrote: But while you are at it, it probably makes sense to properly upgrade as I describe above]
Seen & noted, will do, thanks again.
manic

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: tabulated survey at topic head

Post by asinshesq »

The following post was posted in the wrong place so I am quoting it here before answering it:
christianwill770 wrote:Hi,

have a client that wants to display surveys on their forum, and this MOD seems to be exactly what we need. Unfortunately I've never gotten it to work. Obviously its something i'm doing wrong at me end, but i'm not having any luck in sorting it out on my own :cry:

running a WAMP test server on my laptop with the following versions:
WAMP: 2.0
Apache: 2.2.11
PHP: 5.2.9
MySQL: 5.1.33

PHPBB: 3.0.5
Tabulated survey at topic head: 1.0.8

Clean installation of PHPBB, copied Tab Survey into the correct directory, followed the instructions per install.xml, ran ./install_survey.php and everything seems to have worked without error or fault.

So, now i can see advanced permissions in the forum permissions and i have grant all permissions on YES for survey to the administrator account. in the forum i will click new topic and will not have a survey tab/button at the bottom... please help!!

Thanks,

Christian
You are probably granting permissions the wrong way. Are you sure you are granting it in the forum in question (not just in its category)? Are you sure you are granting it to the admin group? And are you sure that the user you are using to try this out is in the admin group?

Have you tried a permissions trace? Go to the acp and do the folowing:

- click the view forum-based permissions link at the bottom left

- select the forum you are testing for

- select or your own username (not the admin group but for your own username)

- click the surveys tab

Does it say you do or do not have permissions for surveys? If it says you do not have permission, click the little icon that looks like a key that appears to the left of your username. When you do that, it will tell you exactly why you do not have permissions.

By the way, you should upgrade to phpbb3.0.6 as well, but that's not causing this problem.

christianwill770
Registered User
Posts: 3
Joined: Sun Dec 06, 2009 4:56 am

Re: tabulated survey at topic head

Post by christianwill770 »

asinshesq wrote:The following post was posted in the wrong place so I am quoting it here before answering it:
christianwill770 wrote:Hi,

have a client that wants to display surveys on their forum, and this MOD seems to be exactly what we need. Unfortunately I've never gotten it to work. Obviously its something i'm doing wrong at me end, but i'm not having any luck in sorting it out on my own :cry:

running a WAMP test server on my laptop with the following versions:
WAMP: 2.0
Apache: 2.2.11
PHP: 5.2.9
MySQL: 5.1.33

PHPBB: 3.0.5
Tabulated survey at topic head: 1.0.8

Clean installation of PHPBB, copied Tab Survey into the correct directory, followed the instructions per install.xml, ran ./install_survey.php and everything seems to have worked without error or fault.

So, now i can see advanced permissions in the forum permissions and i have grant all permissions on YES for survey to the administrator account. in the forum i will click new topic and will not have a survey tab/button at the bottom... please help!!

Thanks,

Christian
You are probably granting permissions the wrong way. Are you sure you are granting it in the forum in question (not just in its category)? Are you sure you are granting it to the admin group? And are you sure that the user you are using to try this out is in the admin group?

Have you tried a permissions trace? Go to the acp and do the folowing:

- click the view forum-based permissions link at the bottom left

- select the forum you are testing for

- select or your own username (not the admin group but for your own username)

- click the surveys tab

Does it say you do or do not have permissions for surveys? If it says you do not have permission, click the little icon that looks like a key that appears to the left of your username. When you do that, it will tell you exactly why you do not have permissions.

By the way, you should upgrade to phpbb3.0.6 as well, but that's not causing this problem.
Hi Alan,

So I did the trace permissions and now all permissions are set to YES for everything, username and registered users (except default), for creating a survey in that specific test forum.

Still no survey tab in the new topic posting :(

I'm starting to wonder if I might have done something wrong in the manual file changes, which file specifically deals with the new topic postings... hoprfully i can go over the instructions again and narrow down where i might have messed up!

Any suggestions are welcome.

Thanks again,


Christian

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: tabulated survey at topic head

Post by asinshesq »

christianwill770 wrote:...So I did the trace permissions and now all permissions are set to YES for everything, username and registered users (except default), for creating a survey in that specific test forum.

Still no survey tab in the new topic posting :(
Do you mean that you checked for your own personal username and you clicked the link that looks like a key and it said yes at the bottom for each of the survey permissions?

:idea: Keep in mind that you should ONLY see the survey design tab when you are starting a brand new topic (because surveys are tied to the first post in a topic). Any chance you were just trying it in a reply?

:idea: Did you try going into the styles part of the ACP and refreshing the template for your style?
I'm starting to wonder if I might have done something wrong in the manual file changes
If there's a mistake, it's probably in the changes for posting.php. But if you want to rule out a permissions problem first, try this:

Code: Select all

OPEN
posting.php

FIND
if (($mode == 'post' || $post_id == $post_data['topic_first_post_id']) && $auth->acl_get('f_survey_design', $forum_id))

REPLACE WITH
if (($mode == 'post' || $post_id == $post_data['topic_first_post_id']))
That will get rid of the permissions check altogether when you start a new topic. If after doing that you suddenly see a design survey tab when you start a new topci, then there is nothing wrong with the changes you made to the files but you are having some kind of permissions issue.

If you do have a problem with changes you made to the files, perhaps you should start over but install it with automod. That will install the mod in 2 seconds and doesn't make mistakes the way the rest of us do ;)

christianwill770
Registered User
Posts: 3
Joined: Sun Dec 06, 2009 4:56 am

Re: tabulated survey at topic head

Post by christianwill770 »

Ahahahahahahaha!!! :D that's my crazy laugh of success!!
asinshesq wrote::idea: Did you try going into the styles part of the ACP and refreshing the template for your style?
Thanks for the help Alan, seems the problem came down to refreshing the template in the ACP... and a few misreads on my part with the posting.php instructions :?
asinshesq wrote:If you do have a problem with changes you made to the files, perhaps you should start over but install it with automod. That will install the mod in 2 seconds and doesn't make mistakes the way the rest of us do ;)
I'm going to start from fresh using automod and see if it goes more smoothly for me :)

just some advice to anyone new to PHPBB or just MODs in general; Use automod to save time and human error - I got Tabulated Survery at Topic Head installed in seconds without any issues

annab
Registered User
Posts: 50
Joined: Thu Mar 17, 2005 5:17 am

Re: tabulated survey at topic head

Post by annab »

Love this mod. It works on 3.0.6 but with a small issue: there is no text "Surveys" on the tab for setting forum permissions. Otherwise, it works.

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: tabulated survey at topic head

Post by asinshesq »

annab wrote:Love this mod. It works on 3.0.6 but with a small issue: there is no text "Surveys" on the tab for setting forum permissions. Otherwise, it works.
Here's a screenshot of the survey forum permission page from a clean install on 3.0.6 using automod. As you can see, the tab properly reads "Surveys". Wonder why it's not showing up on yours. What does yours look like? Did you install with automod and afterwards run the install_survey.php script?

Maybe you are running a language other than "en" you and forgot to upload the language/en/acp/permissions_survey.php file in that other language? Are all the other language entries in the mod working for you?
Attachments
survey_screenshot.jpg
survey_screenshot.jpg (80.05 KiB) Viewed 498 times

annab
Registered User
Posts: 50
Joined: Thu Mar 17, 2005 5:17 am

Re: tabulated survey at topic head

Post by annab »

Hi,

I installed it manually. I don't think I missed anything but who knows? I noticed when I searched for the code to change in imageset, it didn't exist, so I just added it to the bottom. Probably a 3.05 thing.
survey.gif
survey.gif (22.37 KiB) Viewed 490 times
All the other text is there. The mod works as expected (so far) except for the missing text as shown above.

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: tabulated survey at topic head

Post by asinshesq »

annab wrote:Hi,

I installed it manually. I don't think I missed anything but who knows?...
Strange. How about posting what's in your langauge/en/acp/survey_permissions.php file so we can take a quick look at that?

annab
Registered User
Posts: 50
Joined: Thu Mar 17, 2005 5:17 am

Re: tabulated survey at topic head

Post by annab »

Code: Select all

<?php
/**
* acp_permissions_survey (phpBB Permission Set for Surveys) [English]
*
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/

/**
* DO NOT CHANGE
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

if (empty($lang) || !is_array($lang))
{
	$lang = array();
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine



// Adding new category for surveys
$lang['permission_cat']['surveys'] = 'Surveys';


// Adding permissions for surveys
$lang = array_merge($lang, array(
	'acl_f_survey_design'	=> array('lang' => 'Can design surveys in posts', 'cat' => 'surveys'),
	'acl_f_survey_takeforothers'	=> array('lang' => 'Can answer surveys for others', 'cat' => 'surveys'),
	'acl_f_survey_viewhiddenresults'	=> array('lang' => 'Can view hidden survey results', 'cat' => 'surveys'),
));

?>
This is a file that came packaged with the mod, right? I just needed to upload, correct?

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: tabulated survey at topic head

Post by asinshesq »

annab wrote:This is a file that came packaged with the mod, right? I just needed to upload, correct?
Correct. Don't know why the word is not showing up on your acp permissions tab. I'll have to think some more about it.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17231
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

tabulated survey at topic head

Post by DavidIQ »

MOD Updated to version 1.0.9
See first post for Download Link
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: tabulated survey at topic head

Post by asinshesq »

DavidIQ wrote:MOD Updated to version 1.0.9
See first post for Download Link
Thanks, DavidIQ and others who helped with the validation. Here's the chagelog showing chagnes from the version 1.0.8:

Code: Select all

##	2009-12-19 - Version 1.0.9
##		changed IN to sql_in_set as per validation standards in query appearing in functions_survey.php
##
##		changed list of nonresponders to exclude inactive users
##
##		fixed bug in survey expired code
##
##		changed some drop down menus in survey design form to radio buttons for easier use
##
##		made a few other stylistic changes in functions_survey.php
##
##		updated umil folder
In the contrib folder, I've included instructions for upgrading from version 1.0.8 to the current version.

Locked

Return to “[3.0.x] MOD Database Releases”