Welcome to Mars Hill

Mars Hill in Athens, GreeceWhile I was listening to The Way of the Master podcast yesterday, the host related the idea that the Internet is the new Mars Hill. I’ve also been thinking about this lately, and today I would like to take the time to bring you into the discussion.

What is Mars Hill?” you may be asking. In Acts 17, Mars Hill is where Paul spent time reasoning with the philosophers of Athens. A parenthetical by the author of Acts reports that “All the Athenians and the foreigners who lived there used to spend their time in nothing else than telling or listening to something new.” (NET Trans)

Mars Hill, or the Areopagus as it was known to the Athenians in that day, was known as a place for the open exchange of ideas. It was here that Paul brought the teachings of Christ into the intellectual arena alongside the philosophies of the Epicureans and the Stoics (Acts 17: 18). In other words, Paul presented Christianity as a worthy philosophical opponent to competing worldviews.

Likewise, in the present day, the Internet has very much arrived and continues to grow as our modern day Mars Hill. For example, during The Way of the Master podcast I mentioned at the beginning of this post, the host mentioned that they had posted a part of his debate with an atheist on the online video service called YouTube. In response to this post, another atheist video taped his challenges to their video and posted it on YouTube. Finally, during The Way of the Master podcast, the host gave his responses to the atheist’s challenges. The exchange of ideas taking place was intriguing, and it represented an example of Christianity competing in the marketplace of ideas.

Now, after reading this post, perhaps you are interested in getting involved in this modern day Mars Hill. Maybe you would like to contribute your voice to the discussion or at least listen in? Well as a means of allowing you to listen in, I would like to introduce you to a web application called an RSS Reader. More specifically, I would like to introduce you to my favorite RSS Reader known as the Google Reader:

Google Reader

What is RSS?
First off, RSS is an acronym for Really Simple Syndication. RSS is the means by which blog authors make their blogs available for mass distribution. People like you and me can use an RSS Reader to subscribe to RSS feeds and thereby read their favorite blogs via a common interface at their leisure. For example, in my RSS Reader, I currently subscribe to the following blogs:

  • Between Two Worlds – “A Mix of Theology, Philosophy, Politics, and Culture”
  • Challies Dot Com – Personal blog of Tim Challies a cool Canadian, web designer, and Christian thinker.
  • Fellowship Church Sermons – podcast sermons from my church
  • PreachingTheBible.com – John Piper sermons
  • Pyromaniacs – “The Pyromaniacs are usually provocative, often annoying, always opinionated, rarely subtle, and sometimes worth listening to. Our doctrinal perspective is essentially in agreement with the London Baptist Confessions of 1644 and 1689.”
  • Stand to Reason Blog – A Christian apologetics organization founded by Greg Koukl. I also subscribe to their daily and weekly podcasts.
  • The A-Team Blog – “Take a stand for the truth, but do it in LOVE, fool!”
  • The Christian Mind – “‘If Christians cannot communicate as thinking beings, they are reduced to encountering one another only at the shallow level of gossip and small talk. Hence the perhaps peculiarly modern problem – the loneliness of the thinking Christian.’ – Harry Blamires, The Christian Mind
  • the evangelical outpost – “Reflections on culture, politics, and religion from an evangelical worldview.
  • Way of the Master Radio – Daily radio show hosted by Todd Friel
  • World Magazine Blog – The blog of World Magazine

Forget Bookmarks! You need an RSS Reader:
In the distant past of the Internet (let’s say 2 or 3 years ago), if you wanted to keep up with the latest postings on the aforementioned websites, you might bookmark all of the above links in your web browser and check them periodically. Of course this would take a lot of time and a good amount of clicking. However, on today’s World Wide Web the new way of keeping up with all of your favorite websites is via site RSS feeds displayed in your favorite RSS Reader.

In my case, this is where the Google RSS Reader comes in. The Google RSS Reader features an easy to use interface that allows me to subscribe to the RSS feeds of my favorite blogs. Once I’ve subscribed to a feed, I can browse the titles of new posts via a sortable left hand column. Clicking on a title displays the post in the main content window on the screen. Furthermore, if the post contains audio (this is commonly known as a podcast), the Google Reader displays a simple audio player interface that allows me to play the file.

