Additional Info
Type
Package ID
TestMonkey:ssi_topicNews
First Created
February 06, 2007, 07:41:03 PM
Last Updated
August 26, 2007, 10:38:44 PM

ssi_topicNews v0.8

This Mod Adds to your SSI.php a function that allows you to get and display a specific topic.
Compatible With 1.1.1, 1.1.2
Latest version v0.8
Downloads 31,204
Reviews 0
Rating 0/5
Subscribers 0
License (View License)
Author(s)
-- READ - Module no longer being updated ------
Try this module instead:
http://custom.simplemachines.org/mods/index.php?mod=751
------------------------------------------------------------
My Module has not been tested for 1.1.3 but should work fine.
------------------------------------------------------------

Thank you for you're interest in ssi_topicNews Mod by James L. Moss aka: TestMonkey.

This Mod is an updated and packaged version of the function originally posted and created by sting in this thread:
http://www.simplemachines.org/community/index.php?topic=78532.0

This Mod Adds a function that allows you to get and display a specific topic as an single story or article.

Example usage:
    ssi_topicNews($topic, $limit = null, $start = null, $length = null, $link = null, $output_method = 'array');

Changelog:
ssi_topicNews v0.8
- Changed the parse_bbc call to point to ID_TOPIC instead of ID_MSG this fixes a forum error log msg.

ssi_topicNews v0.7
- Cleaned up and changed the default output to a cleaner div style layout and removed the hard coded font coloring.

ssi_topicNews v0.6
- Cleaned up the cutoff/length code so it works more correctly helping to keep the output correct and more predictable.
- Shifted the parse_bbcode call up some to insure any and all output is sent thru it.

ssi_topicNews v0.5
- Cleaned up code a bit, updated the $length/$cutoff code to work correctly like how ssi_BoardNews() is done currently.
- Added new option $link, which allows you to pass a url into the function which generates a "Read More..." link.

ssi_topicNews v0.4
- Install Scripts now use install.mod and uninstall.mod so the package now cleanly uninstal's the modification.

ssi_topicNews v0.3
- Cleaned up the package install scripts

ssi_topicNews v0.2
- Added $board = null; to the function to eleminate errors in the forum logs.
- Added code to turn $topic into an integer
- Added code to default to $topic 2 which is the default first post if $topic 0 or 1 was defined

ssi_topicNews v0.1
- First release

TODO List:
- Keep Optimising the code in ssi_topicNews();
- Add upgrade ability to the package for version 1.0 and higher

Notes:
1) $topic 0 or 1 can not be selected, It will default to 2 the default SMF first post..
2) If you get an parse error while trying to install the mod, go into:
    Packages -> Options, and Change all file permissions throughout the forum such that:: All files are writable.
    -OR-
    Manually chmod SSI.php to 666 or 777 through an ftp program.
    Now try to apply the modification again and it should work.
3) You need to play with the $length value some to get the desired short headline output.
4) If you use the $link variable it needs to point to the full story somewhere.

Contributors and other credits:
- Major credit to the SMF team for creating SMF & SSI.php especially for the functions we can use as a reference.
- Major credit to [Unknown] for all the hard work he's done and still does.
- Sting for the original code he posted here: http://www.simplemachines.org/community/index.php?topic=78532.0
- Credit to winrules for noticing and suggesting the font color change in v0.7

Keep in mind this mod is still being developed.
Understand it works fine now but will keep being improved apon check for updates.
Manual installation info
You have to register or login to be able to leave a review
There are currently no reviews on this customization
Advertisement: