Possibility to use path to the website’s index page when entering weblog’s path settings
Posted: 27 January 2008 07:30 AM   [ Ignore ]  
Lab Assistant
Avatar
RankRank
Total Posts:  286
Joined  02-02-2007

Hi,

Going to Admin >  Weblog Administration >  Weblog Management >  Edit Weblog you can enter various path settings:

1) Weblog URL
2) Comment Page URL
3) Search Results URL
4) Trackback Return URL
5) Ping Return URL
6) RSS Feed URL

Perhaps quite often path settings entered there start with “http://www.mysite.net/index.php”. This means that entering path settings you duplicate the settings entered in Admin >  System Preferences >  General Configuration where URL to the root directory of your site (http://www.mysite.net) and Name of your site’s index page (index.php) was set.

It seems to me that it would be handy to be able to use path to the website’s index page that was set in Admin >  System Preferences >  General Configuration when entering path settings in Admin >  Weblog Administration >  Weblog Management >  Edit Weblog. If there were such possibility you could instead of entering full path to particular template (such as http://www.mysite.net/index.php/my_template_group/my_template/) to enter only
template group name and template name (such as /my_template_group/my_template/).

I suggest that beside each text input used for entering a path setting for a particular weblog there would be a selectbox with two options: “Use base path” (that is, the path to website’s index page) and “Don’t use base path”. If the first option is selected, you should enter the path starting from template group name.

Imagine a situation where you have to move a website having tens of weblogs to different host and different URL. In such a situation you should spend a LOT of time correcting manually path settings for each particular weblog; needless to say a possibility of mistakes and bugs resulting from them is quite high.

 Signature 

Full list of plugins here

Child Categories
Browser Sniff
Category Id
Entries List

Profile
 
 
Posted: 22 February 2008 09:40 PM   [ Ignore ]   [ # 1 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  609
Joined  06-29-2005
Laisvunas - 27 January 2008 07:30 AM

Imagine a situation where you have to move a website having tens of weblogs to different host and different URL. In such a situation you should spend a LOT of time correcting manually path settings for each particular weblog; needless to say a possibility of mistakes and bugs resulting from them is quite high.

Please see this post for an explanation of how to use the Find and Replace functionality of your control panel to automatically replace many of these problem entries automatically. Thanks for your excellent posts so far!! Please consider giving us a WIKI entry.

Terry

Profile
 
 
Posted: 23 February 2008 06:53 AM   [ Ignore ]   [ # 2 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  2413
Joined  12-06-2002

Just FYI—you can use the {site_url} variable in these settings.

 Signature 

Sign up for Southern Fried ExpressionEngine - a 4-day EE class in San Antonio, TX starting on January 20th.

Profile
 
 
Posted: 23 February 2008 07:38 AM   [ Ignore ]   [ # 3 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  609
Joined  06-29-2005
Michael Boyink - 23 February 2008 06:53 AM

Just FYI—you can use the {site_url} variable in these settings.

No kidding - actually *IN* the weblog path settings dialog and elsewhere? That is very nice! Thank you!

Terry

Profile
 
 
Posted: 23 February 2008 07:46 AM   [ Ignore ]   [ # 4 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  2413
Joined  12-06-2002

Yes - in the weblog path settings, and I just tested it in the file upload path as well and it worked (that one always bites me post-launch..wink)

 Signature 

Sign up for Southern Fried ExpressionEngine - a 4-day EE class in San Antonio, TX starting on January 20th.

Profile
 
 
Posted: 24 February 2008 11:01 AM   [ Ignore ]   [ # 5 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  286
Joined  02-02-2007

@Michael Boyink Thank you very much for the tip. It solves my problem completely. As it turns out the feature I suggested has no sense.

About {site_url} variable and its use in setting preferences in Control Panel I have two points:

1) it is strange that almost nothing can be found about this variable in docs. Entering “site_url” in the docs search field outputs 4 items, and the only relevant thing about it is in this page where you can read that {site_url} can be used for displaying “URL for new content from the site that sent the ping”. Such info is at best incomplete.

2) it is even more strange that in docs nothing can be found about the possibility of using {site_url} (and maybe other EE variables) for setting preferences in Control Panel.

EE docs are of quite high quality and such oversights seems to me inexplainable.

It would be good if someone having right to edit docs (or the right to comment docs) added all relevant info concerning these two aspects.

 Signature 

Full list of plugins here

Child Categories
Browser Sniff
Category Id
Entries List

Profile
 
 
Posted: 24 February 2008 01:10 PM   [ Ignore ]   [ # 6 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  609
Joined  06-29-2005

I should note a caveat to using {site_url} - if one uses Windows Live Writer to post to your blog via the MetaWeblog API module, the Weblog URL (The URL to that weblog’s particular landing template) must be spelled out entirely. Otherwise you will wind up with funny URL:

http://mysite.com/{site_url}index.php/template_group

It apparently reads from the weblog preference setting via the MetaWeblog API module, and that does not apparently parse the variable back into the complete URL.

Terry

Profile
 
 
Posted: 24 February 2008 01:14 PM   [ Ignore ]   [ # 7 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  609
Joined  06-29-2005

I added this caveat to the wiki.

Terry

Profile
 
 
Posted: 25 February 2008 11:36 AM   [ Ignore ]   [ # 8 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  317
Joined  04-11-2006

Good thread - must say I concur about the ‘hidden nature’ of {site_url} in the docs! wink

Michael: just to be really specific - in the file upload preferences for each weblog there are two fields that are site specific:
- Server path to upload directory
- Url of upload directory

I can see that the second could easily take the {site_url} variable, cause it normally starts of as something like:

http://www.mysite.com/images/custom/pics_for_blog/

so, using the {site_url} this would become:

{site_url}/images/custom/pics_for_blog/


but how would you use {site_url} in specifying the Server path, when, for example on one server of mine it is:

/usr/local/psa/home/vhosts/mysite.com/httpdocs/images/custom/pics_for_blog/

??

To my simple mind, if I stuck in {site_url}, I woud end up with something like:

/usr/local/psa/home/vhosts/http://www.mysite.com/httpdocs/images/custom/pics_for_blog/

surprised

 Signature 

OakenPage website works - doing simple things well

Profile
 
 
Posted: 25 February 2008 11:42 AM   [ Ignore ]   [ # 9 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  2413
Joined  12-06-2002

No, you can’t use the site_url variable in the server path.

For me there hasn’t been a reason to worry about using a variable there as it won’t change anyway.  The site_url does as part of a go-live process. 

YMMV.

 Signature 

Sign up for Southern Fried ExpressionEngine - a 4-day EE class in San Antonio, TX starting on January 20th.

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 65024 Total Logged-in Users: 39
Total Topics: 82111 Total Anonymous Users: 23
Total Replies: 441285 Total Guests: 182
Total Posts: 523396    
Members ( View Memberlist )