Members: 16,996
Threads: 38,846
Posts: 159,391
Online: 25

Newest Member: Kl_broka@rediffmail.com


Odoo.tv - Outdoor Television


Sedo - Domains kaufen und verkaufen das Projekt mambers.com steht zum Verkauf Besucherstatistiken von mambers.com etracker® Web-Controlling statt Logfile-Analyse

Go Back   Mambers.com > Development > Module 'How Do I' Questions

Reply
 
LinkBack Thread Tools Display Modes
Old 13.04.2004, 00:07   #1 (permalink)
Baby Mamber
 
Join Date: Apr 2004
Posts: 4
nickc is on a distinguished road
Default Is there an easy way to create multiple instances/copies of a module

Hi all,

I've only recently discovered Mambo, and so far after trying *all* of the other CMS-type packages (e107, phpnuke, xaraya etc..), I think it's by far the best. Anyway, on to my point;

I know a *little* PHP, but next to no Mambo, so I'm posting to ask is it possible to re-use a module, but with different parameters/title etc? I've written (well, cobbled together from various OS scripts/modules) a game server module which will give info for different types of game server (Q3, UT2003/4 etc.) and I have a module which displays serer name, map name, optionally displays a thumbnail of the current map, but I don't want to have to physically copy the module just for a different game server. I am currently specifying the id of the server in a module parameter, so I would think it's possible to reuse it with a different parameter, I just can't see how. I'm still learning Mambo, so I probably missed something *really* obvious.

Thanks to anyone who can help me.
nickc is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 13.04.2004, 00:14   #2 (permalink)
Senior Mamber
 
SvenErik's Avatar
 
Join Date: Apr 2004
Location: Mo i Rana, Norway (66°19'N 14°09'E)
Posts: 214
SvenErik is on a distinguished road
Default Re: Reusing modules

I am afraid not. It is only possible to have a module displayed one place. If you want to have the same module several places as you stated, you have to give each module a different name in the module and in the installation X;L file and install each one.
__________________
"Every demand is a prison, and wisdom is only free when it asks nothing."
Sir Bertrand Russell
SvenErik is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 13.04.2004, 00:18   #3 (permalink)
Baby Mamber
 
Join Date: Apr 2004
Posts: 4
nickc is on a distinguished road
Default Re: Reusing modules

Quote:
Originally Posted by SvenErik
I am afraid not. It is only possible to have a module displayed one place. If you want to have the same module several places as you stated, you have to give each module a different name in the module and in the installation X;L file and install each one.
Thanks - I was just about reaching that conclusion Thought I must have missed something. OK, I'll have to either change the parameters to be a comma-separated list of servers, or create separate modules - one for each gametype - won't be hard, I just hoped it would be easier

Thanks again
nickc is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 13.04.2004, 08:52   #4 (permalink)
Professional Mamber
 
stingrey's Avatar
 
Join Date: Apr 2004
Location: Marikina, Manila, Philippines
Posts: 776
stingrey is on a distinguished road
Default Re: Reusing modules

Actually it is possible to have multiple instances of a module without actually have to physically create multiple seperately named copies of your module.

What you have to do is play with the database.
The mymenu component is based on this very premise as it creates multiple instances of the mod_mainmenu.php module.

So how do you do this, read here for alwarren's ecxcellent howto:
http://forum.mamboserver.com/viewtop...183&highlight=

And yes you are able to set different parameters for your modules once they have been created.


It is also the premise that is underpinning my component discussed here:
General Component Programming Question

I am looking at extending the components ability to allow the creation of multiple instances of any module, just got to figure out how people will be be able to add their own modules to the list.
__________________
Joomla! Core Team Member
Software Coding & Design - Stability Team Leader
www.joomla.org
Former Mambo Core Team Member
stingrey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 13.04.2004, 10:41   #5 (permalink)
Baby Mamber
 
Join Date: Apr 2004
Posts: 4
nickc is on a distinguished road
Default Re: Reusing modules

Thanks - I'll check that out.
nickc is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 13.04.2004, 12:00   #6 (permalink)
Senior Mamber
 
Join Date: Mar 2004
Posts: 121
alwarren is an unknown quantity at this point
Default Re: Reusing modules

Quote:
Originally Posted by stingrey
Actually it is possible to have multiple instances of a module without actually have to physically create multiple seperately named copies of your module.

What you have to do is play with the database.
The mymenu component is based on this very premise as it creates multiple instances of the mod_mainmenu.php module.

So how do you do this, read here for alwarren's ecxcellent howto:
http://forum.mamboserver.com/viewtop...183&highlight=
I've also added the howto to Mosforge to protect it from forum pruning - http://mosforge.net/snippet/detail.p...=snippet&id=13
alwarren is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 13.04.2004, 14:09   #7 (permalink)
Junior Mamber
 
Jason407's Avatar
 
Join Date: Apr 2004
Location: Orlando, Florida
Posts: 27
Jason407 will become famous soon enough
Default Re: Reusing modules

Quote:
Originally Posted by stingrey
What you have to do is play with the database.
The mymenu component is based on this very premise as it creates multiple instances of the mod_mainmenu.php module.
Shhhh....you are giving away all my secrets!!!!
__________________
Jason
www.jasonmurphy.net
Jason407 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 14.04.2004, 07:26   #8 (permalink)
Professional Mamber
 
stingrey's Avatar
 
Join Date: Apr 2004
Location: Marikina, Manila, Philippines
Posts: 776
stingrey is on a distinguished road
Default Re: Reusing modules

Quote:
Shhhh....you are giving away all my secrets!!!!
Ok, no worries...mum's the word (how did that phrase ever come about, oops I'm digressing), your secret is safe with me.

So long as you promise not to tell anyone, especially that jason fellow that I'm, using his component as a basis for my component

Remember, secret squirrel
__________________
Joomla! Core Team Member
Software Coding & Design - Stability Team Leader
www.joomla.org
Former Mambo Core Team Member
stingrey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 29.04.2004, 04:50   #9 (permalink)
Senior Mamber
 
TJay's Avatar
 
Join Date: Apr 2004
Location: New Orleans
Posts: 167
TJay is on a distinguished road
Default Re: Reusing modules

Dang
That didnt work, I set the modules up, and I do indeed get two copies of the same module, but what I put different parameters in for the weather location I get the same weather on bout modules

Check out www.jonezing.com click on the Roanoke and New Orleans sections and watcht the MyWeather module, some things change but its giving me the same weather for both places

WHat do I do now?
Can you make seperate copies if you have to?

TJay
TJay is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Module -> unable to use 'Install from Directory' option afru Module 'How Do I' Questions 7 04.01.2005 15:37
Problem installing new modules afru Module 'How Do I' Questions 0 11.04.2004 18:55
forum for modules and components [Resolved] doggystyle Feedback 4 08.04.2004 22:56
Hide titles of modules romanus Module 'How Do I' Questions 9 08.04.2004 02:29
Template modules TheGreek Template Discussions 10 08.04.2004 00:27


All times are GMT +2. The time now is 03:26.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
A vBSkinworks Design
© Copyright 2004-2008 by Arthur Konze Webdesign.