[EventCalendar] siteurl vs home

Alex Tingle alex at firetree.net
Wed Nov 30 14:38:28 UTC 2005

Hi Rusty,

On 30 Nov 2005, at 13:28, Rusty Smith wrote:
> Hi Alex - thanks for your reply. The reason we have moved the index 
> out of
> the WordPress file is to mask the location of these files and to make 
> the
> address to the blog map cleanly to a "pretty" url. I *think* this is 
> an ok
> thing to do as far as WordPress is concerned as it is the first option
> available under "options" in the admin panel and the instructions are
> clearly laid out in the codex and the "official" install instructions 
> how to
> do so. (See http://wordpress.org/docs/installation/different-address/).
> There is a good chance that there something that I am missing or don't
> understand though... if so please let me know as I would like to 
> insure the
> long-term viability of this particular install...

Thanks for the link. That's just what I was looking for. I think we're 
both right. It says this:

   "2. Copy the index.php file from the wordpress directory
       into the root of your site."

So, my question stands. Why are you *moving* the index.php file? Why 
not follow these instructions and leave the original where it was?

On the other hand. I also think that I do need to change my code a bit. 
I've put it on the to do list.

Just so we're clear. We're talking about a setup like this, right?...

  http://example.com/index.php  <-- your new index.php
  http://example.com/wordpress/ <-- dir with WP files.

Your link also says this: "Change your Blog address to be 

So now:
  'Wordpress address' = siteurl = http://example.com/wordpress
  'Blog address'      = home    = http://example.com


> At any rate, Sibo's edits to the plug-in seem to have done the trick, 
> with
> the only caveat that the calendar does not make pretty permalinks - I 
> never
> noticed if it did prior to this mod though?
> If these edits do turn out to be ok in the long run I do think that 
> you are
> absolutely right that the plugin should work out of the box like it 
> does
> now, with maybe some instructions on how to mod it to work in the 
> other.
> As always, thanks for the tremendous support, Alex, and please do let 
> me
> know if there is something dumb that I am missing.
> Rusty Smith
> -----Original Message-----
> From: eventcalendar-bounces at firetree.net
> [mailto:eventcalendar-bounces at firetree.net] On Behalf Of Alex Tingle
> Sent: Wednesday, November 30, 2005 5:26 AM
> To: <eventcalendar at firetree.net> <eventcalendar at firetree.net>
> Subject: Re: [EventCalendar] siteurl vs home
> It's my opinion that moving your index.php file around is just not a
> good thing to do. I've already changed all these things around to fix
> it for people who have their 'home' pointed somewhere other than their
> blog. That seems the be the way the two settings are supposed to be
> used.
> I can't for the life of me understand why anyone would delete
> Wordpress' index.php. There's nothing wrong with having another one
> elsewhere, of course.
> I can't see how it can be made to work both for you guys and the people
> who leave index.php in its original position.
> As I said elsewhere, maybe I'm wrong. I intend to research the
> 'official' Wordpress meaning  of 'home' and 'siteurl'. If anyone can
> find a link to helpful documentation on the matter, I'd be grateful.
> -Alex
> --
> :: Let me solve your problems: http://www.firetree.net/consulting/
> :: alex.tingle AT firetree.net  +44-7901-552763
> On 30 Nov 2005, at 02:39, Rusty Smith wrote:
>> Sibo: OK - I recant my last email. I did not need the
>> "myfiles=get_option"
>> change because I still had a copy of event calendar in my original
>> directory. When I removed it, I of course needed the change. I did
>> need to
>> keep the change at line 64:
>> $url=parse_url(get_option('home'));
>> Or the spinner would lock and the calendar would not load. I also had
>> to
>> change the path for the spinner graphic (around line 469) to point to
>> the
>> correct directory for the spinner to display.
>> Thanks again for posting your fix to the group. I never would have
>> figured
>> this out on my own.
>> Rusty Smith
>> Assistant Professor
>> Auburn University School of Architecture
>> (334) 844-5444
>> web: www.protomondo.com
>> wiki: www.wikifish.org/wiki/wikifish/rusty_smith
>> skype: rustysmith
>> short wireless emails to: rustysmith at sprintpcs.com
>> -----Original Message-----
>> From: eventcalendar-bounces at firetree.net
>> [mailto:eventcalendar-bounces at firetree.net] On Behalf Of Rusty Smith
>> Sent: Tuesday, November 29, 2005 7:12 PM
>> To: eventcalendar at firetree.net
>> Subject: { SPAM 2 }::RE:[EventCalendar] siteurl vs home
>> Sibo:
>> your pointers were timely for me as I just migrated over to a setup
>> like you
>> described. When I did your 3rd step as you said:
>>> and to replace the $myfile's assignment in function
>> ec3_action_wp_head() with
>>> $myfiles=get_option('siteurl').'/wp-content/plugins/eventcalendar3/';
>> the calendar broke.
>> I found a third siteurl setting under " function ec3_Options" (around
>> line
>> 64) and changed it from:
>> $url=parse_url(get_option('siteurl'));
>> to
>> $url=parse_url(get_option('home'));
>> Now it seems to work like a charm. Anybody see any harm in this? Sibo,
>> I am
>> not sure what your 3rd step was supposed to do?
>> Rusty Smith
>> -----Original Message-----
>> From: eventcalendar-bounces at firetree.net
>> [mailto:eventcalendar-bounces at firetree.net] On Behalf Of Sibo Lin
>> Sent: Sunday, November 27, 2005 6:06 PM
>> To: eventcalendar at firetree.net
>> Subject: { SPAM 2 }::[EventCalendar] siteurl vs home
>> Hi, I love this Event Calendar plug-in! One problem I
>> ran across though was that the
>> "get_options('siteurl')" was used all the time instead
>> of get_options('home'). The distinction only matters
>> for people like me who install their wordpress scripts
>> in a different directory than the publically-viewable
>> weblog. For instance, I edit my blog at
>> https://www.blahblahblah.com/wordpress/wp-admin/ and
>> other people view my blog at
>> http://www.blahblahblah.com/wordpress (notice: https
>> vs http). This has two problems
>> 1) The publically viewable blog does not load the
>> correct css for the calendar.
>> 2) The links on the calendar are to the https
>> directory, which only works for users listed in my
>> htaccess directory. All other users get blocked when
>> they try clicking on the calendar events links
>> The solution I found was to replace the
>> get_options('siteurl') in the month_link() and
>> day_link() functions with
>> get_options('home')
>> and to replace the $myfile's assignment in function
>> ec3_action_wp_head() with
>> $myfiles=get_option('siteurl').'/wp-content/plugins/eventcalendar3/';
>> Otherwise, I love your plugin! Keep it up!
>> http://sibo.has.it/

Dammit Jim, I'm a programmer... not a mind reader!

More information about the EventCalendar mailing list