<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	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:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Content Management Systems Archives - Chris Gilligan » new media</title>
	<atom:link href="http://chrisgilligan.com/consulting/content-management-systems/feed/" rel="self" type="application/rss+xml" />
	<link>https://chrisgilligan.com/consulting/content-management-systems/</link>
	<description>portfolio of web work</description>
	<lastBuildDate>Tue, 12 Sep 2023 16:33:54 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>
	<item>
		<title>YouTube Gallery snippet &#038; table transform for OU Campus</title>
		<link>https://chrisgilligan.com/consulting/youtube-gallery-snippet-table-transform-ou-campus/</link>
					<comments>https://chrisgilligan.com/consulting/youtube-gallery-snippet-table-transform-ou-campus/#respond</comments>
		
		<dc:creator><![CDATA[Chris Gilligan]]></dc:creator>
		<pubDate>Wed, 02 Mar 2016 18:20:55 +0000</pubDate>
				<category><![CDATA[Consulting]]></category>
		<category><![CDATA[Content Management Systems]]></category>
		<category><![CDATA[OU Campus]]></category>
		<guid isPermaLink="false">https://chrisgilligan.com/?p=2401</guid>

					<description><![CDATA[<p>Here&#8217;s a neat way to present multiple YouTube videos in a responsive &#8220;gallery&#8221; in OU Campus. This example uses a mix of Bootstrap CSS and CSS specific to the gallery. Thanks to Wooster Web Design for the HTML/CSS/JS. With the YouTube Gallery snippet and XSL transform, you can create a video gallery of multiple YouTube [&#8230;]</p>
<p>The post <a href="https://chrisgilligan.com/consulting/youtube-gallery-snippet-table-transform-ou-campus/">YouTube Gallery snippet &#038; table transform for OU Campus</a> appeared first on <a href="https://chrisgilligan.com">Chris Gilligan » new media</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p style="float: right; margin: 0 0 10px 15px; width:240px; height: auto;">
		<img src="https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2016/03/screen-shot-2016-03-02-at-1.13.28-PM.png?x25141" width="240" style="max-width: 100%; height: auto;" />
		</p><p>Here&#8217;s a neat way to <a href="http://www.utc.edu/university-web-services/advanced/youtube-gallery.php" target="_blank">present multiple YouTube videos in a responsive &#8220;gallery&#8221;</a> in OU Campus. This example uses a mix of Bootstrap CSS and CSS specific to the gallery. Thanks to <a href="http://www.woosterwebdesign.com/responsive-youtube-player-with-playlist/" target="_blank">Wooster Web Design</a> for the HTML/CSS/JS.</p>
<p>With the YouTube Gallery snippet and XSL transform, you can create a video gallery of multiple YouTube videos, selectable by clicking thumbnail images.</p>
<p>Here&#8217;s the table transform snippet (add HTML to /_resources/ou/snippets, then create new item in Content &gt; Snippets).</p>
<pre class="theme:monokai lang:default decode:true" title="YouTube Gallery table transform snippet">&lt;table class="ou-youtube-gallery transform" style="width: 100%;"&gt;
	&lt;caption&gt;YouTube Gallery Table&lt;/caption&gt;
	&lt;thead&gt;
		&lt;tr&gt;
			&lt;th width="30%"&gt;Title&lt;/th&gt;
			&lt;th&gt;YouTube ID (code after "watch?v=" e.g. G4RT-prDbIw in youtube.com/watch?v=G4RT-prDbIw or youtu.be/G4RT-prDbIw)&lt;/th&gt;
		&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td&gt;
			My YouTube Video
			&lt;/td&gt;
			&lt;td&gt;
			G4RT-prDbIw
			&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td&gt;
			Another YouTube Video
			&lt;/td&gt;
			&lt;td&gt;
			o5ZymO9UgjM
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;br /&gt;
</pre>
<p>Here&#8217;s the XSL template match; this belongs in an XSL file such as common.xsl or interior.xsl.</p>
<pre class="theme:monokai lang:default decode:true " title="XSL template match for YouTube Gallery snippet">&lt;!-- transform YouTube Gallery --&gt;
&lt;xsl:template match="table[contains(@class, 'ou-youtube-gallery')]"&gt;
	&lt;xsl:variable name="id" select="position()" /&gt;
  	&lt;style type="text/css"&gt;
		@import url(//www.yourdomain.edu/_resources/css/youtube-gallery.css);
  	&lt;/style&gt;
	&lt;script type="text/javascript" src="/_resources/js/youtube-gallery.js?x25141" /&gt;

	&lt;div class="well"&gt;
		&lt;!-- THE YOUTUBE PLAYER --&gt;
		&lt;div class="vid-container"&gt;
			&lt;iframe id="vid_frame{$id}" frameborder="0" width="560" height="315"&gt;
				&lt;xsl:attribute name="src"&gt;https://www.youtube.com/embed/&lt;xsl:value-of select="./tbody/tr[1]/td[2]//text()"/&gt;?rel=0&amp;amp;showinfo=0&amp;amp;autohide=1&lt;/xsl:attribute&gt;
			&lt;/iframe&gt;
		&lt;/div&gt;

		&lt;!-- THE PLAYLIST --&gt;
		&lt;div class="vid-list-container"&gt;
			&lt;div class="vid-list"&gt;

				&lt;xsl:for-each select="./tbody/tr"&gt;
					&lt;div class="vid-item" onclick="document.getElementById('vid_frame{$id}').src='https://youtube.com/embed/{td[2]//text()}?autoplay=1&amp;amp;rel=0&amp;amp;showinfo=0&amp;amp;autohide=1'"&gt;

						&lt;div class="thumb"&gt;&lt;img alt="video thumbnail" src="https://img.youtube.com/vi/{td[2]//text()}/0.jpg" /&gt;&lt;/div&gt;

						&lt;div class="desc"&gt;&lt;xsl:value-of select="td[1]//text()" /&gt;&lt;/div&gt;

					&lt;/div&gt;
				&lt;/xsl:for-each&gt;

			&lt;/div&gt;&lt;!--/vid-list--&gt;
		&lt;/div&gt;&lt;!--/vid-container--&gt;

		&lt;!-- LEFT AND RIGHT ARROWS --&gt;
		&lt;div class="arrows"&gt;
			&lt;div class="arrow-left"&gt;&lt;i class="icon-chevron-left icon-large"&gt;&lt;!--scroll left--&gt;&lt;/i&gt;&lt;/div&gt;
			&lt;div class="arrow-right"&gt;&lt;i class="icon-chevron-right icon-large"&gt;&lt;!--scroll right--&gt;&lt;/i&gt;&lt;/div&gt;
		&lt;/div&gt;

	&lt;/div&gt;
&lt;/xsl:template&gt;
</pre>
<p>And here are the .js for scrolling and .css for styling</p>
<pre class="theme:monokai lang:js decode:true " title=".js for scrolling">//www.woosterwebdesign.com/responsive-youtube-player-with-playlist/

$(document).ready(function () {
		    $(".arrow-right").bind("click", function (event) {
		        event.preventDefault();
		        $(".vid-list-container").stop().animate({
		            scrollLeft: "+=336"
		        }, 750);
		    });
		    $(".arrow-left").bind("click", function (event) {
		        event.preventDefault();
		        $(".vid-list-container").stop().animate({
		            scrollLeft: "-=336"
		        }, 750);
		    });
		});</pre>
<pre class="theme:monokai lang:css decode:true ">/* styles responsive YouTube Gallery with scrolling thumbnails */
/** /www.woosterwebdesign.com/responsive-youtube-player-with-playlist/ **/

/*  VIDEO PLAYER CONTAINER
############################### */
.vid-container {
	position: relative;
	padding-bottom: 52%;
	padding-top: 30px; 
	height: 0; 
}

.vid-container iframe,
.vid-container object,
.vid-container embed {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}


/*  VIDEOS PLAYLIST 
############################### */
.vid-list-container {
	width: 92%;
	overflow: hidden;
	margin-top: 20px;
	margin-left:4%;
	padding-bottom: 20px;
}

.vid-list {
	width: 3680px;
	position: relative;
	top:0;
	left: 0;
}

.vid-item {
	display: block;
	width: 148px;
	height: 148px;
	float: left;
	margin: 0;
	padding: 10px;
}

.thumb {
	/*position: relative;*/
	overflow:hidden;
	height: 84px;
}

.thumb img {
	width: 100%;
	position: relative;
	top: -13px;
}

.vid-item .desc {
	color: #21A1D2;
	font-size: 15px;
	margin-top:5px;
}

.vid-item:hover {
	background: #eee;
	cursor: pointer;
}

.arrows {
	position:relative;
	width: 100%;
}

.arrow-left {
	color: #fff;
	position: absolute;
	background: #777;
	padding: 15px;
	left: -25px;
	top: -130px;
	z-index: 99;
	cursor: pointer;
}

.arrow-right {
	color: #fff;
	position: absolute;
	background: #777;
	padding: 15px;
	right: -25px;
	top: -130px;
	z-index:100;
	cursor: pointer;
}

.arrow-left:hover {
	background: #CC181E;
}

.arrow-right:hover {
	background: #CC181E;
}


@media (max-width: 624px) {
	body {
		margin: 15px;
	}
	.caption {
		margin-top: 40px;
	}
	.vid-list-container {
		padding-bottom: 20px;
	}

	/* reposition left/right arrows */
	.arrows {
		position:relative;
		margin: 0 auto;
		width:96px;
	}
	.arrow-left {
		left: 0;
		top: -17px;
	}

	.arrow-right {
		right: 0;
		top: -17px;
	}
}
</pre>
<p>&#8230;and, finally, some instructions for use:</p>
<blockquote><p>Click the Insert Snippet button, then choose category Video/Embedded Media &gt; YouTube Gallery</p>
<p>This will insert a table in which you enter Title and YouTube ID for each video. This creates a gallery as shown below. To insert additional videos, click the cursor on a table row, then click the Table button, and choose Row &gt; Insert Row Before (or after), then enter the additional title and ID.</p></blockquote>
<p>&nbsp;</p>
<p>The post <a href="https://chrisgilligan.com/consulting/youtube-gallery-snippet-table-transform-ou-campus/">YouTube Gallery snippet &#038; table transform for OU Campus</a> appeared first on <a href="https://chrisgilligan.com">Chris Gilligan » new media</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://chrisgilligan.com/consulting/youtube-gallery-snippet-table-transform-ou-campus/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Integrating Content from External Sources into OU Campus Using RSS, PHP, and JavaScript</title>
		<link>https://chrisgilligan.com/consulting/integrating-content-from-external-sources-into-ou-campus-using-rss-php-and-javascript/</link>
					<comments>https://chrisgilligan.com/consulting/integrating-content-from-external-sources-into-ou-campus-using-rss-php-and-javascript/#respond</comments>
		
		<dc:creator><![CDATA[Chris Gilligan]]></dc:creator>
		<pubDate>Tue, 23 Feb 2016 00:50:35 +0000</pubDate>
				<category><![CDATA[Consulting]]></category>
		<category><![CDATA[Content Management Systems]]></category>
		<category><![CDATA[Education]]></category>
		<category><![CDATA[OU Campus]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://chrisgilligan.com/?p=2386</guid>

					<description><![CDATA[<p>The web team of the University of Tennessee at Chattanooga&#160;uses PHP and RSS to syndicate blog content, news releases, and calendar events into their main website. PHP SimpleXML is used to parse the XML of the RSS feeds. We import a variety of feeds, from WordPress, from Master Calendar, and from other sites such as [&#8230;]</p>
<p>The post <a href="https://chrisgilligan.com/consulting/integrating-content-from-external-sources-into-ou-campus-using-rss-php-and-javascript/">Integrating Content from External Sources into OU Campus Using RSS, PHP, and JavaScript</a> appeared first on <a href="https://chrisgilligan.com">Chris Gilligan » new media</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p style="float: right; margin: 0 0 10px 15px; width:240px; height: auto;">
		<img src="https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2016/02/screen-shot-2016-02-22-at-4.45.18-PM.png?x25141" width="240" style="max-width: 100%; height: auto;" />
		</p><p><strong>The web team of the University of Tennessee at Chattanooga</strong>&nbsp;uses PHP and RSS to syndicate blog content, news releases, and calendar events into their main website.</p>
<p><a href="http://php.net/manual/en/book.simplexml.php" target="_blank" rel="noopener noreferrer">PHP SimpleXML</a> is used to parse the XML of the RSS feeds. We import a variety of feeds, from WordPress, from Master Calendar, and from other sites such as an external athletics CMS. WordPress provides some RSS features, including RSS from categories, tags and search strings, but we have added media attachments and a customized template to output a more complicated RSS feed on the University home page.</p>
<ul>
<li><em>this is a companion blog post for a <a href="https://s3.amazonaws.com/cgilligan-share/OUTC16-presentation-chris-gilligan-php-rss-ou-campus.pdf">presentation</a> given at<br />
<a href="https://www.outc16.com" target="_blank" rel="noopener noreferrer">OmniUpdate OU Campus User Training Conference 2016</a></em></li>
<li><em>shortcut to this blog post:&nbsp;<a href="http://utc.edu/outc16">utc.edu/outc16</a></em></li>
<li><em>links below are production&nbsp;examples of the concepts outlined in this post</em></li>
</ul>
<h2>News releases, events and content from WordPress via RSS</h2>
<p>Example web pages:</p>
<ul>
<li><a href="http://www.utc.edu/sustainability/" target="_blank" rel="noopener noreferrer">OU Campus PHP page with news feed and events feed from WordPress</a></li>
<li><a href="http://www.utc.edu/athletics/" target="_blank" rel="noopener noreferrer">OU Campus PHP page with news feed from SideArm Sports</a></li>
</ul>
<h3>WordPress plugin &amp; PHP to add media attachments to RSS feed</h3>
<p>Example RSS feeds <em>(view XML/XSL styled page in FireFox; View Source to see XML structure, namespaces, node names and structure)</em>:</p>
<ul>
<li><a href="http://watoosa.com/feed/" target="_blank" rel="noopener noreferrer">normal WordPress RSS feed</a></li>
<li><a href="http://blog.utc.edu/news/headlines.xml/" target="_blank" rel="noopener noreferrer">customized WordPress feed with additional namespace and media attachments</a>
<ul>
<li>headlines-customfeed.php&nbsp;<em>(custom feed template)</em></li>
<li>functions.php: load_template&nbsp;<em>(registers and loads the custom feed template)</em></li>
</ul>
</li>
<li><a href="http://gomocs.com/rss.aspx" target="_blank" rel="noopener noreferrer">RSS feed with inline images</a>&nbsp;<em>(open in Firefox to see XML &amp; XSL)</em></li>
</ul>
<p>Custom WordPress RSS feed template, followed by the functions call to load and create it:</p>
<pre class="theme:monokai lang:php decode:true " title="custom-headlines.php goes in (child) template directory">&lt;?php
/*
Template Name: Custom Current Headlines Feed

*/

$numposts = 10;
$category_id = get_cat_ID('Current Headlines');

function custom_rss_date( $timestamp = null ) {
  $timestamp = ($timestamp==null) ? time() : $timestamp;
  echo date(DATE_RSS, $timestamp);
}

function custom_rss_text_limit($string, $length, $replacer = '&amp;hellip;') { 
  $string = strip_tags($string);
  if(strlen($string) &gt; $length) 
    return (preg_match('/^(.*)\W.*$/', substr($string, 0, $length+1), $matches) ? $matches[1] : substr($string, 0, $length)) . $replacer;   
  return $string; 
}

$posts = query_posts('cat='.$category_id.'&amp;showposts='.$numposts);

$lastpost = $numposts - 1;



header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
$more = 1;

echo '&lt;?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'&gt;'; ?&gt;

&lt;rss version="2.0"
	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:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	&lt;?php do_action('rss2_ns'); ?&gt;
&gt;

&lt;channel&gt;
	&lt;title&gt;&lt;?php bloginfo_rss('name'); wp_title_rss(); ?&gt;&lt;/title&gt;
	&lt;atom:link href="&lt;?php self_link(); ?&gt;" rel="self" type="application/rss+xml" /&gt;
	&lt;link&gt;&lt;?php bloginfo_rss('url') ?&gt;&lt;/link&gt;
	&lt;description&gt;&lt;?php bloginfo_rss("description") ?&gt;&lt;/description&gt;
	&lt;lastBuildDate&gt;&lt;?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?&gt;&lt;/lastBuildDate&gt;
	&lt;language&gt;&lt;?php bloginfo_rss( 'language' ); ?&gt;&lt;/language&gt;
	&lt;sy:updatePeriod&gt;&lt;?php echo apply_filters( 'rss_update_period', 'hourly' ); ?&gt;&lt;/sy:updatePeriod&gt;
	&lt;sy:updateFrequency&gt;&lt;?php echo apply_filters( 'rss_update_frequency', '1' ); ?&gt;&lt;/sy:updateFrequency&gt;
	&lt;?php do_action('rss2_head'); ?&gt;
	&lt;?php while( have_posts()) : the_post(); ?&gt;
	&lt;item&gt;
		&lt;title&gt;&lt;?php the_title_rss() ?&gt;&lt;/title&gt;
		&lt;link&gt;&lt;?php the_permalink_rss() ?&gt;&lt;/link&gt;
		&lt;comments&gt;&lt;?php comments_link_feed(); ?&gt;&lt;/comments&gt;
		&lt;pubDate&gt;&lt;?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?&gt;&lt;/pubDate&gt;
		&lt;dc:creator&gt;&lt;?php the_author() ?&gt;&lt;/dc:creator&gt;
&lt;?php the_category_rss('rss2') ?&gt;
		&lt;guid isPermaLink="false"&gt;&lt;?php the_guid(); ?&gt;&lt;/guid&gt;
&lt;?php if (get_option('rss_use_excerpt')) : ?&gt;
		&lt;description&gt;&lt;![CDATA[&lt;?php get_the_excerpt(); ?&gt;]]&gt;&lt;/description&gt;
&lt;?php else : ?&gt;
		&lt;description&gt;&lt;?php echo '&lt;![CDATA['.custom_rss_text_limit($post-&gt;post_content, 256).']]&gt;';  ?&gt;&lt;/description&gt;
&lt;?php $content = get_the_content_feed('rss2'); ?&gt;
	&lt;?php if ( strlen( $content ) &gt; 0 ) : ?&gt;
		&lt;content:encoded&gt;&lt;![CDATA[&lt;?php echo $content; ?&gt;]]&gt;&lt;/content:encoded&gt;
	&lt;?php else : ?&gt;
		&lt;content:encoded&gt;&lt;![CDATA[&lt;?php the_excerpt(); ?&gt;]]&gt;&lt;/content:encoded&gt;
	&lt;?php endif; ?&gt;
&lt;?php endif; ?&gt;
		&lt;wfw:commentRss&gt;&lt;?php echo esc_url( get_post_comments_feed_link(null, 'rss2') ); ?&gt;&lt;/wfw:commentRss&gt;
		&lt;slash:comments&gt;&lt;?php echo get_comments_number(); ?&gt;&lt;/slash:comments&gt;
&lt;?php rss_enclosure(); ?&gt;
&lt;?php do_action('rss2_item'); ?&gt;
		&lt;/item&gt;
	&lt;?php endwhile; ?&gt;
&lt;/channel&gt;
&lt;/rss&gt;
</pre>
<pre class="theme:monokai lang:php decode:true " title="goes in functions.php to load the custom feed">/* Custom RSS Feed for Home Page headlines */

function create_my_customfeed() {
load_template( get_stylesheet_directory() . '/headlines-customfeed.php');
}
add_action('do_feed_headlines', 'create_my_customfeed', 10, 1);
</pre>
<h3>OU Campus PHP helper file and code asset</h3>
<p>To parse an existing external RSS feed, such as a standard or custom WordPress feed, we use a helper file that employs PHP&#8217;s simplexml_load_string to load the targeted RSS feed, traverse the XML document, select node content, then echo out a block of styled html for each set of targeted XML nodes. The helper file accepts&nbsp;the $feed variable to specify the location of the targeted feed, and the $maxitems variable to specify the number of items to select from the top of the that feed.</p>
<p>On its own, the PHP helper file can be hit in a browser, to verify the targeted feed type exists and is parsed correctly. The browser will return an un-styled&nbsp;html page from the helper file URL.</p>
<p>The OU Campus Code Asset includes the helper file, over-rides the helper&#8217;s default variables, is and is very simple to copy and modify, according to the intended target feed and desired number of items to be presented on the final page. Many different Assets can include a single helper file.</p>
<p><em>(Vinit from OmniUpdate outlined a much better way to handle the feed URL and number of items in his Server Side Scripting class: via PCF Page Parameters.)</em></p>
<h3>PHP file</h3>
<ul>
<li><a href="http://www.utc.edu/_resources/php/get-headlines-gomocs.php" target="_blank" rel="noopener noreferrer">parses feed and displays HTML</a>
<ul>
<li>variables set to defaults for testing
<ul>
<li>may need to verify feed access and XML structure</li>
</ul>
</li>
</ul>
</li>
<li>various types of display html
<ul>
<li>title, excerpt, thumbnail from WordPress</li>
<li>title only from WordPress</li>
<li>RSS feed with formatting or namespaces different&nbsp;from WordPress</li>
</ul>
</li>
</ul>
<pre class="theme:monokai lang:php decode:true" title="/_resources/get-headlines-sidebar.php">&lt;?php

$input = $_SERVER['QUERY_STRING'];
parse_str($input);

if (!isset($feed))//script or page property will choose which feed to display
	$feed = "http://blog.utc.edu/news/headlines.xml/";

if(!isset($maxitems))
	$maxitems = 3;

$file = file_get_contents($feed);
$file = str_ireplace('src="http://', 'src="//', $file);
$file = str_ireplace('media:content url="http://', 'media:content url="//', $file);
$file = str_ireplace('media:thumbnail url="http://', 'media:thumbnail url="//', $file);

$sxml = simplexml_load_string($file);

$i = 0;
	foreach ($sxml-&gt;channel-&gt;item as $item) {
		if (++$i &gt; $maxitems) {
				break;
			}
		$namespaces      = $item-&gt;getNameSpaces( true );
		$content         = isset($namespaces['content']) ? $item-&gt;children( $namespaces['content'] ) : '';
		$content_encoded = isset($content-&gt;encoded)      ? $content-&gt;encoded                         : '';
		$media           = isset($namespaces['media'])   ? $item-&gt;children( $namespaces['media'] )   : '';
		$html       = "&lt;div class=\"row-fluid\"&gt;"
					.     "&lt;h3&gt;&lt;a href=\"{$item-&gt;link}\"&gt;{$item-&gt;title}&lt;/a&gt;&lt;/h3&gt;"
					.     "{$content_encoded}"
					.  "&lt;/div&gt;";
	echo($html);
}
?&gt;
&lt;script&gt;
	$(document).ready(function(){
		$('.sidebar img').removeClass().addClass('thumbnail pull-right span5');
		$('aside.well img').removeClass().addClass('thumbnail pull-right span5');
	});
&lt;/script&gt;
</pre>
<h3>OU Campus Assets</h3>
<ul>
<li>simple structure
<ul>
<li>specify RSS source</li>
<li>number of posts to display</li>
</ul>
</li>
</ul>
<pre class="lang:php decode:true " title="OU Campus Asset">&lt;?php
$feed = "//blog.utc.edu/hr/category/benefits/feed/";
include($_SERVER['DOCUMENT_ROOT']. '/_resources/php/get-headlines-sidebar.php');
$maxitems = 5;
?&gt;</pre>
<p><em>(Vinit from OmniUpdate outlined a much better way to handle the feed URL and number of items in his Server Side Scripting class: via PCF Page Parameters.)</em></p>
<h3>More Speed</h3>
<p>After you verify the final production page, you should set up cron jobs for any external feeds that are created via database calls on the external servers. A&nbsp;WordPress feed will require a bit of PHP and MySQL work to generate the RSS feed. This requires some processing, and will introduce a delay in service of the OU Campus PHP page. To avoid this latency, we create cron jobs on the production server to periodically fetch the feeds and cache them locally on the production server. The speed increase for the final page product is noticeable.</p>
<p>If your OU Campus Sites include development, test, training, or mobile Sites, you will want to duplicate the local static feeds on all of the OU Sites.</p>
<p>If you control an external WordPress site, you can&nbsp;employ caching mechanisms or plugins to more efficiently serve RSS feeds.</p>
<ul>
<li>cache RSS feeds via WordPress plugin, e.g. W3 &nbsp;Total Cache</li>
<li>cron job to fetch feeds to local production servers</li>
<li>minimize external requests for faster page load</li>
</ul>
<p>This cron job can be placed in /etc/cron.hourly to fetch WordPress feeds, check <code>lastBuildDate</code>, and compare that to the existing build date, and create a cached RSS xml file.</p>
<pre class="theme:monokai lang:default decode:true" title="wget the feeds to local via cron">#!/bin/bash

# Preload WordPress Feeds for Website

# UTC News
wget http://blog.utc.edu/news/headlines.xml/ -O /data/web/prod/www/_resources/rss/wp-news.tmp &gt;/dev/null 2&gt;&amp;1
TMP_LASTBUILD="$(xml_grep '/rss/channel/lastBuildDate' --text_only /data/web/prod/www/_resources/rss/wp-news.tmp)"
XML_LASTBUILD="$(xml_grep '/rss/channel/lastBuildDate' --text_only /data/web/prod/www/_resources/rss/wp-news.xml)"
MIMETYPE=`file -b --mime-type /data/web/prod/www/_resources/rss/wp-news.tmp`
if [ "$MIMETYPE" == "application/xml" -a  "$TMP_LASTBUILD" != "$XML_LASTBUILD" ] ; then
    mv /data/web/prod/www/_resources/rss/wp-news.tmp /data/web/prod/www/_resources/rss/wp-news.xml
fi

# Duplicate for development, test &amp; training environments
cp -p /data/web/prod/www/_resources/rss/wp*.xml /data/web/test/www/_resources/rss/
cp -p /data/web/prod/www/_resources/rss/wp*.xml /data/web/test/train/_resources/rss/
cp -p /data/web/prod/www/_resources/rss/wp*.xml /data/web/dev/www/_resources/rss/
</pre>
<p>For other RSS sources, the structure may be different; maybe we can&#8217;t do a <code>lastBuildDate</code> check. And&#8230; some servers may not respond to a default wget request from a shell script. No problem: just specify <code>--header</code> and <code>--user-agent</code>, don&#8217;t do the <code>lastBuildDate</code> check, and just write the RSS XML file.</p>
<pre class="theme:monokai lang:default decode:true">#!/bin/bash

# Preload GoMocs Feeds for Website


# Gomocs.com News
wget  --header="Accept: text/html" --user-agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/21.0" http://www.gomocs.com/rss.aspx -O /data/web/prod/www/_resources/gomocs-news.xml

# Duplicate for development, test &amp; training environments
cp -p /data/web/prod/www/_resources/rss/gomocs*.xml /data/web/test/www/_resources/rss/
cp -p /data/web/prod/www/_resources/rss/gomocs*.xml /data/web/test/train/_resources/rss/
cp -p /data/web/prod/www/_resources/rss/gomocs*.xml /data/web/dev/www/_resources/rss/</pre>
<h2>Event Calendar RSS feeds from Master Calendar via RSS</h2>
<p>Example pages that include feeds from Master Calendar. MC has a very rudimentary RSS output of title, date/time and description. MC caches its RSS feeds by default, and expects a lot of traffic to the feed locations, so it is not so necessary to create cron jobs to fetch them. However, if you have an OU Campus page that fetches and displays a large number of MC feeds, you will see a performance increase by using cron jobs. UTC.edu&#8217;s home page fetches a number of feeds, and we saw a noticeably faster page load after moving these calls to cron jobs.</p>
<ul>
<li><a href="http://www.utc.edu/" target="_blank" rel="noopener noreferrer">home page tabbed calendar</a></li>
<li><a href="http://www.utc.edu/music/" target="_blank" rel="noopener noreferrer">simple sidebar calendar</a></li>
</ul>
<h2>Social Media Streams</h2>
<p><strong>UTC uses a jQuery plugin and PHP</strong>&nbsp;to pull in social media posts for the university account, as well as for individual departments and colleges. This is an easy way to create a social stream sidebar or social wall page.</p>
<ul>
<li><a href="http://codecanyon.net/item/jquery-social-stream/2103997" target="_blank" rel="noopener noreferrer">jQuery Social Stream</a></li>
<li><a href="http://www.utc.edu/read-achieve/" target="_blank" rel="noopener noreferrer">program site with Twitter feed</a></li>
<li><a href="http://www.utc.edu/" target="_blank" rel="noopener noreferrer">home page with multiple feeds in a sidebar stream</a></li>
<li><a href="http://www.utc.edu/mocs-news/" target="_blank" rel="noopener noreferrer">social wall page with YouTube videos</a></li>
</ul>
<p><em>Facebook, Twitter and Instagram require PHP &nbsp;API script for connection to signed apps.<a href="http://lulalake.org/" target="_blank" rel="noopener noreferrer">&nbsp;jquery.imagesloaded</a>&nbsp;is helpful for the wall display</em></p>
<h2>Code Samples</h2>
<p><em>(A compilation zip including all code mentioned in the presentation is available. Comment and subscribe to this post&nbsp;to be notified of updates.)</em></p>
<ul>
<li>WordPress plugin to add media attachments to RSS feed</li>
<li>WordPress functions.php changes</li>
<li>PHP files to parse feeds and display HTML</li>
<li>OU Campus Assets to specify RSS source and set number of posts</li>
<li>cron job to fetch RSS feeds to local server</li>
</ul>
<p>The post <a href="https://chrisgilligan.com/consulting/integrating-content-from-external-sources-into-ou-campus-using-rss-php-and-javascript/">Integrating Content from External Sources into OU Campus Using RSS, PHP, and JavaScript</a> appeared first on <a href="https://chrisgilligan.com">Chris Gilligan » new media</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://chrisgilligan.com/consulting/integrating-content-from-external-sources-into-ou-campus-using-rss-php-and-javascript/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>WordPress Fail2Ban RegEx for RedHat, CentOS, Amazon Linux</title>
		<link>https://chrisgilligan.com/consulting/wordpress-wp-fail2ban-regex-redhat-centos-amazon-linux/</link>
					<comments>https://chrisgilligan.com/consulting/wordpress-wp-fail2ban-regex-redhat-centos-amazon-linux/#respond</comments>
		
		<dc:creator><![CDATA[Chris Gilligan]]></dc:creator>
		<pubDate>Thu, 30 May 2013 00:30:24 +0000</pubDate>
				<category><![CDATA[Amazon Web Services]]></category>
		<category><![CDATA[Consulting]]></category>
		<category><![CDATA[Content Management Systems]]></category>
		<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Virtualmin]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://chrisgilligan.com/?p=1875</guid>

					<description><![CDATA[<p>VacantServer WordPress sites are getting hammered with bad logins and probes. We&#8217;ve implemented a plugin to log failed login attempts to syslog, and a Fail2Ban filter for the same. If you run these on RedHat, you&#8217;ll need some additional configuration info&#8230; here it is: WordPress login failure regex (error_log): ^%(__prefix_line)sAuthentication failure for .* from &#60;HOST&#62;$ [&#8230;]</p>
<p>The post <a href="https://chrisgilligan.com/consulting/wordpress-wp-fail2ban-regex-redhat-centos-amazon-linux/">WordPress Fail2Ban RegEx for RedHat, CentOS, Amazon Linux</a> appeared first on <a href="https://chrisgilligan.com">Chris Gilligan » new media</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong><a href="http://vacantserver.net/">VacantServer</a> WordPress sites are getting hammered with bad logins and probes.</strong></p>
<p>We&#8217;ve implemented a <a href="http://wordpress.org/extend/plugins/wp-fail2ban/">plugin to log failed login attempts to syslog</a>, and a Fail2Ban filter for the same. If you run these on RedHat, you&#8217;ll need some additional configuration info&#8230; here it is:</p>
<div>
<div><strong>WordPress login failure regex (error_log):</strong></div>
<div>
<pre class="lang:default decode:true ">^%(__prefix_line)sAuthentication failure for .* from &lt;HOST&gt;$</pre>
<p><strong>Apache nohome regex (error_log):</strong></p>
</div>
<div>
<pre class="lang:default decode:true ">[[]client &lt;HOST&gt;[]] File does not exist: .*/~.*</pre>
<p><strong>PHP noscript regex (/home/*/logs/error_log,/var/log/httpd/error_log):</strong></p>
</div>
<div>
<pre class="lang:default decode:true">[[]client &lt;HOST&gt;[]] (File does not exist|script not found or unable to stat): /\S*(\.php|\.asp|\.exe|\.pl)
[[]client &lt;HOST&gt;[]] script '/\S*(\.php|\.asp|\.exe|\.pl)\S*' not found or unable to stat *$</pre>
<p><strong>XMLRPC flood attacks &#8212; DDoS and probing (/home/*/logs/access_log):</strong></p>
<pre class="lang:default decode:true crayon-selected">&lt;HOST&gt;\s.*\s.POST\s/xmlrpc.php*.\s.*</pre>
<p>Please also enable the generic apache-nohome, apache-noscript. Install wp fail2ban plugin (and configure it for your server) on your high traffic blogs. These all are helping during the current onslaught, which also includes probing for wp-admin directories, probing for /wp-admin/login.php, plus comment spam.</p>
<p>A new XMLRPC exploit has the script kiddies doing DDoS and probing for vulnerable services, and possibly doing remote code execution on vulnerable services.</p>
<h4>Here are some additional resources:</h4>
<ul>
<li>RegEx testing tool: <a href="http://gskinner.com/RegExr/">RegExr (AIR and web versions)</a></li>
<li>use <a href="http://www.fail2ban.org/wiki/index.php/MANUAL_0_8#Testing">Fail2Ban&#8217;s built-in regex testing</a></li>
<li>additionally, try <a href="http://23x.net/908/securing-wordpress-using-fail2ban.html">23x&#8217;s Apache WordPress Fail2Ban advice</a></li>
<li>block spammer IP&#8217;s via <a href="http://blog.shadypixel.com/spam-log-plugin/">Akismet: Spam-Log Plugin</a></li>
</ul>
</div>
</div>
<p>The post <a href="https://chrisgilligan.com/consulting/wordpress-wp-fail2ban-regex-redhat-centos-amazon-linux/">WordPress Fail2Ban RegEx for RedHat, CentOS, Amazon Linux</a> appeared first on <a href="https://chrisgilligan.com">Chris Gilligan » new media</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://chrisgilligan.com/consulting/wordpress-wp-fail2ban-regex-redhat-centos-amazon-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Portable Wifi Hotspot Rental Site</title>
		<link>https://chrisgilligan.com/portfolio/portable-wifi-hotspot-rental-site/</link>
					<comments>https://chrisgilligan.com/portfolio/portable-wifi-hotspot-rental-site/#respond</comments>
		
		<dc:creator><![CDATA[Chris Gilligan]]></dc:creator>
		<pubDate>Wed, 12 Sep 2012 16:25:53 +0000</pubDate>
				<category><![CDATA[Amazon Web Services]]></category>
		<category><![CDATA[Consulting]]></category>
		<category><![CDATA[Content Management Systems]]></category>
		<category><![CDATA[E-Commerce]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Small Business]]></category>
		<category><![CDATA[Travel]]></category>
		<category><![CDATA[Virtualmin]]></category>
		<category><![CDATA[Web Server Performance Tuning]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://chrisgilligan.com/?p=2318</guid>

					<description><![CDATA[<p>Trawire.com offers portable 4G MiFi and iPad rentals for visitors traveling to Iceland. Trawire&#8217;s CIO approached me for assistance after his systems administrator bailed and left him with a poorly maintained, self-hosted MacMini server running unoptimized WordPress installs. I migrated the site to Amazon Web Services, where it now can handle traffic spikes and can be [&#8230;]</p>
<p>The post <a href="https://chrisgilligan.com/portfolio/portable-wifi-hotspot-rental-site/">Portable Wifi Hotspot Rental Site</a> appeared first on <a href="https://chrisgilligan.com">Chris Gilligan » new media</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p style="float: right; margin: 0 0 10px 15px; width:240px; height: auto;">
		<img src="https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2014/10/screen-shot-2014-10-02-at-12.29.29-PM.png?x25141" width="240" style="max-width: 100%; height: auto;" />
		</p><p><strong><a href="http://iceland.trawire.com/">Trawire.com</a> offers portable 4G MiFi and iPad rentals for visitors traveling to Iceland.</strong> Trawire&#8217;s CIO approached me for assistance after his systems administrator bailed and left him with a poorly maintained, self-hosted MacMini server running unoptimized WordPress installs.</p>
<div id="attachment_2319" style="width: 310px" class="wp-caption aligncenter"><a href="http://iceland.trawire.com/"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-2319" class="size-medium wp-image-2319" src="https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2014/10/screen-shot-2014-10-02-at-12.29.29-PM-300x259.png?x25141" alt="Trawire website" width="300" height="259" srcset="https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2014/10/screen-shot-2014-10-02-at-12.29.29-PM-300x259.png?x25141 300w, https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2014/10/screen-shot-2014-10-02-at-12.29.29-PM-1024x886.png?x25141 1024w, https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2014/10/screen-shot-2014-10-02-at-12.29.29-PM.png?x25141 1235w" sizes="(max-width: 300px) 100vw, 300px" /></a><p id="caption-attachment-2319" class="wp-caption-text">Trawire website</p></div>
<p>I migrated the site to Amazon Web Services, where it now can handle traffic spikes and can be scaled and built out more easily, should the concept grow to additional markets. Working with my WordPress coding contacts in India, Trawire developed plugins to add features, and keep the software up-to-date. My contributions: caching and content distribution for static assets &amp; queries, Virtualmin and phpMyAdmin for ease of management and development.</p>
<p>&nbsp;</p>
<p>The post <a href="https://chrisgilligan.com/portfolio/portable-wifi-hotspot-rental-site/">Portable Wifi Hotspot Rental Site</a> appeared first on <a href="https://chrisgilligan.com">Chris Gilligan » new media</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://chrisgilligan.com/portfolio/portable-wifi-hotspot-rental-site/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Varnish VCL and Config for WordPress with W3 Total Cache</title>
		<link>https://chrisgilligan.com/consulting/varnish-vcl-and-config-for-wordpress-with-w3-total-cache/</link>
					<comments>https://chrisgilligan.com/consulting/varnish-vcl-and-config-for-wordpress-with-w3-total-cache/#comments</comments>
		
		<dc:creator><![CDATA[Chris Gilligan]]></dc:creator>
		<pubDate>Wed, 15 Aug 2012 00:23:11 +0000</pubDate>
				<category><![CDATA[Amazon Web Services]]></category>
		<category><![CDATA[Consulting]]></category>
		<category><![CDATA[Content Management Systems]]></category>
		<category><![CDATA[Web Server Performance Tuning]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[apc]]></category>
		<category><![CDATA[apc cache]]></category>
		<category><![CDATA[apc fcgid]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[varnish]]></category>
		<category><![CDATA[varnish cache]]></category>
		<category><![CDATA[w3 total cache]]></category>
		<category><![CDATA[w3tc]]></category>
		<guid isPermaLink="false">https://chrisgilligan.com/?p=867</guid>

					<description><![CDATA[<p>I have been working on a Varnish front-end for Apache, to be used with WordPress sites. I described the architecture in Load Balancing Virtualmin WordPress Hosting Server with Varnish on AWS. I now have a configuration that seems to work for all WordPress features, including logged-out commenting. This configuration also works well with W3 Total [&#8230;]</p>
<p>The post <a href="https://chrisgilligan.com/consulting/varnish-vcl-and-config-for-wordpress-with-w3-total-cache/">Varnish VCL and Config for WordPress with W3 Total Cache</a> appeared first on <a href="https://chrisgilligan.com">Chris Gilligan » new media</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p style="float: right; margin: 0 0 10px 15px; width:240px; height: auto;">
		<img src="https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2012/08/wordnish.png?x25141" width="240" style="max-width: 100%; height: auto;" />
		</p><p>I have been working on a Varnish front-end for Apache, to be used with WordPress sites. I described the architecture in <a title="Load Balancing Virtualmin WordPress Hosting Server with Varnish on AWS" href="https://chrisgilligan.com/consulting/load-balancing-virtualmin-wordpress-hosting-server-varnish-aws/">Load Balancing Virtualmin WordPress Hosting Server with Varnish on AWS</a>. I now have a configuration that seems to work for all WordPress features, including logged-out commenting. This configuration also works well with W3 Total Cache.</p>
<p>This configuration is for Varnish on a separate server, but should also work on a single server with appropriate changes to the port and backend IP settings.</p>
<h3>Varnish Config (/etc/sysconfig/varnish)</h3>
<pre class="lang:perl decode:true crayon-selected"># Configuration file for varnish
#
# /etc/init.d/varnish expects the variable $DAEMON_OPTS to be set from this
# shell script fragment.
#
#
# Maximum number of open files (for ulimit -n)
NFILES=131072
#
# Locked shared memory (for ulimit -l)
# Default log size is 82MB + header
MEMLOCK=82000
#
# Maximum size of corefile (for ulimit -c). Default in Fedora is 0
# DAEMON_COREFILE_LIMIT="unlimited"
#
# Set this to 1 to make init script reload try to switch vcl without restart.
# To make this work, you need to set the following variables
# explicit: VARNISH_VCL_CONF, VARNISH_ADMIN_LISTEN_ADDRESS,
# VARNISH_ADMIN_LISTEN_PORT, VARNISH_SECRET_FILE
RELOAD_VCL=1
#
## Advanced configuration
#
# # Main configuration file.
VARNISH_VCL_CONF=/etc/varnish/wordpress-varnish3.vcl
#
# # Default address and port to bind to
# # Blank address means all IPv4 and IPv6 interfaces, otherwise specify
# # a host name, an IPv4 dotted quad, or an IPv6 address in brackets.
# VARNISH_LISTEN_ADDRESS=
VARNISH_LISTEN_PORT=80
#
# # Telnet admin interface listen address and port
VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1
VARNISH_ADMIN_LISTEN_PORT=6082
#
# # Shared secret file for admin interface
VARNISH_SECRET_FILE=/etc/varnish/secret
#
# # The minimum number of worker threads to start
VARNISH_MIN_THREADS=1
#
# # The Maximum number of worker threads to start
VARNISH_MAX_THREADS=1000
#
# # Idle timeout for worker threads
VARNISH_THREAD_TIMEOUT=120
#
# # Cache file location if using file cache
#VARNISH_STORAGE_FILE=/var/lib/varnish/varnish_storage.bin
#
# # Cache size: in bytes, optionally using k / M / G / T suffix,
# # or in percentage of available disk space using the % suffix.
VARNISH_STORAGE_SIZE=3G
#
# # Backend storage specification
# malloc runs from RAM, file from file
VARNISH_STORAGE="malloc,${VARNISH_STORAGE_SIZE}"
#VARNISH_STORAGE="file,${VARNISH_STORAGE_FILE},${VARNISH_STORAGE_SIZE}"
#
# # Default TTL used when the backend does not specify one
VARNISH_TTL=120
#
# # DAEMON_OPTS is used by the init script. If you add or remove options,
# # be sure you update this section, too.
DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \
-f ${VARNISH_VCL_CONF} \
-T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \
-t ${VARNISH_TTL} \
-w ${VARNISH_MIN_THREADS},${VARNISH_MAX_THREADS},${VARNISH_THREAD_TIMEOUT} \
-u varnish -g varnish \
-S ${VARNISH_SECRET_FILE} \
-s ${VARNISH_STORAGE}"
#</pre>
<h3>Varnish VCL (/etc/varnish/wordpress-varnish3.vcl)</h3>
<pre class="lang:default decode:true">backend origin {
.host = "10.11.12.13";
.port = "80";
.connect_timeout = 60s;
.first_byte_timeout = 60s;
.between_bytes_timeout = 60s;
}
#
sub vcl_recv {
# only using one backend
set req.backend = origin;
#
# set standard proxied ip header for getting original remote address
set req.http.X-Forwarded-For = client.ip;
#
# logged in users must always pass
if( req.url ~ "^/wp-(login|admin)" || req.http.Cookie ~ "wordpress_logged_in_" ){
return (pass);
}
# accept purges from w3tc and varnish http purge
if (req.request == "PURGE") {
return (lookup);
}
#
# don't cache search results
if( req.url ~ "\?s=" ){
return (pass);
}
#
# always pass through posted requests and those with basic auth
if ( req.request == "POST" || req.http.Authorization ) {
return (pass);
}
#
# else ok to fetch a cached page
unset req.http.Cookie;
return (lookup);
}
#
# accept purges from w3tc and varnish http purge
sub vcl_hit {
if (req.request == "PURGE") { purge; }
return (deliver);
}
#
# accept purges from w3tc and varnish http purge
sub vcl_miss {
if (req.request == "PURGE") { purge; }
return (fetch);
}
#
sub vcl_fetch {
#
# remove some headers we never want to see
unset beresp.http.Server;
unset beresp.http.X-Powered-By;
#
# only allow cookies to be set if we're in admin area - i.e. commenters stay logged out
if( beresp.http.Set-Cookie &amp;&amp; req.url !~ "^/wp-(login|admin)" ){
unset beresp.http.Set-Cookie;
}
#
# don't cache response to posted requests or those with basic auth
if ( req.request == "POST" || req.http.Authorization ) {
return (hit_for_pass);
}
#
# only cache status ok
if ( beresp.status != 200 ) {
return (hit_for_pass);
}
#
# don't cache search results
if( req.url ~ "\?s=" ){
return (hit_for_pass);
}
#
# else ok to cache the response
set beresp.ttl = 24h;
return (deliver);
}
#
sub vcl_deliver {
# add debugging headers, so we can see what's cached
if (obj.hits &gt; 0) {
set resp.http.X-Cache = "HIT";
}
else {
set resp.http.X-Cache = "MISS";
}
# remove some headers added by varnish
unset resp.http.Via;
unset resp.http.X-Varnish;
}
#
sub vcl_hash {
hash_data( req.url );
# altering hash so subdomains are ignored.
# don't do this if you actually run different sites on different subdomains
if ( req.http.host ) {
hash_data( regsub( req.http.host, "^([^\.]+\.)+([a-z]+)$", "\1\2" ) );
} else {
hash_data( server.ip );
}
# ensure separate cache for mobile clients (WPTouch workaround)
if( req.http.User-Agent ~ "(iPod|iPhone|incognito|webmate|dream|CUPCAKE|WebOS|blackberry9\d\d\d)" ){
hash_data("touch");
}
return (hash);
}</pre>
<p>The post <a href="https://chrisgilligan.com/consulting/varnish-vcl-and-config-for-wordpress-with-w3-total-cache/">Varnish VCL and Config for WordPress with W3 Total Cache</a> appeared first on <a href="https://chrisgilligan.com">Chris Gilligan » new media</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://chrisgilligan.com/consulting/varnish-vcl-and-config-for-wordpress-with-w3-total-cache/feed/</wfw:commentRss>
			<slash:comments>25</slash:comments>
		
		
			</item>
		<item>
		<title>Office Furniture Retail Showcase</title>
		<link>https://chrisgilligan.com/portfolio/office-furniture-chattanooga/</link>
					<comments>https://chrisgilligan.com/portfolio/office-furniture-chattanooga/#comments</comments>
		
		<dc:creator><![CDATA[Chris Gilligan]]></dc:creator>
		<pubDate>Tue, 17 May 2011 15:21:01 +0000</pubDate>
				<category><![CDATA[Content Management Systems]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Retail]]></category>
		<category><![CDATA[Small Business]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Content Management]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[portfolio]]></category>
		<category><![CDATA[Search Engine Optimization]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Social Media]]></category>
		<guid isPermaLink="false">https://chrisgilligan.com/?p=332</guid>

					<description><![CDATA[<p>I worked with Office Coordinators Inc&#8217;s talented in-house designers to update the OCI website. OCI chose an e-commerce theme, and we completely reworked the CSS and layout to match their colors and logo treatment. After a previous failed attempt with another developer, they were surprised at how quickly the site came together, and how easy [&#8230;]</p>
<p>The post <a href="https://chrisgilligan.com/portfolio/office-furniture-chattanooga/">Office Furniture Retail Showcase</a> appeared first on <a href="https://chrisgilligan.com">Chris Gilligan » new media</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p style="float: right; margin: 0 0 10px 15px; width:240px; height: auto;">
		<img src="https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2011/05/Screen-shot-2011-05-17-at-9.51.53-AM.png?x25141" width="240" style="max-width: 100%; height: auto;" />
		</p><div id="attachment_333" style="width: 310px" class="wp-caption aligncenter"><a href="http://officecoordinators.com/"><img decoding="async" aria-describedby="caption-attachment-333" class="size-medium wp-image-333" title="Office Coordinators Inc. website" src="https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2011/05/Screen-shot-2011-05-17-at-9.51.53-AM-300x200.png?x25141" alt="Office Coordinators Inc. website" width="300" height="200" srcset="https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2011/05/Screen-shot-2011-05-17-at-9.51.53-AM-300x200.png?x25141 300w, https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2011/05/Screen-shot-2011-05-17-at-9.51.53-AM-1024x682.png?x25141 1024w, https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2011/05/Screen-shot-2011-05-17-at-9.51.53-AM.png?x25141 1350w" sizes="(max-width: 300px) 100vw, 300px" /></a><p id="caption-attachment-333" class="wp-caption-text">Office Coordinators Inc. website</p></div>
<p><strong>I worked with <strong>Office Coordinators Inc&#8217;s</strong> talented in-house designers to update the OCI website.</strong> OCI chose an e-commerce theme, and we completely reworked the CSS and layout to match their colors and logo treatment. After a previous failed attempt with another developer, they were surprised at how quickly the site came together, and how easy it is to manage with WordPress!</p>
<ul>
<li><strong>&#8220;Inquiry mode&#8221; e-commerce:</strong> customers can select items, add to shopping cart, then email for more information or price quote</li>
<li><strong>Search Engine Optimization: </strong>Google Analytics and Sitemaps</li>
<li><strong>WordPress</strong> Content Management</li>
<li><strong>Social Networking</strong> with Facebook &#8220;score card&#8221;</li>
</ul>
<blockquote><p>Thank you for your persistence. You’re our favorite website/technically savvy guy ever.<br />
— Emily Vaughn, OCI</p></blockquote>
<p>The post <a href="https://chrisgilligan.com/portfolio/office-furniture-chattanooga/">Office Furniture Retail Showcase</a> appeared first on <a href="https://chrisgilligan.com">Chris Gilligan » new media</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://chrisgilligan.com/portfolio/office-furniture-chattanooga/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Bike Shop Website with Facebook Features</title>
		<link>https://chrisgilligan.com/portfolio/bike-shop-website-with-facebook-features/</link>
					<comments>https://chrisgilligan.com/portfolio/bike-shop-website-with-facebook-features/#respond</comments>
		
		<dc:creator><![CDATA[Chris Gilligan]]></dc:creator>
		<pubDate>Sun, 13 Feb 2011 21:51:43 +0000</pubDate>
				<category><![CDATA[Content Management Systems]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Retail]]></category>
		<category><![CDATA[Small Business]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[chattanooga]]></category>
		<category><![CDATA[Cycling]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[portfolio]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Syndication]]></category>
		<guid isPermaLink="false">https://chrisgilligan.com/?p=316</guid>

					<description><![CDATA[<p>I&#8217;ve been hosting and helping with Suck Creek Cycle&#8217;s website since they opened in 1998. The site was long overdue for an upgrade, so I took an existing template design and tweaked it a bit to look like the bike shop, then integrated social media and syndicated content from their vendors. Facebook local business page [&#8230;]</p>
<p>The post <a href="https://chrisgilligan.com/portfolio/bike-shop-website-with-facebook-features/">Bike Shop Website with Facebook Features</a> appeared first on <a href="https://chrisgilligan.com">Chris Gilligan » new media</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p style="float: right; margin: 0 0 10px 15px; width:240px; height: auto;">
		<img src="https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2011/02/suck-creek-cycle.png?x25141" width="240" style="max-width: 100%; height: auto;" />
		</p><div id="attachment_317" style="width: 310px" class="wp-caption aligncenter"><a href="http://suckcreek.com/"><img decoding="async" aria-describedby="caption-attachment-317" class="size-medium wp-image-317" title="suck-creek-cycle" src="https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2011/02/suck-creek-cycle-300x245.png?x25141" alt="" width="300" height="245" srcset="https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2011/02/suck-creek-cycle-300x245.png?x25141 300w, https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2011/02/suck-creek-cycle-1024x836.png?x25141 1024w, https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2011/02/suck-creek-cycle.png?x25141 1102w" sizes="(max-width: 300px) 100vw, 300px" /></a><p id="caption-attachment-317" class="wp-caption-text">Suck Creek Cycle website</p></div>
<p><strong>I&#8217;ve been hosting and helping with <a href="http://suckcreek.com/">Suck Creek Cycle&#8217;s website</a> since they opened in 1998.</strong> The site was long overdue for an upgrade, so I took an existing template design and tweaked it a bit to look like the bike shop, then integrated social media and syndicated content from their vendors.</p>
<ul>
<li>Facebook local business page integration — publish from WordPress directly to Facebook</li>
<li>Facebook Friends and Wall displayed on the website</li>
<li>RSS Syndication for news from cycling sites and bike vendors</li>
</ul>
<p>The post <a href="https://chrisgilligan.com/portfolio/bike-shop-website-with-facebook-features/">Bike Shop Website with Facebook Features</a> appeared first on <a href="https://chrisgilligan.com">Chris Gilligan » new media</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://chrisgilligan.com/portfolio/bike-shop-website-with-facebook-features/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Farmers Market Website</title>
		<link>https://chrisgilligan.com/portfolio/farmers-market-website/</link>
					<comments>https://chrisgilligan.com/portfolio/farmers-market-website/#respond</comments>
		
		<dc:creator><![CDATA[Chris Gilligan]]></dc:creator>
		<pubDate>Sun, 05 Sep 2010 19:35:30 +0000</pubDate>
				<category><![CDATA[Agriculture]]></category>
		<category><![CDATA[Content Management Systems]]></category>
		<category><![CDATA[Organic Farms]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[chattanooga]]></category>
		<category><![CDATA[Content Management]]></category>
		<category><![CDATA[farmers market]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[local designers]]></category>
		<category><![CDATA[logos]]></category>
		<category><![CDATA[portfolio]]></category>
		<category><![CDATA[recipes]]></category>
		<category><![CDATA[Search Engine Optimization]]></category>
		<category><![CDATA[slider]]></category>
		<category><![CDATA[SlideShowPro]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[widgets]]></category>
		<guid isPermaLink="false">https://chrisgilligan.com/?p=260</guid>

					<description><![CDATA[<p>This is a major redesign of the website for Chattanooga&#8217;s Main St Farmers Market. Local designers Widgets &#38; Stone came up with the logos and suggested the look and feel, and I worked with Padgett Arnold to get the visuals and content just right. Interactive home page presents tons of information in a compact javascript [&#8230;]</p>
<p>The post <a href="https://chrisgilligan.com/portfolio/farmers-market-website/">Farmers Market Website</a> appeared first on <a href="https://chrisgilligan.com">Chris Gilligan » new media</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p style="float: right; margin: 0 0 10px 15px; width:240px; height: auto;">
		<img src="https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2010/09/Picture-11.png?x25141" width="240" style="max-width: 100%; height: auto;" />
		</p><div id="attachment_261" style="width: 310px" class="wp-caption aligncenter"><a href="http://mainstfarmersmarket.com/"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-261" class="size-medium wp-image-261" title="Main St Farmers Market" alt="" src="https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2010/09/Picture-11-300x248.png?x25141" width="300" height="248" srcset="https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2010/09/Picture-11-300x248.png?x25141 300w, https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2010/09/Picture-11-1024x847.png?x25141 1024w, https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2010/09/Picture-11.png?x25141 1144w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a><p id="caption-attachment-261" class="wp-caption-text">Main St Farmers Market website</p></div>
<p><strong>This is a major redesign</strong> of the website for <a href="http://mainstfarmersmarket.com/">Chattanooga&#8217;s Main St Farmers Market</a>. Local <a href="http://widgetsandstone.com/page/projects/unprocessing-farmers-trademark/">designers Widgets &amp; Stone</a> came up with the logos and suggested the look and feel, and I worked with Padgett Arnold to get the visuals and content just right. <del><br />
</del></p>
<ul>
<li>Interactive home page presents tons of information in a compact javascript slider</li>
<li>Fresh content includes recipes and a list of what&#8217;s available each week</li>
<li>Facebook fan page gets automatically updated with new content</li>
<li>New photos and videos are easily uploaded via SlideShowPro and YouTuber for a fun, engaging user experience</li>
<li>Lightweight CSS3 design and an alternative layout for mobile browsers present the site quickly and efficiently</li>
</ul>
<p>The post <a href="https://chrisgilligan.com/portfolio/farmers-market-website/">Farmers Market Website</a> appeared first on <a href="https://chrisgilligan.com">Chris Gilligan » new media</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://chrisgilligan.com/portfolio/farmers-market-website/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Landscape Architect Website with Slideshows &#038; Social Media Integration</title>
		<link>https://chrisgilligan.com/portfolio/landscape-architect-website-with-slideshows-social-media-integration/</link>
					<comments>https://chrisgilligan.com/portfolio/landscape-architect-website-with-slideshows-social-media-integration/#respond</comments>
		
		<dc:creator><![CDATA[Chris Gilligan]]></dc:creator>
		<pubDate>Thu, 28 Jan 2010 20:32:48 +0000</pubDate>
				<category><![CDATA[Content Management Systems]]></category>
		<category><![CDATA[Contracting]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Content Management]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[portfolio]]></category>
		<category><![CDATA[Search Engine Optimization]]></category>
		<category><![CDATA[SlideShowPro]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Twitter]]></category>
		<guid isPermaLink="false">https://chrisgilligan.com/?p=238</guid>

					<description><![CDATA[<p>This is a simple website for a Chattanooga based landscape architect that focuses on beautiful portfolio slideshows. We&#8217;ve also added Twitter and Facebook integration to keep fans and customers updated on the latest projects.</p>
<p>The post <a href="https://chrisgilligan.com/portfolio/landscape-architect-website-with-slideshows-social-media-integration/">Landscape Architect Website with Slideshows &#038; Social Media Integration</a> appeared first on <a href="https://chrisgilligan.com">Chris Gilligan » new media</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p style="float: right; margin: 0 0 10px 15px; width:240px; height: auto;">
		<img src="https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2010/01/Picture-3.png?x25141" width="240" style="max-width: 100%; height: auto;" />
		</p><div id="attachment_239" style="width: 310px" class="wp-caption aligncenter"><a href="http://craigdesigngroup.com/"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-239" class="size-medium wp-image-239" title="Craig Design Group Website" alt="Craig Design Group Website" src="https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2010/01/Picture-3-300x251.png?x25141" width="300" height="251" srcset="https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2010/01/Picture-3-300x251.png?x25141 300w, https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2010/01/Picture-3-1024x859.png?x25141 1024w, https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2010/01/Picture-3.png?x25141 1074w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a><p id="caption-attachment-239" class="wp-caption-text">Craig Design Group Website</p></div>
<p>This is a simple website for a <a href="http://craigdesigngroup.com/">Chattanooga based landscape architect</a> that focuses on beautiful portfolio slideshows. We&#8217;ve also added Twitter and Facebook integration to keep fans and customers updated on the latest projects.</p>
<p>The post <a href="https://chrisgilligan.com/portfolio/landscape-architect-website-with-slideshows-social-media-integration/">Landscape Architect Website with Slideshows &#038; Social Media Integration</a> appeared first on <a href="https://chrisgilligan.com">Chris Gilligan » new media</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://chrisgilligan.com/portfolio/landscape-architect-website-with-slideshows-social-media-integration/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Social Media &#8212; Facebook, Twitter, Blogging and Sharing</title>
		<link>https://chrisgilligan.com/consulting/content-management-systems/social-media-facebook-twitter-blogging-and-sharing/</link>
					<comments>https://chrisgilligan.com/consulting/content-management-systems/social-media-facebook-twitter-blogging-and-sharing/#respond</comments>
		
		<dc:creator><![CDATA[Chris Gilligan]]></dc:creator>
		<pubDate>Thu, 03 Dec 2009 19:19:42 +0000</pubDate>
				<category><![CDATA[Content Management Systems]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Bookmarking]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Twitter]]></category>
		<guid isPermaLink="false">https://chrisgilligan.com/?p=219</guid>

					<description><![CDATA[<p>Social media, including sites like Facebook and MySpace, micro-blogging platforms like Twitter, and sharing/bookmarking tools like Digg, Del.icio.us and Stumble Upon are all very important to your outreach to customers, not to mention the incoming links they provide, and the potential of exponential viral traffic. Add to this the need for regular blogging (on your [&#8230;]</p>
<p>The post <a href="https://chrisgilligan.com/consulting/content-management-systems/social-media-facebook-twitter-blogging-and-sharing/">Social Media &#8212; Facebook, Twitter, Blogging and Sharing</a> appeared first on <a href="https://chrisgilligan.com">Chris Gilligan » new media</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p style="float: right; margin: 0 0 10px 15px; width:240px; height: auto;">
		<img src="https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2009/12/social-media-icons.jpg?x25141" width="240" style="max-width: 100%; height: auto;" />
		</p><p><a href="https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2009/12/social-media-icons.jpg?x25141"><img loading="lazy" decoding="async" class="alignright size-thumbnail wp-image-917" title="social-media-icons" src="https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2009/12/social-media-icons-150x150.jpg?x25141" alt="" width="150" height="150" srcset="https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2009/12/social-media-icons-150x150.jpg?x25141 150w, https://d2lehxir4n36oh.cloudfront.net/wp-content/uploads/2009/12/social-media-icons.jpg?x25141 524w" sizes="auto, (max-width: 150px) 100vw, 150px" /></a><strong>Social media</strong>, including sites like Facebook and MySpace, micro-blogging platforms like Twitter, and sharing/bookmarking tools like Digg, Del.icio.us and Stumble Upon are all very important to your outreach to customers, not to mention the incoming links they provide, and the potential of exponential viral traffic.</p>
<p>Add to this the need for regular blogging (on your site and other platforms) and email updates, and the management of all this online communication becomes daunting. What if there were a way to integrate all of your modes of online presence, so you&#8217;d only have to post once to update all of the different platforms? Well, the short answer is: there is.</p>
<p>I&#8217;ve been working with a <a href="http://sequatchiecovefarm.com/">local organic farm</a> to update their online presence, and we&#8217;ve come up with a very simple implementation of WordPress that cross-posts to Facebook Pages and Twitter. Every blog post automatically creates an entry with linkback on Facebook Pages, and an accompanying Tweet with linkback. It has been a great way to keep the farm&#8217;s audience informed and engaged.</p>
<p>Additionally, we&#8217;ve added bookmarking links for all of the major social media platforms and favorites keepers, thus adding to the potential for viral sharing.</p>
<p>I&#8217;m also working on a mailing list that further integrates with WordPress, and it&#8217;s looking very promising. There is a new WordPress mailing list plugin that allows opt-in or manually entered mailing list clients to manage automated subscriptions to blog and page updates, and allows administrators to manage multiple mailing lists, and send newsletters and alerts. It integrates with the website seamlessly and also has <a href="http://tinymce.moxiecode.com/examples/full.php">WYSIWYG</a> editing.</p>
<p>The post <a href="https://chrisgilligan.com/consulting/content-management-systems/social-media-facebook-twitter-blogging-and-sharing/">Social Media &#8212; Facebook, Twitter, Blogging and Sharing</a> appeared first on <a href="https://chrisgilligan.com">Chris Gilligan » new media</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://chrisgilligan.com/consulting/content-management-systems/social-media-facebook-twitter-blogging-and-sharing/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Page Caching using Disk: Enhanced 
Content Delivery Network via Amazon Web Services: CloudFront: d2lehxir4n36oh.cloudfront.net
Lazy Loading (feed)

Served from: chrisgilligan.com @ 2026-07-17 06:28:53 by W3 Total Cache
-->