• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Stylesheet settings, need them to be relative
PostPosted: Fri Oct 03, 2008 5:34 pm 
Offline
New Member

Joined: Thu Jan 03, 2008 6:01 pm
Posts: 3
How do I set the stylesheets to a relative path?


Top
 Profile  
 
 Post subject: Re: Stylesheet settings, need them to be relative
PostPosted: Fri Oct 03, 2008 6:40 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Fri Feb 02, 2007 4:31 pm
Posts: 2395
Location: Comox Valley, BC
Stylesheets are usually entered into the database, so you don't need a path. If you are using external stylesheets, you need to put the path from the root /.

Nullig

_________________
Come play in the Sandbox at my CMS Made Simple demo site: http://www.cmsmsdemo.com.


Top
 Profile  
 
 Post subject: Re: Stylesheet settings, need them to be relative
PostPosted: Fri Oct 03, 2008 6:45 pm 
Offline
New Member

Joined: Thu Jan 03, 2008 6:01 pm
Posts: 3
The stylesheet is set in the template as {{stylesheet}}
which loads all the stylesheets.  It takes its url setting from the config.php file.
The confg file sets the 'root' url for your site... its then subsequently uses, obviously by the stylesheet call
to explicity set the stylesheets.

$config['root_url'] = 'http://localhost/iran';

Because I use both localhost, and an external ip to expose to clients, I need my stylesheet path to be relative.
Do you know how to accomplish this task?


Last edited by violetweb on Fri Oct 03, 2008 6:48 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Stylesheet settings, need them to be relative
PostPosted: Fri Oct 03, 2008 7:14 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Fri Feb 02, 2007 4:31 pm
Posts: 2395
Location: Comox Valley, BC
The regular CMSMS stylesheets are in the database. They are not separate, external files.

Nullig

_________________
Come play in the Sandbox at my CMS Made Simple demo site: http://www.cmsmsdemo.com.


Top
 Profile  
 
 Post subject: Re: Stylesheet settings, need them to be relative
PostPosted: Fri Oct 03, 2008 10:22 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Wed Oct 17, 2007 6:09 pm
Posts: 232
Location: the world
You can try to use something like this:

Code:
if($_SERVER['SERVER_ADDR']=='127.0.0.1'){
   $config['root_url'] = 'http://localhost/iran';
}else{
   $config['root_url'] = 'http://198.111.2.3/'; // IP ADDRESS
}

_________________
http://FollowTheRoad.com/ - living on the road...
http://www.kligys.com/ - asmeninis blog'as...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Arvixe - A CMSMS Partner