addedValues Plugin

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

(1 or more words)


Get tropes here!
Click to see internals
Report bug


Hawaiian Hardwoods Direct

sitepic_hhd_screenshot.jpg:
Viewable with Any Browser

Members
Join Now
Login

Builtin Variables

About Builtin variables

Builtin Variables are addedValues way of providing read-only access to the internal values Manila uses. For example, messages in Manila always have values for msgnum, subject, body, posttime and lastupdated, as well as many other less obviously meaningful values. If the message is a picture, there will be values for image.height and width, its mimetype, and image.shortcut among others. Click on the following pictures to see how Frontier stores these values (not compulsory!)

pic_variable builtins1: pic_variable builtins2:

Seven message builtins reference the trackback inbound urls table of a message. A message may have any number of incoming trackbacks, therefore any number of rows in the table. The columns of the table are known as

Tables are represented in addedValues as row placeholder variables, in this case it is called trackback.inbound.urls, and may contain any number of rows. The values in the table can be displayed in a report using the foreach and endforeach qualifiers to delimit a loop over every row in a row placeholder table , for example in a message item detail report the following displays every incoming trackback as a link within an ul list <ul>
[[trackback.inbound.urls foreach]]
<li>{addedValueMacros.getLink(trackback.inbound.urls.weblogname, trackback.inbound.urls.url, whatTarget:trackback.inbound.urls.weblogname)}</li>
[[trackback.inbound.urls endforeach]]
</ul>
the number of values can be determined also, using [[trackback.inbound.urls values]] or the pseudomacro forEachCount(trackback.inbound.url)

The alsoListedin message builtin may be indexed and be used in queries and forms. It keeps track of the messages that are categorised as stories and/or pictures. Indexing the value opens the possibility of improving upon Manilas story and picture page, using addedValues. See examples at http://www.addedValues.org/stories/storyReader$484 and http://www.addedValues.org/stories/storyReader$485

For Gems and member records, there's another different set of variables.

Defining Builtins

AddedValues can read values of builtins variables, but will not recognise their names until explicitly asked to. Once defined, builtin Variables can be indexed, and used as other variables, except addedValues never changes the values of Manila builtin variables. In advanced browsers builtins show in green in the multibox listing variables, unles they are indexed, in which case they are red. The values will continue to exists regardless of whether addedValues recognises them or not.

pic_variable Builtin Controls:

Displaying Builtins

Because there are a lot of builtins, it is sometimes convenient to not see these names in the multiple selection box. These buttons control whether they are visible or hidden.

pic_variable Display Options: