Customizing SMF > Modifications and Packages
Content of the latest posts, 1.2.2 (SMF 1.1-1.1.18, 2.0-2.0.4)
davidhs:
Link to Mod
Content of the latest posts
ABOUT...
Content of the latest posts, 1.2.2
© 2010-2013 by davidhs
© Russian language 2010-2011 by Bugo
DESCRIPTION
The MOD ContentOfLatestPosts can show in any post on the forum a list with the content of the latest posts. The content to be displayed is sorted by date and grouped by board. It is also defined by several parameters:
* Content type: Can show the content of the post (post text and attachments; the default option), only the text, only the subject or only some information in the post (attachments, links, eLinks or images).
* Boards: Posts consulted may belong to the current board (the board of post which shows the list; the default option), any board (except board of deleted posts), a single board or several boards.
* Include child boards: Indicates if are consulted posts of child boards and untill level. Default is not included.
* Group posts by board: Results can be grouped by board or not. Default are grouped.
* Links to boards: Boards to which belongs each content is show in a navigation tree. May have link to all boards (the default option), only to last level or to none.
* Maximum number of posts by group: Indicates the maximum number of posts shown by group. Default is unlimited.
* Maximum number of posts by topic: Indicates the maximum number of posts shown by topic. Default is unlimited.
* Maximum age: Indicates the maximum number of days old of the content. Default is 0 days (shows only content posted today).
* Only unread posts: Posts consulted can be all (the default option), only recent unread topics, all unread topics or only updated topics.
* Date consulted: The age can be calculated with the creation date (the default option) or the last modification date of post. If content of posts often be corrected, it may be best to use the last modification date.
* Sticky topics: Indicates if the content is searched in all topics (the default option), only in sticky topics or only in non-sticky topics.
* Locked topics: Indicates if the content is searched in all topics (the default option), only in locked topics or only in unlocked topics.
There is also the option to define the header of the list, through BBCode. In the header can be used these tags, which represent some data:
* {TITLE}: Title of list.
* {TYPE}: Content type.
Administration panel
In administration panel can set the default value for each parameter.
Can also create up to 5 predefined lists, each with its parameters and header BBCode.
BBCode tag
To display a list of content of the latest posts you have to write the BBCode tag:
--- Code: ---[contentlatest predefined=... type=... boards=... child_boards=... group=... boards_link=... number_by_group=... number_by_topic=... age=... unread=... date=... sticky=... locked=...]text[/contentlatest]
--- End code ---
Parameters, all optional, are:
* predefined: Predefined list number. Permitted values: 1 to 5.
* type: Type of content. Permitted values: all (all), post (post), subject (subject), attachment (attachments), link (links), elink (eLinks), image (images).
* boards: Boards. Permitted values: Comma separated boards numbers or all (all).
* child_boards: Include child boards. Permitted values: empty or 0 (not include), number (maximum level to be included), all (all levels).
* group: Group posts by board. Permitted values: yes (yes), no (no).
* boards_link: Links to boards. Permitted values: all (yes, all), parent (yes, only last level), no (no).
* number_by_group: Maximum number of posts by group. Permitted values: empty, 0 or all (unlimited), number (maximum number).
* number_by_topic: Maximum number of posts by topic. Permitted values: empty, 0 or all (unlimited), number (maximum number).
* age: Maximum age in days.
* unread: Only unread posts. Permitted values: no (no), new (recent unread topics), all (all unread topics), replies (updated topics).
* date: Date consulted. Permitted values: create (creation date), modify (last modification date).
* sticky: Sticky topics. Permitted values: all (all topics), yes (only sticky topics), no (only not-sticky topics).
* locked: Locked topics. Permitted values: all (all topics), yes (only locked topics), no (only unlocked topics).
If any parameter not exists the value used is the value of predefined list or, if not exists, the default value, both defined in the administration panel.
The text between contentlatest begin and end tags is the title of the list. If text begins with "http://" is supposed to be the URL of an image. When you have set the header of the list, this text replaces the {TITLE} tag, if exists.
Appearance of the list
By default the list has the style of current theme, but can be changed in the file style.css (series SMF 1.1.x) or css/index.css (series SMF 2.0.x) of theme copying the CSS rules of the block
--- Code: ---/* BEGIN MOD ContentOfLatestPosts */
...
/* END MOD ContentOfLatestPosts */
--- End code ---
before of the block and editing.
EXAMPLES
SMF COMPATIBILITY
* SMF 1.1 to 1.1.18.
* SMF 2.0 to 2.0.4.
LANGUAGES
* english, english_british.
* russian (until version 1.1.4).
* spanish, spanish_es, spanish_latin.
If you want help translating it into other languages, you can add the translation in this topic.
DOWNLOAD
Link to MOD
MANUAL INSTALLATION
See http://docs.simplemachines.org/index.php?topic=402
SUPPORT AND COMMENTS
In English: http://www.simplemachines.org/community/index.php?topic=383432.0
In Spanish: http://www.simplemachines.org/community/index.php?topic=378552.0
CHANGE LOG
--- Code: ---Legend: ! Fixed + Added - Removed * Changed @ Note
1.2.2 2013-04-10
------------------
+ SMF compatibility: Adds 1.1.18.
+ SMF compatibility: Adds 2.0.4.
- SMF compatibility: Removes support to obsolete series 1.0.x and Beta and RC versions.
1.2.1 2012-12-22
------------------
+ SMF compatibility: Adds 1.0.23.
+ SMF compatibility: Adds 1.1.17.
+ SMF compatibility: Adds 2.0.3.
1.2 2012-04-08
------------------
+ Field in Administration panel and BBCode parameter to indicate if results are grouped by board or not.
+ Field in Administration panel and BBCode parameter to indicate the maximum number of posts shown by group.
+ Field in Administration panel and BBCode parameter to indicate the maximum number of posts shown by topic.
+ Field in Administration panel and BBCode parameter to indicate if are consulted only unread posts.
+ Redirect to Administration panel after install.
1.1.4 2011-12-24
------------------
+ SMF compatibility: Adds 1.0.22.
+ SMF compatibility: Adds 1.1.16.
+ SMF compatibility: Adds 2.0.2.
1.1.3 2011-09-20
------------------
! Use of integration hook integrate_modify_modifications in SMF 2.0.
+ SMF compatibility: Adds 1.1.15.
+ SMF compatibility: Adds 2.0.1.
1.1.2 2011-06-22
------------------
! Maximum age in days is not rounded.
+ SMF compatibility: Adds 1.1.14.
+ SMF compatibility: Adds 2.0.
* Uses integration hooks in SMF 2.0 RC4 and next.
1.1.1 2011-02-15
------------------
! Small adjustments to each version of SMF.
+ SMF compatibility: Adds 1.0 RC1 to RC2 and 1.0 to 1.0.21.
+ SMF compatibility: Adds 1.1 Beta 3 Public, RC1 to RC3 and 1.1 to 1.1.13.
+ SMF compatibility: Adds 2.0 Beta 3.1 Public and RC5.
1.1 2010-12-21
------------------
+ Field in Administration panel to write a description of each list (default and predefined).
+ Field in Administration panel to write a text to display if have not content.
+ Field in Administration panel and BBCode parameter to indicate if are consulted posts of child boards and until level.
+ Languages: Adds russian, russian-utf8, thanks to Bugo.
1.0.2 2010-11-07
------------------
+ SMF compatibility: Adds 2.0 Beta 4, RC1 to RC1.2 and RC4.
+ Languages: Adds english_british, english_british-utf8 (copy of english).
+ Languages: Adds spanish, spanish-utf8 (copy of spanish_es).
* Regular expression of links is used by SMF 2.0 RC4.
1.0.1 2010-05-28
------------------
! In administration panel, value of "BBCode of the header" fields could not have tags with parameters quoted.
1.0 2010-05-26
------------------
+ Administration panel and BBCode tag.
+ SMF compatibility: 2.0 RC2 to RC3.
+ Languages: english, english-utf8, spanish_es, spanish_es-utf8, spanish_latin, spanish_latin-utf8.
--- End code ---
Kreator:
Hmm, I assume you stick the bbc code into a post... only I just get the bbc tag returned each time I post it, as follows
[contentlatest predefined=all type=all boards=all boards_link=all age=60 date=modify sticky=all locked=all]LATEST CONTENT[/contentlatest]
so whats happening? checked that there is a bb code for contentlatest in ACP
davidhs:
This happens because the value of the parameter "predefined" is wrong (only can take 1 to 5).
--- Quote from: davidhs on May 26, 2010, 01:15:53 AM ---Parameters, all optional, are:
* predefined: Predefined list number. Permitted values: 1 to 5.[...]
--- End quote ---
But in your case does not have to use this parameter. Write only:
--- Code: ---[contentlatest type=all boards=all boards_link=all age=60 date=modify sticky=all locked=all]LATEST CONTENT[/contentlatest]
--- End code ---
Because the default values of the pameters this is equivalent:
--- Code: ---[contentlatest boards=all age=60 date=modify]LATEST CONTENT[/contentlatest]
--- End code ---
Both shows list of all posts (text and attachment of each post), in all boards, with link in all navegation tree, modified in the last 60 days, sticky or non-sticky, and locked or unlocked.
Use the parameter "predefined" only in you define a predefined list in administration panel.
davidhs:
New version:
--- Code: ---Legend: ! Fixed + Added - Removed * Changed @ Note
1.0.1 2010-05-28
------------------
! In administration panel, value of "BBCode of the header" fields could not have tags with parameters quoted.
--- End code ---
vicram10:
nice mod..
congrats ;)
Navigation
[0] Message Index
[#] Next page
Go to full version