Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Predefined Posting Templates with markup (Thickbox? Stash?)
TomTester
New
PROBLEM:
I have a forum where people post event listings.
I find no two people use the same format, reducing legibility, ease of use.
I often end up re-writing event posts to ensure consistency.
This problem pertains to both post TITLE and post CONTENT.
IDEA:
Provide people with a posting template, which, with the appropriate fields
filled out, will generate a marked up post in a standard format.
BENEFITS:
Consistent lay-out
Consistent content elements
Markup (invisible) would allow content re-use
EXAMPLE:
- START NEW DISCUSSION
-> SELECT DISCUSSION CATEGORY ("EVENT")
-> POPS UP THICKBOX WITH "EVEN POSTING TEMPLATE" FORM
User fills out the 'event template' above like this:
IDEAL RESULT (a man can dream, not?)
This results in the generation/insertion of an hCalendar microformat
Note: posting template-specific CSS takes care of formatting
WORKABLE RESULT (good enough for me)
FORUM POSTING RESULT
posts as well, e.g. item for sale, job posting, etc. etc.
Reactions? Ideas? Willing participants?
I have a forum where people post event listings.
I find no two people use the same format, reducing legibility, ease of use.
I often end up re-writing event posts to ensure consistency.
This problem pertains to both post TITLE and post CONTENT.
IDEA:
Provide people with a posting template, which, with the appropriate fields
filled out, will generate a marked up post in a standard format.
BENEFITS:
Consistent lay-out
Consistent content elements
Markup (invisible) would allow content re-use
EXAMPLE:
- START NEW DISCUSSION
-> SELECT DISCUSSION CATEGORY ("EVENT")
-> POPS UP THICKBOX WITH "EVEN POSTING TEMPLATE" FORM
TITLE : _________________________________
DATE : __/__/__
TIME : __:__ - __:__
VENUE : _________________________________
STREET: _________________________________
CITY: _________________________________
STATE: _________
ZIP: _________
COUNTRY: _________
HOST: _________________________________
TEXT: _________________________________
_________________________________
[SUBMIT] [CANCEL]
User fills out the 'event template' above like this:
TITLE : VANILLA OFF-LINE MEET
DATE : 3/3/2007
TIME : 8:00 pm - 10:00 pm
VENUE : BOEING BAR
URL : http://www.boeingbar.com
STREET : 232 THIRD AVE
CITY : NEW YORK
STATE : NY
ZIP : 10016
COUNTRY : USA
HOST : Tom Tester
TEXT : Let's take it off-line & outside babies...
Sure you can code, but can you drink?
IDEAL RESULT (a man can dream, not?)
This results in the generation/insertion of an hCalendar microformat
<div class="vevent">
<a class="url" href="http://www.boeingbar.com/">
<span class="summary">VANILLA OFF-LINE MEET</span>
</a>:
<abbr class="dtstart" title="2007-03-03T20:00:00-05:00">3 March 2007 from 8:00pm EST</abbr>
until <abbr class="dtstart" title="2007-03-03T022:00:00-05:00">3 March 2007 from 10:00pm EST</abbr>
at the <span class="location">BOEING BAR, 232 THIRD AVE, NEW YORK, NY</span>
<div>Let's take it off-line & outside babies...<br>Sure you can code, but can you drink?</div>
Hosted by <span class="uid">Tom Tester</span>
</div>
Note: posting template-specific CSS takes care of formatting
WORKABLE RESULT (good enough for me)
<a class="url" href="http://www.boeingbar.com/"><b><font size="4" color="red">VANILLA OFF-LINE MEET</font></b></a>
3 March 2007 from <b>8:00pm EST</b> until 3 March 2007 from 10:00pm EST
at the <b>BOEING BAR, 232 THIRD AVE, NEW YORK, NY 10016, USA</b>
Let's take it off-line & outside babies...
Sure you can code, but can you drink?
Hosted by <i>Tom Tester</i>
FORUM POSTING RESULT
VANILLA OFF-LINE MEETOf course posting templates could be created for many other 'standard'
3 March 2007 from 8:00pm EST until 3 March 2007 from 10:00pm EST
at the BOEING BAR, 232 THIRD AVE, NEW YORK, NY 10016, USA
Let's take it off-line & outside babies...
Sure you can code, but can you drink?
Hosted by Tom Tester
posts as well, e.g. item for sale, job posting, etc. etc.
Reactions? Ideas? Willing participants?
0
This discussion has been closed.
Comments
I meant it for ANYTHING that could benefit from a 'posting template' of sorts.
For example... when posting job info, people need to provide the location,
the title, the job description, requirements and contact info. I have many
job postings where the location is not included, so people do not know to
which geographic region it applies. Ditto with contact info for the poster.
In those cases a posting template could make sure the poster remembers all
the info that may be needed. It will be a 'flexible' database, initially used to
COLLECT and PRESENT data in a consistent fashion.
I merely use the forum post itself to store the (structured) data. Hence the
forum post BECOMES the database, not unlike storing an XML record in a
MEMO/TEXT field.
possibilities once 'discussion creation' based on a 'ping' is a reality.
If so I love this idea
Sounds like you need a dropdown menu with the available (microformat where possible) templates in which then opens the contents via AJAX in a Thickbox? Ignoring, for a moment, the submitting a new discussion part, the templates can be very simple PHP pages with a form in that spits out an HTMLised post. Ideally the dropdown menu would even be populated by reading the "templates" directory (when an admin hits a refresh button in the admin site).
Mark's basically done something like this second part already on this forum with the Add-ons hasn't he?
but K.I.S.S. works too, i.e. drop-down with some posting templates, a link, etc.
Start a new discussion
from a template...and when you tick that box a dropdown appears beneath?
Start a new discussion
from a templatePick a template...Discussion Template 1Discussion Template 2Discussion Template 3
And then when you pick one it fires up the Thickbox. You could even then decide you picked the wrong one, close the Thickbox and pick another. This would seriously rock - now we just need to find someone to code it
Didn't think of that, but yes, you're absolutely right.
I listed all the bells and whistles above. Forget about the microformats, the CSS, etc. etc.
We can start with the basics.
The Posting Template Plugin (PTP):
- PTP adds a templates drop-down above the comment form
- each item in the PTP drop-down refers to a form URL (either hosted on the forum server or elsewhere, e.g. formspring.com)
- once the users picks a template, PTP opens up a thickbox with said forum URL
- the submit button (action) for the form is coded to send it to a 'form accept' function provided/facilitated by the PTP plugin
- this function accepts the form contents, formats it, and inserts it into the comment field as HTML via nifty JavaScript/AJAX
The security aspects can be handled by existing comment verification (e.g. SirNot's HTML cleaner add-on).
It SOUNDS like a very basic mechanism. We can always add any XML/mF bells and whistles later.
I'd love to take a look at this,but I don't have much time atm.
I can definitely help code this, but I see some serious problems that I'm not thinking my way around as of yet. The biggest problem I see is not putting the structured info into the post, but getting it out again for editing. Secondary, is that the info should be searchable though the standard Vanilla search. That, of course, rules out putting that data in a separate table, or at a minimum makes for a fun bit of hacking the search code to pull it back in.
One proof of concept/starting point I'm looking at is the structured blogging plugin for Wordpress. That stores post information doubly in the body. 1) as xml data (microformat), and 2) the same data reformatted for proper display. Having the former embedded in the post gives an easy way to pull it back into the edit form, and the latter leaves the post data searchable.
I'm going to mess around with the code this weekend/next week and see if the plugin can be ported over, or at least get a handle on how to make the idea go in Vanilla.
Thoughts?
look up fcktemplates.html file. u can design ur templates in it.
the user clicks on the template button, the user picks one template from the available one, and a dummy post is made in ur text area, which u can fill in
Basically, you saved a chunk of text in your "clipboard", and select the text block by name from a pulldown, which "pastes" it into the form.
Schiz, if you mean that you have a form that you fill in, I like this idea (although a dropdown makes more sense to me). If a template activates a form that then gets filled out (allowing data validation etc in future versions), surely, for editing purposes these fields can just be pulled back into the form? A bunch of DIVs with classes (Field1, 2, 3 etc) could be created from the form and then parsed back into a form for editing of the template no?
What you mention is cool too, but a little TOO simple for my taste. I think the structure of a FORM
is key here (no editing of field names etc.).
@BShulz
The biggest problem I see is not putting the structured info into the post, but getting it out again for editing.
Though editing posts would be supremely useful, I could even live without that option... that said, simple
structures can be parsed with with simple tools, e.g. see these articles:
http://www.danwebb.net/2007/2/9/sumo-a-generic-microformats-parser-for-javascript
http://www.kaply.com/weblog/2007/01/31/parsing-microformats/
http://www.kaply.com/weblog/2007/04/18/microformat-objects-in-javascript/
Building a form on the fly isn't that much more difficult either...
Secondary, is that the info should be searchable though the standard Vanilla search. That, of course,
rules out putting that data in a separate table, or at a minimum makes for a fun bit of hacking the search
code to pull it back in.
I'd prefer to avoid separate tables and anything complicated.. and keep 'structure' stored with the data.'
One trick could be to define a CSS style that HIDES the FIELD NAMES from display, but would not be
missed by the search engine (e.g. in my original example imagine
<div class="vevent"> <a class="url" href="http://www.boeingbar.com/"> <span class="summary">VANILLA OFF-LINE MEET</span> </a>: <div class="invisible">START TIME: </div><abbr class="dtstart" title="2007-03-03T20:00:00-05:00">3 March 2007 from 8:00pm EST</abbr> until <div class="invisible">END TIME: </div><abbr class="dtstart" title="2007-03-03T022:00:00-05:00">3 March 2007 from 10:00pm EST</abbr> at the <div class="invisible">LOCATION: </div><span class="location">BOEING BAR, 232 THIRD AVE, NEW YORK, NY</span> <div>Let's take it off-line & outside babies...<br>Sure you can code, but can you drink?</div> Hosted by <div class="invisible">USER: </div><span class="uid">Tom Tester</span> </div>
IMHO by abusing the 'unknown HTML tag' 'feature' (i.e. every tag not recognized by the browser will not
be rendered) you can actually store structure inside a regular post (providing the HTML formatter leaves
those tags in).