[ALPHA] NewTopic RequiresAdditionalFields 0.1.0b

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.
Post Reply
User avatar
mad-manne
Registered User
Posts: 776
Joined: Thu May 29, 2003 6:59 pm
Location: Marl, Germany

[ALPHA] NewTopic RequiresAdditionalFields 0.1.0b

Post by mad-manne »

MOD Title: NewTopic RequiresAdditionalFields
MOD Description: This MOD adds the ability to configure each forum inside a phpBB-board to require (different)additional fields when a user starts a new topic.
MOD Version: alpha 0.1.0b
MOD Download: NewTopic_RAF(alpha_0.1.0b).zip
Last Stable version: -/-

Demo Board: http://phpbb.mad-manne.de/mods2.0
Demo Username: mad-tester
Demo Password: crazy



ImageImage[ALPHA] NewTopic RequiresAdditionalFields 0.1.0b
ImageImagethe MOD formerly known as : Post RequiresAdditionalFields


:!: Read THIS first :!:
As long as this MOD is in ALPHA-stage I will not provide any update-paths, so every new (ALPHA)-release will have to be installed to a board that does not contain an older version of my MOD. With this in mind, it should be very clear, that this must not be used in a live environment, because you could loose any data already collected by an older version.
Once this will be promoted as BETA-software, updates will be provided.



Description
This MOD adds the ability to configure each forum inside a phpBB-board to require (different)additional fields when a user starts a new topic. Most commonly this could be used in a forum dealing with support-questions, but I'm sure there are many other situations where this will be helpful. With this MOD installed you can force users to submit the information you want them to.
Well, so how does this work? As a first step you'll have to setup a template of RequiredAdditionalFields which contains the questions you want your users to answer. Then you'll configure the appropriate forum to use this template of RAF. Once this has been succesful, an additional "dialog" will appear on top of the page when starting a new topic in that forum.
When viewing such a topic, you will see an additional table on top of the page which shows the information the user has submitted.
  • Terminology
    -->In order to abbreviate RequiredAdditionalFields for the rest of this topic, you'll read: RAF
    -->When talking of templates in this topic, don't mix it up with what templates are normally in terms of phpBB!!
    A template of RAF defines all information the MOD needs in order to know which fields, fieldtypes and defaults must be asked for in the additional dialog on top of the page when starting a new topic.
Features
  • Assign every forum ONE or NO template of RAF in ACP [ 100% ]
  • Assign every forum ONE or NO template of RAF in MCP [ 0% ]
  • Define templates of RAF in an extra-section of the ACP [ 0% ]
  • Define templates of RAF in an extra-section of the MCP [ 0% ]
    • Up to 255 different templates of RAF can be defined [ 80% ]
    • Each template of RAF can consist of up to 30 fields [ 80% ]
    • Each template of RAF can have a different title-bar for input & display of the fields [ 100% ]
    • Each template of RAF can have an optional explanatory text above the questions, so users can figure out why they have to provide the additional information [ 100% ]
  • 6 different field-types supported [ 95% ]
    • Every field can have an optional default value [ 100% ]
    • Every field can have it's own additional explanation, to help users in understanding what information they are supposed to provide [ 100% ]
      • Text [ 100% ]
      • Passwords [ 80% ]
        Handling of who has the right to view information submitted into password-fields needs to be implemented.
        As for now, everyone can see what was submitted when viewing the topic!
      • Radio-Buttons [ 100% ]
        • ... can be displayed horizontally(default) or vertically [ 100% ]
      • Checkboxes [ 100% ]
        • ... can be displayed horizontally(default) or vertically [ 100% ]
      • Dropdown-Lists [ 100% ]
      • MultipleSelect-Lists [ 100% ]
        • ... configure how many elements are visible without scrolling [ 100% ]
  • Define "Global Fields" that can be used in any template of RAF [ 0% ]
    • You could setup a Global Field named OS, define it to be a dropdown-list containing commonly used OSs and then use this in different templates of RAF ...
      If you change the list of OSs for that global field, all templates of RAF using this Global Field will present the changed list!
  • Rights-Management [ 0% ]
    • Decide whether moderators are allowed to configure RAF-settings at all [ 0% ]
    • If RAF-settings are "open" for moderators, configure who can do what [ 0% ]
  • When starting a new topic in a forum that is configured to use a template of RAF, users are forced to fill in all fields before they can submit their post [ 100% ]
  • When making posts Sticky or Announcement, RAF can be left blank [ 100% ]
  • The answers a user gave, are being displayed on top of each topic while viewing [ 100% ]
  • Administrators and moderators can choose not to be presented the RAF-dialog when starting a new topic on a per-forum basis. [ 0% ]
    • Basically this is due to the fact, that they will mostly start new topics as stickies/announcements in those fora anyway, so it's just to not bother them with the RAF-dialog!
  • Users can decide to let the system "remember" their submitted answers for each template of RAF. [ 0% ]
    • This reduces the need to fill in the same information over and over again, because when a users starts a new topic, he can start with the answers he gave last time when he posted in a forum based on the same template of RAF
