Get XOOPS XOOPSXOOPS FAQFAQ ForumsForums NewsNews ThemesThemes ModulesModules

Search

Donate to XOOPS!

Please select an amount to donate


Do you want your username revealed with your donation?
Yes - List me as a Generous Donor
No - List my donation as from an Anonymous Donor


Local Support

Advertisement

XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

admin Arabic banner block Christmas comments cumulus DayDawn dhsoft e-Commerce E-Learning Git Google GUI hacks instant-zero jQuery module mygalleries news Nordic Olédrion oxygen PageRank PHP rmcommon security SEO simple-XOOPS Smarty sport tag Theme tutorial wiki WOX xoops XoopsEngine ZendFramework

New Users

Registering user

# 133971

bitwww

Welcome to XOOPS!
[Main Page]

DevWiki Better Site Management

From XOOPS Web Application System

Main Page | Recent changes | Edit this page | Page history | Switch to MediaWiki mode

Printable version | Disclaimers | Privacy policy
Category: DevWiki

DevWiki Index


Better Site Management Better Site Management using Abbreviated XOOPS_URL Benefits

  1. Easy to have local test/qa environment (no bounce back to live domain).
  2. Mirror the live site for experimenting without screwing up live site.
  3. Running multiple site with same content with DNS parking ?Multiple domain site using cPanel.
  4. Decrease output by few % (most urls are abbreviated with no schema/host/port) hence minimizing your bandwidth usage.

How to do it on the new site?

Fix the xoops-2.0.9.2 distribution with following code

File "include/checklogin.php" line #82

   $url = xoops_getenv('HTTP_HOST').trim($_POST['xoops_redirect']);

will change to

   $url .= xoops_getenv('HTTP_HOST').trim($_POST['xoops_redirect']);

And in file "include/functions.php" line #137

Comment following 3 lines

   if (strpos($ref, XOOPS_URL) !== 0 ) {
       return false;
   }

and add these 4 lines

   $pref = parse_url($ref);
   if (strpos( $_SERVER['HTTP_HOST'], $pref['host']) !== 0) {
       return false;
   }

Note:

  1. Database columns will not be populated with site specific full url. Easy to import-export across environments.
  2. You may face problems with some modules where module author re-wrote xoops_refcheck in their code base :-/

Proceed with install? You remember the regular install screen?

http://xoops.biz/dist/abvrurl/old_x2_c.jpg Use something like this. remove the host (and port if any) portion

http://xoops.biz/dist/abvrurl/new_x2_c.jpg And you should ignore this warning and proceed

http://xoops.biz/dist/abvrurl/warn_x2_c.jpg Done

Now export the database and files and import on any machine (change the mainfile.php a little to match your environment), it should work fine without sticking to some domain. How to do it on my existing site?

   to be done

Cheers, Sudhaker Raj sudhaker at yahoo dot com Site: http://xoops.biz/

Last modified: 30.03.07 by GibaPhp

Retrieved from "http://xoops.org/modules/mediawiki/index.php/DevWiki_Better_Site_Management"

This page has been accessed 2,724 times. This page was last modified 04:24, 30 December 2007. Content is available under XOOPS Web Application System.