Jueves, 24 Abril 2014 18:22
beggarly

Using mutiple instances of the module

Filters news by the current section and category

Using mutiple instances of the module

Postby Waterbaby999 » Wed Apr 15, 2009 7:18 pm

Hi all,

There was another post on this matter but it doesn't answer my question.

I wanted to use a couple of instances of this module, and I did the regular procedure of renaming the relevant files, updating the .xml file, installing the module and so forth.

When I enable the module, my site just goes blank (i.e. white screen, no text, so nothing to debug with).

Any suggestions? Am I missing something?

I just renamed the files by putting a 2 at the end, and its installed as mod_filterednews2 - all the files are visible via FTP and permissions appear OK. Assume I've missed something!

Ruth
Waterbaby999
Fresh Boarder
Fresh Boarder
 
Posts: 13
Joined: Wed Apr 15, 2009 7:15 pm

Re: Using mutiple instances of the module

Postby chus » Fri Apr 17, 2009 4:24 pm

Hi!

Why don't you copy the module the easy way by going to your Module Manager, selecting Filtered News and clicking on Copy from the top menu?
User avatar
chus
Administrator
Administrator
 
Posts: 455
Joined: Thu Sep 13, 2007 2:21 am
Location: Costa Rica

Re: Using mutiple instances of the module

Postby Waterbaby999 » Fri Apr 17, 2009 9:04 pm

Because I want to completely change the styling of the second instance - I don't think you can do that by using the method you describe, as this simply uses the same module settings in another location.

Unless of course someone can make me feel like a fewl and point out the obvious, question still stands :)

Ruth
Waterbaby999
Fresh Boarder
Fresh Boarder
 
Posts: 13
Joined: Wed Apr 15, 2009 7:15 pm

Re: Using mutiple instances of the module

Postby chus » Mon Apr 20, 2009 5:55 pm

You can have indeed different settings for each copy of a module.
User avatar
chus
Administrator
Administrator
 
Posts: 455
Joined: Thu Sep 13, 2007 2:21 am
Location: Costa Rica

Re: Using mutiple instances of the module

Postby Waterbaby999 » Mon Apr 20, 2009 6:29 pm

I am not talking about the module settings - I want to completely change the layout, the CSS styling, the icons used for bullet points - in fact one module needs to be an ordered list.

As far as I am aware, that is not possible when simply creating a new module by going New>choose module type as it's calling from the same CSS files etc, so if I changed these it would affect all modules which are using that css file. I don't want that to happen!

I want each instance of the module to be completely different in terms of its layout and CSS styling - the only way I know of doing this is by copying the module installer and renaming it so it's a totally different folder in the "modules" folder and hence allows you to change the styling/layout without altering the first instance.

Hope that makes sense, still no closer to figuring out the random blank pages though, sure it's something I've overlooked.

Ruth
Waterbaby999
Fresh Boarder
Fresh Boarder
 
Posts: 13
Joined: Wed Apr 15, 2009 7:15 pm

Re: Using mutiple instances of the module

Postby chus » Mon Apr 20, 2009 7:10 pm

In that case you need to rename mod_filterednews.php and mod_filterednews.xml and change the corresponding file names in mod_filterednews.xml. Then you also need to rename the modFilteredNewsHelper class everywhere it appears in mod_filterednews.php and helper.php.
User avatar
chus
Administrator
Administrator
 
Posts: 455
Joined: Thu Sep 13, 2007 2:21 am
Location: Costa Rica

Re: Using mutiple instances of the module

Postby Waterbaby999 » Mon Apr 20, 2009 7:34 pm

Ahh ok I did all the bits except the latter - that might well be where it is breaking things. Will give it a try this evening and get back to you :)

Ruth
Waterbaby999
Fresh Boarder
Fresh Boarder
 
Posts: 13
Joined: Wed Apr 15, 2009 7:15 pm

Re: Using mutiple instances of the module

Postby Waterbaby999 » Tue Apr 21, 2009 11:07 pm

Thanks for the advice, my site now doesn't break, however it is still referencing the default.php from the original module and I can't for the life of me figure out where it's pointing from. I need to change this as I want one module to be an ordered list and the other to be bulleted.
Waterbaby999
Fresh Boarder
Fresh Boarder
 
Posts: 13
Joined: Wed Apr 15, 2009 7:15 pm

Re: Using mutiple instances of the module

Postby Waterbaby999 » Thu Apr 30, 2009 9:04 pm

Any help with this would be greatly appreciated - I have tried troubleshooting but am getting nowhere. I've got the module installed and working fine but as I mentioned in the earlier message it's using the wrong file for default.php (using the one in the original location)

Ruth
Waterbaby999
Fresh Boarder
Fresh Boarder
 
Posts: 13
Joined: Wed Apr 15, 2009 7:15 pm

Re: Using mutiple instances of the module

Postby chus » Thu May 07, 2009 2:36 am

Hi!

It must be due to mod_your-own/mod_your-own.php line 92
Code: Select all
require(JModuleHelper::getLayoutPath('mod_filterednews', $layout));

You problably need to change it to
Code: Select all
require(JModuleHelper::getLayoutPath('mod_your-own', $layout));
User avatar
chus
Administrator
Administrator
 
Posts: 455
Joined: Thu Sep 13, 2007 2:21 am
Location: Costa Rica

Next

Return to Filtered News



Who is online

Users browsing this forum: No registered users and 1 guest