Translations of this page:

Forum topics list

In Claromentis version 5.4, parameter “forum_id” had name “id“. Starting from Claromentis 5.5, the name is changed to “forum_id”.
<component class="ForumSmartComponent"
    name="news_list_1"
    forum_id="1"
    use_iframe="0"
    width="600"
    height="400"
    scrolling = "auto"
    columns = "owner,date_created,topic_name,body_text"
    link_new_window="1"
    page_size="10"
    css_main_table="table_docs"
    css_paging_table="table_options"
    text_character_count="30"
    template="forum/forum_list.html"
    show_paging="1"
    current_page="1"
>

Attribute class defines PHP class, which creates html code basing on parameters indicated. It’s not obligatory to include the full list of parameters as all parameters have appropriate default values.

<component class="ForumSmartComponent" name="component1">

Parameters description

1. name Defines object name which must be unique among several objects on the page and strongly recommended to be unique in the whole system, because variables of PHP session are distinguished on the basis of this name.

2. forum_id ID of forum category. Either forum_id or codename must be specified

3. codename Allows to show posts from multiple forums. Specifies codename of forums from where to show posts. Either forum_id or codename must be specified. Possible values are:

  • “_all_” - return topics from all forums including special
  • “_main_” - return topics from main forums (without codename)
  • value” - return topics from forums with codename value

4. width The width of the frame counted in pixels.

5. height The height of the frame counted in pixels.

6. scrolling Frame scrolling. Possible values – auto, yes, no.

7. columns Defines which columns to show, comma delimited list: owner,date_created,topic_name,body_text.

8. template You could use customized template for news list. By default it is “forum/forum_list.html”.

9. current_page Page number, default value - 1.

10. link_new_window Open links on new window. (1/0)

11. show_paging Defines if the list of pages should be shown or not. In templater component mode works only if “use_iframe” is set to 1.

12. page_size Define the number of elements within one page. –1 – show all the elements.

13. CSS styles for main table consisting documents list, page number table and trace path.
css_main_table=”table_docs”;
css_paging_table=”table_options”;

14. use_iframe It’s used only for templater component. If set to 1, templater generates javascript code (given above), which creates iframe and loads documents list in it. If set to 0 - templater produces actual html list of topics enframed by DIV.

15. text_character_count Show specified number of characters from the beginning of forum text. 0 - do not constrain the size.

Related topics

 
components/built-in/forum_list.txt · Last modified: 07/06/2011 10:49 by admin
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki