<?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>xiphux &#187; Programming</title>
	<atom:link href="http://www.xiphux.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.xiphux.com</link>
	<description></description>
	<lastBuildDate>Thu, 18 Feb 2010 23:52:45 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Updated GitPHP 0.1.1 packages</title>
		<link>http://www.xiphux.com/2010/02/18/updated-gitphp-0-1-1-packages/</link>
		<comments>http://www.xiphux.com/2010/02/18/updated-gitphp-0-1-1-packages/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 23:52:45 +0000</pubDate>
		<dc:creator>xiphux</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[gitphp]]></category>

		<guid isPermaLink="false">http://www.xiphux.com/?p=681</guid>
		<description><![CDATA[Oops, I seem to have forgotten to actually add GeSHi to the gitphp repo previously, which means the previous 0.1.1 packages didn&#8217;t have GeSHi in them.  I&#8217;ve added it and updated the packages on the gitphp page.
]]></description>
			<content:encoded><![CDATA[<p>Oops, I seem to have forgotten to actually add GeSHi to the gitphp repo previously, which means the previous 0.1.1 packages didn&#8217;t have GeSHi in them.  I&#8217;ve added it and updated the packages on the gitphp page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xiphux.com/2010/02/18/updated-gitphp-0-1-1-packages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GitPHP 0.1.1, and some notes on future direction</title>
		<link>http://www.xiphux.com/2010/02/14/gitphp-0-1-1-and-some-notes-on-future-direction/</link>
		<comments>http://www.xiphux.com/2010/02/14/gitphp-0-1-1-and-some-notes-on-future-direction/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 01:32:53 +0000</pubDate>
		<dc:creator>xiphux</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[gitphp]]></category>

		<guid isPermaLink="false">http://www.xiphux.com/?p=667</guid>
		<description><![CDATA[This release has a couple new features and bugfixes, and starts a bit of a change in direction with the development of the project.
First, features:

Support for specifying a project list file, rather than listing out projects manually in the config file.  It was done with Gitosis in mind, but will work with any flat [...]]]></description>
			<content:encoded><![CDATA[<p>This release has a couple new features and bugfixes, and starts a bit of a change in direction with the development of the project.</p>
<p>First, features:</p>
<ul>
<li>Support for specifying a project list file, rather than listing out projects manually in the config file.  It was done with Gitosis in mind, but will work with any flat file of projects.  Thanks to Jonathan Kolb</li>
<li>Switch to using GeSHi&#8217;s CSS mode to make highlighted blob support more lightweight (less traffic)</li>
<li>Basic blame support.  This is available as a link on any blob page to see the blame view for that file (if there&#8217;s somewhere else you would like the link, let me know).  This is just the standard git blame algorithm, it doesn&#8217;t do any of the more fancy pickaxe stuff such as added/deleted lines.  Also, currently blame view does not do any syntax highlighting with GeSHi &#8211; it&#8217;s actually trickier than it sounds because of the way GeSHi works</li>
<li>Smarty and GeSHi are now included with GitPHP so you don&#8217;t have to install it yourself &#8211; more on this below</li>
</ul>
<p>Bugfixes:</p>
<ul>
<li>Fix a bug that prevented filesearch from working, thanks to Christiaan Kortekaas</li>
<li>Fix a bug that caused RSS to generate an error for a project with a small number of commits, thanks to Zaran</li>
<li>Fix a security hole that allowed users to access any project using the p= parameter, even if it was not listed in the project list.  Thanks to Jonathan Kolb</li>
</ul>
<p>Just a note that some files have been moved around for organizational purposes (in particular, images, CSS, and documentation was moved into their own directories, rather than having them float around in the root), so if you&#8217;re upgrading, I would backup your config, delete your current install, then install the new version and replace your config so you don&#8217;t have unused files hanging around.</p>
<p>As always, release is on the <a href="http://www.xiphux.com/programming/php/gitphp/">GitPHP</a> page, and bugs can be reported on <a href="http://mantis.xiphux.com">Mantis</a>.</p>
<p>For future releases, I am aiming for making everyone&#8217;s lives easier with some significant changes.  In case you&#8217;re a tl;dr person, I will bold key points.</p>
<p><strong>Ease of setup</strong><br />
Currently, GitPHP is not easy to setup.  You have to read through a long list of configuration options to get things set up, and you have to install smarty on your own, as well as (if you choose) GeSHi.  One thing I&#8217;ve discovered, after developing commercial software for a year and a half, is that <em>users don&#8217;t read instructions</em>.  Despite the fact that I&#8217;ve written up a README and explained how to do everything, I&#8217;m willing to bet there&#8217;s been at least one user that tried to install GitPHP, gotten an error that Smarty isn&#8217;t found, then gave up.  There was even a fork by someone at one time to remove Smarty support.  While I have nothing against forks (I&#8217;ve seen at least two forks of GitPHP), I couldn&#8217;t really understand why someone would want to remove support for Smarty other than the fact that they didn&#8217;t want to have to install it themselves as a dependency.  If it&#8217;s completely internal to the project, it shouldn&#8217;t matter whether you&#8217;re using smarty or any other template engine.  Besides, Smarty is what provides the caching framework that GitPHP uses.<br />
Previously, I always excluded Smarty and GeSHi because I wanted to keep the package lightweight and allow users to choose what versions they wanted to use (in keeping with Unix style).  But since this has led to so much confusion for people, <strong>I am now including Smarty with GitPHP</strong> (in a &#8216;lib/&#8217; directory).  The example config now points to this smarty install by default.  <strong>GeSHi is also included</strong> in this lib directory, and the example config points to this copy and enables GeSHi by default.  Eventually the config options will be removed from the example config, or at least moved away from the main config options.  The config options themselves will probably never go away because it&#8217;s useful to be able to point to a shared smarty or geshi instance, but at least they&#8217;ll be hidden away from the average user and not be required options.<br />
This is probably the best I can do as far as making Smarty transparent.  You still need to set templates_c writable by the server because I can&#8217;t control permissions on a directory in a tarball.<br />
<strong>I will also be evaluating other configuration options for removal in the future</strong> from the example config so you don&#8217;t have to read over them if I can provide reasonable defaults.  No current options will be removed completely, but like Smarty and GeSHi, they may be hidden away by default.  The only config option a user must be required to set up is the project root, because I&#8217;m not psychic and I don&#8217;t know where you&#8217;ve made your projects available.</p>
<p><strong>Ease of maintainability</strong><br />
For the past few years, I&#8217;ve hated the GitPHP codebase.  GitPHP was written in 2005, back when PHP 4 was still commonplace and PHP 5 was not widely deployed for everyone.  So at the time, when I started the project, I wrote it as a very large collection of functions (like a C program), because:</p>
<ul>
<li>I wanted it to work on PHP4, which most people (including me) were still using at the time</li>
<li>I was basing it on Gitweb, which is a single perl file.  Perl is not exactly organized, and neither was the Gitweb code.  (it still isn&#8217;t)</li>
<li>I was still relatively inexperienced with PHP</li>
</ul>
<p>However, after five years of changes and tweaking, it&#8217;s ended up as a train wreck of spaghetti code.  I&#8217;ve found myself having to violate the DRY (don&#8217;t repeat yourself) principle all over the place just to fix simple bugs, and adding a new feature (blame) was a lot messier than it should have been.<br />
Therefore, I am going to be rewriting all the internal code of GitPHP.  Because PHP 5 is widespread now (and PHP 4 is end of life), I can take advantage of PHP 5&#8217;s much better (though still not quite perfect) object oriented programming support.  This means I can use things inherent to object oriented programming like patterns, code reuse, and loading data by git commands only on demand and caching it in objects to minimize the number of git commands executed.<br />
For people looking at the code (me, and maybe anyone doing a bugfix), this will eventually make your job a lot easier.  For users, what this means is that <strong>at some point &#8211; maybe even as soon as the next release &#8211; GitPHP will stop working on PHP 4</strong>.  I&#8217;ve already started, but as a rewrite of pretty much the entire application, it&#8217;s going to take quite a while.  Depending on how long it takes me, it&#8217;s possible that the next release will have a half-half codebase.  We&#8217;ll see.</p>
<p><strong>Ease of use</strong><br />
The current GitPHP interface is based on Gitweb (obviously).  While the gitweb interface works fairly well, there are also places where I&#8217;ve found using it to be fairly clumsy.<br />
Also, currently GitPHP uses no javascript for browser compatibility reasons.  However, there have been a number of times where I would have liked to use javascript to make life easier for someone using the site.  As compatibility between browsers gets better, using javascript <em>in a compatible but also degradable way</em> looks more and more feasible, so <strong>I will be looking into ways to make the user interface of GitPHP more flexible in the future &#8211; implementing javascript, and partially departing from the Gitweb look</strong>.  It&#8217;s not going to look like a radically different application or anything, but it will probably stop adhering so closely to Gitweb.  This is a long term thing though; I probably won&#8217;t start this until I&#8217;ve at least addressed the other two points, rewriting the core and making the install easier.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xiphux.com/2010/02/14/gitphp-0-1-1-and-some-notes-on-future-direction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GitPHP 0.1.0</title>
		<link>http://www.xiphux.com/2009/11/10/gitphp-0-1-0/</link>
		<comments>http://www.xiphux.com/2009/11/10/gitphp-0-1-0/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 02:43:33 +0000</pubDate>
		<dc:creator>xiphux</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[gitphp]]></category>

		<guid isPermaLink="false">http://www.xiphux.com/?p=663</guid>
		<description><![CDATA[This release fixes a major security hole; upgrading is recommended as soon as possible.
Changes:

Security fix: A user could perform a directory traversal using a crafted relative path (using .. and a null byte) to read an arbitrary file on the server
Allow display of clone/push urls for projects

Release is on the GitPHP page, and bugs can [...]]]></description>
			<content:encoded><![CDATA[<p>This release fixes a major security hole; upgrading is recommended as soon as possible.</p>
<p>Changes:</p>
<ul>
<li><strong style="color:red;">Security fix:</strong> A user could perform a directory traversal using a crafted relative path (using .. and a null byte) to read an arbitrary file on the server</li>
<li>Allow display of clone/push urls for projects</li>
</ul>
<p>Release is on the <a href="http://www.xiphux.com/programming/php/gitphp/">GitPHP</a> page, and bugs can be reported on <a href="http://mantis.xiphux.com">Mantis</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xiphux.com/2009/11/10/gitphp-0-1-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GitPHP 0.0.9</title>
		<link>http://www.xiphux.com/2009/10/24/gitphp-0-0-9/</link>
		<comments>http://www.xiphux.com/2009/10/24/gitphp-0-0-9/#comments</comments>
		<pubDate>Sun, 25 Oct 2009 02:49:51 +0000</pubDate>
		<dc:creator>xiphux</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[gitphp]]></category>

		<guid isPermaLink="false">http://www.xiphux.com/?p=659</guid>
		<description><![CDATA[This is just a small bugfix release.
Changes:

PHP 5.3 fixes (avoid assigning object references, switch to perl compatible regular expressions since the posix extended regex functions are deprecated) &#8211; patch by Khee Chin
On the project list, the project description links to the project page like gitweb &#8211; patch by Khee Chin
Packed ref support &#8211; based on [...]]]></description>
			<content:encoded><![CDATA[<p>This is just a small bugfix release.</p>
<p>Changes:</p>
<ul>
<li>PHP 5.3 fixes (avoid assigning object references, switch to perl compatible regular expressions since the posix extended regex functions are deprecated) &#8211; patch by Khee Chin</li>
<li>On the project list, the project description links to the project page like gitweb &#8211; patch by Khee Chin</li>
<li>Packed ref support &#8211; based on work by Khee Chin</li>
<li>Fixed display of non-english UTF-8 characters (they used to appear garbled)</li>
<li>Disabled smarty&#8217;s template compile check in releases for a small performance boost (smarty used to constantly check if a template was modified, something that&#8217;s unnecessary in releases put into production and is only useful during development)</li>
</ul>
<p>Release is on the <a href="http://www.xiphux.com/programming/php/gitphp/">GitPHP</a> page, and bugs can be reported on <a href="http://mantis.xiphux.com">Mantis</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xiphux.com/2009/10/24/gitphp-0-0-9/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>GitPHP 0.0.8</title>
		<link>http://www.xiphux.com/2009/07/25/gitphp-0-0-8/</link>
		<comments>http://www.xiphux.com/2009/07/25/gitphp-0-0-8/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 05:41:39 +0000</pubDate>
		<dc:creator>xiphux</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[gitphp]]></category>

		<guid isPermaLink="false">http://www.xiphux.com/?p=646</guid>
		<description><![CDATA[This release does not have many major changes for end users.  However, there are a number of significant changes under the hood:
Major features:
Caching
By request&#8230; GitPHP now makes use of Smarty caching to cache the output of any action &#8211; this includes all pages, blobs, diffs, searches, and even snapshots.  There are new cache [...]]]></description>
			<content:encoded><![CDATA[<p>This release does not have many major changes for end users.  However, there are a number of significant changes under the hood:</p>
<p>Major features:<br />
<strong>Caching</strong><br />
By request&#8230; GitPHP now makes use of Smarty caching to cache the output of any action &#8211; this includes all pages, blobs, diffs, searches, and even snapshots.  There are new cache options in the example config, so make sure you copy them into your existing config to turn on caching and choose your desired cache lifetime.<br />
GitPHP will attempt to automatically expire the cache appropriately.  When a page is loaded for a project, it will expire any cached pages that are older than the most recent commit to the project, on any head.  This ensures that users are always seeing the proper information for the project, and not seeing outdated information due to cached pages that have been hanging around too long.  This check is a tiny performance hit, but is trivial compared to the gain of caching.  You <em>can</em> turn this off if you want to skip the check, but you should beware that users could be seeing mixes of old and new data depending on what has and hasn&#8217;t been cached.  You can also turn this off if commits are coming in so quickly that the cache is constantly being expired, but if you&#8217;re doing your git workflow properly (occasionally pushing groups of commits from a private to a public repository) this should not be the case.<br />
If you ever run into cache issues, you can go to</p>
<p>http://yourserver.com/gitphp/index.php?a=expire</p>
<p>to forcefully expire everything in the cache.  You will also need to do this if you change any config options.  This is not linked anywhere from the interface since it&#8217;s an administrative action; you have to type it in yourself.</p>
<p><strong>Unified templates</strong><br />
I realized that the way I was handling templates previously was hampering customizability.  I had template pieces that got displayed in order&#8230; for example, the header template, then the nav template, then the paging prev/next template, then the log template, then the footer template&#8230; you get the idea.  While each of those templates was customizable, I was still enforcing the order of elements &#8211; eg the nav always had to be first, before the content.<br />
Now, each page&#8217;s template is a single file that displays everything.  This allows full flexibility to customize the template any way you want &#8211; anything can now be moved anywhere on the page.  (It also made implementing caching easier)<br />
This is a very slight performance degradation compared to previous versions, because there are times where the code will have to loop twice &#8211; once to parse data, then another time to output it in the template.  However, caching completely eliminates this difference (and then some).</p>
<p>Minor features:</p>
<ul>
<li>Debugging can be turned on with a new config option.  This is probably not useful for most users.  However, this will display the execution time of a given page at the bottom, so it can be useful for checking how much time a particular action on a repository takes &#8211; although naturally, this is influenced by the cache</li>
</ul>
<p>Bugfixes:</p>
<ul>
<li>The &#8220;performance fix&#8221; introduced in version 0.0.6 made use of the &#8211;skip parameter for revision lists.  This parameter was introduced in git 1.5.0, which means that revision browsing was effectively broken for any version of git lower than that.  (It was broken on this site&#8230; dreamhost runs git 1.4.4.4).  I have now made it backwards compatible; gitphp will use the faster &#8211;skip parameter if it detects you are running git 1.5.0 or greater, and transparently fall back to the old method if you are not.  I refuse to be like gitweb and require the gitweb and git versions to both be the most current; I&#8217;ll always support old versions to the best of my ability, so please report bugs on <a href="http://mantis.xiphux.com">Mantis</a> if you have any issues with old versions.</li>
<li>Whitespace is preserved on non-html pages (such as opml and rss) for readability</li>
<li>The blob page now properly displays ref tags for HEAD</li>
<li>Pages now properly report their charset to the browser as UTF-8</li>
<li>Pages do not use the output buffer anymore.  It is unnecessary if you are using caching, and avoids issues where the snapshot is larger than the output buffer and gets truncated</li>
</ul>
<p>Internationalization is not in this release.  Technically it is done, but no one showed interest in translating into another language.  Abstracted and tokenized strings, without any other languages besides English, are just an unnecessary performance hit.  The code still exists in the branch <a href="http://www.xiphux.com/gitphp/index.php?p=php/gitphp.git&#038;a=shortlog&#038;h=refs/heads/i18n-manual">i18n-manual</a>, but I&#8217;m not going to merge the feature until there&#8217;s a reason to, meaning there&#8217;s at least one other language to offer.</p>
<p>As always, the release is on the <a href="http://www.xiphux.com/programming/php/gitphp/">GitPHP</a> page, and bugs can be reported on <a href="http://mantis.xiphux.com">Mantis</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xiphux.com/2009/07/25/gitphp-0-0-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GitPHP internationalization</title>
		<link>http://www.xiphux.com/2009/07/05/gitphp-internationalization/</link>
		<comments>http://www.xiphux.com/2009/07/05/gitphp-internationalization/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 01:54:24 +0000</pubDate>
		<dc:creator>xiphux</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[gitphp]]></category>

		<guid isPermaLink="false">http://www.xiphux.com/?p=642</guid>
		<description><![CDATA[If you would like to see the next gitphp release in your language, and can translate tokenized strings, I would be interested in hearing from you: xiphux@gmail.com.
]]></description>
			<content:encoded><![CDATA[<p>If you would like to see the next gitphp release in your language, and can translate tokenized strings, I would be interested in hearing from you: <a href="mailto:xiphux@gmail.com">xiphux@gmail.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xiphux.com/2009/07/05/gitphp-internationalization/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>GitPHP 0.0.7</title>
		<link>http://www.xiphux.com/2009/07/03/gitphp-0-0-7/</link>
		<comments>http://www.xiphux.com/2009/07/03/gitphp-0-0-7/#comments</comments>
		<pubDate>Sat, 04 Jul 2009 04:11:50 +0000</pubDate>
		<dc:creator>xiphux</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[gitphp]]></category>

		<guid isPermaLink="false">http://www.xiphux.com/?p=637</guid>
		<description><![CDATA[This one is a minor release.  No new config options.
There are three small(-ish) changes:

Readable names in diffs (I changed some of these last release but didn&#8217;t get all of them)
Treeview paths now have clickable links for each folder, so you can jump to any parent directory easily
Ref icons appear in more places by commit [...]]]></description>
			<content:encoded><![CDATA[<p>This one is a minor release.  No new config options.</p>
<p>There are three small(-ish) changes:</p>
<ul>
<li>Readable names in diffs (I changed some of these last release but didn&#8217;t get all of them)</li>
<li>Treeview paths now have clickable links for each folder, so you can jump to any parent directory easily</li>
<li>Ref icons appear in more places by commit titles</li>
</ul>
<p>I wouldn&#8217;t normally do a release this small, but I&#8217;m planning on making some major changes to the way templates work (internally, not really much difference visible to users), which is a change that could potentially take a while, so I wanted to get these fixes out and released before I started anything.</p>
<p>As always, packages are available from the <a href="http://www.xiphux.com/programming/php/gitphp/">GitPHP</a> page, and bugs can be reported by <a href="http://mantis.xiphux.com">Mantis</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xiphux.com/2009/07/03/gitphp-0-0-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gentoo overlay</title>
		<link>http://www.xiphux.com/2009/05/20/gentoo-overlay/</link>
		<comments>http://www.xiphux.com/2009/05/20/gentoo-overlay/#comments</comments>
		<pubDate>Thu, 21 May 2009 00:41:47 +0000</pubDate>
		<dc:creator>xiphux</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[gitphp]]></category>

		<guid isPermaLink="false">http://www.xiphux.com/?p=630</guid>
		<description><![CDATA[Created a gentoo overlay.  Right now it only has ebuilds for gitphp.  You can set it up by doing something like:
git clone http://www.xiphux.com/git/gentoo.git /usr/local/portage/xiphux
And adding to your make.conf:
PORTDIR_OVERLAY="/usr/local/portage/xiphux"
The ebuild will handle changing the permissions of templates_c and will copy gitphp.conf.php.example to gitphp.conf.php, and will allow you to merge changes to gitphp.conf.php using etc-update [...]]]></description>
			<content:encoded><![CDATA[<p>Created a gentoo overlay.  Right now it only has ebuilds for gitphp.  You can set it up by doing something like:</p>
<p><code>git clone http://www.xiphux.com/git/gentoo.git /usr/local/portage/xiphux</code></p>
<p>And adding to your make.conf:<br />
<code>PORTDIR_OVERLAY="/usr/local/portage/xiphux"</code></p>
<p>The ebuild will handle changing the permissions of templates_c and will copy gitphp.conf.php.example to gitphp.conf.php, and will allow you to merge changes to gitphp.conf.php using etc-update when you upgrade.</p>
<p>Unfortunately, I don&#8217;t know of a good way to make webapp-config handle the templates_c directory, so when you unmerge the package you have to get rid of the templates_c directory manually (since by then the webserver has generated the compiled files in there, so webapp-config won&#8217;t remove it since it&#8217;s not empty).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xiphux.com/2009/05/20/gentoo-overlay/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GitPHP 0.0.6</title>
		<link>http://www.xiphux.com/2009/05/19/gitphp-006/</link>
		<comments>http://www.xiphux.com/2009/05/19/gitphp-006/#comments</comments>
		<pubDate>Wed, 20 May 2009 03:56:21 +0000</pubDate>
		<dc:creator>xiphux</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[gitphp]]></category>

		<guid isPermaLink="false">http://www.xiphux.com/?p=623</guid>
		<description><![CDATA[Wasn&#8217;t really getting any bug reports, so I figured I&#8217;d just release.
There&#8217;s a README file included now.  I&#8217;m no master technical writer, but it should explain what you need to know.
The config file is no longer distributed directly; it is distributed as an example file so you don&#8217;t overwrite your old config when upgrading. [...]]]></description>
			<content:encoded><![CDATA[<p>Wasn&#8217;t really getting any bug reports, so I figured I&#8217;d just release.</p>
<p>There&#8217;s a README file included now.  I&#8217;m no master technical writer, but it should explain what you need to know.</p>
<p>The config file is no longer distributed directly; it is distributed as an example file so you don&#8217;t overwrite your old config when upgrading.  I recommend checking for new options that have been added to the example config that you may not have in your main config.</p>
<p>Changes in this release:</p>
<ul>
<li>Mime type support, to display images inline.  When viewing a blob, if it recognizes the mime type as an image, it will embed and display the image using a data uri rather than dumping the binary content.  This is only done for images, though &#8211; there isn&#8217;t a good way to embed other binary file formats.  It supports pecl-fileinfo (which was merged into PHP in 5.3), the &#8220;file&#8221; command on *nix machines, and just checking the file extension.  Based on work by Trevino</li>
<li>Searching of commit logs, authors, committers, filenames, and file contents</li>
<li>Blob diffs show the filenames instead of the hashes to be more readable</li>
<li>Fixed blank entries that appeared at the end of the log/shortlog</li>
<li>Added a link to the tree from the main project list</li>
<li>Some performance fixes for projects with many commits</li>
<li>Snapshots can be sent as tar.gz or zip</li>
<li>templates_c directory created for you already, just change the permissions</li>
<li>Single tag view page&#8230; somehow I forgot this a long time ago and never noticed since I don&#8217;t usually annotate my tags</li>
</ul>
<p>As usual, release is on the <a href="http://www.xiphux.com/programming/php/gitphp">GitPHP</a> page, the repository can be browsed <a href="http://gitphp.xiphux.com">here</a>, and bugs / enhancement suggestions can be reported on <a href="http://mantis.xiphux.com">Mantis</a>.</p>
<p>I am working on setting up a gentoo portage overlay with a gitphp ebuild, which will install gitphp and handle stuff for you, like the templates_c permissions and config file management using etc-update.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xiphux.com/2009/05/19/gitphp-006/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New GitPHP features</title>
		<link>http://www.xiphux.com/2009/05/06/new-gitphp-features/</link>
		<comments>http://www.xiphux.com/2009/05/06/new-gitphp-features/#comments</comments>
		<pubDate>Wed, 06 May 2009 23:54:58 +0000</pubDate>
		<dc:creator>xiphux</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[gitphp]]></category>

		<guid isPermaLink="false">http://www.xiphux.com/?p=604</guid>
		<description><![CDATA[I have some new GitPHP features developed.  They are in the current git repository and just need some more testing time before a new release can come out (hint, hint &#8211; testing this and reporting bugs would help me a great deal).  Off of the top of my head, changes are:

Mime type support.  When viewing [...]]]></description>
			<content:encoded><![CDATA[<p>I have some new GitPHP features developed.  They are in the current git repository and just need some more testing time before a new release can come out (hint, hint &#8211; testing this and reporting bugs would help me a great deal).  Off of the top of my head, changes are:</p>
<ul>
<li>Mime type support.  When viewing a blob, if it recognizes the mime type as an image, it will embed and display the image using a data uri rather than dumping the binary content.  This is only done for images, though &#8211; there isn&#8217;t a good way to embed other binary file formats.  It supports pecl-fileinfo (which was merged into PHP in 5.3), the &#8220;file&#8221; command on *nix machines, and just checking the file extension.  Based on work by Trevino</li>
<li>Searching of commit logs, authors, committers, filenames, and file contents</li>
<li>Blob diffs show the filenames instead of the hashes to be more readable</li>
<li>Fixed blank entries that appeared at the end of the log/shortlog</li>
<li>Added a link to the tree from the main project list</li>
<li>Some performance fixes for projects with many commits</li>
<li>Snapshots can be sent as tar.gz now</li>
<li>templates_c directory created for you now, you just need to change the permissions</li>
</ul>
<p>Also, I&#8217;m going to be writing up a README, because it looks like the installation and the handling of templates_c has really confused people.</p>
<p>I&#8217;ve seen suggestions of <em>symlinking templates to templates_c</em>, which is not right at all, they are not the same thing.  (I saw this posted on a Chinese website, and I don&#8217;t know Chinese, so I can&#8217;t tell the person the right way)</p>
<p>Your <strong>templates</strong> directory holds the templates that I&#8217;ve written &#8211; essentially the layout of the page, without any of the data in it.  Your <strong>templates_c</strong> directory contains compiled templates &#8211; that is, smarty has taken the templates (*.tpl) from the templates directory, inserted all the php code it takes to make them work, and stored the php file that resulted from that template in templates_c, for use when serving up pages.  Compiled templates are <strong>temporary</strong>.  Actual templates, tpl files, are not temporary, they were written by me and come with the distribution.  If you symlink the two directories together, you have one directory with a mess of compiled and uncompiled templates.</p>
<p>I admit that a readme would have explained this a little better, which is why I&#8217;m doing it for the next version.  Here is how your directory structure is <em>supposed</em> to look:</p>
<p><strong>gitphp/index.php</strong></p>
<p><strong>gitphp/config/gitphp.conf.php</strong></p>
<p><strong>gitphp/include/*.php</strong></p>
<p><strong>gitphp/templates/*.tpl</strong> &lt;- These are the templates written by me that come with gitphp</p>
<p><strong>gitphp/templates_c/*.tpl.php </strong> &lt;- These are the compiled templates that get written, so this directory must be writable by the web server</p>
<p><strong><br />
</strong></p>
<p>If you don&#8217;t have a global copy of smarty installed, you can install it locally:</p>
<p><strong>gitphp/smarty/Smarty.class.php</strong></p>
<p><strong>gitphp/smarty/internals/*</strong></p>
<p><strong>gitphp/smarty/plugins/*</strong></p>
<p><strong><br />
</strong></p>
<p>If you want to use geshi:</p>
<p><strong>gitphp/geshi/geshi.php</strong></p>
<p><strong>gitphp/geshi/geshi/*.php</strong></p>
<p><strong><br />
</strong></p>
<p>I&#8217;m planning on releasing the new version maybe this weekend or next.  Whatever testing you can do with the snapshot before then will help everyone, because that means less bugs in the actual release.  You can report them using <a href="http://mantis.xiphux.com">Mantis</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xiphux.com/2009/05/06/new-gitphp-features/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
