Block Code 'Snippets'
are small blocks of reusable code that can be inserted in a TinyPortal Block
. They can range from the simple to the complex and can produce any number of results in your Blocks. Examples of some of the code snippets that are available are; Google Translate, Random Topics, SMF Gallery Block for SMF2 and many more.
TinyPortal comes with many block codes already included and available for you to use, like the Shoutbox, User block and the Themes block and these Block Code Snippets
give you even more choices for content that you can display on your site.
There are a few code snippets already included in TinyPortal. These 'blockcodes' can be used when defining a new block. When using the default blockcodes these are included a php code in the new block. Expert users may choose to tweak the blockcodes to their liking.
The pre-defined blockcodes types you can use are these:
Doc last Updated 15-05-2019 by @rjen
- Classic Recent Topics- The older classic recent topics news from TP v0.9.8.
- Gender Chart- Calculates male/female gender ratio from members database.
- Hello - A simple example of the blockcode.
- List Articles in categories - Code block that wil dynamically list the approved articles in a category. Articles are presented with clickable links, sorted by position. This code snippets uses category numbers '1, 2 and 3'. Update the array setting as desired.
- Mini calendar2 - A simple calendar to be used in a php-block, the code is from http://keithdevens.com/software/php_calendar , slightly modified. It simply displays the date and the days in current month/year. Current day is highlighted. Version 0.3 is updated to be used in SMF 2.1 and fit in the side bars.
- News Box - Show random news from the SMF news.
- Online Users Box - Show users currently online - using the built-in SSI function.
- Search articles - Search box for TinyPortal articles.
- Single Shout - Show a single latest shout or x latest shouts.
- Top Posters with Avatar - This block will show the avatar, username, and post count of the Top Posters on your site. Edit block to change the configuration.