<?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>scriptygoddess &#187; How to&#8217;s</title>
	<atom:link href="http://www.scriptygoddess.com/archives/category/how-tos/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scriptygoddess.com</link>
	<description></description>
	<lastBuildDate>Thu, 08 Dec 2011 18:23:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Download all images on a web page</title>
		<link>http://www.scriptygoddess.com/archives/2010/12/16/download-all-images-on-a-web-page/</link>
		<comments>http://www.scriptygoddess.com/archives/2010/12/16/download-all-images-on-a-web-page/#comments</comments>
		<pubDate>Fri, 17 Dec 2010 06:38:35 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[How to's]]></category>
		<category><![CDATA[Lessons learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1654</guid>
		<description><![CDATA[Once upon a time, you used to be able to download all images that were on a page using the Firefox Web Developer Toolbar addon. It&#039;s been a long time since it worked correctly. You can still download regular images on a page, but any image that is called via CSS (background images, etc.) won&#039;t [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Once upon a time, you used to be able to download all images that were on a page using the Firefox Web Developer Toolbar addon. It&#039;s been a long time since it worked correctly. You can still download regular images on a page, but any image that is called via CSS (background images, etc.) won&#039;t be included in what the Web Developer toolbar&#039;s &#034;Images -&gt; View Image Information&#034; shows.</p>
<p>Of course there&#039;s another way &#8211; but I never knew it until recently. It&#039;s incredibly simple and built right into Firefox. Just right-click on a page, select &#034;view page info&#034; from the menu. Then on the pop-up click the &#034;media&#034; tab. That will list all the images on the page, both ones called from the HTML and the CSS.</p>
<p><img class="aligncenter size-medium wp-image-1659" title="Screen shot 2010-12-16 at Dec 16  8.53.19 PM" src="http://www.scriptygoddess.com/wp-content/uploads/2010/12/Screen-shot-2010-12-16-at-Dec-16-8.53.19-PM-300x300.png" alt="" width="300" height="300" /></p>
<p>You can click on individual image and then click &#034;Save As&#034; to download one in particular you want. Or if you want all of them, hold down the shift key and select all the lines. Then click &#034;save as&#034; to save them down to your computer.</p>
<p><img class="aligncenter size-medium wp-image-1660" title="Screen shot 2010-12-16 at Dec 16  9.08.07 PM" src="http://www.scriptygoddess.com/wp-content/uploads/2010/12/Screen-shot-2010-12-16-at-Dec-16-9.08.07-PM-300x300.png" alt="" width="300" height="300" /></p>
<p>I found this tip here: <a href="http://www.webdeveloper.com/forum/showthread.php?t=212610">http://www.webdeveloper.com/forum/showthread.php?t=212610</a></p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2010/12/16/download-all-images-on-a-web-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inline Trackback Display</title>
		<link>http://www.scriptygoddess.com/archives/2003/08/10/inline-trackback-display/</link>
		<comments>http://www.scriptygoddess.com/archives/2003/08/10/inline-trackback-display/#comments</comments>
		<pubDate>Mon, 11 Aug 2003 02:04:56 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[How to's]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2003/08/10/inline-trackback-display/</guid>
		<description><![CDATA[Guest Authored by<br />
Kevin - <a href="http://wizbangblog.com/">Wizbangblog.com</a>
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Here&#039;s a nice Movable Type template trick <a href="http://wizbangblog.com/archives/000461.php">originally posted</a> at Wizbang. Show your posts&#039; trackbacks inline with your posts.  Why do this? Well it shows readers who is linking to your post, plus it provides Ecosystem and Technorati links to the sites that send you trackbacks.<br />
<span id="more-1108"></span><br />
This technique is now used at a number of popular sites.  <a href="http://amish.blogmosis.com/">Amish Tech Support</a>, <a href="http://outsidethebeltway.com/">Outside The Beltway</a>, <a href="http://electricvenom.com/">Electric Venom</a>, <a href="http://wizbangblog.com/">Wizbang</a>, and a long list of other sites.  Visit any of these sites to see the code <a href="http://wizbangblog.com/">in action</a>.</p>
<p><strong>Installation</strong><br />
Place the code below at the end of your Posted By line, replacing whatever is listed between the &lt;MTEntryIfAllowPings&gt; and &lt;/MTEntryIfAllowPings&gt;.  Use the code in your Main Index, Date, Category, and Individual Archive templates.  Note that the lastn=&#034;15&#034; can be changed to whatever you like.</p>
<h3>&lt;MTEntryIfAllowPings&gt;<br />
| &lt;a<br />
href=&#034;&lt;$MTCGIPath$&gt;&lt;$MTTrackbackScript$&gt;?__mode=view&#038;entry_i<br />
d=&lt;$MTEntryID$&gt;&#034;<br />
onclick=&#034;OpenTrackback(this.href); return false&#034;&gt;Trackbacks&lt;/a&gt;<br />
(&lt;$MTEntryTrackbackCount$&gt;)<br />
&lt;MTPings lastn=&#034;15&#034;&gt;<br />
&lt;br&gt;&lt;$MTPingBlogName$&gt; linked with &lt;a href=&#034;&lt;$MTPingURL$&gt;&#034;&gt;&lt;$MTPingTitle$&gt;&lt;/a&gt;<br />
&lt;/MTPings&gt;<br />
&lt;/MTEntryIfAllowPings&gt;</h3>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2003/08/10/inline-trackback-display/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Creating a Sideblog in MT</title>
		<link>http://www.scriptygoddess.com/archives/2003/07/01/creating-a-sideblog-in-mt/</link>
		<comments>http://www.scriptygoddess.com/archives/2003/07/01/creating-a-sideblog-in-mt/#comments</comments>
		<pubDate>Wed, 02 Jul 2003 02:17:08 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[How to's]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2003/07/01/creating-a-sideblog-in-mt/</guid>
		<description><![CDATA[Guest authored by<br />
Kevin Donahue- <a href="http://blog.kevindonahue.com">blog.kevindonahue.com</a>
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Having seen some great &#034;sideblogs&#034; across the internet (<a href="http://www.bigpinkcookie.com/">Christine&#039;s Crumbs</a>, <a href="http://www.movableblog.com/">Movablog&#039;s Asides</a>, and many others) I&#039;m inspired to add a Sideblog to my own MT-powered blog. <a href="http://www.jacobsen.no/anders/blog/">Anders</a> created a short &#034;how-to&#034; for those who are <a href="http://www.jacobsen.no/anders/blog/archives/2003/06/05/adding_a_sideblog_in_mt.html">not using php</a> and it has inspired me to create a php version here.<br />
<span id="more-1098"></span><br />
<b>What is a Sideblog?</b><br />
First, I guess it would be important to understand the &#034;what&#034; of the whole Sideblog phenomenon. A Sideblog could have many purposes, but is generally used as a quick link repository. For me, if I see something that was really interesting, but I didn&#039;t feel connected enough to blog it &#8211; I would post it in the Sideblog. The Sideblog would then be included in the main blog.</p>
<p><b>How to create a Sideblog in MT</b><br />
A Sideblog is basically a new weblog that gets included in your original blog. The steps are very painless. The creation steps are universal. The include steps presume you are using php. Anders has an <a href="http://www.jacobsen.no/anders/blog/archives/2003/06/05/adding_a_sideblog_in_mt.html">SSI version of these instructions</a> as well. </p>
<ol>
<li>Create a new blog in MT&#039;s main menu. I&#039;ve called mine &#034;Sideblog&#034;.</li>
<li>Create a basic <b>index template</b> that shows just the html that you want to include in your main blog. I strongly suggest that you implement some type of limit on the number of entries displayed. For example:<br />
<h3>&lt;MTEntries lastn=&#034;15&#034;&gt; &lt;MTDateHeader&gt; &lt;br /&gt; &lt;$MTEntryDate format=&#034;%Y-%m-%d&#034;$&gt;: &lt;br /&gt; &lt;/MTDateHeader&gt; &lt;$MTEntryBody$&gt;&lt;br /&gt; &lt;/MTEntries&gt;</h3>
<li>Exit the Sideblog and edit the <b>main index template</b> for your existing main blog. We want to include the index page from the Sideblog, so we&#039;ll use a php include. For example:<br />
<h3>&lt;?php include(&#034;http://www.<font color="red">to-be-simple-just-use-full-web-path</font>.com/<font color="red">sideblog</font>/index.php&#034;);<br />
?&gt;</h3>
</li>
</ol>
<p>That&#039;s it! Now you can post to your Sideblog and (if you use the template I&#039;ve shown) the 15 most recent posts will show up in your main blog.</p>
<p><b>How to use the Sideblog</b></p>
<p>There are a lot of variations on using the sideblog. Some people post the interesting link in the excerpt and use the extended entry to include a brief little message about it. I suggest posting the interesting link in the <b>entry body</b> and then any other comments I have on the link in the extended entry. That works for me in my testing. Your mileage may vary.</p>
<p><b>Variations</b><br />
There are a lot of ways to &#034;spice up&#034; the sideblog. Since we just included the index template from the Sideblog into the main blog, all of our template tags are available to us. For example, <a href="http://www.bigpinkcookie.com/">Christine&#039;s Crumbs</a> show the number of comments for each Sideblog post as a link to the Sideblog entry itself.  This is a great way to allow your visitors to interact with your Sideblog. If we modify the template in #2 above as follows to mimic Christine&#039;s Crumbs:<br />
<h3>&lt;MTEntries lastn=&#034;15&#034;&gt;<br />
&lt;$MTEntryBody convert_breaks=&#034;0&#034;$&gt;&nbsp;(&lt;a<br />
href=&#034;&lt;$MTEntryLink$&gt;&#034;&gt;&lt;$MTEntryCommentCount$&gt;&lt;/a&gt;)&lt;br /&gt;<br />
&lt;/MTEntries&gt;</h3>
<p>You can additional spaces to separate the interesting link from the comment count or modify the code to include any detail you like. I like the way Christine&#039;s works, so I plan to use the comment count on my own Sideblog.</p>
<p>That&#039;s all there is to it. Again, we just include the MT tags directly from the index template of the Sideblog. There are other ways to accomplish this, but I think this is the simplest of them all!</p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2003/07/01/creating-a-sideblog-in-mt/feed/</wfw:commentRss>
		<slash:comments>77</slash:comments>
		</item>
		<item>
		<title>Site validation</title>
		<link>http://www.scriptygoddess.com/archives/2003/05/12/site-validation/</link>
		<comments>http://www.scriptygoddess.com/archives/2003/05/12/site-validation/#comments</comments>
		<pubDate>Mon, 12 May 2003 18:10:23 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[How to's]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2003/05/12/site-validation/</guid>
		<description><![CDATA[Mark Pilgrim&#039;s recent post (why we won&#039;t help you) about using HTML validation as a way to troubleshoot layout problems (among other things) got me wondering if I could validate my own HTML. So I did &#8211; here are some tips on how you can too: Validation means you&#039;re bringing your markup into compliance with [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Mark Pilgrim&#039;s recent post (<a href="http://diveintomark.org/archives/2003/05/05/why_we_wont_help_you.html">why we won&#039;t help you</a>) about using HTML validation as a way to troubleshoot layout problems (among other things) got me wondering if I could validate my own HTML.  So I did &#8211; here are some tips on how you can too:</p>
<p><a href="http://validator.w3.org/">Validation</a> means you&#039;re bringing your markup into compliance with the standards set by the <a href="http://www.w3.org/">World Wide Web Consortium</a>; because I was a novice and because my main goal was cross-browser viewing compatibility, I chose to validate to the standards for <a href="http://www.w3.org/TR/html4/">HTML 4.01</a> Transitional.  HTML is being supplanted by <a href="http://www.w3.org/MarkUp/#xhtml1">XHTML</a> or eXtensible Hypertext Markup Language; if you want to validate to the most cutting-edge standards, you&#039;ll want to <a href="http://www.w3.org/TR/xhtml1/">read more about it</a>. Among other benefits, validation acts as the ultimate proofreader; it catches mistakes you might not find (and might not even know were mistakes) that cause your site to behave strangely in differnet browsers.  If you&#039;re considering embarking upon a big site overhaul <a href="http://domesticat.net/skins/howto.php">like skinning</a>, this kind of effort is worth it, because you&#039;ll move forward with cleaner code.</p>
<p>The nuts and bolts of validating involve checking for and correcting errors; to do this most effectively while my main site was still live, I moved a copy of my index page to a test blog &#8211; no risk of ruining the template because my main site could serve as a backup copy.  Another reason to use a test blog? You will always want to validate the source code of a live page; that&#039;s what people will see when they view your site.  If you try to validate a blogging template before any PHP scripts or template tags have been processed when the page loads, the validator will give you error messages because it won&#039;t recognize the tags.  When I first ran my page through the <a href="http://validator.w3.org/">W3C HTML Validator</a>, I discovered 103 errors.  Let that sink in for a moment.  Then I realized that the validator was picking up two kinds of mistakes: 1. errors in the code used for the templates, and 2. errors in the code in the entry text.  Every time I corrected an error in the template code, it removed multiple instances of that error on the index page &#8211; the number of errors I found started dropping sharply after I figured that out.</p>
<p>In addition to the W3C validator, I used <a href="http://www.utoronto.ca/webdocs/HTMLdocs/NewHTML/htmlindex.html">this excellent HTML resource from Ian Graham</a>; which helped me understand what tags could be used where, and what tags were <i>deprecated</i>, or out-of-date. I used <a href="http://www.htmlvalidator.com/lite/">HTML Validator Lite</a> to help me interpret the more obscure messages I got from the W3C validator. I didn&#039;t know which standard HTMLValidator Lite was using, so I doublechecked the changes it suggested on another test page before implementing them in the final corrected template.  Many people recommend using <a href="http://www.w3.org/People/Raggett/tidy/">HTML Tidy</a>; my page was so far from valid when I started that Tidy had trouble processing it.</p>
<p>Other good things to be aware of (or &#034;let my mistakes save you time&#034;): Many of the errors I encountered were as a result of the improper handling of <a href="http://www.utoronto.ca/webdocs/HTMLdocs/NewHTML/entities.html">special characters</a> in Javascript (like the &#034;Blogroll Me!&#034; link) or HTML (like a link to an item on Amazon.com) in my templates.  I used <a href="http://www.hiveware.com/urlcleaner.php">the Hiveware URLCleaner</a> and the <a href="http://www3.sympatico.ca/dylanfoley/stacks/1102.html#cleanURL">CleanURL bookmarklet</a> to give me the ASCII equivalents to characters like the dreaded ampersand. I made sure that each and every page had a <a href="http://htmlhelp.com/tools/validator/doctype.html">DOCTYPE</a> at the top; it&#039;s the validator&#039;s way of recognizing what kind of text you&#039;re about to feed it.  I was under the mistaken impression that tables don&#039;t validate (this comes from hanging out with people who use and love cascading stylesheets); table tags must appear in the proper order (be <i>properly nested</i>) to ensure that designs with tables validate.  Finally, if you do want to skin your website and you want it to be valid, you can; each skin you implement needs to be checked against the output of the validator.</p>
<p>Sound complicated?  It&#039;s not nearly as complex as trying to ask for help when you&#039;re not sure what the problem is (&#034;My site doesn&#039;t look like I thought it would in Browser X.  Why?&#034;)  Being able to say &#034;My site validates, and I&#039;m still having problem X&#034; puts you a lot closer to a solution because more people will have an idea of what you&#039;re talking about. Don&#039;t be intimidated &#8211; give it a try.  If I can do it without pulling my hair out, anyone can.</p>
<p><b>Guest authored by:<br />
Donna &#8211; <a href="http://www.deliriouscool.org">deliriouscool.org</a></b></p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2003/05/12/site-validation/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Zipped Archives in Unix Shell</title>
		<link>http://www.scriptygoddess.com/archives/2003/05/11/zipped-archives-in-unix-shell/</link>
		<comments>http://www.scriptygoddess.com/archives/2003/05/11/zipped-archives-in-unix-shell/#comments</comments>
		<pubDate>Mon, 12 May 2003 01:52:36 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[How to's]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2003/05/11/zipped-archives-in-unix-shell/</guid>
		<description><![CDATA[If you&#039;re working with scripts, the time will come when you need to work with a Unix archive. Generally, these are .tar files or .tar.gz (zipped). These .tar files are commonly called &#034;tarballs&#034;. These are no different than any other archive/backup/zipped files, they just take a little getting used to. How to decompress a .tar [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>If you&#039;re working with scripts, the time will come when you need to work with a Unix archive. Generally, these are .tar files or .tar.gz (zipped). These .tar files are commonly called &#034;tarballs&#034;. These are no different than any other archive/backup/zipped files, they just take a little getting used to.</p>
<p><b>How to decompress a .tar or .tar.gz archive in Windows:</b><br />
<a href="http://www.winzip.com" target="new">Winzip</a> is my windows-based zip file manager of choice. There are several versions available, included a free &#034;evaluation&#034; version. Winzip can decompress .tar and .tar.gz files locally to your hard drive. Make sure you use the wizard or select &#034;Use Folder Names&#034; from the Classic interface so the file structure will be maintained.</p>
<p><b>How to decompress a .tar or .tar.gz archive on your webserver:</b><br />
You need shell access (telnet or ssh). If you don&#039;t have shell access, you&#039;ll just have to decompress the tarball local (see Windows directions above) and upload via ftp.</p>
<p>1) Assuming you have shell access, upload the tarball to your webserver in binary mode via ftp. <i>(Note: Choose <u>binary</u> mode, not ascii or automatic detect &#8211; <u>binary</u>)</i>. Most of the time, you&#039;ll want to place the tarball one level above where you want the files installed, as the structure of most tarballs begins with a folder.</p>
<p>2) Once the tarball is on your server, log into your shell account (ask your host for directions).</p>
<p>3) Use the following commands to decompress:</p>
<p>.tar files: <b>tar -xvfz <font color="red">filename</font>.tar</b><br />
.tar.gz files: <b>tar -xvfz <font color="red">filename</font>.tar.gz</b></p>
<p>4) The files will decompress into it&#039;s original uncompressed structure. You can browse the structure using your ftp program or other tools that are more familiar to you.</p>
<p>While we&#039;re at it, let&#039;s just round out this topic. </p>
<p><b>How to zip a folder in Unix:</b><br />
To create an archive from the Unix shell (telnet/ssh), use the following command:</p>
<p><b>tar -cvzf <font color="red">filename</font>.tar.gz <font color="red">folder-name</font></b></p>
<p>So, if I want to create a tarball to backup my &#034;images&#034; folder, I&#039;d use the following command:</p>
<p><b>tar -cvzf <font color="red">images</font>.tar.gz <font color="red">images</font></b></p>
<p>Note the space between the &#034;z&#034; and the name of the folder I am compressing. You can create archives of individual files as well, just replace the &#034;folder-name&#034; in the example with a file name (i.e. &#034;image.jpg&#034;).</p>
<p>If you need a good telnet/ssh client for windows, I recommend <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/" target="new">Putty</a>. For more information on unix shell commands, google &#034;unix shell commands&#034;. There are 1,000s of good resources.</p>
<p><b>Guest authored by:<br />
Kevin Donahue &#8211; <a href="http://blog.kevindonahue.com">blog.kevindonahue.com</a></b></p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2003/05/11/zipped-archives-in-unix-shell/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Skinning simplified</title>
		<link>http://www.scriptygoddess.com/archives/2003/05/04/skinning-simplified/</link>
		<comments>http://www.scriptygoddess.com/archives/2003/05/04/skinning-simplified/#comments</comments>
		<pubDate>Sun, 04 May 2003 17:55:00 +0000</pubDate>
		<dc:creator>Lisa</dc:creator>
				<category><![CDATA[How to's]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2003/05/04/skinning-simplified/</guid>
		<description><![CDATA[This is specific to MT, but the concent should be applicable to other blogging software. Back when Statia and I were first skinning her site, Robyn used the sandwich anology(*) to explain how you &#034;piece&#034; out index.php for skinning. 1) the code at the top, up to but not including MTEntries [bread] 2) the MTEntries [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>This is specific to MT, but the concent should be applicable to other blogging software.</p>
<p>Back when <a href="http://www.pizzadreaming.com/">Statia</a> and I were first skinning her site, <a href="http://www.tampatantrum.com/">Robyn</a> used the sandwich anology(*) to explain how you &#034;piece&#034; out index.php for skinning.</p>
<p>1) the code at the top, up to but not including MTEntries [bread]<br />
2) the MTEntries stuff [the all important sandwich filler]<br />
3) the code after MTEntries to the end [bread]</p>
<p>Section 2 is the code that stays in index.php.<br />
Section 1 is headerN.php (where N is the skin #).<br />
Section 3 is footerN.php (where N is the skin #).</p>
<p>You can get more complicated and leave the javascript and the other code that is global to all of your skins in index.php. Then your header &#038; footer would just contain the code that actually changes per skin, but it&#039;s not necessary.</p>
<p>(*) The sandwich analogy has been around for a while. <a href="http://www.bigpinkcookie.com">Christine</a> used it to explain skins to Robyn. And it&#039;s quite possible that <a href="http://www.domesticat.net">Amy</a> used it to explain it to Christine.<br />
<span id="more-1044"></span><br />
<b>I&#039;ve bolded the sections where you&#039;ll have to make changes. You can download this section of the tutorial <a href="http://www.scriptygoddess.com/archives/examples/skinning_examples.txt">here</a> (right-click and save) if you&#039;re having problems copying &#038; pasting from the site.</b></p>
<p>Other parts &#8211; these are all New Index Templates:</p>
<p>1) cookiecheck.php &#8211; This is the workhorse that points people to the right skin (if they are new and don&#039;t have a cookie or if they have a cookie already). This gets added to the top of index.php (and any other pages you want to match your skin). Note: I&#039;ve used 10 here as the limit for the number of skins I have, but you can set it to either the exact number of skins you have or some other number.</p>
<p>&lt;?<br />
  if (isset($newskin)) {<br />
    $newskin=(int)$newskin;<br />
    if ($newskin&lt;1) $newskin=1;<br />
    if ($newskin&gt;<b>10</b>) $newskin=1;<br />
  } elseif (isset($skin)) {<br />
    $newskin=(int)$skin;<br />
    if ($skin&lt;1) $newskin=1;<br />
    if ($skin&gt;<b>10</b>) $newskin=1;<br />
  } else {<br />
    $newskin=1;<br />
  }<br />
  $skin=$newskin;</p>
<p>    $headervar = &#034;<b>/path/to/directory/where/your/skin/pieces/live/header</b>&#034;;<br />
    $footervar = &#034;<b>/path/to/directory/where/your/skin/pieces/live/footer</b>&#034;;<br />
    $extension = &#034;.php&#034;;<br />
?&gt;</p>
<p>2) skins/index.php &#8211; This is your skin selector page. It basically has links to /skins/index2.php?newskin=N for each of your skins. It lets people see what skins you have to offer. cookiecheck.php goes at the top of this page too.</p>
<p>&lt;?php include(&#039;<b>/path/to/docroot/directory/cookiecheck.php</b>&#039;); ?&gt;</p>
<p>&lt;!DOCTYPE HTML PUBLIC &#034;-//W3C//DTD HTML 4.0 Transitional//EN&#034;&gt;</p>
<p>&lt;? include($headervar.$skin.$extension); ?&gt;</p>
<p>&lt;table&gt;<br />
&lt;tr&gt;<br />
&lt;td valign=&#034;top&#034; class=&#034;tableText&#034;&gt;1: Description goes here &lt;a href=&#034;/skins/index2.php?newskin=1&#034;&gt;Make this one your skin&lt;/a&gt;.&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td valign=&#034;top&#034; class=&#034;tableText&#034;&gt;2: Description goes here &lt;a href=&#034;/skins/index2.php?newskin=2&#034;&gt;Make this one your skin&lt;/a&gt;.&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/table&gt;</p>
<p>&lt;? include($footervar.$skin.$extension); ?&gt;</p>
<p>&lt;/body&gt;<br />
&lt;/html&gt;</p>
<p>3) skins/index2.php &#8211; This is where people can test drive the skin they&#039;ve selected. This has the same code at the top of the file as in cookiecheck.php. It also sets your cookie.</p>
<p>&lt;?<br />
  if (isset($newskin)) {<br />
    $newskin=(int)$newskin;<br />
    if ($newskin&lt;1) $newskin=1;<br />
    if ($newskin&gt;10) $newskin=1;<br />
  } elseif (isset($skin)) {<br />
    $newskin=(int)$skin;<br />
    if ($skin&lt;1) $newskin=1;<br />
    if ($skin&gt;10) $newskin=1;<br />
  } else {<br />
    $newskin=1;<br />
  }<br />
  $skin=$newskin;<br />
  setcookie (&#039;skin&#039;, &#034;&#034;, time() &#8211; 3600);<br />
  setcookie(&#039;skin&#039;,$newskin,time()+(86400*365),&#039;/');<br />
  setcookie(&#039;skin&#039;,$newskin,time()+(86400*365),&#039;/',&#039;.<b>your_domain.com</b>&#039;);<br />
  $skin=$newskin;</p>
<p>    $headervar = &#034;<b>/path/to/directory/where/your/skin/pieces/live/header</b>&#034;;<br />
    $footervar = &#034;<b>/path/to/directory/where/your/skin/pieces/live/footer</b>&#034;;<br />
    $extension = &#034;.php&#034;;<br />
?&gt; </p>
<p>&lt;!DOCTYPE HTML PUBLIC &#034;-//W3C//DTD HTML 4.0 Transitional//EN&#034;&gt;<br />
&lt;html&gt;</p>
<p>&lt;? include($headervar.$skin.$extension); ?&gt;</p>
<p>&lt;b&gt;Like it?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;</p>
<p>Your skin number has been reset to &#039;&lt;?= $skin ?&gt;.&#039;&lt;br /&gt;&lt;br /&gt;</p>
<p>If you like it, journey on to the &lt;a href=&#034;<b>http://your_url.com/</b>&#034;&gt;main page&lt;/a&gt; of this site and play with it a bit. If it&#039;s not quite what you want, you can always &lt;a href=&#034;/skins/index.php&#034;&gt;go back&lt;/a&gt; and select another.</p>
<p>If you run into problems with any of the skins, &lt;a href=&#034;<b>contact_info_here</b>&#034;&gt;drop me a note&lt;/a&gt;.</p>
<p>&lt;? include($footervar.$skin.$extension); ?&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p>
<p>4) Example index.php (when I&#039;m setting up skins for the first time, I like to name this test.php until I get all of the kicks worked out):</p>
<p>&lt;?php<br />
include(&#039;<b>/path/to/docroot/directory/cookiecheck.php</b>&#039;);<br />
?&gt;</p>
<p>&lt;?<br />
    $headervar = &#034;<b>/path/to/directory/where/your/skin/pieces/live/header</b>&#034;;<br />
    $footervar = &#034;<b>/path/to/directory/where/your/skin/pieces/live/footer</b>&#034;;<br />
$extension = &#039;.php&#039;;<br />
include(&#039;$headervar.$skin.$extension);<br />
?&gt;</p>
<p>&lt;MTEntries&gt;<br />
blah blah blah<br />
&lt;/MTEntries&gt;</p>
<p>&lt;? include(&#039;$footervar.$skin.$extension); ?&gt;</p>
<p>&lt;/body&gt;<br />
&lt;/html&gt;</p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2003/05/04/skinning-simplified/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>Posts and comments feed</title>
		<link>http://www.scriptygoddess.com/archives/2003/04/27/posts-and-comments-feed/</link>
		<comments>http://www.scriptygoddess.com/archives/2003/04/27/posts-and-comments-feed/#comments</comments>
		<pubDate>Sun, 27 Apr 2003 18:28:49 +0000</pubDate>
		<dc:creator>Lisa</dc:creator>
				<category><![CDATA[How to's]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2003/04/27/posts-and-comments-feed/</guid>
		<description><![CDATA[This is not Jennifer&#039;s feed. This feed was put together by Brad, .NET Guy. This feed contains your 10 most recent posts as well as your 20 most recent comments. The difference between this and Jennifer&#039;s feed is that if someone comes by and comments on a post that&#039;s not one of your 10 most [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>This is not <a href="http://www.fortysomething.ca">Jennifer</a>&#039;s feed. This feed was put together by <a href="http://dotnetguy.techieswithcats.com">Brad, .NET Guy</a>.</p>
<p>This feed contains your 10 most recent posts as well as your 20 most recent comments. The difference between this and Jennifer&#039;s feed is that if someone comes by and comments on a post that&#039;s not one of your 10 most recent, your readers will still get to see the comment.</p>
<p>Please <a href="http://unixgal.techieswithcats.com/archives/003048.php">read more</a> on my site. I have 2 variations of this feed available there for download.</p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2003/04/27/posts-and-comments-feed/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Comment leaders for the current month</title>
		<link>http://www.scriptygoddess.com/archives/2003/04/19/comment-leaders-for-the-current-month/</link>
		<comments>http://www.scriptygoddess.com/archives/2003/04/19/comment-leaders-for-the-current-month/#comments</comments>
		<pubDate>Sat, 19 Apr 2003 04:24:58 +0000</pubDate>
		<dc:creator>Lisa</dc:creator>
				<category><![CDATA[How to's]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2003/04/19/comment-leaders-for-the-current-month/</guid>
		<description><![CDATA[This is a variation of Girlie&#039;s Comment Leaderboard. I&#039;ve seen other people who show the comment leaders for the last 30 days, but I decided I&#039;d rather show the leaders for the current month. Here&#039;s the code. The items bolded and underlined need to be changed to reflect your blog settings. &#60;? include (&#034;/path/to/your/connection/file/connect.php&#034;); $leaders [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>This is a variation of <a href="http://www.thegirliematters.com/tips/archives/0301/comments_leader_board_with_php_and_mysql.php">Girlie&#039;s Comment Leaderboard</a>. I&#039;ve seen other people who show the comment leaders for the last 30 days, but I decided I&#039;d rather show the leaders for the current month. </p>
<p>Here&#039;s the code. The items bolded and underlined need to be changed to reflect your blog settings.</p>
<p>&lt;? include (&#034;<b><u>/path/to/your/connection/file/connect.php</u></b>&#034;); </p>
<p>$leaders = mysql_query(&#034;SELECT comment_email, comment_url, comment_author, COUNT(*) as comment_count FROM mt_comment WHERE (comment_blog_id=<b><u>1</u></b>) AND (comment_email!=&#039;<b><u>you@yourdomain.com</u></b>&#039;) AND MONTH(comment_created_on) = MONTH(CURDATE()) AND YEAR(comment_created_on) = YEAR(CURDATE()) GROUP BY comment_author, comment_email ORDER BY comment_count DESC LIMIT <b><u>10</u></b>&#034;);</p>
<p>while($row = mysql_fetch_array($leaders)) {<br />
    while (list($key,$val) = each($row)) {$$key = $val;}<br />
    if (!empty($comment_url)) {<br />
        $authorlink = &#034;&lt;a href=&#92;&#034;$comment_url&#92;&#034;&gt;$comment_author&lt;/a&gt;&#034;;<br />
    } elseif(!empty($comment_email)) {<br />
        $authorlink = &#034;&lt;a href=&#92;&#034;mailto:$comment_email&#92;&#034;&gt;$comment_author&lt;/a&gt;&#034;;<br />
    } else {$authorlink = $comment_author;}<br />
    echo &#034;$authorlink ($comment_count)&lt;br /&gt;&#92;n&#034;;<br />
}<br />
?&gt;</p>
<p><b><u>/path/to/your/connection/file/connect.php</u></b> = location of your connect.php file<br />
<b><u>1</u></b> = your blog ID<br />
<b><u>you@yourdomain.com</u></b> = your email address (so that your comments aren&#039;t counted)<br />
<b><u>10</u></b> = number of leaders to show</p>
<p><b>Update: I added &#034;, comment_email&#034; to the &#034;GROUP BY&#034; section so that it will group by name and email address and not lump people who leave comments with the same name together.</b></p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2003/04/19/comment-leaders-for-the-current-month/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Making your site RSS friendly</title>
		<link>http://www.scriptygoddess.com/archives/2003/04/12/making-your-site-rss-friendly/</link>
		<comments>http://www.scriptygoddess.com/archives/2003/04/12/making-your-site-rss-friendly/#comments</comments>
		<pubDate>Sat, 12 Apr 2003 19:50:59 +0000</pubDate>
		<dc:creator>Lisa</dc:creator>
				<category><![CDATA[How to's]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2003/04/12/making-your-site-rss-friendly/</guid>
		<description><![CDATA[I was going to post this here, but it seemed less appropriate the more I wrote. You can read the whole post on my site. Here&#039;s a summary of what I wrote on my blog: Now that you&#039;ve gotten your RSS feed(s) set up, it&#039;s a good time to check out your site from the [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p><s>I was going to post this here, but it seemed less appropriate the more I wrote. </s></p>
<p>You can <a href="http://unixgal.techieswithcats.com/archives/002905.php">read the whole post on my site</a>.</p>
<p>Here&#039;s a summary of what I wrote on my blog:</p>
<p>Now that you&#039;ve gotten your RSS feed(s) set up, it&#039;s a good time to check out your site from the viewpoint of someone entering your site via an RSS reader.</p>
<p>1. Figure out where your RSS feed is sending your readers. Look at the &lt;link&gt; tag for your entries. I find that linking to the individual post is the best/easiest place to send your readers.</p>
<p>2. Once you know where you&#039;re readers are being sent, look over this page. Does it have links for next and previous? Can your reader get back to your front page easily?</p>
<p>3. Are the comments easily readable? If you link to the individual post, it&#039;s really handy to just display the comments there (I like oldest comments at the top). A link to the comments works as well, but it&#039;s more clicks for your reader.</p>
<p>4. Is it easy for your reader to leave you a new comment? Because that&#039;s probably why they left their cozy newsreader.</p>
<p>5. Now, look at that page. Should you add some of the lnks that you have on your front page to these other pages? Again, it depends. When I go to a blog from my newsreader, I don&#039;t usually hit the front page. Just the pages with posts that caught my eye.</p>
<p>If you have any questions, please let me know.</p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2003/04/12/making-your-site-rss-friendly/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Running PHP on a html or htm page</title>
		<link>http://www.scriptygoddess.com/archives/2003/04/02/running-php-on-a-html-or-htm-page/</link>
		<comments>http://www.scriptygoddess.com/archives/2003/04/02/running-php-on-a-html-or-htm-page/#comments</comments>
		<pubDate>Thu, 03 Apr 2003 01:16:09 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[How to's]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2003/04/02/running-php-on-a-html-or-htm-page/</guid>
		<description><![CDATA[I&#039;ve had to look this up more times than I can count. I think I&#039;ve made a post to link to it, but it&#039;d be easier for me if this was just here. I got this code from Christine who posted it on the Blogomania support forums ages ago. (side note: Those forums are mostly [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I&#039;ve had to look this up more times than I can count. I think I&#039;ve made a post to link to it, but it&#039;d be easier for me if this was just here. I got this code from <a href="http://www.bigpinkcookie.com/">Christine</a> who <a href="http://www.blogomania.com/forums/viewtopic.php?t=24&#038;highlight=htaccess+php">posted</a> it on the <a href="http://www.blogomania.com/forums/index.php">Blogomania support forums</a> ages ago. (side note: Those forums are mostly for people who are hosted on <a href="http://www.blogomania.com">Blogomania</a> &#8211; but obviously you&#039;re free to peruse the info there)</p>
<p>To make your .htm or .html pages process like they were .php, just add this line to your .htaccess file:</p>
<h3>AddType application/x-httpd-php .html .php .htm</h3>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2003/04/02/running-php-on-a-html-or-htm-page/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>

