addedValues Plugin

...Powerful Free! Database Expansion for Manila
logoBottle:

(1 or more words)


Get tropes here!
Click to see internals
Report bug


GSA Business

sitepic_gsabusiness.jpg:
Viewable with Any Browser

Members
Join Now
Login

Commented links list

David asked me to write this so please someone else put it in something like English language :-)

How to create a commented link list as seen at http://www.femnet.ch/links/arbeit (for A.V. beginners...)

First, create your variables.

You need only 4 of them: linkURL, linkComment, linkCategory and linkShowLink. The title of the link will be the [subject] of the message.

Second, create your output report

You'll need 2 reports: one for showing the links to the public as a list and another that shows each link with all it's values for yourself and your editors.

The first, I called something like linksListReport. It applies to messages and it's usage is search results. In the report definition write something like:

<li><a href="[[linksURL]]">[[subject]]</a>
<p>[[linksComment]]</p>
</li>

Then create your second output report, linksPageReport. This report is meant to show the links and the values of their variables to editors. It applies to messages and it's usage is item detail. Define your layout (keep it easy).

Third, create your input form.

Call it something like linkInputForm. It applies to messages and it's usage is Manila ETP.

Pick all of your variables. Then chose the rendering of each variable. linkURL and linkComment are textboxes, linkCategory checkboxes (when you go for multiple choice) or radiomenu, linkShowLink is radiomenu.

Then make the layout of your form. Because it's a manila ETP form, you need to use [[subject]] and [[body]] as well. [[body]] will be used with the page macro:

[[body hidden("{addedValueMacros.page(\"linksPageReport")}")]]

[[subject]] will be used for the title of the link.

Define your queries

Almost everything is ready now. You need to create your queries. One for each category you want to use (remember the values of the variable linkCategory?). For each category, create a query. E.g. linksRock, linksFolk, linksJazz.

In the query definition, write the following sentence:

linkCategory="value" AND linkShowLink="yes"

e.g. linkCategory="Rock" AND linkShowLink="yes"

Last but not least: Create your pages

For every category, create a new story with the standard Manila input form. In the text section, write the following macro call:

{addedValueMacros.query("queryname", "reportname")}

e.g. {addedValueMacros.query("linksRock", "linksListReport")}

Click "post story". If nothing show up: this is normal, because we didn't enter any links until now. How to do this? It's not really obvious :-)

Write somewhere (for example at the bottom of your template) the following macro call:

{addedValueMacros.newMessageFormLink("Submit new link", "linksInputForm")}

Another way is go to AddedValues/Forms an set at "Configure Custom Input Forms" (at the bottom of the page) "Discussion" to your Input Form. Or use customised input forms (as described at "Forms: Dealing with Numerous Input Forms").