<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:admin="http://webns.net/mvcb/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:content="http://purl.org/rss/1.0/modules/content/">

<channel>
<title>Virtual Venus</title>
<link>http://www.virtualvenus.org/</link>
<description>because weblogs need love too</description>
<dc:language>en-us</dc:language>
<dc:creator>VirtualVenus</dc:creator>
<dc:rights>Copyright 2004</dc:rights>
<dc:date>2004-02-12T00:03:52-06:00</dc:date>
<admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=2.64" />
<admin:errorReportsTo rdf:resource="mailto:kristine@virtualvenus.org"/>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>

<item>
<title>Comment Manager script</title>
<link>http://www.virtualvenus.org/archives/0402/comment_manager_script.php</link>
<description><![CDATA[<p>Are the 5 most recent comments inside MT's interface just not enough of a listing for you?  With multiple blogs or high amounts of comments, you may want a longer listing with more info.  I created this script because I wanted a way to view a longer list of the recent comments, and also have links for easy editing and to enhance blacklisting.  </p>

<p><strong>Required:</strong><br />
<ul><li>PHP</li><li>MT running with a MySQL database</li><li><a href="http://mt-plugins.org/archives/entry/blacklist.php">MT-Blacklist plugin</a></li></ul></p>

<p><a href="http://www.virtualvenus.org/archives/commentmgr.php.txt">Comments Manager script</a> -- save as commentmgr.php.  There are several variables that should be set at the top of the file.</p>

<p>You'll also need <a href="http://www.virtualvenus.org/archives/connect.php.txt">connect.php</a> (save as connect.php).  <br />
<em>if you've used any PHP/MySQL scripts in the past, you probably already have it.  </em></p>

<p>Upload these files and run <strong>commentsmgr.php</strong> from your browser.  A list of your comments should appear with details.  Links on the top bar will allow you to see the next set of oldest comments.</p>

<p>Future enhancements could be made; feel free to leave comments with suggestions and I'll see what I can do. :)</p>

<p><strong>Known issue: </strong>The listing is for all blogs in the system.  If someone on a shared copy of MT was wanting to use this, they'd probably see all of the comments.  They wouldn't be able to edit any that their MT username didn't have permission to, though.</p>
]]></description>
<guid isPermaLink="false">49@http://www.virtualvenus.org/</guid>
<content:encoded><![CDATA[<p>Are the 5 most recent comments inside MT's interface just not enough of a listing for you?  With multiple blogs or high amounts of comments, you may want a longer listing with more info.  I created this script because I wanted a way to view a longer list of the recent comments, and also have links for easy editing and to enhance blacklisting.  </p>

<p><strong>Required:</strong><br />
<ul><li>PHP</li><li>MT running with a MySQL database</li><li><a href="http://mt-plugins.org/archives/entry/blacklist.php">MT-Blacklist plugin</a></li></ul></p>

<p><a href="http://www.virtualvenus.org/archives/commentmgr.php.txt">Comments Manager script</a> -- save as commentmgr.php.  There are several variables that should be set at the top of the file.</p>

<p>You'll also need <a href="http://www.virtualvenus.org/archives/connect.php.txt">connect.php</a> (save as connect.php).  <br />
<em>if you've used any PHP/MySQL scripts in the past, you probably already have it.  </em></p>

<p>Upload these files and run <strong>commentsmgr.php</strong> from your browser.  A list of your comments should appear with details.  Links on the top bar will allow you to see the next set of oldest comments.</p>

<p>Future enhancements could be made; feel free to leave comments with suggestions and I'll see what I can do. :)</p>

<p><strong>Known issue: </strong>The listing is for all blogs in the system.  If someone on a shared copy of MT was wanting to use this, they'd probably see all of the comments.  They wouldn't be able to edit any that their MT username didn't have permission to, though.</p>
]]></content:encoded>
<dc:subject>Scripts</dc:subject>
<dc:date>2004-02-12T00:03:52-06:00</dc:date>
</item>
<item>
<title>Alphabetical Archives by letter</title>
<link>http://www.virtualvenus.org/archives/0402/alphabetical_archives_by_letter.php</link>
<description><![CDATA[<p>Sites with topical articles or listings may wish to provide a variety of archive options to their readers.  One good way to present a lot of data is by alphabetical order.  </p>

<ul><li>PHP required.</li></ul>

<p>The script has notations for what each section does.  For a working example, <a href="http://theredkitchen.net/alpha.php">TheRedKitchen's alphabetical archives</a> were the initial place this code was used.  It's been cleaned up and optimized a bit.</p>
<div class="code">&lt;?<br />
//set the lastn value on both greater than your number of entries.<br />
$titles = array(&lt;MTEntries lastn="800"&gt;"&lt;$MTEntryTitle encode_php="qq"&gt;",  &lt;/MTEntries&gt;);<br />
$links = array(&lt;MTEntries lastn="800"&gt;"&lt;$MTEntryLink encode_php="qq"&gt;", &lt;/MTEntries&gt;);<br />
foreach ($titles as $firsts) { $first[]=strtolower(substr($firsts, 0, 1)); }<br />
<br />
//defaults listing to show the letter a's entries, otherwise uses the letter from the URL.<br />
if (!isset($_REQUEST['letter'])) { $letter="a"; }<br />
   else { $letter=$_REQUEST['letter'];}<br />
<br />
//sorts the titles and links but lets them keep the same value.<br />
array_multisort($titles, $links, $first);<br />
$count = count($titles);<br />
<br />
//create the links to each unique letter on the top of the pages.<br />
$firstarray = array_values(array_unique($first));<br />
foreach ($firstarray as $let) {<br />
 echo " &lt;a href=\"?letter=", $let, "\"&gt;", $let, "&lt;/a&gt;  ";<br />
}<br />
echo "&lt;hr \&gt;\n\r";<br />
<br />
//display the links to entries beginning with the selected letter by checking all entries for a match.<br />
for ($all = 0; $all &lt; $count; $all++) {<br />
     if ($letter == $first[$all]) {<br />
        echo "&lt;a href=\"", $links[$all], "\"&gt;", $titles[$all], "&lt;/a&gt;&lt;br \&gt;\n\r";<br />
     }<br />
}<br />
?&gt;</div>]]></description>
<guid isPermaLink="false">48@http://www.virtualvenus.org/</guid>
<content:encoded><![CDATA[<p>Sites with topical articles or listings may wish to provide a variety of archive options to their readers.  One good way to present a lot of data is by alphabetical order.  </p>

<ul><li>PHP required.</li></ul>

<p>The script has notations for what each section does.  For a working example, <a href="http://theredkitchen.net/alpha.php">TheRedKitchen's alphabetical archives</a> were the initial place this code was used.  It's been cleaned up and optimized a bit.</p>
<div class="code">&lt;?<br />
//set the lastn value on both greater than your number of entries.<br />
$titles = array(&lt;MTEntries lastn="800"&gt;"&lt;$MTEntryTitle encode_php="qq"&gt;",  &lt;/MTEntries&gt;);<br />
$links = array(&lt;MTEntries lastn="800"&gt;"&lt;$MTEntryLink encode_php="qq"&gt;", &lt;/MTEntries&gt;);<br />
foreach ($titles as $firsts) { $first[]=strtolower(substr($firsts, 0, 1)); }<br />
<br />
//defaults listing to show the letter a's entries, otherwise uses the letter from the URL.<br />
if (!isset($_REQUEST['letter'])) { $letter="a"; }<br />
   else { $letter=$_REQUEST['letter'];}<br />
<br />
//sorts the titles and links but lets them keep the same value.<br />
array_multisort($titles, $links, $first);<br />
$count = count($titles);<br />
<br />
//create the links to each unique letter on the top of the pages.<br />
$firstarray = array_values(array_unique($first));<br />
foreach ($firstarray as $let) {<br />
 echo " &lt;a href=\"?letter=", $let, "\"&gt;", $let, "&lt;/a&gt;  ";<br />
}<br />
echo "&lt;hr \&gt;\n\r";<br />
<br />
//display the links to entries beginning with the selected letter by checking all entries for a match.<br />
for ($all = 0; $all &lt; $count; $all++) {<br />
     if ($letter == $first[$all]) {<br />
        echo "&lt;a href=\"", $links[$all], "\"&gt;", $titles[$all], "&lt;/a&gt;&lt;br \&gt;\n\r";<br />
     }<br />
}<br />
?&gt;</div>]]></content:encoded>
<dc:subject>Scripts</dc:subject>
<dc:date>2004-02-09T01:15:29-06:00</dc:date>
</item>
<item>
<title>Winamp Hoverable Playlist updated</title>
<link>http://www.virtualvenus.org/archives/0402/winamp_hoverable_playlist_updated.php</link>
<description><![CDATA[<p style="background-color:#f18dbf; font-weight:bold; padding: 5px;">This is a revised version of the tutorial to update and improve the <a href="http://www.virtualvenus.org/archives/0306/winamp_hoverable_playlist.php">original code.</a></p>


<p>Displaying the songs you are listening to in real time, along with detail about them, is a nice addition to your site.  Using a combination of plugins can give many options for the display of info.  My goal was to not only make a list of the songs I was listening to, but to display an album cover from the song upon hovering.</p>
<p>With this in mind, I started with the concept and Trackback URL format from <a href="http://a.wholelottanothing.org/archives.blah/006625">A Whole Lotta Nothing</a>.  The idea is to use Trackback to transfer the info rather than FTP or another method.  Because most of my songs on my system have ID3 tags on them, I added some additional info to be pulled in with the Trackback.
</p>
<p>I had seen Brad's concept for an advanced <a href="http://www.bradchoate.com/past/mtmacros.php">Macro</a> that used the Overlib script to change <div class="code">&lt;amazon keyword="album title"&gt;</div> into an amazon link with a hover.  The Trackback URL contains the Current Song title, the Current Album Name, and the Current Artist.  This combined with the IfEmpty plugin to determine if the Current Album and Artist info is available will either give text or the code for a hover with the album title and link to purchase it at Amazon.
</p>
<p>Finally, some PHP gives a different message if WinAmp is stopped is added and the whole thing is included onto my sidebar.  The details of how I've done this are below.  Many modifications could be made to this to make it work the way YOU want it to!  

</p>
<br />

<hr />
<br />

<h3>Required:</h3>
<ul>
<li><a href="http://winamp.com">Winamp 2.x or 5.x</a> (I'm using 5.0)</li>
<li><a href="http://www.oddsock.org/tools/dosomething/">OddSock's DoSomething plugin</a> (I'm using 2.11 or 2.12)</li>
<li><a href="http://movabletype.org">Movable Type 2.5</a> or higher</li>
<li><a href="http://mt-plugins.org/archives/entry/macros.php">Macro plugin</a></li>
<li><a href="http://mt-plugins.org/archives/entry/ifempty.php">IfEmpty plugin</a></li>
<li><a href="http://mt-plugins.org/archives/entry/mtamazon.php">Amazon plugin</a><br />
<ul><li><a href="http://associates.amazon.com/exec/panama/associates/ntg/browse/-/1067662/104-1767367-4198325">Amazon Developers Token</a> (as required by Amazon plugin)</li>
<li>(optional) <a href="http://amazon.com">Amazon</a> Associate account - or you can put loveproductions in the config file :)  </li></ul></li>
<li>PHP (for inclusion into the index page)</li>
<li><a href="http://www.bosrup.com/web/overlib/">Overlib</a> javascript (for hovered box)</li>
<li>id3v1 tags set in your music collection files.  This controls the hoverable image and title.</li>
<li>(optional) an always-on internet connection would make this the most useful.</li>
<li>(optional) Brenna's <a href="http://mt-plugins.org/archives/entry/removepings.php">Remove Pings plugin</a> can keep things neat in your database, even after a lot of music has been played.  The KDLB version is enhanced for this tutorial; use <strong>http://blank</strong> as the <em>source_url</em>.</li>
</ul>
<hr />
<div align="center">Example from <a href="http://kadyellebee.com">kadyellebee.com</a><br />
<img alt="winamp2.gif" src="http://www.virtualvenus.org/archives/winamp2.gif" width="298" height="255" border="1" /><br />
When you hover the title of the song, the overlib popup displays, giving the album picture and a purchase link.</div>
<h3>Directions:</h3>
<ul><li>Create a new blog or select one of your less traveled blogs.  This will keep the rebuilds upon trackback down.  
<ul><li>Create a new category.  Entries won't be posted in the category, but trackback pings will come into it.  I named mine Incoming, because that's a term I use through my sites when data is pulled into a template.</li>
  	 <li>Edit the category attributes.  Turn on <strong>Accept Incoming TrackBack pings</strong>.</li>
	 <li>Click <strong>Save</strong>, and more info will appear below.</li>
	 <li>Note the TrackBack URL for this category: <br />
	 <div class="code">http://your-site.com/mt/mt-tb.cgi/3779</div><br />
	 <strong>This will be what you use in the next steps.</strong></li>
</ul>
<ul><li>Open Winamp, and use the menu to select Options &gt; Preference and then go to Plugins and click on the General Purpose option.
<ul><li>Select the DoSomething plugin and click <strong>Configure</strong>.  If DoSomething is not in the list, it means you probably haven't installed it into the correct directory.  Double check the DoSomething documentation.</li>
	<li>I have the following check boxes checked:<br />
		<ul><li>Enable Error Messages</li><li>Show Status Window</li></ul></li>
	<li>Now we are gonna create a new action.<br />
		<ul><li>From the <strong>Action</strong> drop down box, select <strong>"Submit A URL"</strong></li>
		<li>In the URL box, you'll put something like this (all on one line - breaks are only added for wrapping):<br />
		<div class="code">
               <em>http://your-site.com/mt/mt-tb.cgi?tb_id=3779</em><br />
               &excerpt=%%URL_CURRENTSONG%%&url=blank<br />
               &blog_name=%%URL_CURRENTALBUM%%<br />
               %20%2D%20%%URL_CURRENTARTIST%%</div>
		<br />
		The italicized portion should be filed in with your Trackback URL you noted from before.
		</li>
		<li>The URL Result File box can stay empty.</li>
		<li>Click "Add --&gt;" button on the right side.</li>
		<li>Fill in a directory loction in the Temp Dir box.  I use my music folder on my computer just to keep things all in one place.</li>
		<li>Click the "OK" button.</li></ul>
		<div align="center"><a href="http://www.virtualvenus.org/archives/winamp1.php" onclick="window.open('http://www.virtualvenus.org/archives/winamp1.php','popup','width=600,height=350,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.virtualvenus.org/archives/winamp1-thumb.gif" width="200" height="116" border="0" /></a><br />
		<em>click to view the config screen</em></div>

		</li></ul>

	<li>Now Winamp and DoSomething are set to send the info to MT.  We'll set up a template to display the info.<br />
		<ul><li>Create a New Index Template named <strong>Incoming</strong> with an output file of <strong>incoming.php</strong>.</li>
		<li>Paste the below code into the template:<br />
		<textarea cols="40" rows="10" wrap="virtual" />
&lt;$MTInclude module="regex"$&gt;
&lt;MTMacroApply&gt;
&lt;MTPings category="incoming" lastn="8"&gt;
&lt;? if ("&lt;$MTPingTitle$&gt;" == "Broadcast Stopped") { echo "&lt;em&gt;WinAmp is off!&lt;/em&gt;";  }
else {
?&gt;
&lt;MTIfNotEmpty var="PingBlogName"&gt;
&lt;music keyword="&lt;$MTPingBlogName$&gt;"&gt;&lt;$MTPingExcerpt convert_breaks="0"$&gt;&lt;/music&gt;
&lt;?
$asin = "&lt;MTAmazon search="[MTPingBlogName encode_js='1']" method="Keyword" line="music" lastn="1"&gt;&lt;$MTAmazonASIN$&gt;&lt;/MTAmazon&gt;";
?&gt;
&lt;/MTIfNotEmpty&gt;
&lt;? if (empty($asin)) {  ?&gt;
&lt;$MTPingExcerpt convert_breaks="0"$&gt;
&lt;? } } ?&gt;
&lt;br /&gt;
&lt;/MTPings&gt;
&lt;/MTMacroApply&gt;
&lt;em&gt;updated &lt;$MTDate format="%m/%d/%y %X"$&gt;&lt;/em&gt;
</textarea></li>
<li>I created a new Module named <strong>regex</strong> to store the amazon definition.
Paste the following into it:<br />
		<textarea cols="40" rows="10" wrap="virtual" />
&lt;MTMacroDefine name="music" ctag="music"&gt;&lt;MTIfNotEmpty expr="[MTMacroAttr name='keyword']"&gt;&lt;MTAmazon search="[MTMacroAttr name='keyword']" method="Keyword" line="music" lastn="1"&gt;&lt;a href="&lt;MTAmazonLink&gt;" title="Buy now at amazon.com - only &lt;MTAmazonSalePrice&gt;!" onmouseover="return overlib(ImgSrc+'&lt;MTAmazonSmallImage&gt;'+AltEnd+'&lt;MTAmazonReleaseDate format="%b %Y"&gt;'+EndPrice+'&lt;MTAmazonSalePrice&gt;'+PurchLink+'&lt;MTAmazonLink&gt;'+PurchEnd, STICKY, TIMEOUT, 2000, CAPTION, '&lt;MTAmazonTitle encode_js="1"&gt; by &lt;MTAmazonArtist encode_js="1"&gt;');" onmouseout="return nd();"&gt;&lt;MTMacroContent default="[MTAmazonTitle]"&gt;&lt;/a&gt;&lt;/MTAmazon&gt;&lt;/MTIfNotEmpty&gt;&lt;/MTMacroDefine&gt;
	</textarea>
</li></ul></li>
</li></ul>
<li>I use PHP to include this file into my Main Index template on my main blog.  This will keep the list current without having to rebuild your index page itself.<br />
An example of a PHP <a href="http://www.php.net/manual/en/function.include.php">include</a> statement is as follows:<br />
<div class="code">&lt;?<br />
include("/home/USER/public_html/BLOG/incoming.php");<br />
?&gt;</div></li>
</li>
<li>You'll also want to follow the Overlib instructions to put the script into your Main Index template on your main blog.<br />
this would include uploading the .js file and adding two lines of code to your template - the first in the &lt;head&gt; container, and the second inside the &lt;body&gt; :<br />
<div class="code">&lt;script language="JavaScript" src="<$MTBlogURL$>/overlib.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;<br />
&lt;!--<br />
var ImgSrc = "&lt;img src='";<br />
var AltEnd = "' align='left' border='0' hspace='5' /&gt;&lt;br /&gt;Released: &lt;b&gt;";<br />
var EndPrice = "&lt;/b&gt;&lt;br /&gt;Amazon Price: &lt;b&gt;";<br />
var PurchLink = "&lt;/b&gt;&lt;br /&gt;&lt;a href='";<br />
var PurchEnd = "'&gt;Purchase&lt;/a&gt;";<br />
// --&gt;<br />
&lt;/script&gt;</div><br />
<div class="code">&lt;div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"&gt;&amp;nbsp;&lt;/div&gt;</div></li>
</ul>

That should do it!  You now have a fully functioning playlist that connects your music player to your website.</div>


<p><em>Special thanks to <a href="http://www.lisa-jill.com/">Lisa</a> for helping troubleshoot the issues with the original code.</em></p>

<hr />

For debugging purposes, you can create a New Index Template with the instructions from <a href="http://www.virtualvenus.org/wiki/view/Code/WinampHoverablePlaylist">the Wiki: Playlist Test template</a>.  Post a link here, and it will help us determine where the problem is.]]></description>
<guid isPermaLink="false">47@http://www.virtualvenus.org/</guid>
<content:encoded><![CDATA[<p style="background-color:#f18dbf; font-weight:bold; padding: 5px;">This is a revised version of the tutorial to update and improve the <a href="http://www.virtualvenus.org/archives/0306/winamp_hoverable_playlist.php">original code.</a></p>


<p>Displaying the songs you are listening to in real time, along with detail about them, is a nice addition to your site.  Using a combination of plugins can give many options for the display of info.  My goal was to not only make a list of the songs I was listening to, but to display an album cover from the song upon hovering.</p>
<p>With this in mind, I started with the concept and Trackback URL format from <a href="http://a.wholelottanothing.org/archives.blah/006625">A Whole Lotta Nothing</a>.  The idea is to use Trackback to transfer the info rather than FTP or another method.  Because most of my songs on my system have ID3 tags on them, I added some additional info to be pulled in with the Trackback.
</p>
<p>I had seen Brad's concept for an advanced <a href="http://www.bradchoate.com/past/mtmacros.php">Macro</a> that used the Overlib script to change <div class="code">&lt;amazon keyword="album title"&gt;</div> into an amazon link with a hover.  The Trackback URL contains the Current Song title, the Current Album Name, and the Current Artist.  This combined with the IfEmpty plugin to determine if the Current Album and Artist info is available will either give text or the code for a hover with the album title and link to purchase it at Amazon.
</p>
<p>Finally, some PHP gives a different message if WinAmp is stopped is added and the whole thing is included onto my sidebar.  The details of how I've done this are below.  Many modifications could be made to this to make it work the way YOU want it to!  

</p>
<br />

<hr />
<br />

<h3>Required:</h3>
<ul>
<li><a href="http://winamp.com">Winamp 2.x or 5.x</a> (I'm using 5.0)</li>
<li><a href="http://www.oddsock.org/tools/dosomething/">OddSock's DoSomething plugin</a> (I'm using 2.11 or 2.12)</li>
<li><a href="http://movabletype.org">Movable Type 2.5</a> or higher</li>
<li><a href="http://mt-plugins.org/archives/entry/macros.php">Macro plugin</a></li>
<li><a href="http://mt-plugins.org/archives/entry/ifempty.php">IfEmpty plugin</a></li>
<li><a href="http://mt-plugins.org/archives/entry/mtamazon.php">Amazon plugin</a><br />
<ul><li><a href="http://associates.amazon.com/exec/panama/associates/ntg/browse/-/1067662/104-1767367-4198325">Amazon Developers Token</a> (as required by Amazon plugin)</li>
<li>(optional) <a href="http://amazon.com">Amazon</a> Associate account - or you can put loveproductions in the config file :)  </li></ul></li>
<li>PHP (for inclusion into the index page)</li>
<li><a href="http://www.bosrup.com/web/overlib/">Overlib</a> javascript (for hovered box)</li>
<li>id3v1 tags set in your music collection files.  This controls the hoverable image and title.</li>
<li>(optional) an always-on internet connection would make this the most useful.</li>
<li>(optional) Brenna's <a href="http://mt-plugins.org/archives/entry/removepings.php">Remove Pings plugin</a> can keep things neat in your database, even after a lot of music has been played.  The KDLB version is enhanced for this tutorial; use <strong>http://blank</strong> as the <em>source_url</em>.</li>
</ul>
<hr />
<div align="center">Example from <a href="http://kadyellebee.com">kadyellebee.com</a><br />
<img alt="winamp2.gif" src="http://www.virtualvenus.org/archives/winamp2.gif" width="298" height="255" border="1" /><br />
When you hover the title of the song, the overlib popup displays, giving the album picture and a purchase link.</div>
<h3>Directions:</h3>
<ul><li>Create a new blog or select one of your less traveled blogs.  This will keep the rebuilds upon trackback down.  
<ul><li>Create a new category.  Entries won't be posted in the category, but trackback pings will come into it.  I named mine Incoming, because that's a term I use through my sites when data is pulled into a template.</li>
  	 <li>Edit the category attributes.  Turn on <strong>Accept Incoming TrackBack pings</strong>.</li>
	 <li>Click <strong>Save</strong>, and more info will appear below.</li>
	 <li>Note the TrackBack URL for this category: <br />
	 <div class="code">http://your-site.com/mt/mt-tb.cgi/3779</div><br />
	 <strong>This will be what you use in the next steps.</strong></li>
</ul>
<ul><li>Open Winamp, and use the menu to select Options &gt; Preference and then go to Plugins and click on the General Purpose option.
<ul><li>Select the DoSomething plugin and click <strong>Configure</strong>.  If DoSomething is not in the list, it means you probably haven't installed it into the correct directory.  Double check the DoSomething documentation.</li>
	<li>I have the following check boxes checked:<br />
		<ul><li>Enable Error Messages</li><li>Show Status Window</li></ul></li>
	<li>Now we are gonna create a new action.<br />
		<ul><li>From the <strong>Action</strong> drop down box, select <strong>"Submit A URL"</strong></li>
		<li>In the URL box, you'll put something like this (all on one line - breaks are only added for wrapping):<br />
		<div class="code">
               <em>http://your-site.com/mt/mt-tb.cgi?tb_id=3779</em><br />
               &excerpt=%%URL_CURRENTSONG%%&url=blank<br />
               &blog_name=%%URL_CURRENTALBUM%%<br />
               %20%2D%20%%URL_CURRENTARTIST%%</div>
		<br />
		The italicized portion should be filed in with your Trackback URL you noted from before.
		</li>
		<li>The URL Result File box can stay empty.</li>
		<li>Click "Add --&gt;" button on the right side.</li>
		<li>Fill in a directory loction in the Temp Dir box.  I use my music folder on my computer just to keep things all in one place.</li>
		<li>Click the "OK" button.</li></ul>
		<div align="center"><a href="http://www.virtualvenus.org/archives/winamp1.php" onclick="window.open('http://www.virtualvenus.org/archives/winamp1.php','popup','width=600,height=350,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.virtualvenus.org/archives/winamp1-thumb.gif" width="200" height="116" border="0" /></a><br />
		<em>click to view the config screen</em></div>

		</li></ul>

	<li>Now Winamp and DoSomething are set to send the info to MT.  We'll set up a template to display the info.<br />
		<ul><li>Create a New Index Template named <strong>Incoming</strong> with an output file of <strong>incoming.php</strong>.</li>
		<li>Paste the below code into the template:<br />
		<textarea cols="40" rows="10" wrap="virtual" />
&lt;$MTInclude module="regex"$&gt;
&lt;MTMacroApply&gt;
&lt;MTPings category="incoming" lastn="8"&gt;
&lt;? if ("&lt;$MTPingTitle$&gt;" == "Broadcast Stopped") { echo "&lt;em&gt;WinAmp is off!&lt;/em&gt;";  }
else {
?&gt;
&lt;MTIfNotEmpty var="PingBlogName"&gt;
&lt;music keyword="&lt;$MTPingBlogName$&gt;"&gt;&lt;$MTPingExcerpt convert_breaks="0"$&gt;&lt;/music&gt;
&lt;?
$asin = "&lt;MTAmazon search="[MTPingBlogName encode_js='1']" method="Keyword" line="music" lastn="1"&gt;&lt;$MTAmazonASIN$&gt;&lt;/MTAmazon&gt;";
?&gt;
&lt;/MTIfNotEmpty&gt;
&lt;? if (empty($asin)) {  ?&gt;
&lt;$MTPingExcerpt convert_breaks="0"$&gt;
&lt;? } } ?&gt;
&lt;br /&gt;
&lt;/MTPings&gt;
&lt;/MTMacroApply&gt;
&lt;em&gt;updated &lt;$MTDate format="%m/%d/%y %X"$&gt;&lt;/em&gt;
</textarea></li>
<li>I created a new Module named <strong>regex</strong> to store the amazon definition.
Paste the following into it:<br />
		<textarea cols="40" rows="10" wrap="virtual" />
&lt;MTMacroDefine name="music" ctag="music"&gt;&lt;MTIfNotEmpty expr="[MTMacroAttr name='keyword']"&gt;&lt;MTAmazon search="[MTMacroAttr name='keyword']" method="Keyword" line="music" lastn="1"&gt;&lt;a href="&lt;MTAmazonLink&gt;" title="Buy now at amazon.com - only &lt;MTAmazonSalePrice&gt;!" onmouseover="return overlib(ImgSrc+'&lt;MTAmazonSmallImage&gt;'+AltEnd+'&lt;MTAmazonReleaseDate format="%b %Y"&gt;'+EndPrice+'&lt;MTAmazonSalePrice&gt;'+PurchLink+'&lt;MTAmazonLink&gt;'+PurchEnd, STICKY, TIMEOUT, 2000, CAPTION, '&lt;MTAmazonTitle encode_js="1"&gt; by &lt;MTAmazonArtist encode_js="1"&gt;');" onmouseout="return nd();"&gt;&lt;MTMacroContent default="[MTAmazonTitle]"&gt;&lt;/a&gt;&lt;/MTAmazon&gt;&lt;/MTIfNotEmpty&gt;&lt;/MTMacroDefine&gt;
	</textarea>
</li></ul></li>
</li></ul>
<li>I use PHP to include this file into my Main Index template on my main blog.  This will keep the list current without having to rebuild your index page itself.<br />
An example of a PHP <a href="http://www.php.net/manual/en/function.include.php">include</a> statement is as follows:<br />
<div class="code">&lt;?<br />
include("/home/USER/public_html/BLOG/incoming.php");<br />
?&gt;</div></li>
</li>
<li>You'll also want to follow the Overlib instructions to put the script into your Main Index template on your main blog.<br />
this would include uploading the .js file and adding two lines of code to your template - the first in the &lt;head&gt; container, and the second inside the &lt;body&gt; :<br />
<div class="code">&lt;script language="JavaScript" src="<$MTBlogURL$>/overlib.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;<br />
&lt;!--<br />
var ImgSrc = "&lt;img src='";<br />
var AltEnd = "' align='left' border='0' hspace='5' /&gt;&lt;br /&gt;Released: &lt;b&gt;";<br />
var EndPrice = "&lt;/b&gt;&lt;br /&gt;Amazon Price: &lt;b&gt;";<br />
var PurchLink = "&lt;/b&gt;&lt;br /&gt;&lt;a href='";<br />
var PurchEnd = "'&gt;Purchase&lt;/a&gt;";<br />
// --&gt;<br />
&lt;/script&gt;</div><br />
<div class="code">&lt;div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"&gt;&amp;nbsp;&lt;/div&gt;</div></li>
</ul>

That should do it!  You now have a fully functioning playlist that connects your music player to your website.</div>


<p><em>Special thanks to <a href="http://www.lisa-jill.com/">Lisa</a> for helping troubleshoot the issues with the original code.</em></p>

<hr />

For debugging purposes, you can create a New Index Template with the instructions from <a href="http://www.virtualvenus.org/wiki/view/Code/WinampHoverablePlaylist">the Wiki: Playlist Test template</a>.  Post a link here, and it will help us determine where the problem is.]]></content:encoded>
<dc:subject>Tutorial</dc:subject>
<dc:date>2004-02-01T16:33:11-06:00</dc:date>
</item>
<item>
<title>Link to View All Comments for Comment Author</title>
<link>http://www.virtualvenus.org/archives/0401/link_to_view_all_comments_for_comment_author.php</link>
<description><![CDATA[<p>I posted an entry on my Tips Blog on how to <a href="http://www.thegirliematters.com/tips/archives/0401/show_all_comments_for_comment_author.php">show all comments for a particular comment author</a>. In an effort to share the love between my blogs, I'm posting here to tell users how to use this script more dynamically: to create a link in the comment "posted by" line that, when clicked, will generate a list of all comments made by <i>that</i> comment author.</p>

<p><b>Required:</b> PHP and the MySQL database option in MT</p>

<p><b>Update 04.15.04:</b> The <a href="http://www.thegirliematters.com/tips/archives/0401/show_all_comments_for_comment_author.php">original code</a> has been updated to strip tags from comment text as a precautionary measure against malicious code.</p>
<p>First, create a new Index Template for the script code (you'll probably want to customize it to match your site design, styles, etc. Just put the code in between the BODY tags where you want it to display). Assign an output file name with a .php extension (mine is called <i>allcomments.php</i>).</p>

<p>Remove these two lines from the code, as you won't need them:</p>

<div class="code">$author = '<span class="codeoomph">girlie</span>';<br />
$email = '<span class="codeoomph">girlie&#64;thegirliematters&#46;com</span>';<br />
</div>

<p>Now save your template and rebuild it. (Unless you've got some MT tags that need to be updated regularly, you may want to uncheck the &quot;Rebuild this template automatically&quot; box.)</p>

<p>The next step is to place the code for the link on any template(s) you use to display comments, inside the MTComments tags where you want it to appear:</p>

<div class="code">&lt;a href=&quot;&lt;MTBlogURL&gt;<span class="codeoomph">allcomments.php</span>?author=&lt;MTCommentAuthor&gt;&amp;email=&lt;MTCommentEmail&gt;&quot; title=&quot;view all comments by this author&quot;&gt;view all&lt;/a&gt;
</div>

<p>Remember to change <span class="codeoomph">allcomments.php</span> to match your output file path for the new Index Template you created. You may also need to further customize the URL if you set the Index Template to publish in a location other than your Local Site Path.</p>

<p>Rebuild the necessary portions of your site to generate the new links.</p>

<p>Caveat: you can't use the <i>spam_protect</i> attribute on the email address, leaving it vulnerable to spam spiders. If your commenters are consistent about the author name or URL they post with, those are viable alternatives that the script could be modified to use.</p>]]></description>
<guid isPermaLink="false">45@http://www.virtualvenus.org/</guid>
<content:encoded><![CDATA[<p>I posted an entry on my Tips Blog on how to <a href="http://www.thegirliematters.com/tips/archives/0401/show_all_comments_for_comment_author.php">show all comments for a particular comment author</a>. In an effort to share the love between my blogs, I'm posting here to tell users how to use this script more dynamically: to create a link in the comment "posted by" line that, when clicked, will generate a list of all comments made by <i>that</i> comment author.</p>

<p><b>Required:</b> PHP and the MySQL database option in MT</p>

<p><b>Update 04.15.04:</b> The <a href="http://www.thegirliematters.com/tips/archives/0401/show_all_comments_for_comment_author.php">original code</a> has been updated to strip tags from comment text as a precautionary measure against malicious code.</p>
<p>First, create a new Index Template for the script code (you'll probably want to customize it to match your site design, styles, etc. Just put the code in between the BODY tags where you want it to display). Assign an output file name with a .php extension (mine is called <i>allcomments.php</i>).</p>

<p>Remove these two lines from the code, as you won't need them:</p>

<div class="code">$author = '<span class="codeoomph">girlie</span>';<br />
$email = '<span class="codeoomph">girlie&#64;thegirliematters&#46;com</span>';<br />
</div>

<p>Now save your template and rebuild it. (Unless you've got some MT tags that need to be updated regularly, you may want to uncheck the &quot;Rebuild this template automatically&quot; box.)</p>

<p>The next step is to place the code for the link on any template(s) you use to display comments, inside the MTComments tags where you want it to appear:</p>

<div class="code">&lt;a href=&quot;&lt;MTBlogURL&gt;<span class="codeoomph">allcomments.php</span>?author=&lt;MTCommentAuthor&gt;&amp;email=&lt;MTCommentEmail&gt;&quot; title=&quot;view all comments by this author&quot;&gt;view all&lt;/a&gt;
</div>

<p>Remember to change <span class="codeoomph">allcomments.php</span> to match your output file path for the new Index Template you created. You may also need to further customize the URL if you set the Index Template to publish in a location other than your Local Site Path.</p>

<p>Rebuild the necessary portions of your site to generate the new links.</p>

<p>Caveat: you can't use the <i>spam_protect</i> attribute on the email address, leaving it vulnerable to spam spiders. If your commenters are consistent about the author name or URL they post with, those are viable alternatives that the script could be modified to use.</p>]]></content:encoded>
<dc:subject>Tutorial</dc:subject>
<dc:date>2004-01-04T16:07:22-06:00</dc:date>
</item>
<item>
<title>&quot;Mail This Entry&quot; Used For Spam</title>
<link>http://www.virtualvenus.org/archives/0311/mail_this_entry_used_for_spam.php</link>
<description><![CDATA[<p><b>SEE UPDATE BELOW</b></p>

<p>If you are using Movable Type's "Mail This Entry" feature on your blog, you are advised to rename your mt-send-entry.cgi file, or remove the feature entirely.</p>

<p>If you are not using the feature on your blog, you still need to either rename the script, disable it by changing the permissions, or remove it from your server altogether.</p>

<p>Spammers have <a href="http://www.movabletype.org/support/index.php?act=ST&f=14&t=31153" title="MT Support Forum Topic">discovered a means</a> of using this script to send messages that will appear to be coming from <b>your</b> server. </p>

<p>Renaming the script won't prevent them from finding it if you continue to use the feature on your site, but it will slow them down a little if everyone chooses a unique name for the script.</p>

<p>Also, if you're using other versions of this feature such as <a href="http://www.davidgagne.net/code/archives/005317.shtml" title="David Gagne's Pop-Up eMail">Pop-Up Mail This Entry</a> or <a href="http://www.nonplus.net/software/mt/MT-Mail-Entry.htm" title="Stepan Riha's MT-Mail-Entry">MT-Mail-Entry</a>, you may want to take a similar approach to those as well.</p>

<p>If there are any developers out there interested in working on a fix for this vulnerability, please leave a comment and I will contact you with the details of the method being used (if you need them).</p>

<p><b>Update:</b> Ben posted a fix in the previously-mentioned forum thread:</p>

<p>Before line 40 in mt-send-entry.cgi, add these lines:</p>

<div class="code">die &quot;Invalid from or to value&quot;<br />
       if $to =~ /[\r\n]/ || $from =~ /[\r\n]/;
</div>

<p>Save mt-send-entry.cgi, upload to your server in ASCII mode, and CHMOD permissions to 755 again (if necessary).</p>

<p>(<i>Cross-posted at <a href="http://www.thegirliematters.com/tips/archives/0311/mail_this_entry_used_for_spam.php" title="Tips and Tricks Entry">The Girlie Matters</a></i>)</p>
]]></description>
<guid isPermaLink="false">44@http://www.virtualvenus.org/</guid>
<content:encoded><![CDATA[<p><b>SEE UPDATE BELOW</b></p>

<p>If you are using Movable Type's "Mail This Entry" feature on your blog, you are advised to rename your mt-send-entry.cgi file, or remove the feature entirely.</p>

<p>If you are not using the feature on your blog, you still need to either rename the script, disable it by changing the permissions, or remove it from your server altogether.</p>

<p>Spammers have <a href="http://www.movabletype.org/support/index.php?act=ST&f=14&t=31153" title="MT Support Forum Topic">discovered a means</a> of using this script to send messages that will appear to be coming from <b>your</b> server. </p>

<p>Renaming the script won't prevent them from finding it if you continue to use the feature on your site, but it will slow them down a little if everyone chooses a unique name for the script.</p>

<p>Also, if you're using other versions of this feature such as <a href="http://www.davidgagne.net/code/archives/005317.shtml" title="David Gagne's Pop-Up eMail">Pop-Up Mail This Entry</a> or <a href="http://www.nonplus.net/software/mt/MT-Mail-Entry.htm" title="Stepan Riha's MT-Mail-Entry">MT-Mail-Entry</a>, you may want to take a similar approach to those as well.</p>

<p>If there are any developers out there interested in working on a fix for this vulnerability, please leave a comment and I will contact you with the details of the method being used (if you need them).</p>

<p><b>Update:</b> Ben posted a fix in the previously-mentioned forum thread:</p>

<p>Before line 40 in mt-send-entry.cgi, add these lines:</p>

<div class="code">die &quot;Invalid from or to value&quot;<br />
       if $to =~ /[\r\n]/ || $from =~ /[\r\n]/;
</div>

<p>Save mt-send-entry.cgi, upload to your server in ASCII mode, and CHMOD permissions to 755 again (if necessary).</p>

<p>(<i>Cross-posted at <a href="http://www.thegirliematters.com/tips/archives/0311/mail_this_entry_used_for_spam.php" title="Tips and Tricks Entry">The Girlie Matters</a></i>)</p>
]]></content:encoded>
<dc:subject>Bugs</dc:subject>
<dc:date>2003-11-23T09:33:19-06:00</dc:date>
</item>
<item>
<title>MT-Blacklist/Comment Spam Clearinghouse</title>
<link>http://www.virtualvenus.org/archives/0311/mtblacklistcomment_spam_clearinghouse.php</link>
<description><![CDATA[<p>Jay Allen has established a <a href="http://www.jayallen.org/comment_spam" title="MT-Blacklist/Comment Spam Clearinghouse">centralized clearinghouse for fighting comment spam</a>.</p>

<p>Planned or existing features include:<ul><li>News about the <a href="http://www.jayallen.org/projects/mt-blacklist" title="MT-Blacklist">MT-Blacklist plugin</a></li><li>A centralized blacklist database (available as a <a href="http://www.jayallen.org/comment_spam/blacklist.txt" title="blacklist.txt">flat file</a> or <a href="http://www.jayallen.org/comment_spam/feeds/blacklist-changes.rdf" title="blacklist-changes.rdf">RSS feed of changes</a>)</li><li><a href="http://www.jayallen.org/comment_spam/submit" title="submit comment spam">Spam submission</a></li><li>Discussion of spammers' tactics</li><li>Tips for fighting comment spam</li></ul>A spam-free weblog is a happy weblog.</p>
]]></description>
<guid isPermaLink="false">43@http://www.virtualvenus.org/</guid>
<content:encoded><![CDATA[<p>Jay Allen has established a <a href="http://www.jayallen.org/comment_spam" title="MT-Blacklist/Comment Spam Clearinghouse">centralized clearinghouse for fighting comment spam</a>.</p>

<p>Planned or existing features include:<ul><li>News about the <a href="http://www.jayallen.org/projects/mt-blacklist" title="MT-Blacklist">MT-Blacklist plugin</a></li><li>A centralized blacklist database (available as a <a href="http://www.jayallen.org/comment_spam/blacklist.txt" title="blacklist.txt">flat file</a> or <a href="http://www.jayallen.org/comment_spam/feeds/blacklist-changes.rdf" title="blacklist-changes.rdf">RSS feed of changes</a>)</li><li><a href="http://www.jayallen.org/comment_spam/submit" title="submit comment spam">Spam submission</a></li><li>Discussion of spammers' tactics</li><li>Tips for fighting comment spam</li></ul>A spam-free weblog is a happy weblog.</p>
]]></content:encoded>
<dc:subject>Bookmarks</dc:subject>
<dc:date>2003-11-07T19:36:28-06:00</dc:date>
</item>
<item>
<title>Restricted Portions of Posts</title>
<link>http://www.virtualvenus.org/archives/0310/restricted_portions_of_posts.php</link>
<description><![CDATA[<p>This is a little something I did for fun as a companion to the <a href="http://www.scriptygoddess.com/archives/000916.php">ScriptyGoddess Restricted Access Posts hack</a>.</p>

<p>Due to a situation I won't bother going into detail on, I started thinking about how I might protect certain <i>text</i> within the entries on my <a href="http://www.thegirliematters.com/journal/">journal</a>. I already use the SG hack to protect entries which I place in a restricted category, so I began looking at that code to see how I could adapt it to recognize that I wanted certain pieces of text within an otherwise unrestricted entry to <i>not</i> display unless the user already had access to the completely restricted entries on my site.</p>

<p>Are you with me so far? Say I have an entry with text like this:<blockquote class="code">There are a lot of coworkers who I do not like.<br /><br />For example, that bitch Angela drives me nuts.<br /><br />But I have learned to get along with everyone.</blockquote>Maybe I don't want just anyone who runs across my journal to see my statement about Angela (especially Angela if she knows her way around Google).</p>

<p>So this is what I came up with.</p>
<p><b>Required:</b> the <a href="http://mt-plugins.org/archives/entry/process_tags.php">Process Tags plugin</a> (and of course, the aforementioned <a href="http://www.scriptygoddess.com/archives/000916.php">SG hack</a> already installed on your site)</p>

<p>I first created two new Template Modules, <i>begin_restricted</i> and <i>end_restricted</i>:</p>

<p><b>begin_restricted</b><br />
<div class="code">&lt;?<br />
$accessallowed = FALSE;</p>

<p>if (in_array($ip, $array, TRUE) || in_array($cookievalue, $array, TRUE))<br />
{<br />
$accessallowed = TRUE;<br />
}</p>

<p>if ($accessallowed)<br />
{<br />
PRINT &quot;<br />
</div></p>

<p><b>end_restricted</b><br />
<div class="code">&quot;;<br />
} ?&gt;<br />
</div></p>

<p>These are the pieces of code taken (and modified) from the SG hack.</p>

<p>Then, I invoked the process tags plugin within the Individual Entry Archive:</p>

<div class="code">&lt;MTEntryBody process_tags=&quot;1&quot;&gt;<br />
&lt;MTEntryMore process_tags=&quot;1&quot;&gt;
</div>

<p>The only thing left to do is call the modules in my entry around the restricted text:<blockquote class="code">There are a lot of coworkers who I do not like.<br /><br />&lt;MTInclude module=&quot;begin_restricted&quot;&gt;<br /><br />For example, that bitch Angela drives me nuts.<br /><br />&lt;MTInclude module=&quot;end_restricted&quot;&gt;<br /><br />But I have learned to get along with everyone.</blockquote>Now, when I publish the entry, the Process Tags plugin pulls in the necessary PHP code to block the display of my insult to Angela if the reader doesn't have the cookie from the SG hack which gives them full access to my journal: <blockquote class="code">There are a lot of coworkers who I do not like.<br /><br />But I have learned to get along with everyone.</blockquote>That's all they see. View Source merely displays some empty &lt;p&gt; and &lt;/p&gt; tags, due to MT's Convert Breaks formatting option.</p>

<p>I could probably also use an ELSE statement to alert them to the restriction, offer access, etc., but I think that's more distraction than I want to insert into my entries. Perhaps for larger blocks of text, I'll create some alternate modules with these options; or explain elsewhere on my site about the restricted access feature. </p>

<p>Also, I could have avoided the plugin altogether and just used PHP includes for the two pieces of code, but I decided it would be easier to remember the module names than the full path to the files every time I wanted to use them.</p>

<p>I do have to be careful with this, of course - blocking too much might cause the entry to not make sense to the reader who doesn't have full access. But I just wanted to see if I could figure out <b>how</b> to do it; whether I actually make use of it or not remains to be seen.</p>

<p>Perhaps there's a way to achieve this purely in PHP. But being a neophyte in that area, I have no idea how to mark the sections of code I want to be restricted in a way that the script will recognize them, and maybe doing so is more trouble than it's worth. So anyone who <i>does</i> know PHP would really tickle my fancy if they could show me another way to do this. </p>

<p>P.S. I don't really have a co-worker named Angela. =)</p>

<p><b>Update 11.08.03:</b> I have modified the code for the <i>begin_restricted</i> module above to make it a little less redundant (I was repeating some variables and code unnecessarily).</p>]]></description>
<guid isPermaLink="false">41@http://www.virtualvenus.org/</guid>
<content:encoded><![CDATA[<p>This is a little something I did for fun as a companion to the <a href="http://www.scriptygoddess.com/archives/000916.php">ScriptyGoddess Restricted Access Posts hack</a>.</p>

<p>Due to a situation I won't bother going into detail on, I started thinking about how I might protect certain <i>text</i> within the entries on my <a href="http://www.thegirliematters.com/journal/">journal</a>. I already use the SG hack to protect entries which I place in a restricted category, so I began looking at that code to see how I could adapt it to recognize that I wanted certain pieces of text within an otherwise unrestricted entry to <i>not</i> display unless the user already had access to the completely restricted entries on my site.</p>

<p>Are you with me so far? Say I have an entry with text like this:<blockquote class="code">There are a lot of coworkers who I do not like.<br /><br />For example, that bitch Angela drives me nuts.<br /><br />But I have learned to get along with everyone.</blockquote>Maybe I don't want just anyone who runs across my journal to see my statement about Angela (especially Angela if she knows her way around Google).</p>

<p>So this is what I came up with.</p>
<p><b>Required:</b> the <a href="http://mt-plugins.org/archives/entry/process_tags.php">Process Tags plugin</a> (and of course, the aforementioned <a href="http://www.scriptygoddess.com/archives/000916.php">SG hack</a> already installed on your site)</p>

<p>I first created two new Template Modules, <i>begin_restricted</i> and <i>end_restricted</i>:</p>

<p><b>begin_restricted</b><br />
<div class="code">&lt;?<br />
$accessallowed = FALSE;</p>

<p>if (in_array($ip, $array, TRUE) || in_array($cookievalue, $array, TRUE))<br />
{<br />
$accessallowed = TRUE;<br />
}</p>

<p>if ($accessallowed)<br />
{<br />
PRINT &quot;<br />
</div></p>

<p><b>end_restricted</b><br />
<div class="code">&quot;;<br />
} ?&gt;<br />
</div></p>

<p>These are the pieces of code taken (and modified) from the SG hack.</p>

<p>Then, I invoked the process tags plugin within the Individual Entry Archive:</p>

<div class="code">&lt;MTEntryBody process_tags=&quot;1&quot;&gt;<br />
&lt;MTEntryMore process_tags=&quot;1&quot;&gt;
</div>

<p>The only thing left to do is call the modules in my entry around the restricted text:<blockquote class="code">There are a lot of coworkers who I do not like.<br /><br />&lt;MTInclude module=&quot;begin_restricted&quot;&gt;<br /><br />For example, that bitch Angela drives me nuts.<br /><br />&lt;MTInclude module=&quot;end_restricted&quot;&gt;<br /><br />But I have learned to get along with everyone.</blockquote>Now, when I publish the entry, the Process Tags plugin pulls in the necessary PHP code to block the display of my insult to Angela if the reader doesn't have the cookie from the SG hack which gives them full access to my journal: <blockquote class="code">There are a lot of coworkers who I do not like.<br /><br />But I have learned to get along with everyone.</blockquote>That's all they see. View Source merely displays some empty &lt;p&gt; and &lt;/p&gt; tags, due to MT's Convert Breaks formatting option.</p>

<p>I could probably also use an ELSE statement to alert them to the restriction, offer access, etc., but I think that's more distraction than I want to insert into my entries. Perhaps for larger blocks of text, I'll create some alternate modules with these options; or explain elsewhere on my site about the restricted access feature. </p>

<p>Also, I could have avoided the plugin altogether and just used PHP includes for the two pieces of code, but I decided it would be easier to remember the module names than the full path to the files every time I wanted to use them.</p>

<p>I do have to be careful with this, of course - blocking too much might cause the entry to not make sense to the reader who doesn't have full access. But I just wanted to see if I could figure out <b>how</b> to do it; whether I actually make use of it or not remains to be seen.</p>

<p>Perhaps there's a way to achieve this purely in PHP. But being a neophyte in that area, I have no idea how to mark the sections of code I want to be restricted in a way that the script will recognize them, and maybe doing so is more trouble than it's worth. So anyone who <i>does</i> know PHP would really tickle my fancy if they could show me another way to do this. </p>

<p>P.S. I don't really have a co-worker named Angela. =)</p>

<p><b>Update 11.08.03:</b> I have modified the code for the <i>begin_restricted</i> module above to make it a little less redundant (I was repeating some variables and code unnecessarily).</p>]]></content:encoded>
<dc:subject>Tutorial</dc:subject>
<dc:date>2003-10-25T13:49:57-06:00</dc:date>
</item>
<item>
<title>Create An Export Blog</title>
<link>http://www.virtualvenus.org/archives/0309/create_an_export_blog.php</link>
<description><![CDATA[<p>I'm really bad about remembering to do exports of my blog entries in MT, primarily because I have multiple blogs and it's a pain in the rear to visit each one, run the export, View Source (I'm using IE, which sometimes renders the output as HTML), and perform File > Save As to grab the data.</p>

<p>So I decided to create a Backup blog for automated exports. (This blog also holds my <a href="http://www.thegirliematters.com/tips/archives/0309/configuration_listing_with_php_and_mysql.php" title="my Tips entry">Configuration Listings</a>.)</p>

<p>NOTE: This backup method will only export entries with a status of PUBLISH!</p>
<p>Because I'm such a nice person (heh), I've <a href="http://www.virtualvenus.org/downloads/export.zip" title="zip file 3KB">zipped the files</a> for you.</p>

<p>Files included:<ul><li>export.txt - the format for exporting</li><li>exportreadme.txt - instructions</li><li>rebuild.cgi - used to generate the export files</li></ul>(The rebuild.cgi file was found in <a href="http://www.movabletype.org/support/?act=ST&f=14&t=9896">this MT forum thread</a>.)</p>

<p>Detailed instructions are available in <i>exportreadme.txt</i>, but basically, you<ul><li>create the new blog</li><li>create an Index Template for each blog to export</li><li>rebuild the blog using rebuild.cgi</li></ul>A .txt file for each blog's exported entries is then generated in your Backup folder.</p>

<p>It now takes about six seconds to export all my blogs!</p>]]></description>
<guid isPermaLink="false">35@http://www.virtualvenus.org/</guid>
<content:encoded><![CDATA[<p>I'm really bad about remembering to do exports of my blog entries in MT, primarily because I have multiple blogs and it's a pain in the rear to visit each one, run the export, View Source (I'm using IE, which sometimes renders the output as HTML), and perform File > Save As to grab the data.</p>

<p>So I decided to create a Backup blog for automated exports. (This blog also holds my <a href="http://www.thegirliematters.com/tips/archives/0309/configuration_listing_with_php_and_mysql.php" title="my Tips entry">Configuration Listings</a>.)</p>

<p>NOTE: This backup method will only export entries with a status of PUBLISH!</p>
<p>Because I'm such a nice person (heh), I've <a href="http://www.virtualvenus.org/downloads/export.zip" title="zip file 3KB">zipped the files</a> for you.</p>

<p>Files included:<ul><li>export.txt - the format for exporting</li><li>exportreadme.txt - instructions</li><li>rebuild.cgi - used to generate the export files</li></ul>(The rebuild.cgi file was found in <a href="http://www.movabletype.org/support/?act=ST&f=14&t=9896">this MT forum thread</a>.)</p>

<p>Detailed instructions are available in <i>exportreadme.txt</i>, but basically, you<ul><li>create the new blog</li><li>create an Index Template for each blog to export</li><li>rebuild the blog using rebuild.cgi</li></ul>A .txt file for each blog's exported entries is then generated in your Backup folder.</p>

<p>It now takes about six seconds to export all my blogs!</p>]]></content:encoded>
<dc:subject>Tutorial</dc:subject>
<dc:date>2003-09-07T16:38:11-06:00</dc:date>
</item>
<item>
<title>PHP Foundations</title>
<link>http://www.virtualvenus.org/archives/0308/php_foundations.php</link>
<description><![CDATA[<p>Nothin' says lovin' like a little PHP for your weblog.</p>

<p>Since I'm still in the early stages of learning, I'm rather enjoying some of the basic information I'm finding at <a href="http://www.onlamp.com/pub/ct/29" title="PHP Foundation Intro">PHP Foundation</a>, and just thought I'd share.</p>

<p>Thanks to these articles, I'll be better able to tackle my <a href="http://www.amazon.com/exec/obidos/ASIN/0321186486/girliematters-20">572 page gift from Brenna</a>.</p>

<p>If you have any good PHP resources that you've found indispensable in your own efforts to master PHP, please leave them in the comments.</p>
]]></description>
<guid isPermaLink="false">34@http://www.virtualvenus.org/</guid>
<content:encoded><![CDATA[<p>Nothin' says lovin' like a little PHP for your weblog.</p>

<p>Since I'm still in the early stages of learning, I'm rather enjoying some of the basic information I'm finding at <a href="http://www.onlamp.com/pub/ct/29" title="PHP Foundation Intro">PHP Foundation</a>, and just thought I'd share.</p>

<p>Thanks to these articles, I'll be better able to tackle my <a href="http://www.amazon.com/exec/obidos/ASIN/0321186486/girliematters-20">572 page gift from Brenna</a>.</p>

<p>If you have any good PHP resources that you've found indispensable in your own efforts to master PHP, please leave them in the comments.</p>
]]></content:encoded>
<dc:subject>Bookmarks</dc:subject>
<dc:date>2003-08-04T21:30:02-06:00</dc:date>
</item>
<item>
<title>Multiple Blogs - Merged Entries List</title>
<link>http://www.virtualvenus.org/archives/0307/multiple_blogs_merged_entries_list.php</link>
<description><![CDATA[<p>I was inspired to figure this out while toying with the notion of participating in this year's <a href="http://www.blogathon.org" title="Blogathon site">Blogathon</a>. Given that I have more than one blog on my site, I wanted entries from all of them to be considered, rather than having to post in a single blog; and I wanted them all merged together in one list that I could use on a special Blogathon page, where sponsors could track my progress throughout the evening without bouncing all over my site.</p>

<p>Of course, the first people I looked to were my Venus sisters. Kristine's <a href="http://www.scriptygoddess.com/archives/001393.php" title="post on Scriptygoddess">Multiple Blog Updates List</a>, and Brenna's <a href="http://mt.sixapart.com/cgi-bin/ikonboard/ikonboard.cgi?act=ST;f=14;t=5072;st=0" title="MT forums thread">PHP Ordered Updates</a> gave me a starting point, but the theme common to these methods was that they returned only a single most recent entry from each blog, rather than the most recent <i>N</i> entries from across all blogs.</p>

<p>So I set out to get out what I wanted, hoping to also learn a little more about MySQL and PHP along the way.</p>
<p><hr /><br />
<h3>First Method</h3><br />
<ul><b>Required:</b><br />
<li>MySQL database option in <a href="http://movabletype.org">Movable Type</a><br />
<li>ability to use PHP on your site</li><br />
</ul></p>

<p>This approach grabs certain entry and blog information, and displays a <a href="http://www.thegirliematters.com/portal_one.php" title="my first portal page">simple list of the last 10 entries</a> in the specified blogs.</p>

<p>Here is the core code I used in my index template:<br />
<div class="code">&lt;?<br />
//connection info<br />
include (&quot;/FULL/PATH/TO/connect.php&quot;);<br /><br />
$entries = mysql_query(&quot;SELECT e.entry_created_on, e.entry_blog_id, e.entry_id, e.entry_title, SUBSTRING_INDEX(entry_text, ' ', 25) AS excerpt, b.blog_id, b.blog_site_url, b.blog_name, b.blog_description FROM mt_entry e, mt_blog b WHERE (e.entry_blog_id = 2 OR e.entry_blog_id = 3 OR e.entry_blog_id = 7 OR e.entry_blog_id = 8 OR e.entry_blog_id = 13 OR e.entry_blog_id = 16 OR e.entry_blog_id = 17) AND e.entry_status = 2 AND e.entry_blog_id = b.blog_id ORDER BY e.entry_created_on DESC LIMIT 10&quot;);<br /><br />
while($row = mysql_fetch_array($entries)) {<br />
while (list($key,$val) = each($row)) {$$key = $val;}<br />
$date = date(&quot;F d, Y h:i a&quot;, strtotime($entry_created_on));<br />
$body = strip_tags($excerpt);<br />
echo &quot;&lt;div class=\&quot;blogbody\&quot;&gt;&lt;h3 class=\&quot;title\&quot;&gt;$entry_title&lt;/h3&gt;&lt;br /&gt;\n&quot;;<br />
echo &quot;$body&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;\n&quot;;<br />
echo &quot;&lt;h2 class=\&quot;date\&quot;&gt;posted in &lt;a href=\&quot;$blog_site_url\&quot;&gt;$blog_name&lt;/a&gt; on $date&lt;/h2&gt;\n&quot;;<br />
echo &quot;&lt;hr class=\&quot;ruler\&quot;&gt;\n&quot;;<br />
}<br />
?&gt;<br />
</div></p>

<p>Kristine gave me this piece of code to get an excerpt for each entry:</p>

<div class="code">SUBSTRING_INDEX(entry_text, ' ', <span class="codeoomph">25</span>) AS excerpt</div>

<p>Replace <span class="codeoomph">25</span> with the number of words you want to display as the excerpt.</p>

<p>To select the specific blogs from which to pull data, use</p>

<div class="code">e.entry_blog_id = <span class="codeoomph">#</span></div>

<p>repeated for each blog, replacing <span class="codeoomph">#</span> with the blog ID.</p>

<p>The benefit of this method is that no rebuilding is required to update the merged listing, because you're connecting straight to the database to grab the latest entries. </p>

<p><hr /><br />
<h3>Second Method</h3><br />
<ul><b>Required:</b><br />
<li>MySQL database option in <a href="http://movabletype.org">Movable Type</a><br />
<li><a href="http://mt-plugins.org/archives/entry/sql.php" title="entry on mt-plugins.org">SQL plugin</a></li><br />
<li><a href="http://mt-plugins.org/archives/entry/compare.php" title="entry on mt-plugins.org">Compare plugin</a></li><br />
<li><a href="http://mt-plugins.org/archives/entry/firstnwords.php" title="entry on mt-plugins.org">FirstNWords plugin</a></li><br />
<li>A new Trackback-enabled Category</li><br />
</ul></p>

<p>So why didn't I stick with the first method? Because it wasn't flexible enough for my needs.</p>

<p>First, each of my blog's entries require unique handling. My Bookmarks blog is a collection of links, inspired by <a href="http://maikimo.net/weblog/archives/2003/02/04/sideblog_interesting_links_setup_howto.html" title="sideblog how-to">maikimo.net</a>, and the entry body is simply a URL. I wanted it to be clickable, just like in the original blog. My Journal now has <a href="http://www.scriptygoddess.com/archives/000916.php" title="post on Scriptygoddess">restricted access posts</a>, so I might not always want the entry body showing up on the list. </p>

<p>Second, I wanted to link to the actual entries, not just the blogs they appeared in - and my Archive File Templates are different in each blog, so trying to construct a common linking structure would have been painful (oh, how I wish permalinks were stored in the MT database!).</p>

<p>I shifted my code to the SQL plugin (the query is a great deal simpler now, because using the plugin permits you to also make use of the other MT tags) and bumped up the number of entries to 15:<br />
<div class="code">&lt;MTSQLEntries unfiltered=&quot;1&quot; query=&quot;SELECT e.entry_id FROM mt_entry e WHERE (e.entry_blog_id = 2 OR e.entry_blog_id = 3 OR e.entry_blog_id = 7 OR e.entry_blog_id = 8 OR e.entry_blog_id = 13 OR e.entry_blog_id = 16 OR e.entry_blog_id = 17) AND e.entry_status = 2 ORDER BY e.entry_created_on DESC LIMIT 15&quot;&gt;<br /><br />
&lt;h3 class=&quot;title&quot;&gt;&lt;MTEntryTitle&gt;&lt;/h3&gt;<br />
&lt;$MTEntryBody convert_breaks=&quot;0&quot;$&gt;<br />
&lt;MTEntryIfExtended&gt;<br />
&lt;a href=&quot;&lt;MTEntryPermalink&gt;&quot;&gt;[more]&lt;/a&gt;<br />
&lt;/MTEntryIfExtended&gt;<br />
&lt;h2 class=&quot;date&quot;&gt;posted in &lt;a href=&quot;&lt;MTBlogURL&gt;&quot;&gt;&lt;MTBlogName&gt;&lt;/a&gt; on &lt;MTEntryDate format=&quot;%B %d, %Y&quot; lower_case=&quot;1&quot;&gt;&lt;/h2&gt;<br /><br />
&lt;/MTSQLEntries&gt;<br />
</div></p>

<p>So now I had the basic data that I wanted; the only thing left was customizing on a per-blog basis, and that's where Compare and FirstNWords helped out.</p>

<p>Here's what the custom code for my Journal entries looks like:<br />
<div class="code">&lt;MTIfEqual a=&quot;[MTBlogName]&quot; b=&quot;The Girlie Matters&quot;&gt;<br />
    &lt;h3 class=&quot;title&quot;&gt;&lt;MTEntryTitle lower_case=&quot;1&quot;&gt;&lt;/h3&gt;<br />
	&lt;$MTEntryBody convert_breaks=&quot;0&quot;$&gt;<br />
	&lt;MTEntryIfExtended&gt;<br />
    &lt;MTIfEqual a=&quot;[MTEntryCategory]&quot; b=&quot;restricted&quot;&gt;<br />
	&lt;em&gt; (restricted access entry) &lt;/em&gt;<br />
	&lt;/MTIfEqual&gt;<br />
	&lt;a href=&quot;&lt;MTEntryPermalink&gt;&quot;&gt;[more]&lt;/a&gt;<br />
	&lt;/MTEntryIfExtended&gt;<br />
	&lt;h2 class=&quot;date&quot;&gt;	<br />
	posted in &lt;a href=&quot;&lt;MTBlogURL&gt;&quot;&gt;journal&lt;/a&gt; on &lt;MTEntryDate format=&quot;%B %d, %Y&quot; lower_case=&quot;1&quot;&gt;<br />
	&lt;/h2&gt;	<br />
    &lt;/MTIfEqual&gt;<br />
</div></p>

<p>And for my Bookmarks entries:<br />
<div class="code">&lt;MTIfEqual a=&quot;[MTBlogName]&quot; b=&quot;Bookmarks&quot;&gt;<br />
    &lt;h3 class=&quot;title&quot;&gt;&lt;a href=&quot;&lt;$MTEntryBody convert_breaks=&quot;0&quot;$&gt;&quot; title=&quot;&lt;$MTEntryExcerpt$&gt;&quot;&gt;&lt;MTEntryTitle lower_case=&quot;1&quot;&gt;&lt;/a&gt;&lt;/h3&gt;<br />
	&lt;em&gt;&lt;MTEntryExcerpt&gt;&lt;/em&gt;<br />
	&lt;MTEntryIfExtended&gt;<br />
    &lt;MTEntryMore&gt;<br />
	&lt;/MTEntryIfExtended&gt;<br />
	&lt;h2 class=&quot;date&quot;&gt;	<br />
	posted in &lt;a href=&quot;&lt;MTBlogURL&gt;&quot;&gt;bookmarks&lt;/a&gt; on &lt;MTEntryDate format=&quot;%B %d, %Y&quot; lower_case=&quot;1&quot;&gt;<br />
	&lt;/h2&gt;	<br />
    &lt;/MTIfEqual&gt;<br />
</div></p>

<p>I repeated similar code for my other blogs (note that each set of MTIfEqual containers goes <i>before</i> the &lt;/MTSQLEntries&gt; tag). I chose to use MTBlogName instead of MTBlogID in the MTIfEqual statements because it made it easier for me to keep track of which blog the statement was for.</p>

<p>If you want to see what the final code looked like, I've posted it <a href="http://www.virtualvenus.org/demos/mergedblogs.php" title="view full code">here in the Demos blog</a>.</p>

<p>And you can view the results on <a href="http://www.thegirliematters.com/portal.php" title="my current portal page">my portal page</a> (design still in progress).</p>

<p>There's one element left - getting the page to rebuild automatically when entries are posted to the various blogs. (See <b>Update</b> below.)</p>

<p>I have a Site Info blog, which is really just an interface for maintaining non-blog areas of my site via MT (there are no entries, and all the templates are set to <span class="sys">Rebuild: No</span>). Since I consider the portal page to be a site feature, this blog seemed to be the logical place for it. So now it's the only template which is set to <span class="sys">Rebuild: Yes</span>.</p>

<p>Next, I added a category called "portal" to the Site Info blog, and edited its attributes to <span class="sys">Accept Incoming Trackback Pings</span>. I copied the assigned <span class="sys">Trackback URL</span>, and pasted it in the <span class="sys">Blog Configuration | Preferences | Publicity</span> section of each blog which will be updating to the list. Now, whenever I post an entry to any of these blogs, the resulting ping to the Site Info portal category forces the portal page to be rebuilt.</p>

<p>(One thing I noticed when testing the ping is that I got an error unless I enabled Category Archiving in the Site Info blog. I was reluctant to do this at first, because I didn't want to generate an actual category page in the blog. However, with no entries, no category page is published, so it was a moot issue.)</p>

<p><hr /><br />
After all of this thinking, I realized I may be too tired to participate in <a href="http://www.blogathon.org" title="Blogathon site">Blogathon</a> after all. =)</p>

<p><hr /><br />
<b>Update 07.25.03:</b> Oops. Guess what? There's a <a href="http://www.movabletype.org/support/index.php?s=366c24f96d885f6ee91cd2293f66d589&act=ST&f=18&t=23981">difference between a Trackback ping and a weblogs.com style ping</a>, so that whole thing about getting the page to rebuild automatically <i>doesn't work</i>. That's the reason I got the error on my ping attempt, but because I tested the second ping via the Edit Entry screen, I was fooled into thinking it would work both ways. (Can you tell how infrequently I've made use of Trackback?)</p>

<p>Suggested solutions (so far):</p>

<p>1) Setting up a category in each blog that will ping the portal category in the Site Info blog, and assign each entry to that category (but I don't want this category to display on the blogs where it says "posted in blah blah category, so that's out for me).</p>

<p>2) Set up your existing categories to ping the portal category (okay, will I get multiple pings for entries posted to multiple categories? If so, Brenna's <a title="remove pings script" href="http://www.emptypages.org/more/tips/removepings.html">Remove Pings</a> will help keep those cleaned out).</p>

<p>3) Mark's <a title="ping rebuilder script" href="http://markpasc.org/weblog/2003/01/25_quick_links_pingrebuilder.html">PingRebuilder CGI Script</a></p>

<p>4) Manually rebuilding the portal page anytime I post to one of the other blogs.</p>

<p>5) A cron job using <a title="MT Rebuild" href="http://www.mplode.com/tima/files/mt-plugins/#mt-rebuild">MT-Rebuild</a>.</p>

<p>Will add another update once I've settled on a solution. </p>]]></description>
<guid isPermaLink="false">33@http://www.virtualvenus.org/</guid>
<content:encoded><![CDATA[<p>I was inspired to figure this out while toying with the notion of participating in this year's <a href="http://www.blogathon.org" title="Blogathon site">Blogathon</a>. Given that I have more than one blog on my site, I wanted entries from all of them to be considered, rather than having to post in a single blog; and I wanted them all merged together in one list that I could use on a special Blogathon page, where sponsors could track my progress throughout the evening without bouncing all over my site.</p>

<p>Of course, the first people I looked to were my Venus sisters. Kristine's <a href="http://www.scriptygoddess.com/archives/001393.php" title="post on Scriptygoddess">Multiple Blog Updates List</a>, and Brenna's <a href="http://mt.sixapart.com/cgi-bin/ikonboard/ikonboard.cgi?act=ST;f=14;t=5072;st=0" title="MT forums thread">PHP Ordered Updates</a> gave me a starting point, but the theme common to these methods was that they returned only a single most recent entry from each blog, rather than the most recent <i>N</i> entries from across all blogs.</p>

<p>So I set out to get out what I wanted, hoping to also learn a little more about MySQL and PHP along the way.</p>
<p><hr /><br />
<h3>First Method</h3><br />
<ul><b>Required:</b><br />
<li>MySQL database option in <a href="http://movabletype.org">Movable Type</a><br />
<li>ability to use PHP on your site</li><br />
</ul></p>

<p>This approach grabs certain entry and blog information, and displays a <a href="http://www.thegirliematters.com/portal_one.php" title="my first portal page">simple list of the last 10 entries</a> in the specified blogs.</p>

<p>Here is the core code I used in my index template:<br />
<div class="code">&lt;?<br />
//connection info<br />
include (&quot;/FULL/PATH/TO/connect.php&quot;);<br /><br />
$entries = mysql_query(&quot;SELECT e.entry_created_on, e.entry_blog_id, e.entry_id, e.entry_title, SUBSTRING_INDEX(entry_text, ' ', 25) AS excerpt, b.blog_id, b.blog_site_url, b.blog_name, b.blog_description FROM mt_entry e, mt_blog b WHERE (e.entry_blog_id = 2 OR e.entry_blog_id = 3 OR e.entry_blog_id = 7 OR e.entry_blog_id = 8 OR e.entry_blog_id = 13 OR e.entry_blog_id = 16 OR e.entry_blog_id = 17) AND e.entry_status = 2 AND e.entry_blog_id = b.blog_id ORDER BY e.entry_created_on DESC LIMIT 10&quot;);<br /><br />
while($row = mysql_fetch_array($entries)) {<br />
while (list($key,$val) = each($row)) {$$key = $val;}<br />
$date = date(&quot;F d, Y h:i a&quot;, strtotime($entry_created_on));<br />
$body = strip_tags($excerpt);<br />
echo &quot;&lt;div class=\&quot;blogbody\&quot;&gt;&lt;h3 class=\&quot;title\&quot;&gt;$entry_title&lt;/h3&gt;&lt;br /&gt;\n&quot;;<br />
echo &quot;$body&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;\n&quot;;<br />
echo &quot;&lt;h2 class=\&quot;date\&quot;&gt;posted in &lt;a href=\&quot;$blog_site_url\&quot;&gt;$blog_name&lt;/a&gt; on $date&lt;/h2&gt;\n&quot;;<br />
echo &quot;&lt;hr class=\&quot;ruler\&quot;&gt;\n&quot;;<br />
}<br />
?&gt;<br />
</div></p>

<p>Kristine gave me this piece of code to get an excerpt for each entry:</p>

<div class="code">SUBSTRING_INDEX(entry_text, ' ', <span class="codeoomph">25</span>) AS excerpt</div>

<p>Replace <span class="codeoomph">25</span> with the number of words you want to display as the excerpt.</p>

<p>To select the specific blogs from which to pull data, use</p>

<div class="code">e.entry_blog_id = <span class="codeoomph">#</span></div>

<p>repeated for each blog, replacing <span class="codeoomph">#</span> with the blog ID.</p>

<p>The benefit of this method is that no rebuilding is required to update the merged listing, because you're connecting straight to the database to grab the latest entries. </p>

<p><hr /><br />
<h3>Second Method</h3><br />
<ul><b>Required:</b><br />
<li>MySQL database option in <a href="http://movabletype.org">Movable Type</a><br />
<li><a href="http://mt-plugins.org/archives/entry/sql.php" title="entry on mt-plugins.org">SQL plugin</a></li><br />
<li><a href="http://mt-plugins.org/archives/entry/compare.php" title="entry on mt-plugins.org">Compare plugin</a></li><br />
<li><a href="http://mt-plugins.org/archives/entry/firstnwords.php" title="entry on mt-plugins.org">FirstNWords plugin</a></li><br />
<li>A new Trackback-enabled Category</li><br />
</ul></p>

<p>So why didn't I stick with the first method? Because it wasn't flexible enough for my needs.</p>

<p>First, each of my blog's entries require unique handling. My Bookmarks blog is a collection of links, inspired by <a href="http://maikimo.net/weblog/archives/2003/02/04/sideblog_interesting_links_setup_howto.html" title="sideblog how-to">maikimo.net</a>, and the entry body is simply a URL. I wanted it to be clickable, just like in the original blog. My Journal now has <a href="http://www.scriptygoddess.com/archives/000916.php" title="post on Scriptygoddess">restricted access posts</a>, so I might not always want the entry body showing up on the list. </p>

<p>Second, I wanted to link to the actual entries, not just the blogs they appeared in - and my Archive File Templates are different in each blog, so trying to construct a common linking structure would have been painful (oh, how I wish permalinks were stored in the MT database!).</p>

<p>I shifted my code to the SQL plugin (the query is a great deal simpler now, because using the plugin permits you to also make use of the other MT tags) and bumped up the number of entries to 15:<br />
<div class="code">&lt;MTSQLEntries unfiltered=&quot;1&quot; query=&quot;SELECT e.entry_id FROM mt_entry e WHERE (e.entry_blog_id = 2 OR e.entry_blog_id = 3 OR e.entry_blog_id = 7 OR e.entry_blog_id = 8 OR e.entry_blog_id = 13 OR e.entry_blog_id = 16 OR e.entry_blog_id = 17) AND e.entry_status = 2 ORDER BY e.entry_created_on DESC LIMIT 15&quot;&gt;<br /><br />
&lt;h3 class=&quot;title&quot;&gt;&lt;MTEntryTitle&gt;&lt;/h3&gt;<br />
&lt;$MTEntryBody convert_breaks=&quot;0&quot;$&gt;<br />
&lt;MTEntryIfExtended&gt;<br />
&lt;a href=&quot;&lt;MTEntryPermalink&gt;&quot;&gt;[more]&lt;/a&gt;<br />
&lt;/MTEntryIfExtended&gt;<br />
&lt;h2 class=&quot;date&quot;&gt;posted in &lt;a href=&quot;&lt;MTBlogURL&gt;&quot;&gt;&lt;MTBlogName&gt;&lt;/a&gt; on &lt;MTEntryDate format=&quot;%B %d, %Y&quot; lower_case=&quot;1&quot;&gt;&lt;/h2&gt;<br /><br />
&lt;/MTSQLEntries&gt;<br />
</div></p>

<p>So now I had the basic data that I wanted; the only thing left was customizing on a per-blog basis, and that's where Compare and FirstNWords helped out.</p>

<p>Here's what the custom code for my Journal entries looks like:<br />
<div class="code">&lt;MTIfEqual a=&quot;[MTBlogName]&quot; b=&quot;The Girlie Matters&quot;&gt;<br />
    &lt;h3 class=&quot;title&quot;&gt;&lt;MTEntryTitle lower_case=&quot;1&quot;&gt;&lt;/h3&gt;<br />
	&lt;$MTEntryBody convert_breaks=&quot;0&quot;$&gt;<br />
	&lt;MTEntryIfExtended&gt;<br />
    &lt;MTIfEqual a=&quot;[MTEntryCategory]&quot; b=&quot;restricted&quot;&gt;<br />
	&lt;em&gt; (restricted access entry) &lt;/em&gt;<br />
	&lt;/MTIfEqual&gt;<br />
	&lt;a href=&quot;&lt;MTEntryPermalink&gt;&quot;&gt;[more]&lt;/a&gt;<br />
	&lt;/MTEntryIfExtended&gt;<br />
	&lt;h2 class=&quot;date&quot;&gt;	<br />
	posted in &lt;a href=&quot;&lt;MTBlogURL&gt;&quot;&gt;journal&lt;/a&gt; on &lt;MTEntryDate format=&quot;%B %d, %Y&quot; lower_case=&quot;1&quot;&gt;<br />
	&lt;/h2&gt;	<br />
    &lt;/MTIfEqual&gt;<br />
</div></p>

<p>And for my Bookmarks entries:<br />
<div class="code">&lt;MTIfEqual a=&quot;[MTBlogName]&quot; b=&quot;Bookmarks&quot;&gt;<br />
    &lt;h3 class=&quot;title&quot;&gt;&lt;a href=&quot;&lt;$MTEntryBody convert_breaks=&quot;0&quot;$&gt;&quot; title=&quot;&lt;$MTEntryExcerpt$&gt;&quot;&gt;&lt;MTEntryTitle lower_case=&quot;1&quot;&gt;&lt;/a&gt;&lt;/h3&gt;<br />
	&lt;em&gt;&lt;MTEntryExcerpt&gt;&lt;/em&gt;<br />
	&lt;MTEntryIfExtended&gt;<br />
    &lt;MTEntryMore&gt;<br />
	&lt;/MTEntryIfExtended&gt;<br />
	&lt;h2 class=&quot;date&quot;&gt;	<br />
	posted in &lt;a href=&quot;&lt;MTBlogURL&gt;&quot;&gt;bookmarks&lt;/a&gt; on &lt;MTEntryDate format=&quot;%B %d, %Y&quot; lower_case=&quot;1&quot;&gt;<br />
	&lt;/h2&gt;	<br />
    &lt;/MTIfEqual&gt;<br />
</div></p>

<p>I repeated similar code for my other blogs (note that each set of MTIfEqual containers goes <i>before</i> the &lt;/MTSQLEntries&gt; tag). I chose to use MTBlogName instead of MTBlogID in the MTIfEqual statements because it made it easier for me to keep track of which blog the statement was for.</p>

<p>If you want to see what the final code looked like, I've posted it <a href="http://www.virtualvenus.org/demos/mergedblogs.php" title="view full code">here in the Demos blog</a>.</p>

<p>And you can view the results on <a href="http://www.thegirliematters.com/portal.php" title="my current portal page">my portal page</a> (design still in progress).</p>

<p>There's one element left - getting the page to rebuild automatically when entries are posted to the various blogs. (See <b>Update</b> below.)</p>

<p>I have a Site Info blog, which is really just an interface for maintaining non-blog areas of my site via MT (there are no entries, and all the templates are set to <span class="sys">Rebuild: No</span>). Since I consider the portal page to be a site feature, this blog seemed to be the logical place for it. So now it's the only template which is set to <span class="sys">Rebuild: Yes</span>.</p>

<p>Next, I added a category called "portal" to the Site Info blog, and edited its attributes to <span class="sys">Accept Incoming Trackback Pings</span>. I copied the assigned <span class="sys">Trackback URL</span>, and pasted it in the <span class="sys">Blog Configuration | Preferences | Publicity</span> section of each blog which will be updating to the list. Now, whenever I post an entry to any of these blogs, the resulting ping to the Site Info portal category forces the portal page to be rebuilt.</p>

<p>(One thing I noticed when testing the ping is that I got an error unless I enabled Category Archiving in the Site Info blog. I was reluctant to do this at first, because I didn't want to generate an actual category page in the blog. However, with no entries, no category page is published, so it was a moot issue.)</p>

<p><hr /><br />
After all of this thinking, I realized I may be too tired to participate in <a href="http://www.blogathon.org" title="Blogathon site">Blogathon</a> after all. =)</p>

<p><hr /><br />
<b>Update 07.25.03:</b> Oops. Guess what? There's a <a href="http://www.movabletype.org/support/index.php?s=366c24f96d885f6ee91cd2293f66d589&act=ST&f=18&t=23981">difference between a Trackback ping and a weblogs.com style ping</a>, so that whole thing about getting the page to rebuild automatically <i>doesn't work</i>. That's the reason I got the error on my ping attempt, but because I tested the second ping via the Edit Entry screen, I was fooled into thinking it would work both ways. (Can you tell how infrequently I've made use of Trackback?)</p>

<p>Suggested solutions (so far):</p>

<p>1) Setting up a category in each blog that will ping the portal category in the Site Info blog, and assign each entry to that category (but I don't want this category to display on the blogs where it says "posted in blah blah category, so that's out for me).</p>

<p>2) Set up your existing categories to ping the portal category (okay, will I get multiple pings for entries posted to multiple categories? If so, Brenna's <a title="remove pings script" href="http://www.emptypages.org/more/tips/removepings.html">Remove Pings</a> will help keep those cleaned out).</p>

<p>3) Mark's <a title="ping rebuilder script" href="http://markpasc.org/weblog/2003/01/25_quick_links_pingrebuilder.html">PingRebuilder CGI Script</a></p>

<p>4) Manually rebuilding the portal page anytime I post to one of the other blogs.</p>

<p>5) A cron job using <a title="MT Rebuild" href="http://www.mplode.com/tima/files/mt-plugins/#mt-rebuild">MT-Rebuild</a>.</p>

<p>Will add another update once I've settled on a solution. </p>]]></content:encoded>
<dc:subject>Tutorial</dc:subject>
<dc:date>2003-07-13T09:55:17-06:00</dc:date>
</item>


</channel>
</rss>