Get Google Reader:
By this point, if you’re saying, “I would like to try out the Google Reader for myself,” then let me help you get started:

  1. Click here to create a Google Reader account.
  2. Once you’ve created a Google Reader account and you are logged in, if you would like to get started with some blog subscriptions, you may import my subscriptions if you wish. To do this, follow these instructions:
  3. Right click here and choose “Save as…” and save the file subscriptions.xml to your Desktop.
  4. In the main menu, click on “Subscriptions >> Edit Subscriptions”:
  5. reader_editsubscriptions.gif

  6. Then, click on “Import/Export”.
  7. Click on the “Browse…” button in the “Import your subscriptions” area.
  8. Find the file subscriptions.xml on your Desktop, double-click it, and then click Upload.
  9. If you followed these instructions correctly, at this point, you should now have my blog subscriptions in your Google Reader. Enjoy!

Javascript Back Link

I’m always having to Google the code for a Javascript back link; therefore, I thought I would save myself the time and post an example on my blog:

<a href="javascript: history.go(-1)">Back</a>

How to Flush your DNS Cache

If you read the title of this post and you said, "What the heck is DNS Cache?". Let me recommend that you return to looking at Picture of the Day. On the other hand, if you’re interested in what I’m talking about read on:

Today I’ve been waiting for a domain to point to my web server. Furthermore, the sooner this happens the better. Well, as it turns out, a quick check of the domain at DNSreport.com shows that the DNS for this domain has been updated properly. However, when I browse the web via my office cable Internet connection, the domain is still pointing to its old name servers.

In order to confirm that I am experiencing a problem via my cable Internet connection, from a command prompt, I run:

C:\> tracert mydomain.com

The response is:

C:\> Tracing route to mydomain.com [***.***.***.***] over a maximum of 30 hops…

  1. **** Request timed out
  2. **** Request timed out
  3. **** Request timed out
  4. **** Request timed out

and so on and so forth. 

Well, what this seems to indicate is that I can’t browse to mydomain.com because my cable Internet provider’s DNS cache hasn’t been updated. Therefore, I do the following to flush my DNS cache:

  1. Start > Run "cmd"
  2. Do "ipconfig" to see your IP
  3. Do "ipconfig /release" then "ipconfig /renew" 
  4. Do "ipconfig /flushdns"
  5. Now, do "nslookup mydomain.com". 

Now, if the DNS cache was your problem, you should be able to view mydomain.com via your web browser. 

Lightbox JS

Here’s a link to an off-site tutorial for an excellent way to display images on your website. Perhaps I’ll get around to implementing it around here some day:

From the website:
Lightbox JS is a simple, unobtrusive script used to to overlay images on the current page. It’s a snap to setup and works on all modern browsers.

Embedding WordPress into OS Commerce

I’ve created the following tutorial in response to topic 47148: osCommerce and WordPress at WordPress Support.

While I have been programming PHP for a while, I am new to both OS Commerce and WordPress. That being said, for this integration I have tried to follow the coding standards for creating a new OS Commerce page. If you see any refinements I need to make to my code, feel free to comment. I hope this helps all of you who are looking to integrate OS Commerce and WordPress.

10/06/2006 – UPDATE: In response to comments below, I’ve written a Part II to this tutorial showing how to embed WordPress into a default install of OSC MS2.2.

PLEASE NOTE: The code in this tutorial assumes that your OS Commerce install is located in your server’s web root and your WordPress install is located in a subdirectory named wordpress/.

