<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Business Interchange Group - MT Tips Archives</title>
    <link rel="alternate" type="text/html" href="http://businessinterchangegroup.com/" />
    <link rel="self" type="application/atom+xml" href="http://businessinterchangegroup.com/archives/technology/mt-tips/atom.xml" />
    <id>tag:businessinterchangegroup.com,2009-10-11://41</id>
    <updated>2010-01-24T12:21:56Z</updated>
    <subtitle>Using the Movable Type platform to enhance your business on the Web</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Pro 4.32-en</generator>

<entry>
    <title>Enabling PHP on your server</title>
    <link rel="alternate" type="text/html" href="http://businessinterchangegroup.com/archives/2009/12/enabling-php-on-your-server.html" />
    <id>tag:businessinterchangegroup.com,2009://41.1449</id>

    <published>2009-12-31T15:18:52Z</published>
    <updated>2010-01-24T12:21:56Z</updated>

    <summary>Hosting providers have different requirements to enable PHP on the servers you use. Our experience is: GoDaddy: Requires all Web pages containg PHP code have the .php file type. icdSoft: Enable PHP by creating an .htaccess file in the root...</summary>
    <author>
        <name>Merv</name>
        <uri>http://BigMTBlogs.com</uri>
    </author>
    
        <category term="MT Tips" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Technology" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="php" label="PHP" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="server" label="server" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="software" label="software" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://businessinterchangegroup.com/">
        <![CDATA[Hosting providers have different requirements to enable PHP on the servers you use. Our experience is:<br /><br />
<strong>GoDaddy</strong>: Requires all Web pages containg PHP code have the .php file type.<br/>
<br/>
<strong>icdSoft</strong>: Enable PHP by creating an .htaccess file in the root directory and adding the following code:<pre><code>AddHandler application/x-httpd-php5 .php .html .htm</code></pre> We can continue using .html as the file type and when PHP is embedded using<pre><code>&lt;?php
... my php code ...
?&gt;</code></pre>the server interprets it appropriately.<br/>
<br/>
If in doubt, save yourself some time. Look for enabling PHP in the server support help pages or contact your hosting provider support staff.]]>
        
    </content>
</entry>

