--- /dev/null
+<?php
+require '../setup.phtml';
+require '../../CommonApps/Smarty/3.1/Smarty.class.php';
+
+$smarty = new Smarty();
+$smarty->setTemplateDir('./tmp/');
+$smarty->setCompileDir('./tmp_c/');
+$smarty->setConfigDir('./configs/');
+$smarty->setCacheDir('./cache/');
+
+$dbh = Toolkit_Database::getInstance();
+
+$sql = "
+SELECT *
+ FROM news
+ WHERE catid = 2
+ORDER BY pr_date";
+
+$stmt = $dbh->query($sql);
+$getBlocksSql = "
+ SELECT *
+ FROM news_block
+ WHERE news_id = :news_id
+ORDER BY pos";
+$getBlocks = $dbh->prepare($getBlocksSql);
+$data = array();
+while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $prDate = strtotime($row['pr_date']);
+ $row['pubDate'] = date('r', $prDate);
+ $row['pr_date'] = date('Y-m-d H:i:s', $prDate);
+ $data[$row['id']] = $row;
+ $getBlocks->bindParam(':news_id', $row['id'], PDO::PARAM_INT);
+ $getBlocks->execute();
+ $data[$row['id']]['blocks'] = $getBlocks->fetchAll(PDO::FETCH_ASSOC);
+}
+//echo '<pre>'.print_r($data, true).'</pre>';
+$smarty->assign('resized', 'http://www.gaylordgolfmecca.com/images/resized/');
+$smarty->assign('exportTitle', 'Gaylord Golf Mecca');
+$smarty->assign('siteUrl', 'blog.gaylordgolfmecca.com');
+$smarty->assign('data', $data);
+$smarty->display('wordPress.tpl');
+
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your site. -->
+<!-- It contains information about your site's posts, pages, comments, categories, and other content. -->
+<!-- You may use this file to transfer that content from one site to another. -->
+<!-- This file is not intended to serve as a complete backup of your site. -->
+
+<!-- To import this information into a WordPress site follow these steps: -->
+<!-- 1. Log in to that site as an administrator. -->
+<!-- 2. Go to Tools: Import in the WordPress admin panel. -->
+<!-- 3. Install the "WordPress" importer from the list. -->
+<!-- 4. Activate & Run Importer. -->
+<!-- 5. Upload this file using the form provided on that page. -->
+<!-- 6. You will first be asked to map the authors in this export file to users -->
+<!-- on the site. For each author, you may choose to map to an -->
+<!-- existing user on the site or to create a new user. -->
+<!-- 7. WordPress will then import each of the posts, pages, comments, categories, etc. -->
+<!-- contained in this file into your site. -->
+
+<!-- generator="WordPress/4.1.1" created="2015-03-10 16:34" -->
+<rss version="2.0"
+ xmlns:excerpt="http://wordpress.org/export/1.2/excerpt/"
+ xmlns:content="http://purl.org/rss/1.0/modules/content/"
+ xmlns:wfw="http://wellformedweb.org/CommentAPI/"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:wp="http://wordpress.org/export/1.2/"
+>
+
+<channel>
+ <title>{$exportTitle}</title>
+ <link>http://{$siteUrl}</link>
+ <description>Just another Gaslight Media Sites site</description>
+ <pubDate>{$pubDate}</pubDate>
+ <language>en-US</language>
+ <wp:wxr_version>1.2</wp:wxr_version>
+ <wp:base_site_url>http://{$siteUrl}</wp:base_site_url>
+ <wp:base_blog_url>http://{$siteUrl}</wp:base_blog_url>
+
+ <wp:author><wp:author_id>1</wp:author_id><wp:author_login>Steve</wp:author_login><wp:author_email>steve@gaslightmedia.com</wp:author_email><wp:author_display_name><![CDATA[Steve]]></wp:author_display_name><wp:author_first_name><![CDATA[]]></wp:author_first_name><wp:author_last_name><![CDATA[]]></wp:author_last_name></wp:author>
+
+
+ <generator>http://wordpress.org/?v=4.1.1</generator>
+ {foreach $data as $row}
+ <item>
+ <title>{$row.title}</title>
+ <link>http://{$siteUrl}/{$row.ping_name}/</link>
+ <pubDate>{$row.pubDate}</pubDate>
+ <dc:creator><![CDATA[Steve]]></dc:creator>
+ <guid isPermaLink="false">http://{$siteUrl}/?p={$row.id}</guid>
+ <description></description>
+ <content:encoded><![CDATA[{if $row.header}<h3>{$row.header}</h3>{/if}<p>{if $row.image}<img src="{$resized}{$row.image}">{/if}{$row.description}</p>{foreach $row.blocks as $block}{if $block.header}<h3>{$block.header}</h3>{/if}<p>{if $row.image}<img src="{$resized}{$block.image}">{/if}{$block.description}</p>{/foreach}]]></content:encoded>
+ <excerpt:encoded><![CDATA[]]></excerpt:encoded>
+ <wp:post_id>{$row.id}</wp:post_id>
+ <wp:post_date>{$row.pr_date}</wp:post_date>
+ <wp:post_date_gmt>{$row.pr_date}</wp:post_date_gmt>
+ <wp:comment_status>closed</wp:comment_status>
+ <wp:ping_status>open</wp:ping_status>
+ <wp:post_name>{$row.ping_name}</wp:post_name>
+ <wp:status>publish</wp:status>
+ <wp:post_parent>0</wp:post_parent>
+ <wp:menu_order>0</wp:menu_order>
+ <wp:post_type>post</wp:post_type>
+ <wp:post_password></wp:post_password>
+ <wp:is_sticky>0</wp:is_sticky>
+ <category domain="category" nicename="uncategorized"><![CDATA[Uncategorized]]></category>
+ <wp:postmeta>
+ <wp:meta_key>_edit_last</wp:meta_key>
+ <wp:meta_value><![CDATA[1]]></wp:meta_value>
+ </wp:postmeta>
+ </item>
+ {/foreach}
+</channel>
+</rss>