
Finally, it is all coming together. Joomla installed, all extensions I want installed into Joomla, some other nice to have extensions also. This is what I'm using for the new community site I'm working on:
- Community Builder - the basis for any community site
- Gallery2 - an image gallery with a gazillion features. Most of them should be turned off I think so that the community users aren't overwhelmed by all possibilities...
- FireBoard - a forum extension. Pretty nice, not too feature heavy but still got what counts.
- JoomlaPack - a backup-solution for your entire site - be sure to use it!!!
One thing that really amazes me is that I haven't had to code a single line of PHP, almost...
Mostly it's all been down to configuration. Actually a lot of configuration. But hey, for one hour of configuration I get 50-100 hours of code for free, so there's no point in compaining about that.
About the 100% configuration almost, well, one specific functionality that I wanted was to show the latest image comments from the gallery. But that module had not yet been released. So I went ahead and made a simple SQL-executor-with-a-row-template-kind-of-module. Works pretty nice actually. Also I'm pretty sure I'll have use for it in the future as well.
It lets you execute any SQL and then format the rows as you please. Very flexible. Maybe not exactly the Joomla-API-way, but good enough for me, for now.
Here's the important piece of code for the module:
echo '<div class="moduletable"><ul><li>';
$result = mysql_db_query($db_name, $sql);
while ($row = mysql_fetch_assoc($result)) {
$rowTpl = $tpl;
$keys = array_keys($row);
for ($i = 0; $i < sizeof($keys); $i++) {
$key = $keys[$i];
$val = $row[$key];
//echo '==>' . $key . '=' . $val . '<br/>';
$rowTpl = str_ireplace('#'.$key.'#', $val, $rowTpl);
}
echo $rowTpl;
//echo '<hr>';
}
echo '</li></ul></div>';
No comments:
Post a Comment