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”.

Example:

<script type="text/javascript">
<!--
	var smart_forum_list = {};
	smart_forum_list.name = 'test_obj';
	smart_forum_list.forum_id = 1;
	smart_forum_list.codename = '';
	smart_forum_list.width=600;
	smart_forum_list.height=400;
	smart_forum_list.scrolling = "auto";
	smart_forum_list.columns = "owner,date_created,topic_name,body_text";
	smart_forum_list.text_character_count = 30;
	smart_forum_list.template = "forum/forum_list.html";
	smart_forum_list.link_new_window = '1';
	smart_forum_list.page_size = 3;
	smart_forum_list.show_paging = 1;
	smart_forum_list.current_page = 1;
	smart_forum_list.css_main_table = "table_docs";
	smart_forum_list.css_paging_table = "table_options";
//-->
</script>
 
<script type="text/javascript" src="/intranet/forum/show_smartforum.js"></script>

This method inserts an iframe with topics list into the page. iframe is inserted to the same location of the page where javascript file show_smartdocuments.js is included.

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

If you are using codename this line must be removed:

 smart_forum_list.forum_id='1';

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.

 
help/smart_objects/forum_list.txt · Last modified: 07/06/2011 04:49 by admin
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki