Risultati da 1 a 3 di 3

Discussione: Dominio e sottodominio per i singoli forum

  1. #1

    Dominio e sottodominio per i singoli forum

    Buongiorno a tutti.
    Poiché devo fondere tre forum in un unico forum e portare anche alcuni gruppi sociali e alcuni blog da me, mi servirebbe di fare in modo che ogni subforum abbia un dominio autonomo e lo stesso anche per i blog.
    Esempio.
    http://www.nomeforum.com/childforum/ diventerà http://www.childforum.com e questa modifica devo poter decidere di applicarla anche ai childchildforum. In modo tale da avere praticamente dei forum autonomi però all'interno del mio stesso forum e condividendo lo stesso database.
    Qualcuno può aiutarmi in questo percorso? Naturalmente sono consapevolissima che vBulletin non ha questa funzione come nativa, ma se qualcuno ha (o vuole svilupparmi) una mod ad hoc, posso pagarlo bene. Non mi rivolgo nemmeno al forum vBulletin.org perché ho avuto modo tristemente di notare che tutti i programmatori che girano lì sono persone poco serie.

  2. #2
    Borg L'avatar di y2ksw
    Data Registrazione
    Nov 2004
    Località
    Bologna, Italia
    Età
    64
    Messaggi
    9,035
    Ho fatto questa "modifica". E' una soluzione che funziona molto bene ed è facile da implementare. Se non ci riesci, contaci circa 2 ore di lavoro per ogni dominio, prove comprese. Se non hai accesso alla shell/al sistema del server, allora non è fattibile.

    http://www.vbulletin.org/forum/showt...07#post2460207

    Coming back to this argument, here is another implementation I have realized recently.

    Requirements
    • Linux server
    • 1 vbulletin installation (domain1.tld)
    • 2 or more domains on the same server (vbulletin installation and domain2.tld)
    • root shell access
    • excellent system, hosting and vbulletin knowledge
    • Canonical URL's disabled
    • Probably no vbSEO (does not work on more than one domain at a single time)
    First, you will have to create an empty and separate web space for domain2.tld. Run this code ... one by one in your shell:
    Codice:
    # touch mk-symlinks.sh
    # chmod 700 mk-symlinks.sh
    # nano mk-symlinks.sh
    #!/bin/sh
    
    #DBG=echo
    
    src=/var/www/domain1.tld/htdocs
    dst=/var/www/domain2.tld/htdocs
    
    for i in `ls $src/`
    do
        [ "$i" = ".htaccess" ] && continue
        [ "$i" = "anything else to exclude" ] && continue
        $DBG    ln -s $src/$i $dst/$i
    done
    
    exit 0
    & save

    Important: You will have to run this script every time you make a change to the structure or forum root files in your source installation.

    At the Apache Record on the other hand, you will have to change a few settings the way it needs to access the other web space:

    Codice:
    <VirtualHost *:80>
        ServerAdmin webmaster@domain2.tld
        ServerName domain2.tld
        ServerAlias www.domain2.tld
        CustomLog /var/www/domain2.tld/weblogs/access.log combined
        ErrorLog /var/www/domain2.tld/weblogs/error.log
        DocumentRoot /var/www/domain2.tld/htdocs
        <Directory /var/www/domain2.tld/htdocs>
            php_admin_value open_basedir /var/www/domain2.tld:/var/www/domain1.tld/htdocs/
            php_admin_value upload_tmp_dir /var/www/domain2.tld/tmp
    
            Options FollowSymLinks
            AllowOverride All
            Order allow,deny
            Allow from all
    
        </Directory>
    </VirtualHost>
    & Reload Apache.

    This is your basic setup. Now, domain2.tld should already be accessible, but eventually have some problems due to the fact there is no .htaccess file yet. Please create the file and add the following lines:

    Codice:
    # nano /var/www/domain2.tld/htdocs/.htaccess
    RewriteEngine On
    
    # Require fully qualified domain
    RewriteCond %{HTTP_HOST}   !^www\.domain2\.tld [NC]
    RewriteRule ^(.*)         http://www.domain2.tld/$1 [R=301,L]
    
    RewriteRule ^$ forumdisplay.php?f=3 [L]
    RewriteRule ^forum.php$ forumdisplay.php?f=3 [L]
    & Save. Then, add the bottom lines specific to both installations from your source domain, such as SEO-frienly URL's and so stuff. Skip all lines which refer to old links, because domain2.tld is new! Don't forget saving

    The f=3 indicates the forum category you wish to show in the domain2.tld domain as the "main" forum. It must be a category or a top-level section acting as new forum home, else it won't work. No parameters allowed.

    Now you would go to the admincp in domain1.tld and make sure this forum section becomes invisible, but publicly accessible. Since you are an expert, no questions allowed on this

    Then, you would add a few plugins to domain1.tld, which will inherit them also to domain2.tld (it's the same installation).

    global_bootstrap_init_start:
    Codice PHP:
    <?php
    /**
     * @author Y2K Software
     * @copyright (C) Copyright Y2K Software 2013 - All Rights Reserved
     * @version 1.0.0
     */

    // Set bburl
    $vbulletin->options['bburl'] = "http://$_SERVER[HTTP_HOST]";

    // Set other variables
    $valid_sections = array();
    $invalid_sections = array();
    switch(
    $_SERVER['HTTP_HOST'])
    {
        case 
    'www.domain1.tld';
            
    // Remove invalid forum sections
            
    $invalid_sections = array(345);
            break;
        case 
    'www.domain2.tld';
            
    // Options
            
    $vbulletin->options['bbtitle'] = 'Forum domain2.tld';
            
    $vbulletin->options['webmasteremail'] = 'bounce@domain2.tld';
            
    $vbulletin->options['contactusemail'] = 'staff@domain2.tld';
            
    $vbulletin->options['keywords'] = 'anything,you,wanna,have';
            
    $vbulletin->options['description'] = 'TITLE: domain1.tld';
            
    $vbulletin->options['facebookappid'] = '';
            
    $vbulletin->options['facebooksecret'] = '';
            
    $vbulletin->options['styleid'] = 11;
            
    $vbulletin->options['mobilestyleid_advanced'] = 11;
            
    $vbulletin->options['mobilestyleid_basic'] = 11;
            
    $vbulletin->options['allowchangestyles'] = 0;
            
    $vbulletin->options['allowregistration'] = 0;
            
    $vbulletin->options['WOLenable'] = 0;
            
    $vbulletin->options['showevents'] = 0;
            
    $vbulletin->options['showbirthdays'] = 0;

            
    // Remove unwanted or redundant products
            
    $vbulletin->products['vbblog'] = 0;
            
    $vbulletin->products['vbcms'] = 0;
            
            
    // Remove invalid forum sections
            
    $valid_sections = array(345);
            break;
    }

    // Remove invalid forum sections
    foreach($invalid_sections as $key => $value)
    {
        unset(
    $vbulletin->forumcache[$value]);
    }
    if(
    $valid_sections)
    {
        foreach(
    $vbulletin->forumcache as $key => $value)
        {
            if(!
    in_array($key$valid_sections))
            {
                unset(
    $vbulletin->forumcache[$key]);
            }
        }
    }
    This code makes sure that the extra sections are not shown or searched incidentally from the other forum or vice versa.

    style_fetch:
    Codice PHP:
    // Set style: needed for queries and standard messages
    switch($_SERVER['HTTP_HOST'])
    {
        case 
    'www.domain2.tld';
            
    $styleid 11;
            break;

    The styleid=11 wherever it appears, is the normally hidden style, which gives the external forum section a different look.

    That's it. Enjoy.
    Giovanni
    http://www.trimelli.com/

    Per favore non mandatemi PM, ma scrivete sul forum. Vi sarà risposto prima.

  3. #3
    Borg L'avatar di y2ksw
    Data Registrazione
    Nov 2004
    Località
    Bologna, Italia
    Età
    64
    Messaggi
    9,035
    La separazione del cms, blog e gruppi non è fattibile perché non segue la divisione per forum, ma per utente o altro. Dato che il forum non è diviso per utente ma per sezione, non è possibile dividere le altre caratteristiche.

    Per una divisione che richiede più licenze e installazioni, è possibile usare il forum chaining, che richiede ancora molto lavoro e che trovi sempre nella stessa discussione, qualche pagina prima come allegato (da me). E allora ogni forum può avere i suoi contenuti extra e individuali.
    Giovanni
    http://www.trimelli.com/

    Per favore non mandatemi PM, ma scrivete sul forum. Vi sarà risposto prima.

Discussioni Simili

  1. Dominio forum
    Di Manuel nel forum Come faccio
    Risposte: 4
    Ultimo Messaggio: 28-01-2013, 02:49
  2. Spostare vBulletin a sottodominio
    Di Fabioo nel forum Come faccio
    Risposte: 8
    Ultimo Messaggio: 23-08-2012, 12:57
  3. Più forum, stesso dominio, una licenza
    Di najaru nel forum Pre acquisto vBulletin
    Risposte: 2
    Ultimo Messaggio: 19-02-2009, 14:53

Segnalibri

Permessi di Scrittura

  • Tu non puoi inviare nuove discussioni
  • Tu non puoi inviare risposte
  • Tu non puoi inviare allegati
  • Tu non puoi modificare i tuoi messaggi
  •