1
Saganxis
Re: Xoops MultiSite beta Release
  • 2007/9/28 0:33

  • Saganxis

  • Just popping in

  • Posts: 25

  • Since: 2006/7/20


Yes you can use a sitemap for each site. All sites uses the same files but not the same database.We 've been testing this and there is no problem with google, the sites are found by google, don't worry.If you can pay someone??, yes,to me jajaja. This solution is under testing so we strongly DON'T recommend to use multix in production. This is an stable version. I'm working to improve some things. I'll let you know about the next version.



2
Saganxis
Re: Xoops MultiSite beta Release
  • 2007/9/25 23:14

  • Saganxis

  • Just popping in

  • Posts: 25

  • Since: 2006/7/20


Has anyone been testing multix??? Do you have any suggestion to include in the next version???



3
Saganxis
Re: Xoops MultiSite beta Release
  • 2007/9/25 16:13

  • Saganxis

  • Just popping in

  • Posts: 25

  • Since: 2006/7/20


Thanks to all!!!I'm working to improve the coding to meke it more easy to update.
Hi trabis, i'll take care of that in the following version, thank you.



4
Saganxis
Re: Xoops MultiSite beta Release
  • 2007/9/21 13:15

  • Saganxis

  • Just popping in

  • Posts: 25

  • Since: 2006/7/20


Yes the installation allows you to have one core for all sites. Users, modules and so on, you have it in the db so they would be different. But the directory module will be the same for all sites.



5
Saganxis
Re: Xoops MultiSite beta Release
  • 2007/9/21 4:43

  • Saganxis

  • Just popping in

  • Posts: 25

  • Since: 2006/7/20


I will try to explain how Multix work.

I'll explain the installation proccess al the end.

Once you have installed yoursite1.com you see the /sites folder as follow:

/sites/
all/
xoops-config.php
xoops-mod.php
xoops-tbl.php
xoops-thm.php
xoops-grp.php


yoursite.com/
cache
templates_c
uploads
xoops-config.php
xoops-mod.php
xoops-tbl.php
xoops-thm.php
xoops-grp.php


xoops-sites.php

*****************************
File xoops-sites.php
*****************************
In the file xoops-sites.php we find the name of each site in the following format:

$xoops_site["yoursite.com"] = "yoursite.com";

If we want to add an alias we can do this:

$xoops_site["www.yoursite.com"] = "yoursite.com";

This happens because we take the key of the $xoops_site array to refer to the host requested.

*****************************
yoursite.com folder
*****************************

For each site you install you will have the same directory structure as yoursite.com.


########### xoops-mod.php file ###########


In this file we specify the modules will be loaded in each site. We use the following format:

$xoops_mod[ 'dirname_module' ] = option;

option:
0->Just the admin group can view this module
1->All groups can view this module

The option 0 was thought for admin modules like protector. If we let someone to manage any site
and we assign this person to a group with admin priviligies this person wouldn't view or admin this module.

I.e.:

$xoops_mod[ 'news' ] = 1;


########### xoops-tbl.php file ###########

In this file we specify the tables will be shared in each site. We use the following format:

$xoops_tbl["table_name"]["database"] = "database_to_share";
$xoops_tbl["table_name"]["prefix"] = "prefix_of_database_to_share";


If we want in the site2 link to the "table_X" which is in the site1 we procced as follows:

We don't touch the /sites/site1/xoops-tbl.php file.

We modify the /sites/site2/xoops-tbl.php file adding this:

$xoops_tbl["table_X"]["database"] = "database_to_share";
$xoops_tbl["table_X"]["prefix"] = "prefix_of_database_to_share";



########### xoops-thm.php file ###########


In this file we specify the themes will be able to choose in each site. We use the following format:

$xoops_thm['theme_name'] = 'theme_name';


########### xoops-grp.php file ###########


IMPORTANT: To share 'groups' between sites we need to share the tables:

users
groups
groups_users_link

By this way we can share users and groups (not permissions) for the sites we specify.


########### xoops-config.php file ###########


Take a look at the xoops-config.php file. We have some constants which are very important for
some configurations aspects of each site.

Look at XOOPS_GLOBAL_CONFIG, MODULES_FROM_ALL, THEMES_FROM_ALL, GROUPS_FROM_ALL, TABLES_FROM_ALL constants.

If we set XOOPS_GLOBAL_CONFIG to '1' we will load a "common" configuration which are in the
/sites/all/xoops-config.php file. If not we can specify a custom configuration for each site.

If we set MODULES_FROM_ALL to '1' we will load the modules which are in the /sites/all/xoops-mod.php
file. Althougt we can specify a module to be loaded in the /sites/yoursite.com/xoops-mod.php file.
Latter I will explain what i want to say when i talk about "load a module".

We obtain the same functionality with the other constants.

If we set TABLES_FROM_ALL to '1' we will be able to share the same tables which are in the
/sites/all/xoops-tbl.php file for all sites.

There is something that you need to understand.
Supose that we need to share the "avatars" table in almost all sites (supose we have 8 sites).
For example, we need the same table in 6 sites but diferents ones in the others 2 sites. We proceed as follow:

Add this to the /sites/all/xoops-tbl.php file:

$xoops_tbl["avatars"]["database"] = "database_to_share";
$xoops_tbl["avatars"]["prefix"] = "prefix_of_database_to_share";

In the 6 sites set TABLES_FROM_ALL to '1' in the /sites/site_name/xoops-config.php file.
But in the others 2 sites set this constant to '0'.



6
Saganxis
Xoops MultiSite beta Release
  • 2007/9/20 17:18

  • Saganxis

  • Just popping in

  • Posts: 25

  • Since: 2006/7/20


We anounce the first beta version of the MultiSite Proyect for XOOPS (Multix).
This is the 2.0.17 XOOPS version modified to allow multiple sites in one root directory, with the posibility
to share tables, groups, sessions and more. Also you can use some configurations files that will help you to
administer some functionality aspects of each site.

The link to the proyect in sourceforge ishttp://sourceforge.net/projects/multixoops/. You can download from here.

We hope Multix would be helpfull for you and the feedback help Multix to grow and be better!!



7
Saganxis
Re: Multi Sites Challenge
  • 2007/7/6 15:52

  • Saganxis

  • Just popping in

  • Posts: 25

  • Since: 2006/7/20


Hi everyone, I'm working with nekro on Multix. Now i'm trying "clean" the code because it's a bit dirty. When we finish we 'll publish for download. I'll try to finish today.



8
Saganxis
Re: An aproach with Xoops and Cakephp
  • 2007/6/23 13:25

  • Saganxis

  • Just popping in

  • Posts: 25

  • Since: 2006/7/20


I'm really don't know if Cakephp is the best option for Xoops. There are a lot of frameworks which are very interesting like symphony, kumbia, qcodo, etc. This is just an attempt to use XOOPS with a framework.



9
Saganxis
Re: An aproach with Xoops and Cakephp
  • 2007/6/23 13:10

  • Saganxis

  • Just popping in

  • Posts: 25

  • Since: 2006/7/20


Thanks you very muck bleu_ for the traslation.



10
Saganxis
An aproach with Xoops and Cakephp
  • 2007/6/22 20:55

  • Saganxis

  • Just popping in

  • Posts: 25

  • Since: 2006/7/20


Hace tiempo que estoy queriendo hacer alguna interfaz de XOOPS con
algún framework conocido, como lo es Cakephp. Busqué bastante si
alguien habia hecho algo con XOOPS y Cakephp y la verdad no encontré nada.
Lo que si encontré fueron algunos artículos muy
interesantes como

http://www.gigapromoters.com/blog/2007/01/28/joining-powers-of-two-great-systems-joomla-and-cakephp/

http://www.thinkingphp.org/2006/05/04/using-cakephp-in-external-php-systems-cmss-weblogs-etc/

y

http://www.gigapromoters.com/blog/2007/02/13/finally-a-practical-solution-joomla-with-cakephp-together-jake/


entonces empecé a intentar crear un puente propio para Xoops.

Aqui les cuento lo que hice. Claro que esto es solo una prueba por lo cual hay muchas cosas por hacer.

