MDN

Go Back   Mambo - Forums Closed for posting > Mambo 3rd Party Addons > Components

Reply
 
Thread Tools Search this Thread Display Modes
Old January 25th, 2005, 05:52   #1
dahek
 
Join Date: Dec 2004
Posts: 9
dahek is on a distinguished road
Default The same component twice

How can I install the same component twice
under the same mambo ?
dahek is offline   Reply With Quote
Old January 25th, 2005, 09:40   #2
dahek
 
Join Date: Dec 2004
Posts: 9
dahek is on a distinguished road
Default Because

Because Mambo don't have sub categories and
some components dont have option to support
multiplie databeses !!!!!
dahek is offline   Reply With Quote
Old January 25th, 2005, 09:56   #3
Fuga
 
Join Date: May 2004
Posts: 64
Fuga is on a distinguished road
Default

Quote:
Originally Posted by kochp
Why the heck would you want to do that?
Do you also install word twice on windows to edit a second file?
i need that too because i would like to change my sections and categorys layout
Fuga is offline   Reply With Quote
Old January 25th, 2005, 12:02   #4
pagerefiner
 
Join Date: Dec 2004
Location: Chesapeake, Virginia USA
Posts: 165
pagerefiner is on a distinguished road
Default

Quote:
Originally Posted by dahek
How can I install the same component twice
under the same mambo ?
Which component?

You can make a copy of a component, but it takes a little bit of work depending on the size of the component.

1) Copy the original component directory and assign it a new name. You need to copy both the site (frontend) and admin directories.

2) Rename each of the component files based on the new directory name. This is important because Mambo looks for files in the component directory based on the directory name less the com_ part of the directory name. So if you created a com_weblinks2, the file named weblinks.html.php should be changed to weblinks2.html.php, and so on for all of your files.

3) You need to do a bunch of searches within each component file to change all references to the component name in your urls. Using the above example, do a search for com_weblinks and change all instances of it to com_weblinks2. You will usually see these in redirects, urls, and in some ACL related code.

4) Do a search in each file for all occurrences of #__ and changes the name of all tables to the new table name that you will create in the next step. For the com_weblinks component, you would change all instances of #__weblinks to #__weblinks2 (or whatever other name you decided to use for table name). The #__ is a shorthand notation used by the Mambo API to eliminate the need to add a table prefix variable to each table in a query. If your default table prefix was mos_, the #__ would be replaced by mos_ for all table names.

5) Use something like phpMyAdmin to load your database. Copy the original table(s) for the components and rename it/them. For example, copy and rename mos_weblinks to mos_weblinks2.

6) Open your mos_components table and browse for all records with a option column value of the original component name. For example, look for all fields with a option column value of com_weblinks. You may have to change the component name in up to three fields in some components. You need to make duplicate records of each of these records and change all occurences of the original component name to the new component name for the new set of records. You should also change the parent component record to a more descriptive name so you can distinguish it from the original component when the admin menu appears.

7) If you have separate modules for the component, you will need to perform a similar set of operations if you want to clone the modules as well.

The above is a bit time consuming, but it works. For something simple like com_weblinks its possible to clone these at the rate of one per half hour or less after you learn the basics. For something like com_simpleboard, it might take and hour or so.

In any case, it's possible if you have the time to do it.
pagerefiner is offline   Reply With Quote
Old January 25th, 2005, 23:37   #5
dahek
 
Join Date: Dec 2004
Posts: 9
dahek is on a distinguished road
Default

Thnaks !!!!

someone knows when Mambo will support sub categories???
dahek is offline   Reply With Quote
Old January 26th, 2005, 02:54   #6
mmx
 
Join Date: Oct 2003
Location: Virginia Beach, VA USA
Posts: 715
mmx is on a distinguished road
Default

Quote:
Originally Posted by dahek
Thnaks !!!!

someone knows when Mambo will support sub categories???
Mambo 5.0.
__________________
mmx
mmx is offline   Reply With Quote
Old January 26th, 2005, 02:56   #7
mmx
 
Join Date: Oct 2003
Location: Virginia Beach, VA USA
Posts: 715
mmx is on a distinguished road
Default

The first sentence from pagerefiner reads 'Which component?". She might have what you want.
__________________
mmx
mmx is offline   Reply With Quote
Old January 26th, 2005, 04:30   #8
dahek
 
Join Date: Dec 2004
Posts: 9
dahek is on a distinguished road
Default

When it will be ready for download ????
dahek is offline   Reply With Quote
Old January 26th, 2005, 07:46   #9
mmx
 
Join Date: Oct 2003
Location: Virginia Beach, VA USA
Posts: 715
mmx is on a distinguished road
Default

Quote:
Originally Posted by dahek
When it will be ready for download ????
Mambo 5.0 will come much later this year. Most of the work is deep into the research and development stages. A lot of experimentation is going on and many of the ideas for 5.0 have not been implemented yet in CVS.
__________________
mmx
mmx is offline   Reply With Quote
Old January 27th, 2005, 05:23   #10
jschone
 
Join Date: Dec 2004
Posts: 16
jschone is on a distinguished road
Default Component twice

Hi,

Depending on what your goal is with using the component twice: In some cases you could use Mambelfish for it: just upload new "language files" (for example all the same languages, just make the changes you need, and use the mambelfish as a navigation instead of a language switch). Content/compontents that doesn't/don't change you can leave as is.

Maybe not the right solution, and works only if your site is not multilanguage, but it works if you really need it...


Jochem
jschone is offline   Reply With Quote
Old January 30th, 2005, 02:47   #11
dahek
 
Join Date: Dec 2004
Posts: 9
dahek is on a distinguished road
Default

Thanks
dahek is offline   Reply With Quote
Old February 10th, 2005, 19:59   #12
vavroom
 
Posts: n/a
Default

Quote:
Originally Posted by kochp
Why the heck would you want to do that?
Actually, looking at doing that myself, because I need a photo gallery, and a "shop". The client does not want a shop system, he just wants to use the same familliar photo gallery to display his products, and include prices in the description area. I've attempted to convince him that he doesn't want that, that it would be best with an actual shop component, but he's deadset against it.

And I need to have it twice in rather than just once, because he doesn't want his ware's categories to be displayed with his photo categories.

So, there, a somewhat valid reason to have to do it. I don't particularly relish editing all the files though, but if that's what it takes to make the client happy, well, then that's what it takes. Unless someone has a better solution for me, I'd love to hear it (and no, telling the client to go jump is not an option!)
  Reply With Quote
Old February 11th, 2005, 01:43   #13
kai
 
Join Date: Mar 2004
Location: Oldenburg, Germany
Posts: 133
kai is on a distinguished road
Default

Hi,

you should take a look at the Menalto Gallery.
- you can link into a nested Album from the mainmenu and disable the navigation / link back to the toplevel albums.
- you can also install this Gallery twice, there is a component for a second installation available.

Just my idea for your actually problem
Kai
__________________
gallery-addons.com
kai is offline   Reply With Quote
Old February 11th, 2005, 05:08   #14
vavroom
 
Posts: n/a
Default

Yes, I've looked at Menalto, and would much rather do that, but client in this case wants everything mambo based, doesn't want "a bunch of different complications to be confused with"... <shrug> Sometimes, not much can be done about what a client wants...
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
component for creating tabled data with user defined fields. rambo Components 2 November 26th, 2004 14:34
Changes to 4.5.1 will prevent or hinder component upgrades gkemp 4.5.1 10 September 22nd, 2004 05:29
Users Component Under Development MamboJoe Components 48 August 31st, 2004 09:46
How to make multiple entries in the menu for a single component? builderchad Custom Development 0 July 6th, 2004 03:40
Error bei jeder Art von Installation XontaX German Forum 14 April 14th, 2004 11:09


All times are GMT -7. The time now is 08:53.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.