English (United Kingdom)
Jms Multi Site, formerly joomla multisite.
Create, share multiple joomla sites in few clicks !
Message
  • EU e-Privacy Directive

    This website uses cookies to manage authentication, navigation, and other functions. By using our website, you agree that we can place these types of cookies on your device.

    View e-Privacy Directive Documents

Welcome, Guest
Please Login or Register.    Lost Password?
Go to bottomPage: 1
TOPIC: A multisites aware component?
#10096
A multisites aware component? 11 Years, 11 Months ago Karma: 0
Hi Ed,

I am building a component to be shared across a multisite network. On the backend (admin) I want particular views to be available depending on whether it is the master site or one of many slave sites.

I'm guessing I could use Joomla ACL but I've not used the ACL yet?

Is there a better way?

for example
if ($site_type="slave")
I want to put this in the helper.php file (I think), so different submenu options appear.

Maybe I could set $slave_type in the configuration file

Have you any advice?
Techbot
Fresh Boarder
Posts: 14
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#10101
Re: A multisites aware component? 11 Years, 11 Months ago Karma: 54
Under Joomla 2.5, the ACL is effectivelly a solution to restrict the access to specific extensions.

By default, the slave sites have their own menu, articles, ...., content and therefore it is not connected on your master.
In your example, you gave a sample with submenu.
We don't think this is required as you have a specific slave site with specific menu.

The only case where the ACL could be required is when you create a slave site that also contain specific extension installed and that you wouldn't let the user access it. In this case, you could create an ACL group that restrict the access to the extension.
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#10103
Re: A multisites aware component? 11 Years, 11 Months ago Karma: 0
edwin2win wrote:
[quote]

By default, the slave sites have their own menu, articles, ...., content and therefore it is not connected on your master.

This is for a component submenu NOT a menu item or menulist


The submenu is found in helper.php so IS THE SAME for slave and master

eg

helper.php
Code:



public static function addSubmenuDefault($vName)
{
JSubMenuHelper::addEntry(
"Setup",
'index.php?option=com_markets&view=saasmarkets',
$vName == 'markets'
);
JSubMenuHelper::addEntry(
"Manage Profiles",
'index.php?option=com_markets&view=profiles&task=listProfiles',
$vName == 'profiles'
);



see administrator/components/weblinks/helper/weblinks.php for similar code

so what I want is:

Code:



public static function addSubmenuDefault($vName)
{

if(!$slave_site){

                         JSubMenuHelper::addEntry(
"Setup",
'index.php?option=com_markets&view=saasmarkets',
$vName == 'markets'
);

}
else{

JSubMenuHelper::addEntry(
"Manage Profiles",
'index.php?option=com_markets&view=profiles&task=listProfiles',
$vName == 'profiles'
);
}



What do you think?
Techbot
Fresh Boarder
Posts: 14
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#10109
Re: A multisites aware component? 11 Years, 11 Months ago Karma: 54
The idea is good.
We had the same kind of idea that we have included in JMS 1.3.x that we started almost 1 year ago. We are trying to speedup its release that include plenty other functionalities.

We can just say, that this is effectivelly a good idea as we already prepared something similar.

Our solution will work in case when you share the whole website. Not when you have specific slave site because in this case, the menu are specific for each slave site.
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
get the latest posts directly to your desktop
2Win, Multisite(s) are trademarks of Edwin2Win.
Joomla