vendormedia.com

What is RSWiki?
RSWiki is something like WIKI, content-management system and portal with a buch of Web 2.0 applications. Place to store or publish information, stories, pictures, documents, videos for work or fun. Just place to handle your stuff.

Features:

  • web pages with documents organized in tree structure
  • tags, rateings, pictures, videos, attachemnts, comments, forms, client areas, forums
  • RSS, XML-RPC API, mailing lists
  • everything is dynamic
  • everything looks great and simple, easy to use

Candies:

Candies are pre-programed functions. Every candy is removed from page, article or template and it is replaced by candy's return value. In case that candy returns nothing, it's just removed from content. You can use candies to generate useful content to your pages, articles or templates. Some candies are simple, and some are with inner content. This can help to know how you can use candies:

  • {NameOfSimpleCandy}
  • {NameOfSimpleCandy:parameter1,parameter2,...}
  • {NameOfCandyWithInnerContent:}this is the inner content{NameOfCandyWithInnerContent}
  • {NameOfCandyWithInnerContent:parameter1,parameter2,...}this is the inner content{NameOfCandyWithInnerContent}

You can use one candy inside other candy: {someCandyWithContent:\param1,{someOtherCandy},param3} content with {candy} inside{someCandyWithContent}

There are all available candies:

  • substr: Cuts part of string (HTML tags are ignored-not counted in length)
  • setvar: Saves the users variable and returns nothing
  • var: Return the users variable
  • strelements: Parses string in first parameter into array by parameter 2 sepparator. Every element can has a name. Returns inside text with replaced {property:XX}\ candies.
  • lng: Returns the language text (sk, en or others)
  • art: Returns content of article attribute.
  • goto: Creates and returns link.
  • href: Similar to goto candy, but returns only URL for link (href="url").
  • list: Very complicated candy. Generates result from database. Creates a list, pagelist and subsitelist, so you can use listatt, listitem, listitemindex, listcycle, listtr, listtree and listcount candies inside it.
  • listcount: Returns number of items in list.
  • listitem: Returns atribute of item in list.
  • listcycle: Iterates over all in list.
  • listtr: Iterates over all in list and get result to table.
  • listtd: Iterates over all cols in row.
  • listtree: Iterates over all in list and result get to tree. Creates a tree so you can use treechilds, treenode and listitem candies.
  • treechilds: Iterates over items and goes automaticli over all level. Good for "Site map" function.
  • treenode: Check if there is a way to iterate over TreeItem's childs, but only one level down. If it is, treenodelist candy would iterete over this level.
  • treenodelist: Iterates over TreeItem's childs, but only in one level. If you want to go down other level, use treenode in inner content again
  • listitemindex: Search and returns index of item.
  • listatt: Returns atribute of list.
  • if: Do some condition in parameter 1 and returns string from inner text if the condition is valid. Otherwise return nothing.
  • pagecycle: Iterates over all pages generated by list.
  • pageindex: Return index if page.
  • comment: Creates a form for submiting comments and submits comments.
  • commentGroupId: Return the commentGroupId for specified object.
  • att: Creates and returns link for attachment.
  • galpic: Creates and return the picture HTML tag.
  • request: Return the URL or FORM request parameter.

Candy: substr
Example: {substring:1,5}test to short{substring}
Cuts part of string (HTML tags are ignored-not counted in length)
Parameters:

  1. start position (starts with 0)
  2. length of returned string (if its '', that means 'all')

Candy: setvar
Example: {setvar:XYZ,VALUEforXYZ}
Saves the users variable and returns nothing
Parameters:

  1. name of users variable
  2. value for variable

Candy: var
Example: {var:XYZ}
Return the users variable
Parameters:

  1. name of users variable

Candy: strelements
Example 1: {strelements:'name=John;surname=Mat',';','='}text ro html inside, name is {property:name} and surmane is {property:surname} and other{strelements}
Example 2: {strelements:'Finger,Leg,Head'}text ro html inside, first is {property:0} second if {property:1} and third id {property:2} and other{strelements}
Parses string in first parameter into array by parameter 2 sepparator. Every element can has a name. Returns inside text with replaced {property:XX}\ candies.
Parameters:

  1. string to parse
  2. sepparator for items, deffautl is "\n"
  3. sepparator for attributes, deffautl is ":"

Candy: lng
Example: {lng}
Returns the language text (sk, en or others)
No parameters.

Candy: art
Example: {art:caption}
Returns content of article attribute.
Parameters:

  1. atribute name (parentId, pos, mark, caption, content, created, modified, publish, authorId, canPublish, templateId, type, rsId, parentMark, parentPos, parentCaption, parentCreated, parentModified, parentPublish, parentAuthorId, parentCanPublish, parentTemplateId, parentType)
  2. format

