<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Business Interchange Group - Technology 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/atom.xml" />
    <id>tag:businessinterchangegroup.com,2009-10-11://41</id>
    <updated>2010-12-10T19:09:49Z</updated>
    <subtitle>Specializing in enhancing your business on the Web</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Pro 4.32-en</generator>

<entry>
    <title>Using images as input in an HTML form</title>
    <link rel="alternate" type="text/html" href="http://businessinterchangegroup.com/archives/2010/12/using-images-as-input-in-an-html-form.html" />
    <id>tag:businessinterchangegroup.com,2010://41.1465</id>

    <published>2010-12-10T15:56:59Z</published>
    <updated>2010-12-10T19:09:49Z</updated>

    <summary>Learn something new every time I try something different and in this case it has everything to do with browser interpretation of standards. Example: Look to the right and you will see images used to select the color theme for...</summary>
    <author>
        <name>Merv</name>
        <uri>http://BigMTBlogs.com</uri>
    </author>
    
        <category term="Coding Tips" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Technology" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="_get" label="$_GET" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="form" label="form" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="php" label="php" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://businessinterchangegroup.com/">
        <![CDATA[<img src="http://businessinterchangegroup.com/assets_c/2010/12/php-thumb-100x74-114.jpg" width="100" height="74" alt="php.jpg" class="mt-image-left" style="float: left; margin: 0 20px 20px 0;" />Learn something new every time I try something different and in this case it has everything to do with browser interpretation of standards. Example:<br />
<br/>
<div style="clear: left"></div>
<blockquote>
Look to the right and you will see images used to select the color theme for our website. I am using $_GET to pass the color selection. There are subtle differences in how browsers will present the $_GET data in the URL. Here's what I started with using Firefox:<br />
<br/>
<pre><code>&lt;form action="&lt;?php echo $_SERVER['PHP_SELF'];?&gt;" method="get"&gt;
&lt;input type="image" name="color" value="gray"<br/>    src="&lt;mt:StaticWebPath&gt;images/user/color-gray.png"<br/>    alt="gray image" title="Click to change style to gray"<br/>    style="width: 25px; height: 25px; padding-right: 5px;" /&gt;<br/>...<br/>more &lt;input> with name="color" value="name of color"<br/>...<br/>&lt;/form&gt;</code></pre>

In my php routine I used the familiar isset function on $_GET and if set used the key value of 'color' to set the $color variable like so:<br />
<pre><code>if (isset($_GET['color'])) $color = $_GET['color'];</code></pre>

Worked great in Firefox as the URL had the following parameters when clicking the Gray image (notice the color=gray parameter highlighted in red):<br />
<pre><code>/index.html?color.x=12&color.y=11&<span style="color: red">color=gray</span></code></pre>

BUT ... Internet Explorer (7 and/or 8) does NOT pass all the same parameters ... Here's the URL with parameters provided by IE (notice the color=gray is not passed, only the coordinates of where I clicked on the image):<br />
<pre><code>/index.html?color.x=12&color.y=18</code></pre>

SO, off to modify the php form handler to accommodate yet another IE interpretation of HTML standards. I renamed each input with its unique color ... <br/>
<pre><code>&lt;input type="image" name="gray" value="gray"<br/>    src="&lt;mt:StaticWebPath&gt;images/user/color-gray.png"<br/>    alt="gray image" title="Click to change style to gray"<br/>    style="width: 25px; height: 25px; padding-right: 5px;" /&gt;<br/></code></pre>
and the URL looked like this when gray is clicked <br />
<pre><code>/index.html?gray.x=12&gray.y=18</code></pre>

And the php code (note: gray.x will be changed to gray_x in php):<br/>
<pre><code>  if (!empty($_GET))
  {
    // Just need to extract the color in the first key in the $_GET array
    $color_keys = (array_keys($_GET));
    // Then remove the _x to just get the color name
    $color = str_ireplace("_x","",$color_keys[0]);</code>
  }</pre>
</blockquote>
Now it works the same in both browsers.<br />:-)<br /> <br/>]]>
        
    </content>
</entry>

<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>** Test title resulting in a URL with a leading dash</title>
    <link rel="alternate" type="text/html" href="http://businessinterchangegroup.com/archives/2009/12/test-title-resulting-in-a-url-with-a-leading-dash.html" />
    <id>tag:businessinterchangegroup.com,2009://41.1445</id>

    <published>2009-12-27T14:20:21Z</published>
    <updated>2009-12-31T15:13:57Z</updated>

    <summary>We have detected a condition causing server 500 errors (not a good thing) when the entry title contains non-alpha/numeric leading characters.The Entry Title is used to create an entry URL with non-alpha/numeric and spaces replaced with dashes. Example:This is an...</summary>
    <author>
        <name>Merv</name>
        <uri>http://BigMTBlogs.com</uri>
    </author>
    
        <category term="Technology" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Testing" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="basenames" label="basenames" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="bug" label="bug" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="urlcreation" label="URL creation" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://businessinterchangegroup.com/">
        <![CDATA[We have detected a condition causing server 500 errors (not a good thing) when the entry title contains non-alpha/numeric leading characters.<br /><br />The Entry Title is used to create an entry URL with non-alpha/numeric and spaces replaced with dashes. Example:<br /><br /><b>This is an entry title</b> generates a URL <b>this-is-an-entry-title.html</b><br /><br />When a title is entered as:<br /><b><br />** This is an entry title **</b> MT generates -<b>this-is-an-entry-title.html</b><br /><br />The leading dash in the URL causes the error. It has been reported to MT support.<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>

<entry>
    <title>Testing Character Encoding from the MT database</title>
    <link rel="alternate" type="text/html" href="http://businessinterchangegroup.com/archives/2009/11/testing-character-encoding-from-the-mt-database.html" />
    <id>tag:businessinterchangegroup.com,2009:/hybrid//41.1425</id>

    <published>2009-11-03T10:48:38Z</published>
    <updated>2009-12-31T14:57:33Z</updated>

    <summary>Real-estate Con-sult-ant: [rē′ əl, e stā′t, kən sult′nt] - pronoun The database encoding is set to utf8_general_ci and it appears it displays fine here.Significant Changes Coming: #4 ACRE® Advisory Board...</summary>
    <author>
        <name>Merv</name>
        <uri>http://BigMTBlogs.com</uri>
    </author>
    
        <category term="Technology" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Testing" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://businessinterchangegroup.com/">
        <![CDATA[<strong>Real-estate Con-sult-ant:</strong> [rē′ əl, e stā′t, kən sult′nt] - <em>pronoun</em><br />
The database encoding is set to utf8_general_ci and it appears it displays fine here.<br /><a href="http://www.theconsultingtimes.com/exchange/forum/archives/2009/10/29/huge_acre_changes_acomin_4_acr.html" style="color: green;">Significant Changes Coming: #4 ACRE® Advisory Board</a>]]>
        
    </content>
</entry>

<entry>
    <title>Example of plugin data without the blog id</title>
    <link rel="alternate" type="text/html" href="http://businessinterchangegroup.com/archives/2009/10/example-of-plugin-dtat-with-the-blog-id.html" />
    <id>tag:businessinterchangegroup.com,2009:/hybrid//41.909</id>

    <published>2009-10-14T08:55:35Z</published>
    <updated>2009-12-31T14:58:45Z</updated>

    <summary>Here&apos;s an example of the Hybrid News plugin data being stored in the data base without the blog id.The first entry is one in which the blog id was added manually through the phpMyAdmin UI to get the theme to...</summary>
    <author>
        <name>Merv</name>
        <uri>http://BigMTBlogs.com</uri>
    </author>
    
        <category term="Technology" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Testing" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="database" label="Database" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="plugin" label="Plugin" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://businessinterchangegroup.com/">
        <![CDATA[<a href="http://businessinterchangegroup.com/assets_c/2009/10/plugin-data-6.html" onclick="window.open('http://businessinterchangegroup.com/assets_c/2009/10/plugin-data-6.html','popup','width=1101,height=724,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://businessinterchangegroup.com/assets_c/2009/10/plugin-data-thumb-200x131-6.jpg" alt="plugin-data.jpg" class="mt-image-right" style="margin: 0pt 0pt 20px 20px; float: right;" height="131" width="200" /></a>Here's an example of the Hybrid News plugin data being stored in the data base without the blog id.<br /><br />The first entry is one in which the blog id was added manually through the phpMyAdmin UI to get the theme to work.<br /><br />The second entry was inserted when I added Copyright info to the Theme Options.<br /><br />This entry has a Featured Image but not designated to be in the Slideshow.<br />]]>
        
    </content>
</entry>

<entry>
    <title>Making tweeks to get Hybrid News to work with MT 4.32</title>
    <link rel="alternate" type="text/html" href="http://businessinterchangegroup.com/archives/2009/10/making-tweeks-to-get-hybrid-news-to-work-with-mt-432.html" />
    <id>tag:businessinterchangegroup.com,2009:/hybrid//41.907</id>

    <published>2009-10-11T22:15:34Z</published>
    <updated>2009-12-31T15:16:37Z</updated>

    <summary>Here are issues discovered with Hybrid News running under MT 4.32:The Bio author custom field is not registered properly by the plugin. Adding an Author Bio results in a MT error. When the Bio custom field is viewed in the...</summary>
    <author>
        <name>Merv</name>
        <uri>http://BigMTBlogs.com</uri>
    </author>
    
        <category term="Projects" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Technology" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Testing" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="plugin" label="Plugin" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="test" label="test" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://businessinterchangegroup.com/">
        <![CDATA[Here are issues discovered with Hybrid News running under MT 4.32:<br /><br /><ol><li>The Bio author custom field is not registered properly by the plugin. Adding an Author Bio results in a MT error. When the Bio custom field is viewed in the UI, the system object type is blank. Fix is to remove the Bio custom field set by the plugin and re-add it using the MT UI.<br /></li><li>The Theme Options are stored in the data base as Hybrid News Plugin data. The options are stored in the data base under mt_plugindata table but the plugindata_key is missing the Blog ID. !Important. <font style="font-size: 0.8em;">(Note: see entry Example ... with screen shot of data base entries)</font><br /></li><li>This test always fails in Entry Summary: &lt;mt:ifnonempty tag="EntryFeaturedImage"&gt;</li><li>In the Entry Archive, The user_pic has a broken link to Profile View but the necessary setup to link to a "Profile View" page is not included in the header. Profile View is geared to the "Community" template sets. The variable "profile_view_url" was added to  the HTML Head to fix the broken link: <font style="font-size: 0.8em;">&lt;mt:SetVarBlock name="profile_view_url"&gt;#&lt;/mt:SetVarBlock&gt;)</font></li><li>Various little glitches in the css. I added custom css developed for MT 4.25 test.<br /></li></ol>]]>
        
    </content>
</entry>

<entry>
    <title>First test entry</title>
    <link rel="alternate" type="text/html" href="http://businessinterchangegroup.com/archives/2009/10/first-tests-entry.html" />
    <id>tag:businessinterchangegroup.com,2009:/hybrid//41.906</id>

    <published>2009-10-11T20:40:49Z</published>
    <updated>2009-12-31T15:01:12Z</updated>

    <summary>This is my first test entry of the Hybrid News on MT 4.32I had to manually fix the Plugin data in the data base because it is being stored by the Plugin without the Blog ID.Also, MT 4.32 contains a...</summary>
    <author>
        <name>Merv</name>
        <uri>http://BigMTBlogs.com</uri>
    </author>
    
        <category term="Projects" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Technology" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Testing" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="business" label="Business" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="database" label="Database" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="firsttest" label="first test" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="plugin" label="Plugin" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="technology" label="Technology" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://businessinterchangegroup.com/">
        <![CDATA[This is my first test entry of the Hybrid News on MT 4.32<br /><br />I had to manually fix the <a class="zem_slink" href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/" title="Plugin" rel="homepage">Plugin</a> data in the data base because it is being stored by the Plugin without the Blog ID.<br /><br />Also, MT 4.32 contains a new UI widget called Zemanta. Need to figure out what value this provides. Seems to add another layer of complication for authors using the UI.<br /><br />I hope it is working.<br />

<div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/0826fdcc-cb82-46c1-8439-59b95ba96ea9/" title="Reblog this post [with Zemanta]"><img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=0826fdcc-cb82-46c1-8439-59b95ba96ea9" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related pretty-attribution"><script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"></script></span></div>]]>
        
    </content>
</entry>

</feed>