ALSO NOTE: This tutorial is written for OS Commerce installs using the Basic Template Structure (BTS). For OSC installs using the Simple Template Structure (STS), please see comment number 9 below:

  1. Create a file for your WordPress blog in the root folder of your OS Commerce install. For our purposes, we’ll name this file blog.php. The contents of this file are as follows:
    <?php
    /*
    Title: Embedding WordPress into OS Commerce
    Author: Michael Wender (www.michaelwender.com)
    Disclaimer: This Software is provided "AS IS" and without warranty of any kind. The user assumes all risks associated with its use and installation.
    $Id: blog.php,v 1.1.1.1 2004/03/04 23:38:02 ccwjr Exp $
    
    osCommerce, Open Source E-Commerce Solutions
    
    http://www.oscommerce.com
    
    Copyright (c) 2003 osCommerce
    Released under the GNU General Public License
    */
    
    // turn off WordPress themes and include the WordPress</b> core:
    define('WP_USE_THEMES', false);
    require('./wordpress/wp-blog-header.php');
    
    require('includes/application_top.php');
    require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_BLOG);
    $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_BLOG));
    $content = CONTENT_BLOG;
    require(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/' . TEMPLATENAME_BLOG_PAGE);
    require(DIR_WS_INCLUDES . 'application_bottom.php');
    ?>
    
  2. Open the file oscommerce_root/includes/filenames.php.
    • Find the section that begins with the comment // define the content used in the project, and add the following code:
    • define('CONTENT_BLOG', 'blog');
    • Find the section that begins with // define the filenames used in the project, and add the following:
    • define('FILENAME_BLOG', CONTENT_BLOG . '.php');
    • Find the section that begins with // define the templatenames used in the project, and add the following:
    • define('TEMPLATENAME_BLOG_PAGE', 'blog_page.tpl.php');
  3. Create the following file: oscommerce_root/templates/your_template_dir/blog_page.tpl.php (Note: This file’s filename matches the variable you defined as TEMPLATENAME_BLOG_PAGE in filenames.php).

    The contents of this file will vary according to which template you are using (to start, I suggest making a copy of your main_page.tpl.php); however, the body content on this page will be your WordPress blog. You will display your blog using The WordPress Loop. The following file is only meant to show you how to get started. Your blog_page.tpl.php will vary according to the template you are using in OS Commerce:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html <?php echo HTML_PARAMS; ?>>
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=<?php echo CHARSET; ?>">
    <?php
    if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
      require(DIR_WS_INCLUDES . 'header_tags.php');
    } else {
    ?>
      <title><?php echo TITLE ?></title>
    <?php
    }
    ?>
    <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
    <link rel="stylesheet" type="text/css" href="<? echo TEMPLATE_STYLE;?>">
    </head>
    <body onload="preloadImages();" style="background-color: #8E8B8B;">
    <!-- warnings //-->
    <?php require(DIR_WS_INCLUDES . 'warnings.php'); ?>
    <!-- warning_eof //-->
    
    <!-- header //-->
    <?php require(DIR_WS_TEMPLATES . TEMPLATE_NAME .'/header.php'); ?>
    <!-- header_eof //-->
    <?php
    	// INSERT YOUR WordPress Loop Code HERE:
    	if (have_posts()) :
    	   while (have_posts()) :
    		  the_post();
    		  the_content();
    	   endwhile;
    	endif;
    	// END WordPress Loop Code
    ?>
    <!-- footer //-->
    <?php require(DIR_WS_TEMPLATES . TEMPLATE_NAME .'/footer.php'); ?>
    <!-- footer_eof //-->
    </body>
    </html>
    

    A discussion of The WordPress Loop is beyond the scope of this tutorial; however, here are some excellent resources:

  4. Create the following file: oscommerce_root/includes/languages/your_language/blog.php (Note: This file must be named the same as the file you created in step 1). The contents of this file are as follows:
    <?php
    /*
    Title: Embedding WordPress into OS Commerce
    Author: Michael Wender (www.michaelwender.com)
    Disclaimer: This Software is provided "AS IS" and without warranty of any kind. The user assumes all risks associated with its use and installation.
    
    $Id: blog.php,v 1.2 2004/03/05 00:36:42 ccwjr Exp $
    
    osCommerce, Open Source E-Commerce Solutions
    
    http://www.oscommerce.com
    
    Copyright (c) 2003 osCommerce
    
    Released under the GNU General Public License
    */
    
    define('NAVBAR_TITLE', STORE_NAME. ' Blog');
    define('HEADING_TITLE', 'Blog');
    ?>
    
  5. Okay, your WordPress blog should now be embedded into your OS Commerce install. Keep in mind that you will need to adjust your menus and links to point to this new page you have created. If your OS Commerce install is located in your site’s web root, and you have used the same filenames suggested in this tutorial, then the link to your blog will be: http://your-domain.com/blog.php.