Candy: goto
Example 1: {goto:home}click here{goto}
Example 2: {goto:,,,en}click here{goto}
Example 3: {goto:home,redClass,_blank,en,'&time=enought'}click here{goto}
Returns shortcut or link.
Parameters:

  1. mark of site (if empty uses actual site mark) or name of pagelist
  2. class name for shortcut (class="CSSclass")
  3. target (target="the_target")
  4. language (sk or en or other)
  5. extra parameters ('m=1&n=5', ...)

Candy: href
Example 1: {href:home}
Example 2: {href:,,,en}
Example 3: {href:home,redClass,_blank,en,'&time=enought'}
Similar to goto candy, but returns only URL for link (href="url").
Parameters:

  1. mark of site (if empty uses actual site mark) or name of pagelist
  2. class name for shortcut (class="CSSclass")
  3. target (target="the_target")
  4. language (sk or en or other), if empty uses actual language
  5. extra parameters ('m=1&n=5', ...)

Candy: list
Example of all articles list: {list:articleList,10,site,type==1,created+} look at this articles: {listcycle:articleList}<a href="{href:{listitem:articleList,mark}}" title="{listitem:articleList,caption}">{listitem:articleList,caption}</a> {listcycle}{list}
Example of all articles list in table: {list:articleList,10,site,type==1,created+} look at this articles: {listtr:articleList}<tr>{listtd:articleList}<td><a href="{href:{listitem:articleList,mark}}" title="{listitem:articleList,caption}">{listitem:articleList,caption}</a></td>{listtd}</tr>{listtr}{list}
Example of A-1 article list: {list:articleList,10,site,type==1 && parentMark=="'A-1'",created+} look at this articles: {listcycle:articleList}<a href="{href:{listitem:articleList,mark}}" title="{listitem:articleList,caption}">{listitem:articleList,caption}</a> {listcycle}{list}
Example of simple menu: {list:simpleMenu,10,site,type==0 && parentMark=="'menu'",mark}<ul>{listcycle:simpleMenu}<li><a href="{href:{listitem:simpleMenu,mark}}" title="{listitem:simpleMenu,caption}">{listitem:simpleMenu,caption}</a></li> {listcycle}</ul>{list}
Example of tree menu: {list:menu,1000,site,type==0,mark,2,parentMark=="'A-1'"}<ul>{listtree:menu,id,parentId,1,1}<li><a href="{href:{listitem:menu,mark}}" title="{listitem:menu,caption}" class="{if:{var:is_{listitem:menu,mark}}==1}active{if}">{listitem:menu,caption}</a></li>{treenode:menu,0}<ul>{treenodelist:menu}<li><a href="{href:{listitem:menu,mark}}" title="{listitem:menu,caption}" class="{if:{var:is_{listitem:menu,mark}}==1}active{if}">{listitem:menu,caption}</a></li>{if:{var:is_{listitem:menu,mark}}==1}<ul>{treenodelist:menu} <li><a href="{href:{listitem:menu,mark}}" title="{listitem:menu,caption}" class="{if:{var:is_{listitem:menu,mark}}==1}active{if}">{listitem:menu,caption}</a></li>{if:{var:is_{listitem:menu,mark}}==1}<ul>{treenodelist:menu}<li><a href="{href:{listitem:menu,mark}}" title="{listitem:menu,caption}" class="{if:{var:is_{listitem:menu,mark}}==1}active{if}">{listitem:menu,caption}</a></li>{treenodelist}</ul>{if}{treenodelist}</ul>{if}{treenodelist}</ul>{treenode}{listtree}</ul>{list}
Example of sites map: {list:sites,1000,site,type==0,mark}{listtree:sites,id,parentId,10,1}<ul><li>{goto:{listitem:sites,mark}}{listitem:sites,caption}{goto}{treechilds:sites}</li></ul>{listtree}{list}
Very complicated candy. Generates result from database. Creates a list, pagelist and subsitelist, so you can use listatt, listitem, listitemindex, listcycle, listtr, listtree and listcount candies inside it.
Parameters:

  1. private name of list ('my', 'other', 'articles', 'something', 'whatever' ...)
  2. number of items per one page (how many items can be on one page)
  3. name of module (to include meta file), default is 'site' (don't fill this parameter if you don't know what it means)
  4. condition to filter['filter'], see function listFromDB for more details. (e.g. parentId==11 && mark like 'My Page %'), default should be the position
  5. order by(default is a..z, for z..a enter "+" before attribute): all site attributes + parentattributes
  6. special mode: 1-parent mode, 2-child mode
  7. condition for firts object of special mode (if you vant to use special mode)

Candy: listcount
Example: {listcount:articleList}
Returns number of items in list.
Parameters:

  1. name of list

Candy: listitem
Example: {listitem:articleList,caption}
Returns atribute of item in list.
Parameters:

  1. name of list
  2. name of attribute in item [perpage, page]
  3. index differencial, you can access other item in list (other than actual item: 4 meand get index 4, -5 means index decremented with 5, +5 means index incremented with 5 ) +0 is default value. This parameter is not supported in a tree.

Candy: listcycle
See list candy for same examples
Iterates over all in list.
Parameters:

  1. name of list

