<?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>SofaSurfer.org</title>
	<atom:link href="http://blog.sofasurfer.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sofasurfer.org</link>
	<description>WWW-Artist</description>
	<lastBuildDate>Thu, 16 Feb 2012 07:48:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Run MODX, WordPress and Redmine on NGINX EC2 micro AIM</title>
		<link>http://blog.sofasurfer.org/2012/02/12/run-modx-wordpress-and-redmine-on-nginx-ec2-micro-aim/</link>
		<comments>http://blog.sofasurfer.org/2012/02/12/run-modx-wordpress-and-redmine-on-nginx-ec2-micro-aim/#comments</comments>
		<pubDate>Sun, 12 Feb 2012 12:23:16 +0000</pubDate>
		<dc:creator>sofasurfer</dc:creator>
				<category><![CDATA[MODX]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[WebStuff]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[NGINX]]></category>
		<category><![CDATA[Redmine]]></category>

		<guid isPermaLink="false">http://blog.sofasurfer.org/?p=869</guid>
		<description><![CDATA[I&#8217;m using amazon web services now for a while and was wondering, if it&#8217;s really necessary to host my  sites on a Small Instance So I came across NGINX web server which is famous for it&#8217;s performance and low resource usage. So here how to run,  MODX, WordPress and Redmine with NGINX on a amzn-ami-2011.09.2.i386-ebs (ami-b4b0cae6) micro AIM  instance. Thanks to: John for the great post [...]]]></description>
		<wfw:commentRss>http://blog.sofasurfer.org/2012/02/12/run-modx-wordpress-and-redmine-on-nginx-ec2-micro-aim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=sofasurfer&amp;url=http%3A%2F%2Fblog.sofasurfer.org%2F2012%2F02%2F12%2Frun-modx-wordpress-and-redmine-on-nginx-ec2-micro-aim%2F&amp;language=en_GB&amp;category=text&amp;title=Run+MODX%2C+WordPress+and+Redmine+on+NGINX+EC2+micro+AIM&amp;description=I%27m+using+amazon+web+services+now+for+a+while+and+was+wondering%2C+if+it%27s+really%C2%A0necessary%C2%A0to+host+my+%C2%A0sites%C2%A0on+a+Small+Instance%0D%0A%0D%0ASo+I+came+across%C2%A0NGINX+web+server+which+is+famous+for+it%27s+performance+and+low+resource+usage.%0D%0A%0D%0ASo+here+how+to+run%2C+%C2%A0MODX%2C%C2%A0WordPress%C2%A0and%C2%A0Redmine%C2%A0with+NGINX+on+a+amzn-ami-2011.09.2.i386-ebs+%28ami-b4b0cae6%29%C2%A0micro+AIM+%C2%A0instance.%0D%0A%0D%0AThanks%C2%A0to%3A%0D%0A%0D%0A%09John%C2%A0for+the+great+post+on+how+to+install+NGINX+server.%0D%0A%09MODX+documentation%2C+for+Nginx+Server+Config.%0D%0A%0D%0A%0D%0A1.+Install+NGINX+web-server%0D%0AI+choose+a+%C2%A0Basic+32-bit+Amazon+Linux+AMI+2011.09+%28AMI+Id%3A+ami-b4b0cae6%29+%C2%A0AMI%C2%A0running+on+a+small+instance.%0D%0A%0D%0A1.1+Update+instance%2C+you+never+know%3A%0D%0Asudo+yum+update%0D%0A1.2+And+install+NGINX.%0D%0Asudo+yum+install+nginx%0D%0A1.3+To+enable+PHP+and+MYSQL+support%2C+the+following+packages+are+required+%28will+install+MYSQL+later%29.%0D%0Asudo+yum+install+php+php-devel+php-pear+php-common+php-gd+php-mbstring+php-xml+php-pdo+php-mysql%0D%0A1.4+Next%2C+we+need+to+install+spawn-fcgi+to+spawn+our+FastCGI+processes.%0D%0Asudo+yum+install+spawn-fcgi%0D%0A1.5+And+a+start%2Fstop+php_cgi+script%0D%0Asudo+vi+%2Fetc%2Finit.d%2Fphp_cgi%0D%0A1.6+copy%2Fpast+this+thanks%C2%A0cea2k%0D%0A%2F%2F+%0D%0A%0D%0A1.7.+Make+it+executable+and+auto+start+on+boot%0D%0Achmod+%2Bx+%2Fetc%2Finit.d%2Fphp_cgi%0D%0Achmod+755+%2Fetc%2Finit.d%2Fphp_cgi%0D%0A%0D%0Achmod+755+%2Fetc%2Finit.d%2Fnginx%0D%0Achkconfig+--add+nginx%0D%0Achkconfig+--level+345+nginx+on%0D%0A1.8+Start+the+server%0D%0A%2Fetc%2Finit.d%2Fphp_cgi+start%0D%0A1.9+Edit+default+nginx.config+file%0D%0Avi+%2Fetc%2Fnginx%2Fnginx.conf%0D%0A1.10+Include+the+virtual+host+directory+at+the+bottom+%28+I+know+old+apache+habit+you+could+of+course+also+use+the+existing%C2%A0%2Fetc%2Fnginx%2Fconf.d%2Fvirtual.conf%29%0D%0Ainclude+%2Fetc%2Fnginx%2Fsites-enabled%2F%2A%3B%0D%0A1.11+And+the+default+virtual+host+files%0D%0Asudo+mkdir+%2Fetc%2Fnginx%2Fsites-enabled%0D%0Asudo+vi+%2Fetc%2Fnginx%2Fsites-enabled%2Fmysite%0D%0A++++%23%0D%0A++++%23+NGINX+default+PHP+CGI+Config+Fiele%0D%0A++++%23%0D%0A++++server+%7B%0D%0A++++++++listen+++++++80%3B%0D%0A++++++++server_name++%2A.mysite.com+%2A.amazonaws.com%3B%0D%0A++++++++root+++++++++%2Fvar%2Fwww%2Fmysite%3B%0D%0A%0D%0A++++++++access_log++%2Fvar%2Flog%2Fnginx%2Faccess-mysite.log+main%3B%0D%0A%0D%0A++++++++location+%2F+%7B%0D%0A++++++++++++++++autoindex++off%3B%0D%0A++++++++++++++++index++index.html+index.htm+index.php%3B%0D%0A++++++++%7D%0D%0A%0D%0A++++++++location+%7E+%5C.php%24+%7B%0D%0A++++++++++++try_files+%24uri+%3D404%3B%0D%0A++++++++++++fastcgi_split_path_info+%5E%28.%2B%5C.php%29%28.%2A%29%24%3B%0D%0A++++++++++++fastcgi_pass+++127.0.0.1%3A9000%3B%0D%0A++++++++++++fastcgi_index++index.php%3B%0D%0A++++++++++++fastcgi_param++SCRIPT_FILENAME++%24document_root%24fastcgi_script_name%3B%0D%0A++++++++++++include++++++++fastcgi_params%3B%0D%0A++++++++++++fastcgi_ignore_client_abort+on%3B%0D%0A++++++++++++fastcgi_param++SERVER_NAME+%24http_host%3B%0D%0A++++++++%7D%0D%0A++++%7D%0D%0A1.12+Create+a+test+file+in+the+root+folder+set+above+%28make+sure+this+folder+exist%29%3A%0D%0Asudo+vi+%2Fvar%2Fwww%2Fmysite%2Ftest.php%0D%0A1.13+And+phpinfo+for+testing%0D%0A%26lt%3B%3Fphp+phpinfo%28%29%3B+%3F%26gt%3B%0D%0A1.14+Restart+nginx+server%0D%0Asudo+%2Fetc%2Finit.d%2Fnginx+restart%0D%0A1.15+By+now+you+should+be+able+to+access+the+server+via+the+public+DNS%2C+make+sure+to+add+amazonaws.com+wildcard+as+servername+to+%C2%A0the+host+file%3A%0D%0Ahttp%3A%2F%2Fec2-122-248-220-5.ap-southeast-1.compute.amazonaws.com%2Ftest.php%0D%0A2.+Configure+PHP%0D%0A2.1+To+make+PHP+fully+run+with+MODX+some+changes+in+the+php.ini+file+has+to+be+made.%0D%0Asudo+vi+%2Fetc%2Fphp.ini%0D%0A2.2+And+change+the+following%0D%0Adate.timezone+%3D+Asia%2FSingapore%0D%0A2.3+Make+sure+that+nginx+user+has+access+to+the+session+file+or+change%C2%A0session.save_path+%3D+%22%2Fvar%2Flib%2Fphp%2Fsession%22%0D%0Asudo+chown+nginx%3Anginx+-R+%2Fvar%2Flib%2Fphp%2Fsession%0D%0A3.+Install+MYSQL-Server%0D%0Asudo+yum+install+mysql+mysql-server+php-mysql%0D%0A3.1+Start+the+server+and+set+the+root+password%0D%0Asudo+%2Fetc%2Finit.d%2Fmysqld+start%0D%0Amysqladmin+-u+root+password+%27new-password%27%0D%0A3.2+Now+you+should+be+able+to+connect+via+the+root+user+and+the+new+password%0D%0Amysql+-u+root+-p%0D%0A4.+Install+S3CMD%0D%0A4.1+This+is+just+a+reminder+as+i+will+restore+some+backup+files+later%3A%0D%0Acd+%2Fetc%2Fyum.repos.d%2F%0D%0Asudo+wget+http%3A%2F%2Fs3tools.org%2Frepo%2FRHEL_6%2Fs3tools.repo%0D%0Asudo+yum+install+s3cmd%0D%0A4.2+Configure+S3%2C+by+setting+access+and+secret+keys.%0D%0As3cmd+--configure%0D%0A5.+Install+MODX%0D%0A5.1+First+we+will+add+a+new+virtual+host+file+to+the+NGINX+server%2C+or+edit+the+one+we+created+earlier+mysite%2C+just+make+sure+there+are+no+DNS+conflics.%0D%0Asudo+vi+%2Fetc%2Fnginx%2Fsites-enabled%2Fmysite%0D%0A5.2+Copy+past+the+below+config+and+change%C2%A0mymodx.com+to+your+domain+name.+This+assumes+MODX+will+be+you+main+root+web+%C2%A0%2A.mymodx.com%0D%0A%2F%2F+%0D%0A%0D%0A5.3+Create+the+modx+database%0D%0Amysql+-u+root+-p%0D%0Amysql%26gt%3B+create+database+mymodx%3B%0D%0A5.4+Now+we+can+copy+the+latest+backup+of+our+MODX+web+application+from+S3+storage+or%C2%A0install+a+fresh+version+and+make+sure+nginx+user+has+read%2Fwrite+access%3A%0D%0Awget%C2%A0http%3A%2F%2Fmodx.com%2Fdownload%2Fdirect%2Fmodx-2.2.0-pl2.zip%0D%0Aunzip+.%2Fmodx-2.2.0-pl2.zip%C2%A0%0D%0Asudo+mv+.%2Fmodx-2.2.0-pl2+%2Fvar%2Fwww%2Fmymodx%0D%0Asudo+chown+nginx%3Anginx+-R+%2Fvar%2Fwww%2Fmydox%0D%0A5.5+And+run+the+setup%0D%0A%0D%0Ahttp%3A%2F%2Fmysite.com%2Fsetup%2F%0D%0A6.+Install+WordPress%0D%0A6.1+This+is+almost+the+same+sa+MODX%2C+just+make+sure+to+change+the+host+file%0D%0Asudo+vi+%2Fetc%2Fnginx%2Fsites-enabled%2Fwp%0D%0A%2F%2F+%0D%0A6.+Install+Redmine%0D%0AI+just+had+to+install+ruby+as+I+restored%2C+my+previous+Redmine+version.+Check+this+for+a+full%C2%A0Installation%C2%A0guide+for+Redmine+RubyGems%C2%A0.%0D%0Asudo+vi+%2Fetc%2Fnginx%2Fsites-enabled%2Fredmine%0D%0A%2F%2F+&amp;tags=EC2%2CMODX%2CNGINX%2CRedmine%2Cblog" type="text/html" />
	</item>
		<item>
		<title>MODX FormLog hook to store formIt data in a jSon</title>
		<link>http://blog.sofasurfer.org/2012/01/28/modx-formlog-hook-to-store-formit-data-in-a-json/</link>
		<comments>http://blog.sofasurfer.org/2012/01/28/modx-formlog-hook-to-store-formit-data-in-a-json/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 06:23:52 +0000</pubDate>
		<dc:creator>sofasurfer</dc:creator>
				<category><![CDATA[HappyCode]]></category>
		<category><![CDATA[WebStuff]]></category>
		<category><![CDATA[jSon]]></category>
		<category><![CDATA[MODX]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.sofasurfer.org/?p=902</guid>
		<description><![CDATA[I was looking for a simple way to store FormIt data, so i came up with this simple hook:]]></description>
		<wfw:commentRss>http://blog.sofasurfer.org/2012/01/28/modx-formlog-hook-to-store-formit-data-in-a-json/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=sofasurfer&amp;url=http%3A%2F%2Fblog.sofasurfer.org%2F2012%2F01%2F28%2Fmodx-formlog-hook-to-store-formit-data-in-a-json%2F&amp;language=en_GB&amp;category=text&amp;title=MODX+FormLog+hook+to+store+formIt+data+in+a+jSon&amp;description=I+was+looking+for+a+simple+way+to+store+FormIt+data%2C+so+i+came+up+with+this+simple+hook%3A%0D%0A%0D%0A+&amp;tags=jSon%2CMODX%2CPHP%2Cblog" type="text/html" />
	</item>
		<item>
		<title>MODX SuperBoxSelect For Dummies</title>
		<link>http://blog.sofasurfer.org/2011/11/21/modx-superboxselect-for-dummies/</link>
		<comments>http://blog.sofasurfer.org/2011/11/21/modx-superboxselect-for-dummies/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 18:49:21 +0000</pubDate>
		<dc:creator>sofasurfer</dc:creator>
				<category><![CDATA[MODX]]></category>
		<category><![CDATA[WebStuff]]></category>
		<category><![CDATA[ExtJS]]></category>

		<guid isPermaLink="false">http://blog.sofasurfer.org/?p=683</guid>
		<description><![CDATA[Dealing now more then one year with MODX revo and ExtJS, I thought it can&#8217;t be too hard to add a SuperBoxSelect component to a custom manager page. The fact that it&#8217;s now even  integrated in MODX  (thanks Ben), made me believe this will be a 5 min job (yeah i&#8217;m still an optimist and obviously there&#8217;s allot to learn). [...]]]></description>
		<wfw:commentRss>http://blog.sofasurfer.org/2011/11/21/modx-superboxselect-for-dummies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=sofasurfer&amp;url=http%3A%2F%2Fblog.sofasurfer.org%2F2011%2F11%2F21%2Fmodx-superboxselect-for-dummies%2F&amp;language=en_GB&amp;category=text&amp;title=MODX+SuperBoxSelect+For+Dummies&amp;description=Dealing+now+more+then+one+year+with+MODX+revo+and+ExtJS%2C+I+thought+it+can%27t+be+too+hard+to+add+a%C2%A0SuperBoxSelect%C2%A0component+to+a+custom+manager+page.%C2%A0The+fact+that+it%27s+now+even+%C2%A0integrated+in+MODX+%C2%A0%28thanks+Ben%29%2C+made+me+believe+this+will+be+a+5+min+job+%28yeah+i%27m+still+an+optimist+and%C2%A0obviously%C2%A0there%27s+allot+to+learn%29.%0D%0A%0D%0A%0D%0A%0D%0AAlso+there+are+plenty+of+information%2C+forums+and+examples+out+there+but+it+still+took+me+almost+half+a+night+to+puzzle+them+together+and+made+it+actually+work.%0D%0A%0D%0ASo+here%2C+step+by+step+what+finally+worked+for+me+%28not+sure+if+this+is+the+best+solution+so+any+input+welcome%29.%0D%0A%0D%0A1.+I+created+a+custom+component+so+I+can+re+use+it+later.%0D%0A%2F%2A%2A%0D%0A+%2A+User+SuperBoxSelect%0D%0A+%2A%0D%0A+%2A+%40class+MODx.combo.Users%0D%0A+%2A+%40extends+Ext.ux.form.SuperBoxSelect%0D%0A+%2A+%40xtype+modx-superbox-user%0D%0A+%2A%2F%0D%0AMODx.combo.Users+%3D+function+%28config%29+%7B%0D%0A++++config+%3D+config+%7C%7C+%7B%7D%3B%0D%0A++++Ext.applyIf%28config%2C+%7B%0D%0A++++%09xtype%3A%27superboxselect%27%0D%0A++++++++%2CtriggerAction%3A+%27all%27%0D%0A%09%2Cmode%3A+%27remote%27%0D%0A++++++++%2CvalueField%3A+%22id%22%0D%0A++++++++%2CdisplayField%3A+%22username%22%0D%0A%09%2Cstore%3A+new+Ext.data.JsonStore%28%7B%0D%0A%09%09id%3A%27id%27%2C%0D%0A%09%09autoLoad%3A+true%2C%0D%0A%09%09root%3A%27results%27%2C%0D%0A%09%09fields%3A+%5B%27username%27%2C+%27id%27%5D%2C%0D%0A%09%09url%3A+MODx.config.connectors_url%2B%27security%2Fuser.php%27%2C%0D%0A%09%09baseParams%3A%7B%0D%0A%09%09%09action%3A+%27getList%27%0D%0A%09%09%09%2Cusergroup%3A+2%0D%0A%09%09%7D%0D%0A%09%7D%29%0D%0A++++%7D%29%3B%0D%0A++++MODx.combo.Users.superclass.constructor.call%28this%2C+config%29%3B%0D%0A%7D%3B%0D%0AExt.extend%28MODx.combo.Users%2C+Ext.ux.form.SuperBoxSelect%29%3B%0D%0AExt.reg%28%27modx-superbox-user%27%2C+MODx.combo.Users+%29%3B%0D%0A2.+Added+the+form+field+to+the+panel%3A%0D%0Aid%3A+%27sofa-panel-users%27%0D%0A%2Cxtype%3A+%27panel%27%0D%0A%2Chidden%3A+true%0D%0A%2Clayout%3A+%27form%27%0D%0A%2Cborder%3A+false%0D%0A%2CautoHeight%3A+true%0D%0A%2CautoWidth%3A+true%0D%0A%2CpreventRender%3A++true%0D%0A%2Citems%3A+%5B%7B%0D%0A%09fieldLabel%3A+_%28%27sofa.selectuser%27%29%2C%0D%0A%09id%3A+%27sofa-superbox-users%27%2C%0D%0A%09name%3A+%27users%5B%5D%27%2C%0D%0A%09xtype%3A+%27modx-superbox-user%27%2C%0D%0A%09resizable%3A+true%2C%0D%0A%7D%5D%0D%0A3.+So+far+so+good+this+still+dint%2C+set+my+values+correctly+when+the+panel+was+loading%2C+so+the+only+way+to+actually+set+my+selection+was+to+manually+add+them+on+success%3A%0D%0AExt.extend%28MODx.panel.UserGroups%2CMODx.FormPanel%2C%7B%0D%0A++++setup%3A+function%28%29+%7B%0D%0A++++++++if+%28this.config.userid+%3D%3D%3D+%27%27+%7C%7C+this.config.userid+%3D%3D%3D+0%29+%7B%0D%0A++++++++++++this.fireEvent%28%27ready%27%29%3B%0D%0A++++++++++++return+false%3B%0D%0A++++++++%7D%0D%0A%09MODx.Ajax.request%28%7B%0D%0A++++++++++++url%3A+this.config.url%0D%0A++++++++++++%2Cparams%3A+%7B%0D%0A++++++++++++++++action%3A+%27get%27%0D%0A++++++++++++++++%2Cuserid%3A+this.config.userid%0D%0A++++++++++++++++%2CgetGroups%3A+true%0D%0A++++++++++++%7D%0D%0A++++++++++++%2Clisteners%3A+%7B%0D%0A++++++++++++++++%27success%27%3A+%7Bfn%3Afunction%28r%29+%7B%0D%0A++++++++++++++++++++this.getForm%28%29.setValues%28r.object%29%3B%0D%0A%0D%0A%09%09++++%2F%2A%2A%0D%0A+%09%09+++++%2A+Set+superbox+User+values%0D%0A%09%09+++++%2A%0D%0A%09%09+++++%2A+I%27m+sure+there%27s+a+better+way+just+couldnt+find+out+how....%0D%0A%09%09+++++%2A%2F%0D%0A%09%09++++Ext.getCmp%28%27sofa-superbox-users%27%29.setValue%28+r.object.users+%29%3B%0D%0A%0D%0A++++++++++++++++++++this.fireEvent%28%27ready%27%2Cr.object%29%3B%0D%0A++++++++++++++++%7D%2Cscope%3Athis%7D%0D%0A++++++++++++%7D%0D%0A++++++++%7D%29%3B%0D%0A++++%7D%0D%0A%7D%29%3B%0D%0A4.+The+PHP+behind+is+simple+as+the+actual+users+are+retrieved+directly+via+MODX+security+user+processor%2C+so+i+just+had+to+save+the+data+and+retrieved+them+again.%0D%0A%2F%2F+Save+selected+users%0D%0A%24pnaelInformation%5B%27users%27%5D+%3D+%24modx-%26gt%3BtoJSON%28+%24scriptProperties%5B%27users%27%5D+%29%3B%0D%0A%0D%0A%2F%2F+Get+selected+users+as+comma+seperate+list%0D%0A%24pnaelInformation%5B%27users%27%5D+%3D+implode%28%27%2C%27%2C%24pnaelInformation%5B%27users%27%5D%29%3B%0D%0AAs+I+said%2C+a+5+min+job.+Still+can%27t+remember+what+i+did+for+the+othe+295+minutes.&amp;tags=ExtJS%2CMODX%2Cblog" type="text/html" />
	</item>
		<item>
		<title>IE9 jQuery Radio checked issue</title>
		<link>http://blog.sofasurfer.org/2011/10/03/ie9-jquery-radio-checked-issue/</link>
		<comments>http://blog.sofasurfer.org/2011/10/03/ie9-jquery-radio-checked-issue/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 13:07:47 +0000</pubDate>
		<dc:creator>sofasurfer</dc:creator>
				<category><![CDATA[MODX]]></category>
		<category><![CDATA[WebStuff]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://blog.sofasurfer.org/?p=679</guid>
		<description><![CDATA[I just spend 4 hours to read a simple radio selection via jQuery in IE9 from the following form. 1 2 3 4 5 6 &#60;form name=&#34;myForm&#34; id=&#34;myForm&#34;&#62; &#60;input type=&#34;radio&#34; name=&#34;cTitle&#34; value=&#34;1&#34; /&#62;Mr &#60;input type=&#34;radio&#34; name=&#34;cTitle&#34; value=&#34;2&#34; /&#62;Miss &#60;input type=&#34;radio&#34; name=&#34;cTitle&#34; value=&#34;3&#34; /&#62;Mrs &#60;input type=&#34;radio&#34; name=&#34;cTitle&#34; value=&#34;4&#34; /&#62;Ms &#60;/form&#62; How could this be a problem [...]]]></description>
		<wfw:commentRss>http://blog.sofasurfer.org/2011/10/03/ie9-jquery-radio-checked-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=sofasurfer&amp;url=http%3A%2F%2Fblog.sofasurfer.org%2F2011%2F10%2F03%2Fie9-jquery-radio-checked-issue%2F&amp;language=en_GB&amp;category=text&amp;title=IE9+jQuery+Radio+checked+issue&amp;description=I+just+spend+4+hours+to+read+a+simple+radio+selection+via+jQuery+in+IE9+from+the+following+form.%0D%0A%26lt%3Bform+name%3D%22myForm%22+id%3D%22myForm%22%26gt%3B%0D%0A%09%26lt%3Binput+type%3D%22radio%22+name%3D%22cTitle%22++value%3D%221%22+%2F%26gt%3BMr%0D%0A%09%26lt%3Binput+type%3D%22radio%22+name%3D%22cTitle%22++value%3D%222%22+%2F%26gt%3BMiss%0D%0A%09%26lt%3Binput+type%3D%22radio%22+name%3D%22cTitle%22++value%3D%223%22+%2F%26gt%3BMrs%0D%0A%09%26lt%3Binput+type%3D%22radio%22+name%3D%22cTitle%22++value%3D%224%22+%2F%26gt%3BMs%0D%0A%26lt%3B%2Fform%26gt%3B%0D%0AHow+could+this+be+a+problem+you+think%3F+Exactly+a+quick+google+search+and+as+expected+the+following+code+worked+just+fine+in+almost+all+browser+exept+IE9+ggrrrrrr%3A%0D%0Avar+cTitle+%3D+%24%28%27input%3Aradio%3Achecked%27%2C+%27%23myForm%27%29.val%28%29%3B%0D%0Avar+cTitle+%3D+%24%28%27input%5Bname%3DcTitle%5D%3Achecked%27%2C+%27%23myForm%27%29.val%28%29%3B%0D%0AYes+the+second+attempt+was+close+but+i+was+missing+the%C2%A0%27%C2%A0around+the+radio+name+and+should+have+taken+the%C2%A0%22%C2%A0to+get+the+objects+%3A%28%0D%0Avar+cTitle+%3D+%24%28%22input%5Bname%3D%27clientTitle%27%5D%3Achecked%22%29.val%28%29%3B%0D%0AI+know+a+prime+example+of+copy+and+paste+and+not+really+using+my+head.%0D%0A%0D%0ASo+just+in+case+you+run+into+similar+problems+give+it+a+try+and+hopefully+save+some+time.&amp;tags=jQuery%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Search Engine Sphider &#8211; web crawler</title>
		<link>http://blog.sofasurfer.org/2011/09/05/website-search-engine-sphider/</link>
		<comments>http://blog.sofasurfer.org/2011/09/05/website-search-engine-sphider/#comments</comments>
		<pubDate>Sun, 04 Sep 2011 19:06:43 +0000</pubDate>
		<dc:creator>sofasurfer</dc:creator>
				<category><![CDATA[HappyCode]]></category>
		<category><![CDATA[WebStuff]]></category>
		<category><![CDATA[happycode]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[sphider]]></category>

		<guid isPermaLink="false">http://blog.sofasurfer.ch/?p=678</guid>
		<description><![CDATA[I was looking for a easy and simple way to crawl multiple web-sites and build a search catalog. After a few google searches I found sphider I really love it and it does exactly what I was expecting. You define the URL&#8217;s you wish to index, set the level of how deep you wish to follow the links [...]]]></description>
		<wfw:commentRss>http://blog.sofasurfer.org/2011/09/05/website-search-engine-sphider/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=sofasurfer&amp;url=http%3A%2F%2Fblog.sofasurfer.org%2F2011%2F09%2F05%2Fwebsite-search-engine-sphider%2F&amp;language=en_GB&amp;category=text&amp;title=Search+Engine+Sphider+%26%238211%3B+web+crawler&amp;description=I+was+looking+for+a+easy+and+simple+way+to+crawl+multiple+web-sites+and+build+a+search+catalog.%0A%0AAfter+a+few+google+searches+I+found+sphider%C2%A0I+really+love+it+and+it+does%C2%A0exactly%C2%A0what+I+was+expecting.%0A%0AYou+define+the+URL%27s+you+wish+to+index%2C+set+the+level+of+how+deep+you+wish+to+follow+the+links+and+it+gives+you+a+super+fast+and%C2%A0powerful%C2%A0search+engine.%0A%0ACheck+it+out%3A%0A%0Ahttp%3A%2F%2Fsearch.sofasurfer.org%2F%0A%0A%26nbsp%3B&amp;tags=happycode%2CPHP%2Csphider%2Cblog" type="text/html" />
	</item>
		<item>
		<title>WP .htaccess file hacked by distributioncorporate.ru</title>
		<link>http://blog.sofasurfer.org/2011/08/28/wp-htaccess-file-hacked-by-distributioncorporate-ru/</link>
		<comments>http://blog.sofasurfer.org/2011/08/28/wp-htaccess-file-hacked-by-distributioncorporate-ru/#comments</comments>
		<pubDate>Sat, 27 Aug 2011 21:07:53 +0000</pubDate>
		<dc:creator>sofasurfer</dc:creator>
				<category><![CDATA[Virus]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[distributioncorporate.ru]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.sofasurfer.ch/?p=653</guid>
		<description><![CDATA[It looks like my blog just got hacked. All traffic was redirected to distributioncorporate.ru with some custom rules in the .htaccess file. Make sure to delete these files: 1 2 /wp-content/uploads/_wp_cache.php /wp-content/uploads/sm3.php I also deleted the Mobile Detector Plugin, which also contained some strange PHP files and may be the cause of this. Check these links [...]]]></description>
		<wfw:commentRss>http://blog.sofasurfer.org/2011/08/28/wp-htaccess-file-hacked-by-distributioncorporate-ru/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=sofasurfer&amp;url=http%3A%2F%2Fblog.sofasurfer.org%2F2011%2F08%2F28%2Fwp-htaccess-file-hacked-by-distributioncorporate-ru%2F&amp;language=en_GB&amp;category=text&amp;title=WP+.htaccess+file+hacked+by+distributioncorporate.ru&amp;description=It+looks+like+my+blog+just+got+hacked.+All+traffic+was+redirected+to+distributioncorporate.ru+with+some+custom+rules+in+the+.htaccess+file.%0A%0AMake+sure+to+delete+these+files%3A%0A%0A%2Fwp-content%2Fuploads%2F_wp_cache.php%0A%2Fwp-content%2Fuploads%2Fsm3.php%0A%0AI+also+deleted+the%C2%A0Mobile+Detector+Plugin%2C+which+also+contained+some+strange+PHP+files+and+may+be+the+cause+of+this.%0A%0ACheck+these+links+for+more+info%3A%0A%0Ahttp%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsite-getting-diverted-from-google%3Freplies%3D12%0A%0Ahttp%3A%2F%2Fmarkmaunder.com%2F&amp;tags=distributioncorporate.ru%2Cwordpress%2Cblog" type="text/html" />
	</item>
		<item>
		<title>UBUNTU EC2: Add new admin user</title>
		<link>http://blog.sofasurfer.org/2011/07/16/ubuntu-ec2-add-new-admin-user/</link>
		<comments>http://blog.sofasurfer.org/2011/07/16/ubuntu-ec2-add-new-admin-user/#comments</comments>
		<pubDate>Sat, 16 Jul 2011 09:51:42 +0000</pubDate>
		<dc:creator>sofasurfer</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[UBUNTU]]></category>

		<guid isPermaLink="false">http://blog.sofasurfer.ch/?p=539</guid>
		<description><![CDATA[I&#8217;m sure there are plenty of articles describe how to add/create a new user on a UBUNTU EC2 instance. Unfortunately I couldn&#8217;t find a simple one so i decided to create this post more for my own reference. I assume you already have a UBUNTU EC2 instance (in my case 10.04.2 LTS ami-6afa8438 ) with a valid key [...]]]></description>
		<wfw:commentRss>http://blog.sofasurfer.org/2011/07/16/ubuntu-ec2-add-new-admin-user/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=sofasurfer&amp;url=http%3A%2F%2Fblog.sofasurfer.org%2F2011%2F07%2F16%2Fubuntu-ec2-add-new-admin-user%2F&amp;language=en_GB&amp;category=text&amp;title=UBUNTU+EC2%3A+Add+new+admin+user&amp;description=I%27m+sure+there+are+plenty+of+articles+describe+how+to+add%2Fcreate+a+new+user+on+a+UBUNTU+EC2+instance.%0A%0AUnfortunately%C2%A0I+couldn%27t+find+a+simple+one+so+i+decided+to+create+this+post+more+for+my+own+reference.%0A%0AI+assume+you+already+have+a+UBUNTU+EC2+instance+%28in+my+case+10.04.2+LTS%C2%A0ami-6afa8438%C2%A0%29+with+a+valid+key+file%C2%A0for+the+default+user+ubuntu+and+wish+to+grant+access+to+an+additional+user.%0A%0AMy+domain+name+is+sofasurfer.ch+and+the+new+user+i+will+add+is+kib.%0A%0ASo+let%27s+get+started.%0A%0A1.+Login+to+server+with+default+user+ubuntu+and+the+original+key-file+ubuntu.pem+%28which+has+to+be+in+the+same+directory+as+you+run+the+command+from%29.%0Assh+-i+ubuntu.pem+ubuntu%40sofasurfer.ch%0A2.+Add+new+user+and+insert+the+requested+user+information%0Asudo+adduser+kib%0A3.+Add+new+user+to+admin+group%2C+which+also+grants+you+sudoer%C2%A0rights%0Asudo+adduser+kib+admin%0A4.+If+you+don%27t+want+to+enter+the+password+each+time+you+use+sudo+you+can+set+this+in+the%C2%A0%2Fetc%2Fsudoers+file.%0Asudo+visudo%0A5.+And+add+the+following+line+below+the+ubuntu+user%C2%A0%C2%A0%28for+security+reasons+not+recommended%29%0Akib+%C2%A0+%C2%A0+ALL%3D%28ALL%29+NOPASSWD%3AALL%0A3.+Switch+to+new+user%0Asu+kib%0A4.+Switch+to+home+directory+for+new+user%0Acd+%2Fhome%2Fkib%0A5.+Create+new+rsa+key+and+fill+in+the+requested+information+%28can+keep+all+default+but+make+sure+to+set+a+password%29%0Assh-keygen+-t+rsa%0A6.+Change+owner+premission%0Achmod+700+.ssh%0A7.+Rename+new+key+files+so+they+match+new+username%0Amv+.ssh%2Fid_rsa+.ssh%2Fid_kib_rsa%0Amv+.ssh%2Fid_rsa.pub+.ssh%2Fid_kib_rsa.pub%0A8.+Combine+the+files+to+generate+the+authorized_keys+file%0Acat+.ssh%2Fid%2A.pub+%26gt%3B+.ssh%2Fauthorized_keys%0A9.+Change%C2%A0permission+so+only+the+new+user+can+access%0Achmod+600+.ssh%2F%2A%0A10.+Copy+keys+to+tmp+folder%2C+to+download+later+from+the+client%2C+make+sure+they+are+readable+by+the+default+user.%0Acp+.ssh%2Fid%2A+%2Ftmp%0Achmod+644+%2Ftmp%2Fid%2A%0A11.+Logout+from+EC2+server%0Aexit%0Aexit%0A12.+Download+new+key+with+original+ubuntu+user%0Ascp+-i+ubuntu.pem+ubuntu%40sofasurfer.ch%3A%2Ftmp%2Fid_kib_rsa+.%2F%0A13.+Change+right+for+new+key+so+they+can+only+be+accessed+from+current+user%2Fmachine%0Achmod+400+id_kib_rsa%0A14.+Login+with+new+user%0Assh+-i+id_kib_rsa+kib%40sofasurfer.ch%0A15.+Delete+keys+from+%2Ftmp+directory%0Arm+-rf+%2Ftmp%2Fid%2A%0ADone%0A%0ANot+sure+if+this+is+the+perfect+way+to+do+so%2C+but+it+worked+for+me+%3A%29%0A%0A%26nbsp%3B&amp;tags=EC2%2CUBUNTU%2Cblog" type="text/html" />
	</item>
		<item>
		<title>There is no in between</title>
		<link>http://blog.sofasurfer.org/2011/07/12/there-is-no-in-between/</link>
		<comments>http://blog.sofasurfer.org/2011/07/12/there-is-no-in-between/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 15:37:44 +0000</pubDate>
		<dc:creator>sofasurfer</dc:creator>
				<category><![CDATA[FunnyStuff]]></category>
		<category><![CDATA[dyslectic]]></category>
		<category><![CDATA[spelling]]></category>

		<guid isPermaLink="false">http://blog.sofasurfer.ch/?p=515</guid>
		<description><![CDATA[As a dyslectic person i always struggle with grammar and spelling. Back in school (Swiss German) i could not figure out if there should be(e)?; a v or a f, an extra h in &#8220;ka(h)m&#8221;; and on and on and on&#8230; The positioning of letters did not match on paper the way i had them in my mind. Lucky me, one [...]]]></description>
		<wfw:commentRss>http://blog.sofasurfer.org/2011/07/12/there-is-no-in-between/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=sofasurfer&amp;url=http%3A%2F%2Fblog.sofasurfer.org%2F2011%2F07%2F12%2Fthere-is-no-in-between%2F&amp;language=en_GB&amp;category=text&amp;title=There+is+no+in+between&amp;description=As+a%C2%A0dyslectic+person+i+always+struggle%C2%A0with%C2%A0grammar%C2%A0and+spelling.%0A%0ABack+in+school+%28Swiss+German%29+i+could+not+figure+out+if+there+should+be%28e%29%3F%3B+a%C2%A0v+or+a+f%2C+an+extra+h+in+%22ka%28h%29m%22%3B%C2%A0and+on+and+on+and+on...+The+positioning+of+letters+did+not+match+on+paper+the+way+i+had+them+in+my+mind.%0A%0ALucky+me%2C+one+day+spell+check+was+invented+and+i%C2%A0finally%C2%A0can+write+letters+%28still+not+perfect%29+but+at+least+people+understand+the+basic+concept.%0A%0AAfter+reading+the+text+beside+my+theory+has+bin+proven+correct%2C+it%27s+not+that+important+at+all%2C+and+more+important%2C+you+communicate+with+people+and+try+to+learn+new+languages+even+there+are+plenty+of+mistakes+%28how+else+you+learn+if+not+with+mistakes%29.%0A%0ADon%27t+get+me+wrong%2C+this+is+no+excuse%2C+not+to+improve+spelling+and+grammar+%3A%29%0A%0AThe+Science+of+Word+Recognition&amp;tags=dyslectic%2Cspelling%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Dynamic google map markers via simple jSon file</title>
		<link>http://blog.sofasurfer.org/2011/06/27/dynamic-google-map-markers-via-simple-json-file/</link>
		<comments>http://blog.sofasurfer.org/2011/06/27/dynamic-google-map-markers-via-simple-json-file/#comments</comments>
		<pubDate>Sun, 26 Jun 2011 20:22:12 +0000</pubDate>
		<dc:creator>sofasurfer</dc:creator>
				<category><![CDATA[HappyCode]]></category>
		<category><![CDATA[WebStuff]]></category>
		<category><![CDATA[Google Maps API V3]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jSon]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.sofasurfer.ch/?p=469</guid>
		<description><![CDATA[After making my previous post on how to simply store comments in a jSon file (and the comment from Brian) I decided to write an additional HOWTO create dynamic markers and store them in a jSon file. It also includes an automatic geo data lockup via Google GeoCoder and generates a detail html file for-each marker created, [...]]]></description>
		<wfw:commentRss>http://blog.sofasurfer.org/2011/06/27/dynamic-google-map-markers-via-simple-json-file/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=sofasurfer&amp;url=http%3A%2F%2Fblog.sofasurfer.org%2F2011%2F06%2F27%2Fdynamic-google-map-markers-via-simple-json-file%2F&amp;language=en_GB&amp;category=text&amp;title=Dynamic+google+map+markers+via+simple+jSon+file&amp;description=After+making+my+previous+post+on+how+to+simply+store+comments+in+a+jSon+file+%28and+the+comment+from+Brian%29+I+decided+to+write+an+additional+HOWTO+create+dynamic+markers+and+store+them+in+a+jSon+file.%0D%0A%0D%0AIt+also+includes+an+automatic+geo+data%C2%A0lockup%C2%A0via+Google+GeoCoder+and+generates+a+detail+html+file+for-each+marker+created%2C+which+then+will+be+loaded+dynamic+when+the+marker+is+clicked.%0D%0A%0D%0ACheck+out+the+working+example+or+download+the+code.%0D%0A%0D%0ASo+lets+get+started+with+the+code.%C2%A0First+we+need+to+add+jQuery+and+the+Google+map+API%3A%0D%0A%0D%0A%0D%0A%0D%0A%09+%0D%0A%09+%0D%0A%0D%0A%09+%0D%0A%09+%0D%0A%0D%0A%0D%0A%0D%0AThe+HTML+code+is+very+basic+and+contains+a+Title%2C+Input+field+for+new+markers+and+the+placeholder+for+the+map.+Make+sure+to+add+%22loadMap%28%29%22+to+the+html+body.%0D%0A%0D%0A%0D%0A+%0D%0A%09Dynamic+Google+Map+markers+via+jSon%0D%0A%0D%0A%09%0D%0A%09%0D%0A%09%0D%0A%09%0D%0A%0D%0A%09%0D%0A%09+%0D%0A%0D%0A%0D%0A%0D%0ASo+lets+have+a+look+at+the+JavaScript%2C+first+we+set+some+global+variables+like+data+path+zoom+level+etc%3A%0D%0A%0D%0A%0D%0A%0D%0A%2F%2F+data+file+with+markers+%28could+also+be+a+PHP+file+for+dynamic+markers%29%0D%0Avar+newDate+%3D+new+Date%3B%0D%0Avar+markerFile+%3D+%27markers.json%3Ftime%3D%27+%2B+newDate.getTime%28%29%3B%0D%0A%0D%0A%2F%2F+set+default+map+properties%0D%0Avar+defaultLatlng+%3D+new+google.maps.LatLng%2849.00%2C10.00%29%3B%0D%0A%0D%0A%2F%2F+zoom+level+of+the+map%0D%0Avar+defaultZoom+%3D+2%3B%0D%0A%0D%0A%2F%2F+variable+for+map%0D%0Avar+map%3B%0D%0A%0D%0A%2F%2F+variable+for+marker+info+window%0D%0Avar+infowindow%0D%0A%0D%0A%2F%2F+List+with+all+marker+to+check+if+exist%0D%0Avar+markerList+%3D+%7B%7D%3B%0D%0A%0D%0A%2F%2F+set+error+handler+for+jQuery+AJAX+requests%0D%0A%24.ajaxSetup%28%7B%22error%22%3Afunction%28XMLHttpRequest%2CtextStatus%2C+errorThrown%29+%7B%0D%0A%09alert%28textStatus%29%3B%0D%0A%09alert%28errorThrown%29%3B%0D%0A%09alert%28XMLHttpRequest.responseText%29%3B%0D%0A%7D%7D%29%3B%0D%0A%0D%0A%2F%2F+option+for+google+map+object%0D%0Avar+myOptions+%3D+%7B%0D%0A%09zoom%3A+defaultZoom%2C%0D%0A%09center%3A+defaultLatlng%2C%0D%0A%09mapTypeId%3A+google.maps.MapTypeId.HYBRID%0D%0A%7D%0D%0A%0D%0A%0D%0A%0D%0AOn+page+load+loadMap+is+fired+which+which+loads+the+google+map+to+the+myMap+DIV%2C+and+then+fires+loadMarkers%3A%0D%0A%0D%0A%2F%2A%2A%0D%0A+%2A+Load+Map%0D%0A+%2A%2F%0D%0Afunction+loadMap%28%29%7B%0D%0A%0D%0A%09%2F%2F+create+new+map+make+sure+a+DIV+with+id+myMap+exist+on+page%0D%0A%09map+%3D+new+google.maps.Map%28document.getElementById%28%22myMap%22%29%2C+myOptions%29%3B%0D%0A%0D%0A%09%2F%2F+create+new+info+window+for+marker+detail+pop-up%0D%0A%09infowindow+%3D+new+google.maps.InfoWindow%28%29%3B%0D%0A%0D%0A%09%2F%2F+load+markers%0D%0A%09loadMarkers%28%29%3B%0D%0A%7D%0D%0A%0D%0A%0D%0ANow+we+need+the+markers%2C+loadMarkers+loads+the+existing+markers+via+ajax+request+directly+from+the+data.json+fiel+%28could+of+course+also+be+a+dynamic+PHP+files+which+generates+jSon%29.%0D%0A%0D%0A%2F%2A%2A%0D%0A+%2A+Load+markers+via+ajax+request+from+server%0D%0A+%2A%2F%0D%0Afunction+loadMarkers%28%29%7B%0D%0A%0D%0A%09%2F%2F+load+marker+jSon+data%0D%0A%09%24.getJSON%28markerFile%2C+function%28data%29+%7B%0D%0A%0D%0A%09%09%2F%2F+loop+all+the+markers%0D%0A%09%09%24.each%28data.markers%2C+function%28i%2Citem%29%7B%0D%0A%0D%0A%09%09%09%2F%2F+add+marker+to+map%0D%0A%09%09%09loadMarker%28item%29%3B%0D%0A%0D%0A%09%09%7D%29%3B%0D%0A%09%7D%29%3B%0D%0A%7D%0D%0A%0D%0A%0D%0AOnce+the+markers+are+loaded+they+somehow+have+to+go+on+the+map%3A%0D%0A%0D%0A%0D%0A%2F%2A%2A%0D%0A+%2A+Load+marker+to+map%0D%0A+%2A%2F%0D%0Afunction+loadMarker%28markerData%29%7B%0D%0A%0D%0A%09%2F%2F+create+new+marker+location%0D%0A%09var+myLatlng+%3D+new+google.maps.LatLng%28markerData%5B%27lat%27%5D%2CmarkerData%5B%27long%27%5D%29%3B%0D%0A%0D%0A%09%2F%2F+create+new+marker%0D%0A%09var+marker+%3D+new+google.maps.Marker%28%7B%0D%0A%09++++id%3A+markerData%5B%27id%27%5D%2C%0D%0A%09++++map%3A+map%2C%0D%0A%09++++title%3A+markerData%5B%27name%27%5D+%2C%0D%0A%09++++position%3A+myLatlng%0D%0A%09%7D%29%3B%0D%0A%0D%0A%09%2F%2F+add+marker+to+list+used+later+to+get+content+and+additional+marker+information%0D%0A%09markerList%5Bmarker.id%5D+%3D+marker%3B%0D%0A%0D%0A%09%2F%2F+add+event+listener+when+marker+is+clicked%0D%0A%09%2F%2F+currently+the+marker+data+contain+a+dataurl+field+this+can+of+course+be+done+different%0D%0A%09google.maps.event.addListener%28marker%2C+%27click%27%2C+function%28%29+%7B%0D%0A%0D%0A%09%09%2F%2F+show+marker+when+clicked%0D%0A%09%09showMarker%28marker.id%29%3B%0D%0A%0D%0A%09%7D%29%3B%0D%0A%0D%0A%09%2F%2F+add+event+when+marker+window+is+closed+to+reset+map+location%0D%0A%09google.maps.event.addListener%28infowindow%2C%27closeclick%27%2C+function%28%29+%7B%0D%0A%09%09map.setCenter%28defaultLatlng%29%3B%0D%0A%09%09map.setZoom%28defaultZoom%29%3B%0D%0A%09%7D%29%3B%0D%0A%7D%0D%0A%0D%0A%0D%0A%0D%0AEach+marker+has+an+onclick+event+which+loads+the+detail+marker+html+file+into+a+google+infowindow.%0D%0A%0D%0A%2F%2A%2A%0D%0A+%2A+Show+marker+info+window%0D%0A+%2A%2F%0D%0Afunction+showMarker%28markerId%29%7B%0D%0A%0D%0A%09%2F%2F+get+marker+information+from+marker+list%0D%0A%09var+marker+%3D+markerList%5BmarkerId%5D%3B%0D%0A%0D%0A%09%2F%2F+check+if+marker+was+found%0D%0A%09if%28+marker+%29%7B%0D%0A%09%09%2F%2F+get+marker+detail+information+from+server%0D%0A%09%09%24.get%28+%27data%2F%27+%2B+marker.id+%2B+%27.html%27+%2C+function%28data%29+%7B%0D%0A%09%09%09%2F%2F+show+marker+window%0D%0A%09%09%09infowindow.setContent%28data%29%3B%0D%0A%09%09%09infowindow.open%28map%2Cmarker%29%3B%0D%0A%09%09%7D%29%3B%0D%0A%09%7Delse%7B%0D%0A%09%09alert%28%27Error+marker+not+found%3A+%27+%2B+markerId%29%3B%0D%0A%09%7D%0D%0A%7D%0D%0A%0D%0A%0D%0AHere+the+logic+for+lockup+new+markers+and+post+them+via+AJAX+jSon+request+to+the+server.%0D%0A%0D%0A+%2F%2A%2A%0D%0A+%2A+Adds+new+marker+to+list%0D%0A+%2A%2F%0D%0Afunction+newMarker%28%29%7B%0D%0A%0D%0A%09%2F%2F+get+new+city+name%0D%0A%09var+markerAddress+%3D+%24%28%27%23newMarker%27%29.val%28%29%3B%0D%0A%0D%0A%09%2F%2F+create+new+geocoder+for+dynamic+map+lookup%0D%0A%09var+geocoder+%3D+new+google.maps.Geocoder%28%29%3B%0D%0A%0D%0A%09geocoder.geocode%28+%7B+%27address%27%3A+markerAddress%7D%2C+function%28results%2C+status%29+%7B%0D%0A%0D%0A%09%09%2F%2F+check+response+status%0D%0A%09%09if+%28status+%3D%3D+google.maps.GeocoderStatus.OK%29+%7B%0D%0A%0D%0A%09%09%09%2F%2F+Fire+Google+Goal%0D%0A%09%09%09_gaq.push%28%5B%27_trackPageview%27%2C+%27%2Ftracking%2Fmarker-submit%27%5D%29%3B%0D%0A%0D%0A%09%09%09%2F%2F+set+new+maker+id+via+timestamp%0D%0A%09%09%09var+newDate+%3D+new+Date%3B%0D%0A%09%09%09var+markerId+%3D+newDate.getTime%28%29%3B%0D%0A%0D%0A%09%09%09%2F%2F+get+name+of+creator%0D%0A%09%09%09var+markerCreator+%3D+prompt%28%22Please+enter+your+name%22%2C%22%22%29%3B%0D%0A%0D%0A%09%09%09%2F%2F+create+new+marker+data+object%0D%0A%09%09%09var+markerData+%3D+%7B%0D%0A%09%09%09%09%27id%27%3A+markerId%2C%0D%0A%09%09%09%09%27lat%27%3A+results%5B0%5D.geometry.location.lat%28%29%2C%0D%0A%09%09%09%09%27long%27%3A+results%5B0%5D.geometry.location.lng%28%29%2C%0D%0A%09%09%09%09%27creator%27%3A+markerCreator%2C%0D%0A%09%09%09%09%27name%27%3A+markerAddress%2C%0D%0A%09%09%09%7D%3B%0D%0A%0D%0A%09%09%09%2F%2F+save+new+marker+request+to+server%0D%0A%09%09%09%24.ajax%28%7B%0D%0A%09%09%09%09type%3A+%27POST%27%2C%0D%0A%09%09%09%09url%3A+%22data.php%22%2C%0D%0A%09%09%09%09data%3A+%7B%0D%0A%09%09%09%09%09marker%3A+markerData%0D%0A%09%09%09%09%7D%2C%0D%0A%09%09%09%09dataType%3A+%27json%27%2C%0D%0A%09%09%09%09async%3A+false%2C%0D%0A%09%09%09%09success%3A+function%28result%29%7B%0D%0A%09%09%09%09%09%2F%2F+add+marker+to+map%0D%0A%09%09%09%09%09loadMarker%28result%29%3B%0D%0A%0D%0A%09%09%09%09%09%2F%2F+show+marker+detail%0D%0A%09%09%09%09%09showMarker%28result%5B%27id%27%5D%29%3B%0D%0A%09%09%09%09%7D%0D%0A%09%09%09%7D%29%3B%0D%0A%0D%0A%09%09%7Delse+if%28+status+%3D%3D+google.maps.GeocoderStatus.OVER_QUERY_LIMIT%29%7B%0D%0A%09%09%09alert%28%22Marker+not+found%3A%22+%2B+status%29%3B%0D%0A%09%09%7D%0D%0A%09%7D%29%3B%0D%0A%7D%0D%0A%0D%0AThe+PHP+code+to+save+the+marker+is+pretty+much+the+same+as+in+my+previous+post%2C+and+returns+the+newly+create+marker+data%3A%0D%0A%0D%0A%0D%0A%2F%2A+get+markes+from+file+%2A%2F%0D%0A%24dataPath+%3D+%27%2Fvar%2Fwww%2Fgmap%2Fdata%2F%27%3B%0D%0A%24markerDataFile+%3D+%27markers.json%27%3B%0D%0A%24markerText+%3D+file_get_contents%28%24markerDataFile%29%3B%0D%0A%0D%0A%2F%2A+create+array+list+from+markers+%2A%2F%0D%0A%24markerList+%3D+json_decode%28%24markerText%2Ctrue%29%3B%0D%0A%0D%0A%2F%2A+check+if+new+marker+is+posted+%2A%2F%0D%0Aif%28+%21empty%28%24_POST%5B%27marker%27%5D%29++%29%7B%0D%0A%0D%0A%09%2F%2A+get+new+marker+data+%2A%2F%0D%0A%09%24markerData+%3D++%24_POST%5B%27marker%27%5D%3B%0D%0A%0D%0A%09%2F%2A+add+additional+marker+information+%2A%2F%0D%0A%09%24markerData%5B%27ip%27%5D+%3D+%24_SERVER%5B%27REMOTE_ADDR%27%5D%3B%0D%0A%09%24markerData%5B%27created%27%5D+%3D+time%28%29%3B%0D%0A%0D%0A%0D%0A%09%2F%2A++create+detail+marker+content+file+%2A%2F%0D%0A%09%24markerContent+%3D+%22%22+.+%24markerData%5B%27creator%27%5D+.+%22-%26gt%3B+%22+.+%24markerData%5B%27name%27%5D+.+%22%22%3B%0D%0A%09%24markerContent+.%3D+%22%22+.+date%28%22D+M+j+G%3Ai%3As+T+Y%22%29+.+%22%22%3B%0D%0A%0D%0A%09%2F%2A+save+marker+file+to+server+%2A%2F%0D%0A%09%24markerFile+%3D+%24dataPath+.+%24markerData%5B%27id%27%5D+.+%22.html%22%3B%0D%0A%09file_put_contents%28%24markerFile++%2C+%24markerContent%29%3B%0D%0A%0D%0A++++++++%2F%2A+add+new+marker+to+existing+list+%2A%2F%0D%0A++++++++%24markerList%5B%27markers%27%5D%5B%5D+%3D+%24markerData%3B%0D%0A%0D%0A++++++++%2F%2A+convert+comments+to+string+%2A%2F%0D%0A++++++++%24markerText+%3D+json_encode%28%24markerList%29%3B%0D%0A%0D%0A++++++++%2F%2A+save+comment+to+file+%2A%2F%0D%0A++++++++file_put_contents%28%24markerDataFile%2C+%24markerText%29%3B%0D%0A%0D%0A++++++++%2F%2A+return+newly+created+marker+%2A%2F%0D%0A%09echo+json_encode%28%24markerData%29%3B%0D%0A%7Delse%7B%0D%0A%09echo+%22Invalid+request%22%3B%0D%0A%7D%0D%0A%0D%0AThis+should+give+a+good+start+on+how+to+dynamically+add+and+display+markers+via+Google+map.%0D%0A%0D%0ACheck+out+the+working+example+or+download+the+code.&amp;tags=Google+Maps+API+V3%2CjQuery%2CjSon%2CPHP%2Cblog" type="text/html" />
	</item>
		<item>
		<title>carsNcampers Motorhome Rental</title>
		<link>http://blog.sofasurfer.org/2011/06/06/1013/</link>
		<comments>http://blog.sofasurfer.org/2011/06/06/1013/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 14:46:24 +0000</pubDate>
		<dc:creator>sofasurfer</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[MODX]]></category>

		<guid isPermaLink="false">http://blog.sofasurfer.org/?p=1013</guid>
		<description><![CDATA[Compleate e-commerce solution for Australia and New Zealand cars/camper rental, based on MODX content management system. Web site: carsncampers.com Design by: telosbrand.com Features: More then 10 supplier: Alpha Campervans, ApolloMotorhome, Backpacker Campers, Britz, Budget Rent-A-Car, Cheapa Campa, Europcar, Hertz Rent-A-Car, Kea Campers, Kea Campers, Maui, Pacific Horizon, United Campervans Dynamic flex rates import and price moddel Fully futured booking engine CRM: Compelate vehicle/rates management system © Copyright 2010 carsNcampers.com]]></description>
		<wfw:commentRss>http://blog.sofasurfer.org/2011/06/06/1013/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=sofasurfer&amp;url=http%3A%2F%2Fblog.sofasurfer.org%2F2011%2F06%2F06%2F1013%2F&amp;language=en_GB&amp;category=text&amp;title=carsNcampers+Motorhome+Rental&amp;description=Compleate%C2%A0e-commerce%C2%A0solution+for+Australia+and+New+Zealand+cars%2Fcamper+rental%2C+based+on%C2%A0MODX%C2%A0content+management+system.%0D%0A%0D%0AWeb+site%3A%C2%A0carsncampers.com%0D%0ADesign+by%3A%C2%A0telosbrand.com%0D%0AFeatures%3A%0D%0A%0D%0A%09More+then+10+supplier%3A+Alpha+Campervans%2C%C2%A0ApolloMotorhome%2C+Backpacker+Campers%2C%C2%A0Britz%2C+Budget+Rent-A-Car%2C+Cheapa+Campa%2C%C2%A0Europcar%2C%C2%A0Hertz%C2%A0Rent-A-Car%2C+Kea+Campers%2C+Kea+Campers%2C%C2%A0Maui%2C%C2%A0Pacific+Horizon%2C+United+Campervans%0D%0A%09Dynamic+flex+rates%C2%A0import+and+price+moddel%0D%0A%09Fully+futured%C2%A0booking+engine%0D%0A%09CRM%3A+Compelate+vehicle%2Frates+management+system%0D%0A%0D%0A%0D%0A%0D%0A%5Bgallery+link%3D%22file%22+columns%3D%224%22%5D%0D%0A%0D%0A%0D%0A%C2%A9+Copyright+2010+carsNcampers.com&amp;tags=e-commerce%2CMODX%2CProjects%2Cblog" type="text/html" />
	</item>
	</channel>
</rss>

