User Login    
 + Register
  • Main navigation
Login
Username:

Password:

Remember me



Lost Password?

Register now!
Who's Online
95 user(s) are online (9 user(s) are browsing XoopsWiki)

Members: 4
Guests: 91

deka87, vamptrix, Shadow, anderssk, more...
[Main Page]

DevWiki Better Site Management

From XOOPS Project

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://www.xoops.org/modules/mediawiki/index.php/DevWiki_Better_Site_Management"

This page has been accessed 676 times. This page was last modified 04:24, 30 December 2007. Content is available under XOOPS Project.


Developers for Hire
Developers for Hire
Local Support Sites
Make a donation
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


Powered by
XOOPS Code hosted on SourceForge

Powered by PHP

PHP 5

Powered by MySQL

Powered by Smarty

OSI certified

GPL

All content on this site is subject to the Creative Commons License
Top Tags
Theme (5) news (2) security (2) sport (1) Arabic (1) wiki (1) Christmas (1) jQuery (1) tag (1) module (1) SEO (1) comments (1)
Advertisement