How can I use a Module for more than one Website

Moderator: joomlalearn

Post Reply
uksaeed
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Thu Jun 02, 2011 4:26 pm

How can I use a Module for more than one Website

Post by uksaeed » Sun Mar 31, 2013 7:49 pm

Hi
I've created a custom module for Joomla 2.5, and I'd like to use this module for a few sites, but I don't have any experience at this area.

Could you please give a direction to sort out this problem.

Regards,
Saeid

www.bazarlondon.com

User avatar
muddauber
Joomla! Ace
Joomla! Ace
Posts: 1518
Joined: Thu Jun 08, 2006 11:26 pm

Re: How can I use a Module for more than one Website

Post by muddauber » Mon Apr 01, 2013 6:52 am

Here is some documentation on creating a module.

http://docs.joomla.org/How_do_you_creat ... _module%3F

JommFoss
Joomla! Intern
Joomla! Intern
Posts: 71
Joined: Wed Mar 13, 2013 12:22 pm

Re: How can I use a Module for more than one Website

Post by JommFoss » Mon Apr 01, 2013 7:05 am

Go to Administrator > Extensions > Template Manager > Options > Global Configuration for Templates > Preview Module Positions set Enabled.

View all modules positions by adding ?tp=1 to the end of your URL such as http://example.com/index.php?tp=1.

If you need to add more position then you should work on index.php & xml file in your template folder.

JommFoss
Joomla! Intern
Joomla! Intern
Posts: 71
Joined: Wed Mar 13, 2013 12:22 pm

Re: How can I use a Module for more than one Website

Post by JommFoss » Mon Apr 01, 2013 7:09 am


JommFoss
Joomla! Intern
Joomla! Intern
Posts: 71
Joined: Wed Mar 13, 2013 12:22 pm

Re: How can I use a Module for more than one Website

Post by JommFoss » Mon Apr 01, 2013 7:10 am

Take look at this link also:
http://www.techguywebsolutions.com/crea ... odule.html

Hope those links help you...

User avatar
subrat
Joomla! Ace
Joomla! Ace
Posts: 1039
Joined: Sat Jul 08, 2006 7:36 am
Location: India
Contact:

Re: How can I use a Module for more than one Website

Post by subrat » Mon Apr 01, 2013 2:28 pm

cant you just zip the files from the current website, correct the xml file if its not set properly and install like any other module on your other sites?
Quality WebDevelopment at http://www.webworkwiz.com
Affordable hosting http://www.vsmhosting.com

JommFoss
Joomla! Intern
Joomla! Intern
Posts: 71
Joined: Wed Mar 13, 2013 12:22 pm

Re: How can I use a Module for more than one Website

Post by JommFoss » Tue Apr 02, 2013 7:57 am

You can not do that, becuse all codes for position are in index.php of your template.

JommFoss
Joomla! Intern
Joomla! Intern
Posts: 71
Joined: Wed Mar 13, 2013 12:22 pm

Re: How can I use a Module for more than one Website

Post by JommFoss » Tue Apr 02, 2013 7:59 am

see below example:
file > templateDetails.xml
......
<positions>
<position>position-1</position>
<position>position-2</position>
<position>position-6</position>
<position>position-7</position>
<position>position-14</position>
</positions>
....

NOW see the index.php:
...............
<?php if($this->countModules('position-2')) : ?>
<div id="pathway" >
<jdoc:include type="modules" name="position-2" />
<div class="clr"></div>
</div>

..............

JommFoss
Joomla! Intern
Joomla! Intern
Posts: 71
Joined: Wed Mar 13, 2013 12:22 pm

Re: How can I use a Module for more than one Website

Post by JommFoss » Tue Apr 02, 2013 8:01 am

After changing the templateDetails.xml
you need to change the index.php in your template folder.
and if you use any class or id you have to chnage or add new code in css file also. :)

User avatar
subrat
Joomla! Ace
Joomla! Ace
Posts: 1039
Joined: Sat Jul 08, 2006 7:36 am
Location: India
Contact:

Re: How can I use a Module for more than one Website

Post by subrat » Tue Apr 02, 2013 8:06 am

@jommfoss, I am not sure if I understand clearly, as per uksaeed, he has created a custom module and wants to use that module in other sites too. If that is the case then do you need to edit the template index file to install a new module?
Quality WebDevelopment at http://www.webworkwiz.com
Affordable hosting http://www.vsmhosting.com

JommFoss
Joomla! Intern
Joomla! Intern
Posts: 71
Joined: Wed Mar 13, 2013 12:22 pm

Re: How can I use a Module for more than one Website

Post by JommFoss » Tue Apr 02, 2013 8:21 am

Hey Subrat, i think you are right :)
I follow the last post & did not mention the first question :)
as uksaeed said, should zip all files & install it by backend. If the module codes/files are fine then the module will work properly.

see this link: http://www.inmotionhosting.com/support/ ... l-a-module

JommFoss
Joomla! Intern
Joomla! Intern
Posts: 71
Joined: Wed Mar 13, 2013 12:22 pm

Re: How can I use a Module for more than one Website

Post by JommFoss » Tue Apr 02, 2013 8:22 am

Tnx @subrat for notice that :)


Post Reply

Return to “Persian Forum”