Les comento que lo que hice fue seguir la explicación de Jake en sus comienzos y descargando su ejemplo, pude armar este paquete para Xoops.
Por ello quizá los interesados puedan ayudar para que esto tome más forma.

Lo que intenté hacer fue una especie de modulo que contenga a cakephp dentro del directorio principal donde está Xoops.

A este pequeño proyecto lo llamé Koops.

Pueden bajarlo de

AQUI
###############################################
IMPORTANTE:

Ver que el mod_rewrite este habilitado en el apache y correctamente configurado.

###############################################


Los directorios están dispuestos de la siguiente manera:


wwwroot
xoops
cache
class
...
koops
...
y sigue...


1 )


Modificar el archivo header.php del directorio principal de Xoops

Le agregué al final una linea como la siguiente:


require_once( 'koops/cake.php');


Claro está que aqui podemos modificar el directorio en donde se incluirá koops.
Pero despues hay que tener en cuenta las variables de ROOT_PATH para Cakephp.


2 )

Dentro de koops copiamos todo el directorio que contiene a Cakephp.
Quedaría de la siguiente forma:

koops/
app
cake
index.php
...


3 )


Dentro de koops/app/webroot/index.php comentar las dos lineas que siguen:

...

if (isset($_GET['url']) && $_GET['url'] === 'favicon.ico') {
} else {
// $Dispatcher=new Dispatcher();
// $Dispatcher->dispatch($url);
}

....


Luego hay que hacer un trigger que una cake y Xoops. Creamos en el directorio /koops
los archivos cake.php y cake.inc.php:

cake.php

<?php

require_once("cake.inc.php");
$xoops_path = dirname( dirname( __FILE__ ) );

require_once( $xoops_path . '/mainfile.php' );


$controller= $_GET['option'];

$action=$_GET['task'];

$param = $_GET[ 'id' ];

HTML_cake::requestCakePHP('/'.$controller.'/'.$action.'/'.$param);


?>


y cake.inc.php


<?php

class HTML_cake {

function requestCakePHP($url)
{
$_GET['url']=$url;
require_once ('app/webroot/index.php');

$Dispatcher=new Dispatcher();
$Dispatcher->dispatch($url);


}

}

?>

esto manejará qué controlador/acción/vista le va a llegar a Cakephp.

En este punto el directorio quedaría:



koops/
app
cake
index.php
cake.php
cake.inc.php
...


4 )

Luego en koops/app/config/ modifico/creo los siguiente archivos

bootstrap.php

<?php

function reform_url($url)
{

$temp=explode('/',$url);
$controller=$temp[1];
$action=$temp[2];
$param=@$temp[3];
$url=XOOPS_URL.'/index.php?option='.$controller.'&task='.$action;
if($param)
$url=$url.'&id='.$param;
return $url;
}
?>

con el fin de que interprete y modifique las url que necesita Cakephp.


En el archivo /koops/app/config/core.php seteamos

define('AUTO_SESSION', false);

para que el control de la sesion lo siga haciendo Xoops.



En koops/app/config/database.php

<?php

class DATABASE_CONFIG
{
var $default = array('driver' => XOOPS_DB_TYPE,
'connect' => 'mysql_connect',
'host' => XOOPS_DB_HOST,
'login' => XOOPS_DB_USER,
'password' => XOOPS_DB_PASS,
'database' => XOOPS_DB_NAME,
'prefix' => 'yourprefix_' );

}
?>




5 )

Con esto bastaría por ahora. El el archivo para descargar incluyo un ejemplo.

Para usarlo solo necesitan crear una tabla 'names'
con los campos

id
names


Luego para usarlo

http://localhost/index.php?option=names&task=index


Eso es todo. Esto es solo una primera aproximación. Los interesados serán
bienvenidos, y las sugerencias por supuesto también.


Si alguien pudiese traducirlo al ingles se lo agradecería porque mi ingles no es muy bueno.

Saludos,

Saganxis




TopTop
(1) 2 3 »



Login

Who's Online

232 user(s) are online (145 user(s) are browsing Support Forums)


Members: 0


Guests: 232


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits