Cyprich.com

Occasionally Relevant Insights from a Software Builder

By

The Pumpkin Patch at Richmond Country Farms

As surprising at it may seem for someone who grew up in Canada, I’ve never been to a pumpkin patch until last week. I’m originally from Czechoslovakia and eastern Europeans don’t recognize the British traditions related to Halloween which include picking and carving pumpkins.

Richmond Country Farms hosts a pumpkin patch each year around this time. I see it each year, but this year I took my family there during a professional development day at school. The Richmond Country Farm is a great place to buy fruits and vegetables that are locally grown. They also offer organic produce which is local as well which is a better choice for healthy eating.

The pumpkin patch is open from October 9 to 31 and there is dedicated parking for it beside the farmer’s market. The entrance fee is $10 for adults and $5 for kids and they accept credit cards. You’ll get one bag per person to carry a pumpkin that you pick. I advise you to wear clothes that you don’t mind getting muddy and boots, of which I came with neither and left the farm very dirty. 🙂

Overall, it was a great experience and I’ll make it a tradition to go each year to a pumpkin patch.

image

You have to walk by a few animals before entering the gate and paying the entrance fee. I think that’s the sheep from the Real Player software. If you’ve never seen a lama close up, this is a great place to view one.

image image

PA220136

Homes for the farm animals.

image image

The ducks have a place to live too.

image

PA220088

Vegetables welcoming you at the entrance gate.

image image

The bridge to the fun area.

PA220089

This is the first time I’ve seen a corn and pumpkin dance.

PA220091

Finally! The ride to the pumpkin patch, accompanied by singing and country music along the way.

PA220098  image

The pumpkin princess and her castle.

PA220102 PA220130

One of the three pumpkin patches available. Its muddier than it looks.

image

By

Add a url Field to jos_content in Joomla

A useful feature for Joomla would be a way to store a URL for an article that only links to another site. You would have to manually create the link within a Joomla article which involves quite a bit of steps to do. I would rather create the title, add the URL, write a brief description of the site, and post the article to my web site.

I was looking at creating a custom component to do this, but while looking at the jos_content table, which contains the articles in Joomla, I noticed a urls field. None of my sites used that field, so this would be a good candidate to hold an article’s URL. The URL text box will look the following:

URL Field in Joomla Article

If you enter a URL here, it will be saved and can be used to build a link to the page content.

How To Add a urls Field

Adding a urls field to a Joomla article is not an easy task for a novice webmaster. A good free tool for editing PHP content is Eclipse. Start your editor, and do the following procedure:

  1. Open admin.content.html.php in the administrator/components/com_content/ folder.
  2. Find the _displayArticleDetails function.
  3. Add the following code at the end of the function before the </table> tag:

    <tr>
      <td valign="top" align="right">
        URL:
      </td>
      <td>
        <input class="text_area" type="text" name="urls" id="urls" size="40" maxlength="254" value="<?php echo $row->urls; ?>" />
      </td>
    </tr>

A URL field will now be displayed when you are editing an article. Anything you enter here will be saved in your Joomla database. Part 2 will show you how to use the URL that was saved with the article.

By

Dynamic Video Player Selection with iframe Embeds

Its a real challenge providing a video on your web site that can be viewed on any device accessing it, i.e. desktop computer, smart phone, PDA, or tablet. HTML5 is gaining ground against Flash, but not all devices will support this format and may only have one type of video player installed. A computer that does not have the correct version of Flash will not be able to play certain Flash videos.

The solution to make videos cross platform is iframe embedding. This will allow a device to choose the right player for a video embedded on a web site.

iframe Embed on YouTube

A video can be embedded in YouTube with the following code:

<iframe class="youtube-player" type="text/html" width="640" height="385"
        src="http://www.youtube.com/watch?v=bu06YnJlmiQ?fs=1&amp;h1=en_US" frameborder="0>
</iframe>http://www.youtube.com/v/bu06YnJlmiQ?fs=1&amp;hl=en_US

The URL in red is the URL of the video on YouTube. You need to include ?fs=1&amp;hl=en_US after the video URL otherwise the HTML page will be embedded in the page as opposed to just the video.

The following is an example of iframe embedding.

By

Using Windows Live Writer With Joomla

Windows Live Writer is a great application for creating blog posts on your computer and then uploading it to your web site. I find this editor works much faster than a web-based one and gives you greater control over content formatting and working with images.

It’s possible to use Windows Live Writer with Joomla if you install an XML-RPC plugin for it. Then it will be possible to compose articles on your PC before uploading it to your site. The following tutorial shows how to do this. Keep in mind that Windows Live Writer was designed to work with blogs, so where the word blog is mention, its referring to your Joomla site.

Install the Plugin

  1. Download the MovableType XML-RPC Plugin.
  2. Install the plugin in your web site:
    a) Open Extensions in administration panel and select Install/Uninstall.
    b) Browse to the plugin and press the “Upload File and Install” button.
    c) You’ll get a confirmation message that the plugin was installed.
  3. Open the Extensions menu and select Plugin Manager.
  4. Browse to the XML-RPC – MovableType API plugin and set it to enabled.
    Enabling XML-RPC in Plugin Manager
  5. Open the Site menu and select Global Configuration.
  6. Click on the System tab and enable web services.
    Enabling Web Services for XML-RPC Plugin

Add a Site to Windows Live Writer

  1. Open the Tools menu and select Accounts.
  2. Press the Add button.
  3. Select Other blog service.
  4. Press the Next button.
  5. Enter the URL of your web site and the login information for the administrator.

    Adding Joomla Account to Windows Live Writer

  6. Press the Next button
  7. Select Movable Type API for the type of blog being used. The Remote Posting URL is your web site followed by /xmlrpc/index.php, i.e. http://www.website.com/xmlrpc/index.php.
    Select Blog Type for Joomla Site
  8. Press the Next button.
  9. Windows Live Writer can’t use Joomla themes, so press the No button.
  10. Choose a name to use for your web site.
  11. Press the Finish button.
  12. Press the OK button to return to editing in Windows Live Writer.

Windows Live Writer can now post to a Joomla site. There is no option to post to the front page in Joomla. You will still have to login and edit this information.