<?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>Einar Egilsson &#187; Plugins</title>
	<atom:link href="http://einaregilsson.com/category/plugins/feed/" rel="self" type="application/rss+xml" />
	<link>http://einaregilsson.com</link>
	<description>A site for my programming pet projects</description>
	<lastBuildDate>Fri, 03 Feb 2012 20:08:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>ClipboardDiff Visual Studio Extension</title>
		<link>http://einaregilsson.com/clipboarddiff-visual-studio-extension/</link>
		<comments>http://einaregilsson.com/clipboarddiff-visual-studio-extension/#comments</comments>
		<pubDate>Fri, 29 Apr 2011 11:36:09 +0000</pubDate>
		<dc:creator>einar</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Extensions]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://tech.einaregilsson.com/?p=430</guid>
		<description><![CDATA[tl;dr: I made a Visual Studio 2010 extension, ClipboardDiff, which lets you diff selected text against the contents of the clipboard. Get it in the Visual Studio Gallery. Follow me on twitter @einaregilsson to get notified of updates and other cool extensions and stuff. At work I sometimes run into &#8220;evil twin&#8221; methods in our codebase. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>tl;dr:</strong> I made a Visual Studio 2010 extension, ClipboardDiff, which lets you diff selected text against the contents of the clipboard. <a title="Download the extension" href="http://visualstudiogallery.msdn.microsoft.com/a7519ab0-6029-49f3-9243-a74d1718a5bb">Get it in the Visual Studio Gallery</a>.</p>
<p><em>Follow me on twitter <a href="http://twitter.com/einaregilsson">@einaregilsson</a> to get notified of updates and other cool extensions and stuff.</em></p>
<p><a href="http://einaregilsson.com/wp-content/uploads/2011/04/cdlogo.png"><img class="alignright size-full wp-image-432" title="ClipboardDiff Logo" src="http://einaregilsson.com/wp-content/uploads/2011/04/cdlogo.png" alt="" width="140" height="140" /></a>At work I sometimes run into &#8220;evil twin&#8221; methods in our codebase. Those are methods that at a glance look almost exactly the same and where one has obviously been copy pasted from the other but then they have gotten out of sync over time. In these cases I try to refactor the two methods into one and add parameters for any behaviour that was different in the two original methods. But it can be hard to tell exactly what has changed between the two methods, especially when they are dozens of lines each. When dealing with this I used to copy each of the methods into their own temp file and then run a diff tool on them. After doing this a few times I got annoyed at the process, and decided to automate it somehow.<br />
<span id="more-430"></span></p>
<p>I&#8217;ve been playing around with Visual Studio extensions a lot lately and so I decided to make one for this problem. The extension is called ClipboardDiff and is now available in the Visual Studio Gallery. The idea is that you copy the first part of text you want to compare, then you select the next part you want to compare and then run the command &#8216;Diff selection against clipboard&#8217;. The command is available by right clicking on the selected text, it&#8217;s at the bottom of the context menu, or you can invoke it with they keyboard combination Alt+Shift+J. If you want to bind it to another keyboard combination just go into Tools-&gt;Customize-&gt;Keyboard and search for &#8216;ClipboardDiff&#8217;, it&#8217;ll find the command.</p>
<p><a href="http://einaregilsson.com/wp-content/uploads/2011/04/cd.png"><img class="alignnone size-full wp-image-431" title="Running the diff command" src="http://einaregilsson.com/wp-content/uploads/2011/04/cd.png" alt="" width="522" height="381" /></a></p>
<p>You can self choose which diff tool to use, to configure it go to Tools-&gt;ClipboardDiff settings and there you can enter the path to your diff tool of choice, and the arguments you want to pass to it. The placeholder values $FILE1$ and $FILE2$ will be replaced by the temp file names once you invoke the diff command. ClipboardDiff knows the default locations of a few diff programs, so if you have Perforce Merge, Tortoise Diff or WinMerge installed you won&#8217;t have to configure anything (Those are just the tools I happened to have installed on my machine). If you haven&#8217;t configured which tool to use the Settings window will be opened the first time you try to run a diff.</p>
<p><a href="http://einaregilsson.com/wp-content/uploads/2011/04/settings.png"><img class="alignnone size-full wp-image-433" title="Configure which diff tool to use" src="http://einaregilsson.com/wp-content/uploads/2011/04/settings.png" alt="" width="560" height="145" /></a></p>
<p>You can <a title="Download the extension" href="http://visualstudiogallery.msdn.microsoft.com/a7519ab0-6029-49f3-9243-a74d1718a5bb">download the extension in the Visual Studio Gallery</a> and the source, as always, is GPL&#8217;d and available on Github at <a href="https://github.com/einaregilsson/ClipboardDiff">https://github.com/einaregilsson/ClipboardDiff</a>. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://einaregilsson.com/clipboarddiff-visual-studio-extension/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Stop Build on first error in Visual Studio 2010</title>
		<link>http://einaregilsson.com/stop-build-on-first-error-in-visual-studio-2010/</link>
		<comments>http://einaregilsson.com/stop-build-on-first-error-in-visual-studio-2010/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 08:08:48 +0000</pubDate>
		<dc:creator>einar</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Extensions]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://tech.einaregilsson.com/?p=426</guid>
		<description><![CDATA[tl;dr: StopOnFirstBuildError is Visual Studio 2010 extension that cancels the rest of a solution build if a single project fails to compile, thus saving you time. Download it in the Visual Studio Gallery. Follow me on twitter @einaregilsson to get notified of updates and other cool extensions and stuff. At work I often work on a [...]]]></description>
			<content:encoded><![CDATA[<p><strong>tl;dr:</strong> StopOnFirstBuildError is Visual Studio 2010 extension that cancels the rest of a solution build if a single project fails to compile, thus saving you time. <a href="http://visualstudiogallery.msdn.microsoft.com/en-us/91aaa139-5d3c-43a7-b39f-369196a84fa5">Download it in the Visual Studio Gallery</a>.</p>
<p><em>Follow me on twitter <a href="http://twitter.com/einaregilsson">@einaregilsson</a> to get notified of updates and other cool extensions and stuff.</em></p>
<p>At work I often work on a solution that has around 25 projects. When one of the projects fails to build, Visual Studio insists on trying to build the rest of the projects, even though at that point I don&#8217;t want it to, since I&#8217;m never going to run the program when some of the projects have failed. Often the other projects depend on the project that failed, and the error list gets filled with errors from those projects that just obscure the root cause of the problem. So, I figured I could probably do something about it.</p>
<p><span id="more-426"></span>I googled around for a solution and found a <a href="http://msdn.microsoft.com/en-us/library/microsoft.build.tasks.msbuild.stoponfirstfailure.aspx">StopOnFirstFailure</a> property in MSBuild that sounded promising, but I couldn&#8217;t find any good way to hook into the VS-&gt;MSBuild relationship. I&#8217;m sure there is some way to do this, so if anyone knows, please let me know. The next thing I found was a <a href="http://stevedunns.blogspot.com/2006/10/visual-studio-build-tip.html">tip from Steve Dunn</a>. It&#8217;s a nice little macro that listens for an event that is fired after each project is built, and calls the Cancel Build command if a project has failed to build. You just open the Macro IDE, open the EnvironmentEvents.vb file and paste the following code in at the bottom:</p>
<pre class="brush: vb; title: ; notranslate">
Private Sub BuildEvents_OnBuildProjConfigDone(
                   _ ByVal Project As String,
                   _ ByVal ProjectConfig As String,
                   _ ByVal Platform As String,
                   _ ByVal SolutionConfig As String,
                   _ ByVal Success As Boolean) Handles BuildEvents.OnBuildProjConfigDone
    If Success = False Then 'The build failed...cancel any further builds.
        DTE.ExecuteCommand(&quot;Build.Cancel&quot;)
    End If
End Sub
</pre>
<p>This does 95% of what I wanted to do. But still, I&#8217;m not a big fan of Visual Studio Macros, I prefer extensions where possible so I can easily see in one place what things I have installed instead of digging through the Macro projects. I also wanted to activate the error window after cancelling the build and be able to turn this on and off easily. So, I made an extension out of it. The main thing in it is still the macro code from Steve Dunn above, but in addition the extension:</p>
<ul>
<li>Activates the error list after cancelling the build.</li>
<li>Prints a message to the Build output window, saying why the build was cancelled.</li>
<li>Adds a menu item to the Build menu, &#8220;Stop Build on first error&#8221;, which you can use to turn the functionality on and off easily.</li>
<li>Is context aware, the menu item and functionality are only available in multi-project solutions, since it would be pretty useless in a single project solution.
</ul>
<p>And that&#8217;s it. You can <a href="http://visualstudiogallery.msdn.microsoft.com/en-us/91aaa139-5d3c-43a7-b39f-369196a84fa5">download the extension</a> in the Visual Studio Gallery, get the GPL&#8217;d source code at <a href="https://github.com/einaregilsson/StopOnFirstBuildError">https://github.com/einaregilsson/StopOnFirstBuildError</a> and follow me on Twitter <a href="http://twitter.com/einaregilsson">@einaregilsson</a> to get notified of updates and other new extensions. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://einaregilsson.com/stop-build-on-first-error-in-visual-studio-2010/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>ZenCoding Visual Studio AddIn</title>
		<link>http://einaregilsson.com/zen-coding-visual-studio-addin/</link>
		<comments>http://einaregilsson.com/zen-coding-visual-studio-addin/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 23:05:08 +0000</pubDate>
		<dc:creator>einar</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Extensions]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[ZenCoding]]></category>

		<guid isPermaLink="false">http://tech.einaregilsson.com/?p=289</guid>
		<description><![CDATA[4 Feb 2010: I&#8217;m no longer working on this addin and cannot provide support for failed installations. I gave some information about possible causes for failed installations in this comment, you can see if that helps, or discuss with other users in the comments. There are unlikely to ever be new versions of this addin [...]]]></description>
			<content:encoded><![CDATA[<p><strong>4 Feb 2010:</strong> I&#8217;m no longer working on this addin and cannot provide support for failed installations. I gave some information about possible causes for failed installations in <a href="http://einaregilsson.com/2009/11/12/zen-coding-visual-studio-addin/#comment-70702">this comment</a>, you can see if that helps, or discuss with other users in the comments. There are unlikely to ever be new versions of this addin published by me, but Boris Sevo has forked the project and has a version with a newer zencoding library at <a href="http://zencoding.codeplex.com/">http://zencoding.codeplex.com/</a>. So go there for updates <img src='http://einaregilsson.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The original blog post about the architecture of the addin is now completely out of date as 90% of the addin is now written in IronPython with just a tiny shim layer of C# to instantiate the IronPython classes. I&#8217;ll probably write a blog post about that architecture seperately (or generally about how to write addins for VS in IronPython). Those interested in the architecture can download the source and look at it.</p>
<p>A nice tutorial with screenshots on how to setup the keyboard mappings and use the addin has just been posted at <a href="http://www.netsi.dk/wordpress/index.php/2009/12/02/zen-coding-a-very-fast-way-of-generating-html-elements-in-your-editor/">http://www.netsi.dk/wordpress/index.php/2009/12/02/zen-coding-a-very-fast-way-of-generating-html-elements-in-your-editor/</a> so go there for your setup instructions. <del>And there is now a dedicated rss feed for updates at <a href="http://einaregilsson.com/zcupdates.aspx ">http://einaregilsson.com/zcupdates.aspx </a>so subscribe to that to be notified of new versions. Eventually I&#8217;ll put an update check in the addin itself.</del></p>
<p><strong>ZenCoding.VisualStudio v1.1.0.333</strong></p>
<p><a title="MSI installer for the add-in" href="http://einaregilsson.com/download/ZenCoding.VisualStudio.msi">DOWNLOAD ADD-IN</a> || <a title="Download zip file with source code" href="http://einaregilsson.com/download/ZenCoding.VisualStudio.zip">DOWNLOAD SOURCE</a></p>
<p><span id="more-289"></span><strong>RELEASE NOTES:</strong></p>
<p><strong>Version 1.1.0.333, 02.12.2009:</strong></p>
<p>This release adds the following features</p>
<ul>
<li>Uses latest version of zencoding python library</li>
<li>Wrap with abbreviation command</li>
<li>Use, create, edit, delete custom snippets (Tools-&gt;Options-&gt;ZenCoding)</li>
<li>Icons for commands</li>
<li>Some bug fixes</li>
</ul>
<p>Also a total rewrite with everything now written in IronPython</p>
<p><strong>Version 1.0, 12.11.2009:</strong></p>
<p>Initial release, features:</p>
<ul>
<li>Expand abbreviation</li>
</ul>
<p><strong>Original blog post follows:</strong></p>
<p>Earlier this week, while reading <a href="http://secretgeek.net">Leon Bambrick&#8217;s blog</a> I learned about a set of plugins, named &#8220;zen-coding&#8221;, which expand snippets of css-selector like code into full blown html and/or css elements. <a href="http://secretgeek.net/zen_coding.asp">Leon&#8217;s article</a> explains it better and there is also some documentation on the <a href="http://code.google.com/p/zen-coding/">official zen-coding page</a>. Anyway, this plugin is available for a number of text editors and IDE&#8217;s but not for Visual Studio. I use Visual Studio a lot and wanted zen-coding in there, so I decided to try and whip up a small add-in for it.</p>
<p>The original library is available both as JavaScript and Python. I really didn&#8217;t want to port or alter anything in the original code, since for future versions I want to be able to just drop in a couple of files from the original library and rebuild the add-in. The obvious choice then was to see if the library would work with IronPython. Fortunately the zen-coding library is just basic string manipulation and worked perfectly with IronPython right out of the box.</p>
<p>The next challenge was figuring out how to call into that from the add-in, which I wanted to write in C#. The library contained two functions I needed to be able to call. That turned out to be surprisingly easy. <del>I made a wrapper class, ZenCodingEngine, which has two delegates with the correct method signatures, and then in its constructor I ran some custom python import code, and got references to the functions I needed and assigned them to my delegates.</del> I changed that approach in the latest version and moved almost all of the logic into Python instead. Now the C# AddIn is very thin, it basically just receives events from VS and invokes a single exec_command() method that is defined in a python script. The interesting parts of that code are below:</p>
<pre class="brush: csharp; title: ; notranslate">
private void ReloadPython()
{
  ScriptEngine engine = Python.CreateEngine();
  ScriptScope scope = engine.CreateScope();
  string folder = Path.GetDirectoryName(new
    Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath);
  List searchPaths = new List&lt;string&gt;(engine.GetSearchPaths());
  searchPaths.Add(folder);
  engine.SetSearchPaths(searchPaths);
  scope = engine.ExecuteFile(Path.Combine(folder, &quot;vs_zen_coding.py&quot;));
  engine.SetVariable(scope, &quot;App&quot;, _applicationObject);
  execCommand = engine.GetVariable&lt;Func&lt;bool&gt;&gt;(scope, &quot;exec_command&quot;);
}

public void Exec(string commandName, vsCommandExecOption executeOption, ref object varIn, ref object varOut, ref bool handled)
{
  handled = false;
  if (!CanExecuteCommand(commandName, executeOption))
  {
    return;
  }

  try
  {
    #if RELOAD_EVERY_TIME
    ReloadPython();
    #else
    if (execCommand == null)
    {
      //Load first time, to avoid making the VS startup slower
      ReloadPython();
    }
    #endif

    execCommand();
  }
  catch (Exception ex)
  {
    DisplayError(ex);
  }
  handled = true;
}</pre>
<p>The ReloadPython() method is not called on startup, instead it is called the first time the command is called. IronPython performs well, but there is still some startup cost and I don&#8217;t want to add that to the startup time of Visual Studio. Instead you pay the price the first time you actually need it. Then we have the Exec method which is from a VS interface and is called when the command is invoked. There I use a compilation constant, RELOAD_EVERY_TIME, to check if I should reload my python script every time I invoke the command. This has proved to be INCREDIBLY useful, instead of constantly starting VS up again and again I just edit my python script, save it and the next time I execute the command the new code is used. And of course I turn this constant off for release builds.</p>
<p>Another nice trick to play around with the VS API, start up an IronPython shell and type:</p>
<div style="background-color:black; color:white;">
&gt;&gt;&gt; from System.Runtime.InteropServices import Marshal<br />
&gt;&gt;&gt; app = Marshal.GetActiveObject(&#8220;VisualStudio.DTE.9.0&#8243;)<br />
&gt;&gt;&gt; app.ActiveDocument.Name<br />
&#8216;ZenCodingAddIn.cs&#8217;
</div>
<p>This gets you a reference to the running instance of VS2009 which you can then experiment with.</p>
<p>You can download <a href="/download/ZenCoding.VisualStudio.msi">an installer</a> for the add-in or get <a href="/download/ZenCoding.VisualStudio.zip">the source</a>. The add-in is licensed under the GPL v3, the same license the zen-coding library uses. The add-in works for Visual Studio 2005, 2008 and 2010 beta 2.</p>
<p>Now, once you&#8217;ve installed the add-in, nothing happens. Well, actually what happens is there&#8217;s a new command available in Visual Studio, named <strong>ZenCoding.Expand</strong>, or <strong>ZenCoding.VisualStudio.ZenCodingAddIn.Expand</strong>, depending on where you are looking for it. (The keyboard mapping uses the full command id, but when adding it to a toolbar you get a shorter friendly name for it). By default it is not mapped to any keyboard combination. This is because <del>it&#8217;s late and I can&#8217;t be bothered to figure it out</del> I strongly believe that add-ins should not force a keyboard shortcut on you, possibly overriding something you have set yourself. So, map the command to your preferred keyboard shortcut (mine is Ctrl+E,Ctrl+K). Or you can drag the command  onto a toolbar, which is fairly useless, but possible.</p>
<p>Enjoy!</p>
<p><strong>UPDATE 13.11.2009: </strong> The main zen-coding developer also told me that I&#8217;m using an older version, the latest version has a lot more features, including user defined snippets. I&#8217;ll start looking at that when I have time, which won&#8217;t be just yet. </p>
]]></content:encoded>
			<wfw:commentRss>http://einaregilsson.com/zen-coding-visual-studio-addin/feed/</wfw:commentRss>
		<slash:comments>44</slash:comments>
		</item>
		<item>
		<title>Integrating ZenPhoto into WordPress</title>
		<link>http://einaregilsson.com/integrating-zenphoto-into-wordpress/</link>
		<comments>http://einaregilsson.com/integrating-zenphoto-into-wordpress/#comments</comments>
		<pubDate>Mon, 06 Aug 2007 00:28:46 +0000</pubDate>
		<dc:creator>einar</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[ZenPhoto]]></category>

		<guid isPermaLink="false">http://tech.einaregilsson.com/2007/08/06/integrating-zenphoto-into-wordpress/</guid>
		<description><![CDATA[ZenPhoto is a great image gallery written in php that I use on another page I have. It has a great admin interface and themes that are simple to use. I wanted to integrate it into a WordPress blog so I looked around on the net and found a great article about it by a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://zenphoto.org">ZenPhoto</a> is a great image gallery written in php that I use on another page I have. It has a great admin interface and themes that are simple to use. I wanted to integrate it into a WordPress blog so I looked around on the net and found a great article about it by a guy named <a href="http://ruzee.com">Steffen Rusitschka</a>. It explains how you can get your ZenPhoto gallery to look like your blog by including some WordPress pages in your ZenPhoto theme. The article is at <a href="http://www.ruzee.com/blog/2006/06/integrating-zenphoto-into-wordpress/">http://www.ruzee.com/blog/2006/06/integrating-zenphoto-into-wordpress/</a>.</p>
<p>His method works great but there were a few things that bugged me about it. <span id="more-42"></span>First, my ZenPhoto javascript didn&#8217;t work with it, so the inline editing of album descriptions didn&#8217;t work. Also I wanted to be able to edit my ZenPhoto theme files in the WordPress theme editor. I tweak my theme all the time and I thought it would be much more convenient to be able to do it all in one place. So I figured out a way to make it work. Steffen gets full credit for coming up with the method, my contribution is simply making the javascript and theme editor work correctly, creating a link to the ZenPhoto admin interface from the WordPress admin interface and packing it all up in a zip file with easy installation instructions. I won&#8217;t explain all the code here, it&#8217;s done quite nicely in Steffens article but for those interested in the implementation it&#8217;s basically this:</p>
<ol>
<li>Make the files in the ZenPhoto theme basically do nothing but include zp-index, zp-image and zp-album from the current WordPress theme folder. This allows us to edit the theme using the WordPress theme editor.</li>
<li>Add hooks in WordPress so the ZenPhoto stylesheet will be included in the &lt;head&gt; element of the page.</li>
<li>Add hooks in WordPress so the zenJavascript function from ZenPhoto is called on the pages, so the inline editing will work (see head.php for this).</li>
<li>Create a small WordPress plugin that creates a link to ZenPhoto from the WordPress admin interface, and gives the zp files pretty names in the WordPress theme editor (&#8216;ZenPhoto Index&#8217; for zp-index.php, &#8216;ZenPhoto Image&#8217; for zp-image.php etc.).</li>
</ol>
<p>For those that just want to get it working, here are the installation instructions:</p>
<ol>
<li>Download the zip file and unzip.</li>
<li>Copy the wordpress-integration-zp-theme folder into your zenphoto/themes folder.</li>
<li>Go to your ZenPhoto admin web, choose Options and activate the theme called &#8216;WordPress Integration Theme&#8217;.</li>
<li>Copy the files (zp-index.php, zp-image.php, zp-album.php, zp-style.css) from the wordpress-theme-files folder into your current WordPress theme folder, /wp-content/themes/yourthemename.</li>
<li>Copy the zen-integration.php file into your WordPress plugin folder, /wp-content/plugins .</li>
<li>Goto your WordPress admin interface, choose Plugins, and activate the &#8216;Zen Integration&#8217; plugin. Note that the plugin assumes that your zenphoto folder is directly below your WordPress folder and is called &#8216;zenphoto&#8217;, &#8216;photos&#8217; or &#8216;gallery&#8217;. If it&#8217;s not, and you want to get the ZenPhoto link from the WordPress admin interface working you&#8217;ll need to edit the zen-integration.php file, find this line:
<pre class="brush: php; title: ; notranslate">$zp_admin_url = ''</pre>
<p>And change it to the full url of your ZenPhoto admin page, e.g.</p>
<pre class="brush: php; title: ; notranslate">$zp_admin_url = 'http://example.com/foo/bar/zenphoto/zen/admin.php'</pre>
<li>There is no step 7, you&#8217;re done!</li>
</ol>
<p>Now you should be able to go to your WordPress theme editor and see the files &#8216;ZenPhoto Index&#8217;, &#8216;ZenPhoto Album&#8217;, &#8216;ZenPhoto Image&#8217; and &#8216;ZenPhoto Stylesheet&#8217; and you can edit them right there. The files included in the zipfile are meant to be used with the default WordPress theme, Kubrick, and will probably not look very good on any other theme. It&#8217;s the simplest thing I could come up with, I mostly just changed the default ZenPhoto theme a bit. You should change it to fit your current WordPress theme. In the files, the ZenPhoto part is always wrapped in a &lt;div id=&#8221;zenphoto&#8221;&gt;, and the ZenPhoto stylesheet prefixes everything with #zenphoto, this is so your ZenPhoto stylesheet won&#8217;t start affecting other parts of your blog.</p>
<p>So, that&#8217;s it I think <img src='http://einaregilsson.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  . You can <a href="/download/zen-integration.zip">download the zip file with all the needed file here</a>, let me know if you have any problems with it. You can view it in action at <a href="/photos">http://einaregilsson.com/photos</a>  (Yes, I know it&#8217;s the same picture over and over, it&#8217;s just for demonstration purposes <img src='http://einaregilsson.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ).</p>
<p><strong>UPDATE 01.09.2007:</strong> Fixed bug where error message didn&#8217;t appear when comment was invalid on an image page.<br />
<strong>UPDATE 02.09.2007:</strong> &#8230;and now I fixed the fix, because it was displaying the error message even if there was no error!</p>
]]></content:encoded>
			<wfw:commentRss>http://einaregilsson.com/integrating-zenphoto-into-wordpress/feed/</wfw:commentRss>
		<slash:comments>71</slash:comments>
		</item>
		<item>
		<title>Yet Another Random Quote, with editing</title>
		<link>http://einaregilsson.com/yarq-with-editing/</link>
		<comments>http://einaregilsson.com/yarq-with-editing/#comments</comments>
		<pubDate>Mon, 30 Jul 2007 12:30:04 +0000</pubDate>
		<dc:creator>einar</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://tech.einaregilsson.com/2007/07/30/yarq-with-editing/</guid>
		<description><![CDATA[On my old site I used to have a random quote feature. When I moved to WordPress I missed it so I found a plugin that displayed random quotes. It was called Yet Another Random Quote (yarq for short) and lives at http://openmonday.org/2006/07/31/yet-another-random-quote/. It&#8217;s a good plugin and works well, but it could only add [...]]]></description>
			<content:encoded><![CDATA[<p>On my old site I used to have a random quote feature. When I moved to WordPress I missed it so I found a plugin that displayed random quotes. It was called Yet Another Random Quote (yarq for short) and lives at <a href="http://openmonday.org/2006/07/31/yet-another-random-quote/">http://openmonday.org/2006/07/31/yet-another-random-quote/</a>. It&#8217;s a good plugin and works well, but it could only add and delete quotes, not edit existing ones. So I changed it a bit, added editing functionality and moved the quote text fields above the quote list, which I thought was better when you had a lot of quotes. After I&#8217;d changed it I emailed the author twice to ask him if he wanted to use my changes in his next version but never heard back from him. So I´m gonna distribute my version here:</p>
<p><a href="/download/yarq.php.txt">Download</a></p>
<p>You can use Options-&gt;YARQ to change the display format, and Manage-&gt;Quotes to add, edit and delete the quotes. If my changes ever make it to the trunk I&#8217;ll stop distributing it here and just link to the main version. If <a href="http://openmonday.org">Frank van der Brink</a> ever reads this, get in contact with me at tech [at] einaregilsson.com and I&#8217;ll send you the patch for my changes.</p>
]]></content:encoded>
			<wfw:commentRss>http://einaregilsson.com/yarq-with-editing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