Candy: listtr
See list candy for same examples
Iterates over all in list and get result to table.
Parameters:

  1. name of list
  2. number of columns

Candy: listtd
See list candy for same examples
Iterates over all cols in row.
Parameters:

  1. name of list

Candy: listtree
See list candy for same examples
Iterates over all in list and result get to tree. Creates a tree so you can use treechilds, treenode and listitem candies.
Parameters:

  1. name of list
  2. name of attribute for ident (id)
  3. name of attribute for parentIdent (parentId)
  4. level of going down (-1-all, 0-only root objects, 1-also first level childs, ...)
  5. type of tree (0-unknown, 1-menu tree)

Candy: treechilds
See list candy for same examples
Iterates over items and goes automaticli over all level. Good for "Site map" function.
Parameters:

  1. name of list

Candy: treenode
See list candy for same examples
Check if there is a way to iterate over TreeItem's childs, but only one level down. If it is, treenodelist candy would iterete over this level.
Parameters:

  1. name of list
  2. condition number [0(10)-iterates if parent or some child is selected, 1(11)- oterates only if child is selected, 2,10,11-allways]

Candy: treenodelist
See list candy for same examples
Iterates over TreeItem's childs, but only in one level. If you want to go down other level, use treenode in inner content again
Parameters:

  1. name of list

Candy: listitemindex
Example: {listitemindex:articleList,caption,'Site map'}
Search and returns index of item.
Parameters:

  1. name of list
  2. name of attribute in item (depens on type, e.g. for a site list is the same like for art candy)
  3. value of attribu in item

Candy: listatt
Example: {listatt:articleList,perpage}
Returns atribute of list.
Parameters:

  1. name of list
  2. name of attribute in item (depens on type, e.g. for a site list is the same like for art candy)

Candy: if
Example 1: {if:{lng}!=sk}{goto:,,,sk}Slovak version{goto}{if}
Example 2: {if:{lng}==sk}Toto sa zobrazi len v slovenskej verzii{if}
Example 3: {if:next_articleList}There is something more ...{if}
Do some condition in parameter 1 and returns string from inner text if the condition is valid. Otherwise return nothing.
Parameters:

  1. condition (something == something, !=, >= , <=) or one of {next_[listName], prev_[listName], nextpage_[listName], prevpage_[listName], nextpageindex_[listName], prevpageindex_[listName], treenodeview_[listName], nexttablerow_[listName], prevtablerow_[listName], nexttablecol_[listName], prevtablecol_[listName]}

Candy: pagecycle
Example 1: {pagecycle:articleList} page {pageindex:articleList}{if:next_articleList}, {if}{pagecycle}
Example 2: <ol>{pagecycle:articleList}<li>page</li>{pagecycle}</ol>
Iterates over all pages generated by list.
Parameters:

  1. name of list

Candy: pageindex
See pagecycle candy for same examples
Return index if page.
Parameters:

  1. name of list

Candy: comment
Example for comment actual page: <a name="forumtree"></a>{comment:com,1001,{art:id},{href:,,,,'#forumtree'}}{setvar:comments,{commentGroupId:1,{art:id}}}{if:{var:comments}!=}{list:cm,100,comment,commentGroupId=={var:comments},+createdAt}{listtree:cm,id,parentId,-1,0}<ul>{setvar:color,{treelevel:cm,0,mod 2}}{if:{var:color}==0}{setvar:color,green}{if}{if:{var:color}==1}{setvar:color,orange}{if}<li class="{var:color}">{listitem:cm,caption} ({listitem:cm,username}, {listitem:cm,createdAt}): {listitem:cm,content} {goto:,,,,'#forumreply'}reply{goto}</li>{treechilds:cm}{listtree}{list}{if}</ul><a name="forumreply"></a>Add comment: <input type="text" name="com_caption" value="{c:caption}"{if:{c:caption}!=} READONLY{if}><br><input type="text" name="com_username"><input type="submit" name="com_send" value="comment" type="submit">{comment}
Creates a form for submiting comments and submits comments.
Parameters:

  1. name of submit form
  2. type of object for comment (parentType) [0-site, 1001-picture, 1002-audio, 1003-document, 1004-person]
  3. id of object for comment (parentId)
  4. action (url of action site)

Candy: commentGroupId
See comment candy for same examples
Return the commentGroupId for specified object.
Parameters:

  1. type of object for comment (parentType) [0-site, 1001-picture, 1002-audio, 1003-document, 1004-person]
  2. id of object for comment (parentId)

Candy: att
Example: {att:att00001}
Returns link for attachment.
Parameters:

  1. "mark" of attachment

Candy: galpic
Example: {galpic:1234,160.jpg,,Picture}
Return the picture HTML tag.
Parameters:

  1. id of picture
  2. version (160.jpg)
  3. class name
  4. alternative text

Candy: request
Example: {request:goto}
Return the URL or FORM request parameter.
Parameters:

  1. name of parameter
vMail vManaging vChat vContact vCounting and vPublishing at vendormedia.com
vendormedia.com