DEMO / Screenshots
You are invited to make some tests over at my DEMO-board, but you can also find some screenshots right here :mrgreen:

ImageImageImage
ImageConfiguring a forum to use a template of RAF

ImageImageImage
ImageGet a quick overview of forums configured to use a template of RAF
ImageIf you move the mouse over a template of RAF-icon it shows you the name of the template used!

ImageImageImage
ImageStarting a new topic in a forum that uses a template of RAF

ImageImageImage
ImageSubmitted without filling in all fields? Doesn't work :twisted:

ImageImageImage
ImageViewing a topic, with the answers submitted by the user.

:idea: Click the thumbnails to be redirected to a bigger version of each screenshot!


Latest News
+ + + Feb 17, 2005 + + +
  • I have decided to release version 0.1.0b, which is a kind of interims-release. I have run into some problems while trying to add the 2 missing features, to make the core-code ready. So while I am still fixing these, anyone willing to test at this stage can grab the first working, yet reduced version of the MOD
    Remember that EDITING and REMEMBER MY ANSWERS are the 2 missing features still not in this version.
+ + + Jan 31, 2005 + + +
  • It looks like I have managed to fix the bugs in 0.1.0, but I want to add 2 more features that will make the core-functionality complete ...
    As I said before, I want to do some heavier testing before releasing version 0.1.1, and as I am going to be off to work in Prag(Czech Republic) from Feb. 4th until Feb. 11th, don't expect this be ready before February 15.
+ + + Jan 30, 2005 + + +
  • Already sorted out most of the bugs, but will code some more and run heavier testing with the new version, before it will get released. My goal is making version 0.1.1 the first _working_ version, that covers the core-functionality of the MOD, so please be patient :roll:
:!: Known bugs :!:
As has been said in the news before ... the initial ALPHA-release 0.1.0 proved to behave pretty weird, so just don't use it unless you'd be willing to take a deep look into the code and try to help me finding the bugs. Anyway I am on my way to fix them, so maybe you'd better just wait.
As soon as the 0.1.1 ALPHA comes out, I will list bugs that are going to be in there.


Downloads Development-Roadmap
I will soon come up with a roadmap, where you can see what is expected to be done when ...


Hope you like it,
Manfred.
Last edited by mad-manne on Sun Mar 26, 2006 8:19 pm, edited 17 times in total.
Try not. Do or do not. There is no try. (YODA)
DarkPepe
Registered User
Posts: 183
Joined: Thu Jan 16, 2003 11:24 pm
Location: Santiago, Chile
Contact:

Post by DarkPepe »

please, create a Test account to 'test' the mod... :D
User avatar
mad-manne
Registered User
Posts: 776
Joined: Thu May 29, 2003 6:59 pm
Location: Marl, Germany

Post by mad-manne »

DarkPepe wrote: please, create a Test account to 'test' the mod... :D

hi pepe,
as stated in my board rules&regulations I have my board setup to NOT require account-activation. I thought this would make it easy to create one if desired!

But anyway here you go:
uzr: mad-tester
pswd: crazy

Cheers,
Manfred.
Try not. Do or do not. There is no try. (YODA)
DarkPepe
Registered User
Posts: 183
Joined: Thu Jan 16, 2003 11:24 pm
Location: Santiago, Chile
Contact:

