<?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>Jason Paschal&#039;s Blog &#187; Web</title>
	<atom:link href="http://www.jasonpaschal.com/category/tech/web/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jasonpaschal.com</link>
	<description>Blog Blah Ball</description>
	<lastBuildDate>Sun, 05 Jun 2011 09:59:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Quickly Remove Images From Imagearn.com Galleries [php script]</title>
		<link>http://www.jasonpaschal.com/2011/06/05/quickly-remove-images-from-imagearn-com-galleries-php-script/</link>
		<comments>http://www.jasonpaschal.com/2011/06/05/quickly-remove-images-from-imagearn-com-galleries-php-script/#comments</comments>
		<pubDate>Sun, 05 Jun 2011 09:57:57 +0000</pubDate>
		<dc:creator>mellomutt</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.jasonpaschal.com/?p=75</guid>
		<description><![CDATA[As is typical of my work, this is quick and dirty but it gets the job done.  Use at your own risk.  However, it works great for me. You&#8217;ll need a web server with PHP that has the curl extension installed.  By the way, my current browser is Chrome. Make sure you&#8217;re logged into Imagearn.com [...]]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.jasonpaschal.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPhp.js"></script>
<p>As is typical of my work, this is quick and dirty but it gets the job done.  Use at your own risk.  However, it works great for me.</p>
<p>You&#8217;ll need a web server with PHP that has the curl extension installed.  By the way, my current browser is Chrome.</p>
<p>Make sure you&#8217;re logged into Imagearn.com when you use it.   Their login sessions last for 30 minutes or so, or if you close your browser, so verify before you run this script.  Nothing bad will happen if you&#8217;re not logged in at the time, only that the images you try to remove *won&#8217;t* be removed.</p>
<p>Note: this script can be tweaked in tons of ways, and I may get around to it, but don&#8217;t hold your breath.  Better off tweaking it yourself.</p>
<p>First, after logging into imagearn.com, go to Edit the gallery that has the images you want to remove.</p>
<p>Then click on Remove Images.</p>
<p>Right-click on that page somewhere and select &#8220;View Source&#8221; or your browser&#8217;s equivalent option.</p>
<p>Copy the page&#8217;s source code.</p>
<p>Now browse to the PHP script.</p>
<p>In the textarea field, paste the source code.</p>
<p>Click Submit.</p>
<p>(Sometimes I have to click it again.)</p>
<p>A vertical list of thumbnails and links will appear below the textarea field.  Middle-clicking either will immediately and permanently delete the related image by open up a properly formatted URL in a new background tab.</p>
<p>NOTE: You MUST MIDDLE-CLICK (open the links in a new tab) when clicking a thumbnail or the word &#8216;remove&#8217;.  The link target is not &#8216;_blank&#8217;, because if it was set to &#8216;_blank&#8217; then the current page will lose focus, and the whole point of me making this would be defeated.  Middle-click opens them in a background tab (for me, at any rate).  This allows me to middle-click through, staying on the same page, and getting rid of images must faster than via the means provided by Imagearn.com which forces you to confirm the removal.  This is very time-consuming if you have alot of images to remove.</p>
<p>I had an enhanced script that would allow you to toggle a bunch of checkboxes at once from a point in the list, then use javascript to open a bunch of tabs with the correct links but the script disappeared from my local server (which is actually my motivation for putting this on the web).</p>
<p><pre class="brush: php">&lt;?php

foreach($_GET as $k =&gt; $v) {
	$$k = $_GET[$k];	
}

foreach($_POST as $k =&gt; $v) {
	$$k = $_POST[$k];	
}
?&gt;
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;title&gt;remove from imagearn gallery&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;form id=&quot;form1&quot; name=&quot;form1&quot; method=&quot;post&quot; action=&quot;&quot;&gt;
  &lt;label&gt;
    &lt;textarea name=&quot;source&quot; id=&quot;source&quot; cols=&quot;100&quot; rows=&quot;20&quot;&gt;&lt;?php print stripslashes($source); ?&gt;&lt;/textarea&gt;
  &lt;/label&gt;
  &lt;label&gt;
    &lt;input type=&quot;submit&quot; name=&quot;button&quot; id=&quot;button&quot; value=&quot;Submit&quot; /&gt;
  &lt;/label&gt;
  &lt;input name=&quot;action&quot; type=&quot;hidden&quot; id=&quot;action&quot; value=&quot;sbt&quot; /&gt;
&lt;/form&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;?php 
if ($action == &quot;sbt&quot;) {
	preg_match_all(&quot;|profile.php?o=remove_images&amp;id=([0-9]+)&amp;idimg=([0-9]+)&quot;[^&gt;]+&gt;[^&lt;]*&lt;img src=&quot;([^&quot;]+)&quot;|i&quot;,stripslashes($source),$matches);
	foreach($matches[1] as $k =&gt; $v) {
		$thumb = $matches[3][$k];
		$f = $v;
		$s = $matches[2][$k];
		$rlink = &quot;http://imagearn.com/profile.php?o=remove_images&amp;id=$f&amp;idimg=$s&amp;yes=yes&quot;;
		echo &quot;&lt;a href=&quot;$rlink&quot; style=&quot;font-size:54px&quot;&gt;&lt;img src=&quot;$thumb&quot;&gt; remove&lt;/a&gt;&lt;br&gt;&quot;;
	}
}
?&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonpaschal.com/2011/06/05/quickly-remove-images-from-imagearn-com-galleries-php-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP &#8211; Read/Parse an Exported Bookmarks File</title>
		<link>http://www.jasonpaschal.com/2010/10/22/php-readparse-an-exported-bookmarks-file/</link>
		<comments>http://www.jasonpaschal.com/2010/10/22/php-readparse-an-exported-bookmarks-file/#comments</comments>
		<pubDate>Fri, 22 Oct 2010 11:03:08 +0000</pubDate>
		<dc:creator>mellomutt</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.jasonpaschal.com/?p=42</guid>
		<description><![CDATA[Since I couldn&#8217;t find anything like this online, I thought it might help someone else. &#60;?php $file = &#34;ps_bookmarks.html&#34;; $handle = @fopen($file, &#34;r&#34;); if ($handle) { while (!feof($handle)) { $line = trim(fgets($handle, 4096)); if ($line) { // If end of items in folder, then remove last folder from category list if (eregi(&#34;&#60;/dl&#62;&#34;,$line)) { $tmp = [...]]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.jasonpaschal.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPhp.js"></script>
<p>Since I couldn&#8217;t find anything like this online, I thought it might help someone else.</p>
<p><span id="more-42"></span></p>
<p><pre class="brush: php">&lt;?php 

$file = &quot;ps_bookmarks.html&quot;; 

$handle = @fopen($file, &quot;r&quot;);

if ($handle) {
	
    while (!feof($handle)) {
		
        $line = trim(fgets($handle, 4096));
		
		if ($line) {
			
			// If end of items in folder, then remove last folder from category list
			
			if (eregi(&quot;&lt;/dl&gt;&quot;,$line)) {
				
				$tmp = array_pop($catlist);				
				
			}
			
			
			if (eregi(&quot;&lt;dt&gt;&quot;,$line) &amp;&amp; !eregi(&quot;href&quot;,$line)) {
				
				$catlist[] = ucfirst(strip_tags($line));
					
			}
			
			
			if (eregi(&quot;href&quot;,$line)) {
				
				preg_match(&quot;/href=&quot;([^&quot;]+)&quot;/i&quot;,$line,$matches);
				
				$url = $matches[1];
				
				$title = strip_tags($line);
				
				foreach ($catlist as $k =&gt; $v) {
					echo &quot;$v/&quot;;
				}
				
				echo &quot; - &quot;;
				
				echo $title;
				
				echo &quot; - &quot;;
				
				echo $url;
				
				echo &quot;&lt;br&gt;&quot;;
			
			}				
			
		}
		
    }
	
    fclose($handle);
	
}

?&gt;</pre></p>
<p>I used an exported Chrome bookmarks file.  The kind that starts with:</p>
<p><strong>&lt;!DOCTYPE NETSCAPE-Bookmark-file-1&gt;</strong></p>
<p>Code I found online was broken, so I made my own bookmarks parser.  I did modify the bookmarks file to help get the output I wanted (I have hundreds of bookmarks all categorized, so I deleted huge swathes of links I no longer wanted)  and I modified this code before I posted it to remove bits that were for my particular setup, but it&#8217;s all generally there.  I&#8217;m sure a clever programmer could take this and make something slick.</p>
<p>This is the rough draft.  I wanted to get my bookmarks into a database and wanted to keep the organization intact. This meant tracking the folders and subfolders, and this does the job.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonpaschal.com/2010/10/22/php-readparse-an-exported-bookmarks-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Chrome: Fast, But Retarded</title>
		<link>http://www.jasonpaschal.com/2010/06/03/google-chrome-fast-but-retarded/</link>
		<comments>http://www.jasonpaschal.com/2010/06/03/google-chrome-fast-but-retarded/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 08:17:58 +0000</pubDate>
		<dc:creator>mellomutt</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Fast]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Retarded]]></category>

		<guid isPermaLink="false">http://www.jasonpaschal.com/?p=6</guid>
		<description><![CDATA[Here&#8217;s a list of some basic elements that I require that Chrome ignores/craps on. First, Let me just say that I had to open Firefox to even post this story.  Chrome wouldn&#8217;t process the rich text plugin I&#8217;m using (FCKEditor) and it ignored other basic elements in terms of display for this CMS.  IE, Firefox&#8230;works fine.  [...]]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.jasonpaschal.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPhp.js"></script>
<p>Here&#8217;s a list of some  basic elements that I require that Chrome ignores/craps on. <img src="../sites/all/modules/fckeditor/fckeditor/editor/images/spacer.gif" alt="" /></p>
<h2><span id="more-6"></span>First,</h2>
<p>Let me just say that I had to open Firefox to even post this  story.  Chrome wouldn&#8217;t process the rich text plugin I&#8217;m using  (FCKEditor) and it ignored other basic elements in terms of display for  this CMS.  IE, Firefox&#8230;works fine.  Whatever. I know I need to update  this CMS [author's note: I've since switch to another CMS since writing this], but to just ignore basic/standard/popular JS and CSS?  Not cool.  I could be convinced that this is actually smart and cool, but you&#8217;d have to be naked and female.</p>
<h2>2) New Tabs WTF</h2>
<div>
<p>I had to install an extension to have Chrome just open a blank  page in a new tab.  By default, Chrome goes all Hitler on new tabs.  It  displays a thumbnailed list of pages you&#8217;ve recently looked at.</p>
</div>
<div>I  suppose they assume that a) you&#8217;re the only person using your computer,  or b) you don&#8217;t care if people know you&#8217;ve been looking at vintage  lesbian incest bondage porn.</p>
</div>
<div>
<p>Well, I <em>do</em> care.  So I went to Chrome Options, and, yep,  you can&#8217;t change new tab behaviour.  You have zero choice in the  matter.  Firefox gives you a choice.  However, there is a Chrome  extension that allows you to simply display a blank page in a new tab.   Installed it.  Worked great.  But it&#8217;s the principle of the thing.  Why  did I have to bother?  Showing your page history thumbnails in a new tab  by default should be an &#8220;opt-in&#8221; sort of process.  Like, I don&#8217;t know, a  little window that pops up and says, &#8220;Do you want the world to know  about your deviant interests?  Check the box below.&#8221;  Sometimes I want  to show people some stuff online.  I don&#8217;t want any new tab I open to  taint the carefully constructed facade I put up between me and the  world.</p>
</div>
<p>If Chrome were a car, bumper stickers would be applied by the  manufacturer.</p>
<h2>3) Friggin&#8217; status bar.</h2>
<div>
<p>There isn&#8217;t one in Chrome.  Hover over a link,  and a little bubble appears in the bottom left corner of the browser  with the URL.  But not necessarily the full URL.  Nope.  The bubble only  extends through a 3rd of the browser space.  So the end of most URLs  get cut off, and to me, it&#8217;s the most important part.  It&#8217;s like, why  bother showing <em>any</em> of the URL?  If you just want to make sure  people are certain of the domain, then why not just show the domain?   Someone had to code it so it shows the ellipses at the end when it gets  cut off.  Someone had to put in &#8220;statusbubble.width=33%&#8221;.  You couldn&#8217;t  make that adjustable?  You couldn&#8217;t make that an option?  You had to be  Hitlers about it?  You had to be dicks?</p>
</div>
<div>
<p>There are no extensions that fix this.  Chrome is stuck with this  retarded behaviour.<br />
Maybe they just decided to be all maverick and question the whole  existence of status bars.  It&#8217;s been nearly two years since this issue  was brought to the attention of Chrome developers.  They refuse to fix  it.  And believe me, it&#8217;s an issue.  Two years of comments attest to  that.  They do say they will get to it, but have to work through other  issues first.  Oh, right, excuse us.  Probably more important things  than basic usability.</p>
<p>If Chrome were a car, it&#8217;d go really fast, but you wouldn&#8217;t know where   you&#8217;re going.</p>
<h2>4) No simple on/off for Javascript/Java.</h2>
<p>Firefox has some great  extensions for toggling JS and Java on the fly.  None for Chrome.  You <em>can</em> turn JS on and off in Chrome, but it&#8217;s several clicks and a few windows  deep.  I&#8217;ve got some really handy buttons that do the same thing in  Firefox.  Where are those buttons located?  You guessed it.  In my  frakkin&#8217; status bar.  Chrome, Chrome, Chrome.  You mean well.  But ffs,  how about making a browser?</p>
<p>If Chrome were a car, you could drive at night, but you couldn&#8217;t dim  your lights for oncoming traffic.</p>
<h2>In conclusion,</h2>
<p>As hard as it is for me to say (since I really enjoy google search, gmail and google docs), screw Google Chrome.  At least for the time being.  Fix  your shit, and we&#8217;ll try again.</p>
<p>If Chrome were a car, the test drive  would not have sold me.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonpaschal.com/2010/06/03/google-chrome-fast-but-retarded/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

