<?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>Herself&#039;s Webtools &#187; coppermine</title>
	<atom:link href="http://herselfswebtools.com/category/coppermine/feed" rel="self" type="application/rss+xml" />
	<link>http://herselfswebtools.com</link>
	<description>Scripts, HowTos, Templates, Plugins, Widgets, Tips</description>
	<lastBuildDate>Fri, 18 Nov 2011 15:47:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>How to add photos from Coppermine to any PHP page</title>
		<link>http://herselfswebtools.com/2008/09/how-to-add-photos-from-coppermine-to-any-php-page.html</link>
		<comments>http://herselfswebtools.com/2008/09/how-to-add-photos-from-coppermine-to-any-php-page.html#comments</comments>
		<pubDate>Mon, 22 Sep 2008 21:24:25 +0000</pubDate>
		<dc:creator>Linda MacPhee-Cobb</dc:creator>
				<category><![CDATA[coppermine]]></category>
		<category><![CDATA[hack your template]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://herselfswebtools.com/?p=345</guid>
		<description><![CDATA[Some asked how to add Coppermine photos to WordPress pages. This code will work for any page. You need to replace MYSQL_SERVER with your database server, localhost usually works just fine. USER_NAME is the user name for your Coppermine database PASSWORD is the password for your Coppermine database DATABASE_NAME is the name of your Coppermine [...]]]></description>
			<content:encoded><![CDATA[<p>Some asked how to add Coppermine photos to WordPress pages. This code will work for any page.</p>
<p>You need to replace MYSQL_SERVER with your database server, localhost usually works just fine.<br />
USER_NAME is the user name for your Coppermine database<br />
PASSWORD is the password for your Coppermine database<br />
DATABASE_NAME is the name of your Coppermine database</p>
<p>Also replace YOUR_DOMAIN with the domain your Coppermine albums are hosted on.  You might also need to change the path.</p>
<p>This code will give you a horizontal table of 3 thumbnail photos.</p>
<hr />
If you are using WordPress, you need to download any page from your theme.  Change the file name to Coppermine and the Template name to Coppermine.</p>
<p>Remove the stuff in the middle.  On my template that is everything between&lt;div id=&#8221;content&#8221; class=&#8221;page&#8221;&gt; and &lt;/div&gt; but your template might be different.  The past this code into that section being sure to add your password, database etc.</p>
<p>When you are done, upload the new template to your theme directory.</p>
<p>Create a new page and choose Coppermine as the template.  All the work is done.  You can add text or anything else to the page.</p>
<hr />
<blockquote><p>&lt;?php<br />
if ( !($coppermine_db = mysql_connect( &#8220;MYSQL_SERVER&#8221;, &#8220;USER_NAME&#8221;, &#8220;PASSWORD&#8221; ))){<br />
die ( &#8220;Can not connect to server&#8221; );<br />
}else{<br />
//select db<br />
if ( !(mysql_select_db(&#8220;DATABASE_NAME&#8221;, $coppermine_db ))){<br />
die ( &#8220;Can not select database&#8221; );<br />
}<br />
}</p>
<p>//ask mysql db for the path and file name of last five images uploaded<br />
$coppermine_query = &#8220;select filepath, filename, ctime from cpg_pictures order by ctime desc limit 3;&#8221;;</p>
<p>$coppermine_result = mysql_query($coppermine_query);<br />
$count = mysql_numrows( $coppermine_result );</p>
<p>//start link<br />
$link =  &#8220;&lt;center&gt;&#8221;;</p>
<p>$link .= &#8220;&lt;table border=3&gt;&#8221;;<br />
$link .=  &#8220;&lt;th colspan=3&gt;&lt;a href=\&#8221;http://YOUR_DOMAIN.com/coppermine/\&#8221;&gt;Recent Photos&lt;/th&gt;&lt;tr&gt;&#8221;;<br />
$i = 0;<br />
while ( $i &lt; $count ){</p>
<p>$path = mysql_result($coppermine_result, $i, &#8220;filepath&#8221; );<br />
$name = mysql_result($coppermine_result, $i, &#8220;filename&#8221; );</p>
<p>$link .= &#8220;&lt;td&gt;&lt;img src=\&#8221;http://YOUR_DOMAIN.com/coppermine/albums/$path&#8221; . &#8220;thumb_$name\&#8221;&gt;&lt;/td&gt;&#8221;;<br />
$i++;<br />
}</p>
<p>$link .= &#8220;&lt;/tr&gt;&lt;/table&gt;&#8221;;<br />
$link .= &#8220;&lt;/center&gt;&#8221;;</p>
<p>//end link</p>
<p>//clean up<br />
mysql_close();</p>
<p>print $link;</p></blockquote>
<p>You can see an example of this code <a href="http://timestocome.com/index.php">TimesToCome</a> where I pull 3 photos from 3 different Coppermine albums onto the page.</p>
]]></content:encoded>
			<wfw:commentRss>http://herselfswebtools.com/2008/09/how-to-add-photos-from-coppermine-to-any-php-page.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yet another Coppermine MySQL injection flaw has been discovered</title>
		<link>http://herselfswebtools.com/2008/08/yet-another-coppermine-mysql-inject-flaw-has-been-discovered.html</link>
		<comments>http://herselfswebtools.com/2008/08/yet-another-coppermine-mysql-inject-flaw-has-been-discovered.html#comments</comments>
		<pubDate>Wed, 06 Aug 2008 18:21:35 +0000</pubDate>
		<dc:creator>Linda MacPhee-Cobb</dc:creator>
				<category><![CDATA[coppermine]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://herselfswebtools.com/?p=321</guid>
		<description><![CDATA[Coppermine 1.4.19 has been released to fix a MySQL injection flaw, again. This is how TimesToCome was hacked last April and why you now have all these shiny new security tools and information on this website. I went to the Coppermine site only because there was a huge increase in cross site scripting attempts last [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://forum.coppermine-gallery.net/index.php/topic,54235.0.html">Coppermine 1.4.19</a> has been released to fix a MySQL injection flaw, again.  This is how TimesToCome was hacked last April and why you now have all these shiny new security tools and information on this website.</p>
<p>I went to the Coppermine site only because there was a huge increase in cross site scripting attempts last night on the Coppermine albums.</p>
<p>Anyhow update if you have not.</p>
]]></content:encoded>
			<wfw:commentRss>http://herselfswebtools.com/2008/08/yet-another-coppermine-mysql-inject-flaw-has-been-discovered.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Blue-box theme converted for Coppermine users</title>
		<link>http://herselfswebtools.com/2008/05/wordpress-blue-box-theme-converted-for-coppermine-users.html</link>
		<comments>http://herselfswebtools.com/2008/05/wordpress-blue-box-theme-converted-for-coppermine-users.html#comments</comments>
		<pubDate>Mon, 12 May 2008 10:00:00 +0000</pubDate>
		<dc:creator>Linda MacPhee-Cobb</dc:creator>
				<category><![CDATA[coppermine]]></category>
		<category><![CDATA[hack your template]]></category>

		<guid isPermaLink="false">http://herselfswebtools.com/?p=239</guid>
		<description><![CDATA[Here is another popular WordPress Theme ( Blue-Box) I converted to work with Coppermine. You should find it easy to tailor to your needs including adding in advertising to your sidebar. Coppermine Blue-Box WordPress adapted theme]]></description>
			<content:encoded><![CDATA[<p><img src="http://herselfswebtools.com/images/coppermine-blue-box.jpg" alt="" /></p>
<p>Here is another popular WordPress Theme ( Blue-Box) I converted to work with Coppermine.  You should find it easy to tailor to your needs including adding in advertising to your sidebar.  <a href="http://herselfswebtools.com/files/coppermine-blue-box.tar.gz">Coppermine Blue-Box WordPress adapted theme</a></p>
]]></content:encoded>
			<wfw:commentRss>http://herselfswebtools.com/2008/05/wordpress-blue-box-theme-converted-for-coppermine-users.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