Post by DarkPepe »

nice mod.. i was looking for this... but have some questions (as all the people on phpbb.com :D )

1.- By accident I did'nt fill the Subject field.. and when the system 'come back' the options that i have marked goes to default. ¿Is this because the BETA testing? or an unplanned feature?

2.- RELEASE THE BETA!! :lol:

Thanx
User avatar
mad-manne
Registered User
Posts: 776
Joined: Thu May 29, 2003 6:59 pm
Location: Marl, Germany

Post by mad-manne »

DarkPepe wrote: By accident I did'nt fill the Subject field.. and when the system 'come back' the options that i have marked goes to default. ¿Is this because the BETA testing? or an unplanned feature?

Yes this due to the fact, that this MOD is in a *very* early stage!
This has also been explained here!
DarkPepe wrote: RELEASE THE BETA!! :lol:

I will ... but you will have to be patient, because it is going to take at least 3 weeks form now on, until the code will be furbished enough to be released as BETA!

Anyway, if you watch this thread, you can be one of the first BETA-testers. 8)

Cheers,
Manfred.
Try not. Do or do not. There is no try. (YODA)
User avatar
Omen
Registered User
Posts: 124
Joined: Thu Dec 26, 2002 5:50 am

Post by Omen »

awesome mod right here....

this is perfect for one of my sites that specialize in lowriders...

a lot of people need help with their hydraulics and i can have them give as much info on their system as possible before i even need to ask....

also perfect for a computer support site that needs the users OS specs for troubleshooting...

here is a feature i think would be great:
a member only needs to fill in that information once...
if they need support again, the fileds will already be filled in with their previous info... BUT can always update it in a new post...

is it possible to have a drop down menu AND a text box for one field?
something like this:
Select Manufacturer: [dropdown] Other: [text box]

have an IF statement asking if the dropdown menu is at default then check the text box, and if the text box is empty then do not authorize... also if the text box is not empty, override the drop down....

i made a "Release Dates" script that was able to do what I am asking but I think this would be perfect for popular name brands but if someone has something generic then they can add the text in themselves and not just specify "Other" in teh drop down....

another feature that would be cool is to have the information only viewable by certain members... only admins, or mods and admins or a group or everyone etc....

i am looking forward to a stable release of this....
User avatar
mad-manne
Registered User
Posts: 776
Joined: Thu May 29, 2003 6:59 pm
Location: Marl, Germany

Post by mad-manne »

omen wrote: awesome mod right here....
this is perfect for one of my sites that specialize in lowriders...

hi omen, nice to hear you like it :mrgreen:
... a member only needs to fill in that information once...
... BUT can always update it in a new post...
. . . . .

Select Manufacturer: [dropdown] Other: [text box]

both good ideas ... I'll give them a thought!
another feature that would be cool is to have the information only viewable by certain members...

Could you explain your idea behind it ... what it could be useful for in your opinion?
Anyway I could imgine something like this:
Define a special pair of fields (username & password) which will only be displayed to admins, moderators and users from certain groups. Maybe one could also want to display that information to users with a certain post-count. this would prevent lurkers from using test-accounts!
i am looking forward to a stable release of this....

... stay tuned and keep watching this thread & forum. You should hear from me soon :-)

BTW ... what are lowriders ?

Cheers,
Manfred.
Try not. Do or do not. There is no try. (YODA)
User avatar
Omen
Registered User
Posts: 124
Joined: Thu Dec 26, 2002 5:50 am

Post by Omen »

Could you explain your idea behind it ... what it could be useful for in your opinion?


I guess it wouldn't be too useful to everyone but some forums might need personal information from a user that they don't want the whole world to see... Only a select few (admin, or mods, or members of a group) can see their info and discreetly answer their questions...

It's not really needed right now but as a future fature it would be cool to see.
It's better to focus on what you have now and squish any bugs first.
BTW ... what are lowriders ?

Customized vehicles with lowered/altered suspension.
There is a lot more to a real lowrider than lowered suspension but thats how it got its name.
It's a lifestyle for some, but for others (that ruin the sport) think of it as a status symbol.

