joomla multisite une base de données

More
12 years 5 months ago #20365 by fgossart
Bonjour, je dois réaliser avec joomla 1.7 et flexicontent plusieurs sites webs dont l'administration est commune (et donc la BDD).
j'aimerais avoir des idées et aussi faire part de l'expérience si elle est concluante.
Mon idée était d'utiliser la gestion des profils et droits pour afficher des menus et modules en fonction des niveaux d'accès.
Le problème est peut etre de forcer un niveau d'accès en fonction de l'URL qui ouvre le site.
Un exemple : je crée des niveaux d'acces, niveau1, niveau2, niveau3...
et je crée les sous domaines niveau1.monsite.com, niveau2.monsite.com... et cela afficherait le contenu filtré.
Peut etre aussi que dans ce cas il faudrait enlever tout ce qui est en niveau "public"...
Quelqu'un a t il déjà tenté (ou une autre idée) ?

Please Log in or Create an account to join the conversation.

More
12 years 5 months ago #20373 by ggppdk
You can install the advanced module manager for nonumber.nl

-- This component will add (among other stuff) a new slider called "Module Assignment" to the parameter sliders of your modules.

-- Open slider and go to the end, enable the PHP parameter and enter something like:
Code:
$url = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; return ( preg_match('nivea1', $url) );
This will make the module appear when the url contains 'nivea1'

WARNING:
Use method to custom the experience of your visitors, but do not use it to enforce security.

-- If you need security: THEN force your visitors to login and use ACCESS LEVELs (which of course are assigned to USER GROUPs) to enforce security for specific user groups.

Of course each module will be assigned an appropriate access level

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
12 years 5 months ago #20443 by fgossart
I try this component.
It seems to allow many great features

For just a single trial I put your php code but doesn't work.

I change for

return ($_SERVER[SERVER_NAME]=='subsite.mainsite.com')

and now if my main website is www.mainsite.com and subsite is subsite.mainsite.com the module appears only in subsite.

I don't find what is wrong in your PHP code but it's a great help for me

I will try now other features using groups and profiles now

Please Log in or Create an account to join the conversation.

More
12 years 5 months ago #20458 by ggppdk
the preg_match must contain the pattern with a start and finish character like this '/.../' or '#...#'
i forgot to add them ... and that is why it is not working, what you did will work just fine.

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
12 years 5 months ago #20557 by kim
Bonsoir,

Ce sujet m'intéresse, mais je suis pas certaine d'avoir bien saisi la portée de vos écrits.

J'ai aussi un site joomla avec flexi et une base de donnée.
Je dois appeler des header et des footer (avec cURL), ainsi que des scriptes différents selon le sous-domaine.

Votre méthode peut marcher dans mon cas?
Ou alors, je suis obligée de dupliquer complètement mon site?

Kim.

Please Log in or Create an account to join the conversation.

More
12 years 5 months ago #20562 by ggppdk
Kim you can have a site with multiple server names right?

Use the Cpanel(WHM) or plesk for this, the method is called domain parking, you can park a subdomain to the main domain (beware i say park NOT REDIRECT).

I am mistaken, someone please correct me.

So the question is to detect the server name, and behave differently.

HOW TO DO IT:
1. Park your subdomains

2. Install the Nonumber "Advanced module manager" which can display modules based on an PHP expression being TRUE

3. You go -TO ALL- module you want to display when name is sub1.myfcwebsite.org
and put in the PHP (display assignment) field
Code:
return ($_SERVER[SERVER_NAME]=='sub1.myfcwebsite.org')
Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.331 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline