We have mod_smf_recent_topics included in the left hand column for all pages on the site. For one page, we also want to include it in the center column (so it will be on the page twice, with different parameters).
This doesn't work, due to the definition of removeTrailingSlash on line 337. (Causes a multiply-defined error).
My solution was to create a directory modules/mod_smf_recent_topics and to move the function definition to the file modules/mod_smf_recent_topics/recent_topics_lib.php.
Then at the start of mod_smf_recent_topics.php, I inserted:
that should work Patrick. Didn't ever really think anyone would want it twice, but it seems I learn something new everyday. Next release I'll either pull it out and put it in a library like you have done or simply merge that code back into the main.
It is a little odd to have it on the page twice, but we wanted to spotlight it on one page, and keep the consistent left-hand nav layout as well. Also, Joomla doesn't have a "put this on every page EXCEPT ..." setting, so leaving something off of only one page is a pain in the neck.
Joomla Hacks is a Joomla Components, Joomla Modules, Joomla Templates, & Joomla Mambots resource portal. None of the text or images in this public website may be copied without the expressed written consent of the authors. Copyright 2005 by JoomlaHacks.com. Powered by Joomla. All rights reserved. Terms of Use