Here are a couple pics of lowriders so you know what I mean.

http://www.treslistras.blogger.com.br/lowrider.jpg
http://home.tiscali.nl/~i.horvath/arman ... k%2069.JPG
http://www.us-car-show.at/lowrider_impala_2.jpg

I'll keep an eye on this mod as it develops...
User avatar
steveorg
Registered User
Posts: 141
Joined: Fri Feb 06, 2004 7:32 pm
Location: The Wrong Coast

Check boxes and multiple choice list boxes

Post by steveorg »

Hey Manfred,

I just reviewed the types of fields that you plan on including and noticed a couple of imprtant ones missing - check boxes and multiple choice list boxes. Any chance that they could be included?
User avatar
mad-manne
Registered User
Posts: 776
Joined: Thu May 29, 2003 6:59 pm
Location: Marl, Germany

Post by mad-manne »

hey steve,
you are right :oops: I really forgot those ...

I just tried to implement checkboxes which worked fine for the first part.
(Didn't have much changes, because the syntax for them is almost like radio-buttons)
But now I'm running into problems retrieving the *full* POST-variable for those because with checkboxes you can get more than just one value.

[EXPERT-ADVICE APPRECIATED]
Can anyone point me at how I can get *every* value that has been selected??

I am using something like this right now ...

Code: Select all

$my_field = $HTTP_POST_VARS['my_checkbox'];
... but like that I *only* get the last value of all that have been checked ?!
[/EXPERT-ADVICE APPRECIATED]

I would surely run into the same probs with multiple-choice dropdown-lists, but the solution should be the same.

I will have to think about how the submitted data from such multiple-choice fields has to get stored, but I think I will *have* to implement this in order to make the MOD really sophisticated 8)
So if I don't run into BIG problems with that, it should be in there.

Cheers,
Manfred.
Try not. Do or do not. There is no try. (YODA)
User avatar
mad-manne
Registered User
Posts: 776
Joined: Thu May 29, 2003 6:59 pm
Location: Marl, Germany

Post by mad-manne »

mad-manne wrote: [EXPERT-ADVICE APPRECIATED] ...

I haven't been lazy ... and found the first part of the trick !

Code: Select all

$my_field = $HTTP_POST_VARS['my_list'];
This works well with multiple-select dropdown-lists when I use this:

Code: Select all

