<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="http://www.majordojo.com/projects/FeedManager/atom.xsl" type="text/xsl" media="screen"?>
<feed xmlns="http://www.w3.org/2005/Atom" 
      xmlns:thr="http://purl.org/syndication/thread/1.0">
  <link rel="alternate" type="text/html" href="http://www.majordojo.com/2005/12/widget-phoyo-ga.php" />
  <link rel="self" type="application/atom+xml" href="http://www.majordojo.com/2005/12/widget-phoyo-ga.php" />
  <id>tag:www.majordojo.com,2010://3/tag:www.majordojo.com,2005://3.2487-</id>
  <updated>2010-02-26T09:30:31Z</updated>
  <title>Comments for Movable Type Widget: Photo Galleries</title>
  <subtitle>A blog about Movable Type, technology, geek-dom, science-fiction and yes, sometimes my personal life.</subtitle>
  <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.261</generator>
  <entry>
    <id>tag:www.majordojo.com,2005://3.2487</id>
    <link rel="alternate" type="text/html" href="http://www.majordojo.com/2005/12/widget-phoyo-ga.php" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.majordojo.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=3/entry_id=2487" title="Movable Type Widget: Photo Galleries" />
    <published>2005-12-27T05:35:03Z</published>
    <updated>2007-08-26T07:20:48Z</updated>
    <title>Movable Type Widget: Photo Galleries</title>
    <summary>The following describes what is necessary to create a &#8220;Recently Updated Photo Gallery Plugin Widget.&#8221; Prerequisites: Photo Gallery Plugin...</summary>
    <author>
      <name>Byrne</name>
      <uri>http://www.majordojo.com/</uri>
    </author>
    
    <category term="Movable Type" />
    
    <content type="html" xml:lang="en" xml:base="http://www.majordojo.com/">
      <![CDATA[<p>The following describes what is necessary to create a &#8220;Recently Updated Photo Gallery Plugin Widget.&#8221; </p>

<p>Prerequisites:</p>

<ul>
<li><a href="http://www.majordojo.com/projects/PhotoGallery/">Photo Gallery Plugin</a></li>
</ul>
]]>
      <![CDATA[<h3>Stylesheet</h3>

<p>One needs to make sure that they substitute the proper URL in for the two background images needed for this widget. The URL should point to the base URL of your photo gallery.</p>

<pre><code>/* =Gallery Index  ----------------------------------------------- */
.useslides ul li {
&lt;b&gt;background:url("&lt;$MTBlogURL$&gt;meta/img/bg_slide.gif") 0 0 no-repeat;&lt;/b&gt;
}
.useslides&gt;ul li {
&lt;b&gt;background-image:url("&lt;$MTBlogURL$&gt;meta/img/bg_slide.png");&lt;/b&gt;
}
.galleries {
float:left;
margin:0 0 15px;
padding:1px 0;
}
.galleries ul {
float:left;
margin:0;
padding:0;
list-style:none;
text-align:left;
width: 160px;
}
.galleries li {
background-image:none;
position:relative;
float:left;
margin:0;
padding:75px 0 15px 15px;
width: 160px;
}
div.useslides ul li {
background-position:0px 0;
padding-top:130px;
text-align:center;
}
.galleries h3 {
margin:0 10px .25em 4px;
font:bold 100% Verdana,Sans-serif;
line-height:1.2em;
}
.useslides h3 {
margin-right:0;
} 
.galleries h3 a, .galleries a.img {
border-width:0;
}
.galleries li .img {
position:absolute;
top:0;
left:15px;
}
.useslides li .img {
/*  left:65px;*/
}
.galleries ul p {
margin:.35em 10px 0 4px;
}
.useslides ul p {
margin-right:0;
}
em.date {
font-style:normal;
}
.useslides a.img, .useslides a.img:visited, .useslides a.img:hover {
background-repeat:no-repeat;
/*  background-position:50% 103px;*/
background-position:50% 38px;
display:block;
width:92px;
height:70px;
padding:25px 17px 28px 0px;
border-width:0;
text-align:center;
}
.useslides a.v, .useslides a.v:visited, .useslides a.v:hover {
background-position:10px 50%;
width:70px;
height:92px;
padding:14px 28px 17px 25px;
}
.useslides .img img {
display:block;
border:1px solid;
border-color:#aaa #ddd #ddd #aaa;
}
</code></pre>

<h3>Template Code</h3>

<p>The following code presumes you have PHP installed, but it also assumes you have the <a href="http://www.majordojo.com/projects/PhotoGallery/">Photo Gallery plugin</a> installed, which has PHP as a prerequisite.</p>

<pre><code>&lt;?php
// Page Variables
$pgtitle = "&lt;$MTBlogName smarty_pants="1"$&gt;";
$section = "index";
$blogrelurl = "&lt;$MTBlogRelativeURL$&gt;";
$blogurl = "&lt;$MTBlogURL$&gt;";
// Functions
include ($_SERVER['DOCUMENT_ROOT']."&lt;$MTBlogRelativeURL$&gt;meta/functions/all.php");
?&gt;
&lt;$MTSetVar2 name="galleryno" value="0"$&gt;
&lt;$MTSetVar2 name="totalphotos" value="0"$&gt;
&lt;$MTSetVar2 name="titleimg" value=""$&gt;
&lt;MTCollateCollect&gt;
&lt;MTCategories&gt;&lt;MTFilterCategories exclude="Favorites"&gt;
  &lt;MTKeyValues source="[MTCategoryDescription]"&gt;
  &lt;MTIfNoKeyExists key="hidden"&gt;
  &lt;MTCollateRecord&gt;
    &lt;MTEntries lastn="1"&gt;
     &lt;MTCollateSetField name="sortdate"&gt;&lt;$MTEntryDate format="%Y-%m-%d-%H-%M-%S"$&gt;&lt;/MTCollateSetField&gt;
      &lt;MTCollateSetField name="date"&gt;&lt;$MTEntryDate format="%b %Y"$&gt;&lt;/MTCollateSetField&gt;
      &lt;MTCollateSetField name="img"&gt;&lt;$MTEntryMore$&gt;&lt;/MTCollateSetField&gt;
    &lt;/MTEntries&gt;
    &lt;MTIfKeyExists key="titleimgid"&gt;&lt;MTEntry id="[MTKeyValue key='titleimgid']"&gt;&lt;MTCollateSetField name="img"&gt;&lt;$MTEntryMore$&gt;&lt;/MTCollateSetField&gt;&lt;/MTEntry&gt;&lt;/MTIfKeyExists&gt;
    &lt;MTCollateSetField name="path"&gt;&lt;$MTCategoryLabel dirifyplus="pld"$&gt;&lt;/MTCollateSetField&gt;
    &lt;MTCollateSetField name="title"&gt;&lt;MTIfKeyExists key="title"&gt;&lt;$MTKeyValue key="title" smarty_pants="1"$&gt;&lt;/MTIfKeyExists&gt;&lt;MTIfNoKeyExists key="title"&gt;&lt;$MTCategoryLabel smarty_pants="1"$&gt;&lt;/MTIfNoKeyExists&gt;&lt;/MTCollateSetField&gt;
    &lt;MTCollateSetField name="count"&gt;&lt;$MTCategoryCount$&gt;&lt;/MTCollateSetField&gt;
    &lt;MTCollateSetField name="desc"&gt;&lt;MTIfNonEmpty tag="MTKeyValuesStripped"&gt;&lt;MTFirstNWords n="9" append="&amp;#8230;" append_decode_html="1"&gt;&lt;$MTKeyValuesStripped smarty_pants="1" remove_html="1"$&gt;&lt;/MTFirstNWords&gt;&lt;MTElse&gt;&lt;em&gt;No description&lt;/em&gt;&lt;/MTElse&gt;&lt;/MTIfNonEmpty&gt;&lt;/MTCollateSetField&gt;
  &lt;/MTCollateRecord&gt;
    &lt;$MTAddVar name="galleryno" value="1"$&gt;
    &lt;$MTAddVar name="totalphotos" value="[MTCategoryCount]"$&gt;
  &lt;/MTIfNoKeyExists&gt;
  &lt;/MTKeyValues&gt;
&lt;/MTFilterCategories&gt;&lt;/MTCategories&gt;
&lt;/MTCollateCollect&gt;
&lt;div class="galleries useslides"&gt;
&lt;h2&gt;Recently Updated Galleries&lt;/h2&gt;
&lt;MTIfGreater a="[MTGetVar2 name='galleryno']" b="0"&gt;
&lt;MTGrid num_columns="1"&gt;&lt;MTCollateList limit="6 sortdate:-" sort="sortdate:-"&gt;&lt;MTGridCell&gt;&lt;?php $thisimg = '&lt;MTCollateField name="img" encode_php="q"&gt;'; ?&gt;
&lt;MTGridIfLeftColumn&gt;
&lt;ul&gt;
&lt;/MTGridIfLeftColumn&gt;
  &lt;li&gt;
    &lt;a href="&lt;$MTBlogArchiveURL relative_url="1"$&gt;&lt;MTCollateField name="path"&gt;/" class="img&lt;?php if (IsVertical($thisimg)) echo ' v'; ?&gt;"&gt;&lt;MTCollateField name="img"&gt;&lt;/a&gt;
  &lt;/li&gt;
&lt;MTGridIfRightColumn&gt;  &lt;/ul&gt;
&lt;/MTGridIfRightColumn&gt;&lt;/MTGridCell&gt;&lt;/MTCollateList&gt;&lt;MTGridTrailingCells&gt;&lt;MTGridIfRightColumn&gt;
&lt;/ul&gt;&lt;/MTGridIfRightColumn&gt;&lt;/MTGridTrailingCells&gt;&lt;/MTGrid&gt;
&lt;MTElse&gt;&lt;p&gt;No galleries published yet.&lt;/p&gt;&lt;/MTElse&gt;&lt;/MTIfGreater&gt;
&lt;/div&gt;
</code></pre>
]]>
    </content>
  </entry>

  <entry>
    <id>tag:www.majordojo.com,2005://3.2487-comment:68668</id>
    <thr:in-reply-to ref="tag:www.majordojo.com,2005://3.2487" type="text/html" href="http://www.majordojo.com/2005/12/widget-phoyo-ga.php"/>
    <link rel="alternate" type="text/html" href="http://www.majordojo.com/2005/12/widget-phoyo-ga.php#c68668" />
    <title>Comment from Heidi Nelle on 2006-11-26</title>
    <author>
        <name>Heidi Nelle</name>
