vBulletin SEO Forums

SEO

vBulletin Search Engine Optimization

Buy vBSEO Now! HACKER SAFE certified sites prevent over 99.9% of hacker crime.
ne nw
vBSEO Total Support Team Launches DeskPro New vBSEO Discount Level for Network Builders vBSEO 3.2.0 GOLD Has Landed Success with vBSEO = 600ore Web Visitors + $1400 in a Day! Crawlability Inc. Files for SEO Technology Patent
se sw

Using config_vbseo.php in different environments - HOWTO?

This is a discussion on Using config_vbseo.php in different environments - HOWTO? within the General Discussion forums, part of the vBSEO SEO Plugin category; Hi, I have two vbulletin+ vbseo environments at the moment: Test environment: http://somedomain.dev/board This is a URL on my local ...

Go Back   vBulletin SEO Forums > vBSEO SEO Plugin > General Discussion

Enhancing 80 million pages.

Register FAQ Members List Social Groups Calendar Search Today's Posts Mark Forums Read
  #1  
Old 03-28-2007, 05:28 AM
Junior Member
 
Real Name: Eliot
Join Date: Mar 2007
Posts: 19
Using config_vbseo.php in different environments - HOWTO?

Hi,

I have two vbulletin+vbseo environments at the moment:

Test environment:
http://somedomain.dev/board
This is a URL on my local server

Production environment:
http://somedomain.com/board

My problem is the config_vbseo.php file is slightly different for the two environments.

What can I do so I can use the same config_vbseo.php file for both environments? Token replacement and having two different copies of the file is not an option.

My thoughts so far:
1) In config_vbseo.php, have a block that detects the current environment and sets the config as required for that environment, in psuedo code:

if (environment == test-env) {
set license key to correct value
set custom doc root to correct value
} else if (environment == prod-env) {
set license key to correct value
set custom doc root to correct value
}


Or 2)
In config_vbseo.php there is a property to save settings to db. (see copied code below). Could the license key and custom doc root be stored in the db

// ****** SAVE/RESTORE SETTINGS TO DB ******
// Set this variable to 1 to save (and restore) your settings from vB's (datastore) dB table
define('VBSEO_CONFIG_INIT', '0');
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #2  
Old 03-29-2007, 04:13 PM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer SupportvBSEO Documenter
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 21,596
Quote:
1) In config_vbseo.php, have a block that detects the current environment and sets the config as required for that environment, in psuedo code:
Yes, you can try it with:
PHP Code:
if($_SERVER['HTTP_HOST']=='subdomain.dev')
{
    
define('VBSEO_LICENSE_CODE',            'xxx1');
    
define('VBSEO_CUSTOM_TOPREL',          'zzz1');
}else
{
    
define('VBSEO_LICENSE_CODE',            'xxx2');
    
define('VBSEO_CUSTOM_TOPREL',          'zzz2');

Quote:
In config_vbseo.php there is a property to save settings to db. (see copied code below). Could the license key and custom doc root be stored in the db
The settings are stored in database as backup and only used when restoring the options during vBSEO upgrade (when fresh config_vbseo.php file is uploaded).
__________________
Oleg Ignatiuk / Crawlability Inc.
Support Team Launches New DeskPro Powered Tool Enhanced Support at Your Service

vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations

6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Howto prevent crawling of Private Forums deb0 Troubleshooting 2 03-03-2007 12:10 AM
Sitemap HowTo? sixtyseven Deutsch 14 03-25-2006 08:24 AM
Howto review MySQL queries used in scripts. xb_ General Discussion 2 09-17-2005 12:38 AM


All times are GMT -4. The time now is 10:14 PM.


Powered by vBulletin Version 3.8.0 Beta 4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.5 ©2008, Crawlability, Inc.