<select name="my_list[]" size="5" multiple>
This results in $my_field being an array with all selections made.
Still I am having problems extracting these right now ...
This is due to the fact that my knowledge of complex array-handling is still not the best :-(

--> I collect all additional fields in an array, so in case of multiple-select fields this results in assigning an array into an array :oops:
... anyway I am confident to find out how it works. Wouldn't mind a hint though :roll:

Cheers,
Manfred.
Try not. Do or do not. There is no try. (YODA)
User avatar
mad-manne
Registered User
Posts: 776
Joined: Thu May 29, 2003 6:59 pm
Location: Marl, Germany

Post by mad-manne »

steveorg wrote: ... and noticed a couple of imprtant ones missing - check boxes and multiple choice list boxes. Any chance that they could be included?
As I said before .. you are perfectly right! I had really missed out on those :shock:

But in contradiction to my signature: I tried AND did :twisted:
... and I even added an option to use password-fields.

One other thing came to mind ... the feature to have the options in Checkboxes or Radio-Buttons be displayed horizontally(default) or vertically!

Here's an overview of what currently works and what doesn't:
  • Text-fields can be standard or password-type
    --> defineable size and max. length for each text-field
  • Radio-Buttons (options displayed horizontally or vertically)
  • Checkboxes (options displayed horizontally or vertically)
  • Dropdown-Lists
  • Multiple-Choice Lists
    --> with defineable number of items to be visible without scrolling for each list
    - - - - - - - - - - - - - - - -
  • When starting a new thread ...
    you'll get the additional "dialog" asking for the required fields. They are NOT saved when submitting ...
    Still there is no checking, whether the additional fields have really been submitted.
    BUT if you try the preview-button, you'll realize that all data is being "remembered".
  • When replying ...
    You will NOT see the additional "dialog", because the RequiredAdditionalFields are only necessary for every first post in thread
  • When viewing ...
    ... you'll still see the same OLD set of example-data in every thread.
    Although it *is* different in the two different forums(Support and quarter-life)
So just go and have a look here!
Be sure to make test-posts in both relevant forums ("Support 4 Whatever" | "quarter-life") because this way you can see all options described above.

Next steps are:
  • Make sure that the additional fields are *really* filled in ...
    Otherwise come up with an ERROR and ask the user to submit them.(Just like when forgetting to submit a subject)
  • Save the Additional Fields in the DB
  • Display the *real* data when viewing
Once that will be done, I might consider going into ALPHA ... but there will still be a lot work to do in the ACP to compose the "RequiredAdditionalFields-Templates" :!:

One final thing that I am almost sure about, is to drop the idea of requiring additional fields on *every* post! Was never my intention anyway(rather a strange case of featuritis when I mentioned it) and I can't imagine this could be useful anywhere ?!

Cheers,
Manfred.
Try not. Do or do not. There is no try. (YODA)
User avatar
steveorg
Registered User
Posts: 141
Joined: Fri Feb 06, 2004 7:32 pm
Location: The Wrong Coast

Thgis is taking shape quickly!

Post by steveorg »

Hi Manfred,

This is becoming a very flexible tool. Nicely conceived and so far, nicely executed.
One final thing that I am almost sure about, is to drop the idea of requiring additional fields on *every* post! Was never my intention anyway (rather a strange case of featuritis when I mentioned it) and I can't imagine this could be useful anywhere ?!
I also can't envision a situation where its "required", but I can imagine situations where optional use would be helpful. The first that comes to mind is mod support on this board. A form customized for each mod could help in the same way that the general support request form works. Since these requests are always replies and not new topics, optional forms would be the only way to make this work. Of course, if the categories hierarchy mod were used for mod support, this scenario would become moot. :wink:

Regards, Steve
User avatar
mad-manne
Registered User
Posts: 776
Joined: Thu May 29, 2003 6:59 pm
Location: Marl, Germany

Post by mad-manne »

Hey Steve,
I think that having the additional data in *every* post would also be distracting while scrolling through a thread. I feel like this would just be an awful overhead of information.

I have now decided to *not* implement anything like this, before getting this MOD to Version 1.0.0! I will keep it in mind though and where applicable right now, I'll try to structure my code in a way, where this should not require a major rewrite of the MOD once I would decide to implement it!

:roll: If ever this board would consider to use my MOD to structure posts in support-related forums I would be damn proud :!:
In this case I think it would be possible to open an extra forum to support approved MODs. There you could have another template of Required Fields.

Just my humble opinion :-)

Cheers,
Manfred.

P.S. Is featureitis an "allowed" english word. Or if not do you at least understand it ? Just trying to make-up my written english,so I would like to know.
Try not. Do or do not. There is no try. (YODA)
User avatar
steveorg
Registered User
Posts: 141
Joined: Fri Feb 06, 2004 7:32 pm
Location: The Wrong Coast

Post by steveorg »

Hey Manfred,
I think that having the additional data in *every* post would also be distracting while scrolling through a thread. I feel like this would just be an awful overhead of information.
I pretty much agree, except when the information is different like it would be in the scenario I mentioned. In that case it would only be the occasional post where a support issue is brought up.
I have now decided to *not* implement anything like this, before getting this MOD to Version 1.0.0!
That's definitely best.
:roll: If ever this board would consider to use my MOD to structure posts in support-related forums I would be damn proud :!:
Given how the support template is ignored, they'd be nuts not to.
In this case I think it would be possible to open an extra forum to support approved MODs. There you could have another template of Required Fields.
That's why I mentioned the categories hierarchy mod. It's subforums fits the need perfectly. Maybe the powers that be are waiting for version 2.2
Is featureitis an "allowed" english word. Or if not do you at least understand it ? Just trying to make-up my written english,so I would like to know.
Its a word that you coined that beautifully expresses the concept. Who knows, in ten years you might find it in the dictionary. :D

Steve
Post Reply

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