Home arrow Forum mod_smf_recent_topics 1.7.1 can't be copied on page
  Welcome, Guest. Please login or register.
Did you miss your activation email?
January 08, 2009, 12:25:43 PM
Home New Posts Search Calendar


Login with username, password and session length
+  Joomla Forum
|-+  Joomla Hacks
| |-+  Joomla-SMF Forum Support
| | |-+  Joomla-SMF 1.1.x (Moderators: -Wolverine, kai920)
| | | |-+  mod_smf_recent_topics 1.7.1 can't be copied on page
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: mod_smf_recent_topics 1.7.1 can't be copied on page  (Read 1374 times)
Patrick Johnson
Joomla Newbie
*

Karma: +1/-0
Offline Offline

Posts: 43


View Profile
mod_smf_recent_topics 1.7.1 can't be copied on page
« on: June 05, 2006, 08:35:08 PM »

Hi,

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:
Code:
require_once( dirname( __FILE__ ) . "/mod_smf_recent_topics/recent_topics_lib.php" );

Is there a better way to solve this ?

Thanks
Patrick
Logged
-Wolverine
Moderator
Joomla Guru
*****

Karma: +376/-34
Offline Offline

Posts: 3393


Lead Developer


View Profile WWW
Re: mod_smf_recent_topics 1.7.1 can't be copied on page
« Reply #1 on: June 05, 2006, 11:29:02 PM »

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.
Logged

Need help?  Check Here First!
Get the JSMF User Guide
SEARCH this forum.
Patrick Johnson
Joomla Newbie
*

Karma: +1/-0
Offline Offline

Posts: 43


View Profile
Re: mod_smf_recent_topics 1.7.1 can't be copied on page
« Reply #2 on: June 06, 2006, 07:51:30 PM »

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.

Thanks much,
Patrick
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Joomla Forum | Powered by SMF 1.1 RC1.
© 2001-2005, Lewis Media. All Rights Reserved.
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

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
Joomla Hacks



Joomla Hacks
German Lang French Lang Italian Lang Spanish Lang Japanese Lang Chinese Lang
Search Contact About Advertise Blogs Topsites Submit News Register Login