<entry>
    <title>Adding optional page layouts to MT 4+ themes</title>
    <link rel="alternate" type="text/html" href="http://businessinterchangegroup.com/archives/2009/12/adding-optional-page-layouts-to-mt-4-themes.html" />
    <id>tag:businessinterchangegroup.com,2009://41.1448</id>

    <published>2009-12-29T22:15:23Z</published>
    <updated>2010-01-24T12:22:46Z</updated>

    <summary><![CDATA[There are instances when it is desired to have page layout options in the MT 4+ themes besides wtt, twt, tw, wt, mw and wm&nbsp; (w=wide, t=thin, m=medium). A case in point: on our personal Blog Providence (using the MT...]]></summary>
    <author>
        <name>Merv</name>
        <uri>http://BigMTBlogs.com</uri>
    </author>
    
        <category term="MT Tips" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Technology" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="css" label="css" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="themes" label="themes" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://businessinterchangegroup.com/">
        <![CDATA[<p>There are instances when it is desired to have page layout options in the MT 4+ themes besides wtt, twt, tw, wt, mw and wm&nbsp; (w=wide, t=thin, m=medium). A case in point: on our personal Blog <a href="http://forney.org/">Providence</a> (using the MT Professional Black Theme) we wanted a full Page width with no sidebars to display a <a href="https://www.google.com/accounts/ServiceLogin?service=cl">Google Calendar</a> and <a href="http://maps.google.com/maps/mm?hl=en">Google Map</a> the entire width. Here's how we got it:</p>]]>
        <![CDATA[The Stylesheet index includes two css files:
<pre><code>@import url(&lt;$mt:StaticWebPath$&gt;themes-base/blog.css);
@import url(&lt;$mt:StaticWebPath$&gt;addons/Commercial.pack/themes/professional-black/screen.css);</code></pre>
The themes-base/blog.css is the standard setup for all themes and contains the css definitions for the various layouts. We added the following:
<pre><code>/* Wide */
.layout-w #alpha {
    width: 940px;
}
.layout-w #beta }
    width: 0px;
}</code></pre>

The standard Page layout is wide-medium (wm) defined in the Page archive template with this code:
<pre><code>&lt;$mt:Var name="page_layout" value="layout-wm"$&gt;</code></pre>

The "page-layout" variable is later used to set the content style. We have two Pages created: "Road calendar" and "Road map" requiring the wide layout. Here is the code we added to the Page archive template (right after the standard value above):
<pre><code>&lt;mt:If tag="PageTitle" eq="Road map"&gt;
&lt;$mt:Var name="page_layout" value="layout-w"$&gt;
&lt;/mt:If&gt;
&lt;mt:If tag="PageTitle" eq="Road calendar"&gt;
&lt;$mt:Var name="page_layout" value="layout-w"$&gt;
&lt;/mt:If&gt;</code></pre>

Add the content to the pages and you will have a single wide page layout. Here are my examples:<br />
<a href="http://forney.org/road-calendar.html">Road Calendar</a><br />
<a href="http://forney.org/road-map.html">Road Map</a><br /
]]>
    </content>
</entry>

<entry>
    <title>Movable Type: Run Periodic Tasks on GoDaddy Hosting</title>
    <link rel="alternate" type="text/html" href="http://businessinterchangegroup.com/archives/2009/11/mt-run-periodic-tasks-on-godaddy-hosting.html" />
    <id>tag:businessinterchangegroup.com,2009://41.1439</id>

    <published>2009-11-26T12:32:17Z</published>
    <updated>2009-12-31T17:05:27Z</updated>

    <summary>We experienced an issue running periodic tasks on GoDaddy&apos;s servers. &quot;Periodic Tasks&quot; is a tool in the MT library that allows many functions to be run in the background such as publishing entries in the future (Write Entry =&gt; Publishing =&gt; Status =&gt; Scheduled).</summary>
    <author>
        <name>Merv</name>
        <uri>http://BigMTBlogs.com</uri>
    </author>
    
        <category term="MT Tips" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Technology" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="cron" label="cron" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="godaddy" label="GoDaddy" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="software" label="software" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://businessinterchangegroup.com/">
        <![CDATA[We experienced an issue running periodic tasks on GoDaddy's servers. "Periodic Tasks" is a tool in the MT library that allows many functions to be run in the background such as publishing entries in the future (Write Entry =&gt; Publishing =&gt; Status =&gt; Scheduled). ]]>
        <![CDATA[Here's what we found:<br />
<br />
The <a href="http://godaddy.com/">GoDaddy</a> cron setup wizard requires a full path address to run-periodic-tasks but the resulting cron command is:
<pre><code>cd  /home/content/d/a/a/userid/html/cgi-bin/; ./tools/run-periodic-tasks</code></pre>
Executing the "out of the box" run-periodic-tasks tool from the cron job
produced a module addressing error. The code in run-periodic-tasks causing the error was:
<pre><code>use lib 'lib', '../lib'; (go up one level to find the lib directory)</code></pre>
A quick change to the full path of the MT lib directory:
<pre><code>use lib '/home/content/d/a/a/userid/html/cgi/mt/lib/';
</code></pre>
got it to work fine.<br /><br />The "out of the box" run-periodic-tasks code works fine in the <a href="http://icdsoft.com/"><span style="font-style: italic;">icd</span>SOFT</a> hosting environment. The cron job setup is<pre><code>/home/userid/www/www/cgi-bin/mt/tools/run-periodic-tasks</code></pre>
also using the full path to the task and referencing ../lib works fine.]]>
    </content>
</entry>

</feed>