<!--         -->
    </author>
    <content type="html" xml:lang="en" xml:base="">
	<![CDATA[<p>Okay, so where do I put all of this?</p>
]]>
    </content>
    <published>2006-11-26T21:59:33Z</published>
    <updated>2006-11-26T21:59:33Z</updated>
  </entry>

  <entry>
    <id>tag:www.majordojo.com,2005://3.2487-comment:68669</id>
    <thr:in-reply-to ref="tag:www.majordojo.com,2005://3.2487" type="text/html" href="http://www.majordojo.com/2005/12/widget-phoyo-ga.php"/>
    <link rel="alternate" type="text/html" href="http://www.majordojo.com/2005/12/widget-phoyo-ga.php#c68669" />
    <title>Comment from Heidi Nelle on 2006-11-26</title>
    <author>
        <name>Heidi Nelle</name>
<!--        <uri>http://blackheartbeat.org</uri> -->
    </author>
    <content type="html" xml:lang="en" xml:base="http://blackheartbeat.org">
	<![CDATA[<p>Okay, I think I figured it out. Although, my weblog is located at <a href="http://blackheartbeat.org" rel="nofollow"><a href="http://blackheartbeat.org" rel="nofollow">http://blackheartbeat.org</a></a> (and weblog archives are at <a href="http://blackheartbeat.org/archives)," rel="nofollow"><a href="http://blackheartbeat.org/archives)," rel="nofollow">http://blackheartbeat.org/archives),</a></a> and my gallery is located at <a href="http://blackheartbeat.org/myPhoto" rel="nofollow"><a href="http://blackheartbeat.org/myPhoto" rel="nofollow">http://blackheartbeat.org/myPhoto</a></a> (and gallery archives are at <a href="http://blackheartbeat.org/myPhoto/arvhies)." rel="nofollow"><a href="http://blackheartbeat.org/myPhoto/arvhies)." rel="nofollow">http://blackheartbeat.org/myPhoto/arvhies).</a></a> Do I have to do anything different?</p>

<p>Also, why does the sidebar say there are no galleries published yet, when that just isn't true?</p>
]]>
    </content>
    <published>2006-11-27T00:40:29Z</published>
    <updated>2006-11-27T00:40:29Z</updated>
  </entry>

  <entry>
    <id>tag:www.majordojo.com,2005://3.2487-comment:166312</id>
    <thr:in-reply-to ref="tag:www.majordojo.com,2005://3.2487" type="text/html" href="http://www.majordojo.com/2005/12/widget-phoyo-ga.php"/>
    <link rel="alternate" type="text/html" href="http://www.majordojo.com/2005/12/widget-phoyo-ga.php#c166312" />
    <title>Comment from Best Fonts on 2009-12-09</title>
    <author>
        <name>Best Fonts</name>
<!--        <uri>http://www.fontmountain.com/</uri> -->
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.fontmountain.com/">
	<![CDATA[<p>Hey man, I'm meet making this comment because I'm browsing with the Bainate application and some of the frams are a bit odd. But the application isn't that popular anyway so no worries.</p>
]]>
    </content>
    <published>2009-12-09T09:48:54Z</published>
    <updated>2009-12-09T09:48:54Z</updated>
  </entry>

</feed>

