SubClosure

{ Don't Repeat Yourself ! }

I recently had to set up a new mac for web development.
Its always such a hassle to find it all again and I ended up spending much more time then anticipated.

Here is a quick reference list of what steps I took. Following this list will get you going in under one hour plus all software is free.

 

  1. install cyberduck for transfer and remote synchronization
  2. install xampp for a complete LAMP setup
  3. install eclipse pdt for a great php IDE
  4. install eclipse subclipse plugin for your svn projects
  5. install aptana plugin for all web development
  6. install textwrangler as a general purpose text and code editor with remote support
  7. install firefox with firebug plugin for debugging your html/css/javascript

After that also download some great php libs to include in new php projects:

  1. redbean – database orm
  2. ezql – easy database interface and abstraction
  3. phpmailer – probably the best email lib for php
  4. phpunit – unit testing
  5. simplepie – rss parser and rss creation
  6. php thumbnails – great for image uploads

just rediscovered my good old friend yoxos for downloading customized eclipse packages.
http://eclipsesource.com/en/yoxos/download-yoxos-5/

It allows to save profiles for installing the same eclipse configuration across multiple computers which saves heaps of time.

Safari, Chrome and Firefox work great with the facebook like button.

But to get internet explorer to display it I had to add the facebook namespace to my html tag.

e.g.
<html  xmlns:fb=”http://www.facebook.com/2008/fbml”
xmlns:og=”http://opengraphprotocol.org/schema/” … >

 

Probably one of the first things you would want to do with an openlayers map is adding some interaction.
Amazingly it is difficult to find an easy and quick example on how to do it.

Here is an example on how to move an Openlayer.Marker to the point where a user clicked on the map.

 

var markers = new OpenLayers.Layer.Markers( "Markers" );
marker = new OpenLayers.Marker(lonLat) ;
markers.addMarker(marker);
map.addLayer(markers);

map.events.register("click", map , function(e){
var opx = map.getLayerPxFromViewPortPx(e.xy) ;
marker.map = map ;
marker.moveTo(opx) ;
});


Another example can be found on the openlayers examples page.
I found it a bit overkill though and more difficult to use.

This error occurs on line 915 in Openlayers.js.

If you get this error when using the moveTo method of an OpenLayers.Marker object  set the map on the marker first.

e.g.

mymarker.map = map ;
mymarker.moveTo(opx ) ;

 

 

Has your facebook LIKE button suddenly disappeared from your website, even though you didn’t make any code changes?

It surely disappeared on my page over night and after a quick look at the javascript error log, I found this error in the http://connect.facebook.net/en_US/all.js script: e.root is undefined

After a bit of googling I found a solution:

just before the div that contains the facebook javascript add another div with the id “fb-root” like so:

<div id=”fb-root”></div>
 <div class=”facebook-button” >
 <script src=”http://connect.facebook.net/en_US/all.js#xfbml=1″></script>
 <fb:like show_faces=”false” width=”200″ font=”"></fb:like>
</div>

and … working again !

Lately I have gotten a bit frustrated with a bug within the Joomla 1.5 reset password functions.
I got lots of angry emails from users that had an invalid token error.

Also I never really liked that users had to copy and paste the token manually.
But I probably could have lived with that, if there wasn’t the rather random invalid token error my users were getting.

Out of  this frustration I created a new component that handles the reset password process. There is also a plugin that needs to be activated.
When the plugin is activated, it attempts to replace the joomla default forgot password link with a link to this component.

This was mainly written for my own joomla websites but I decided to provide it as a free download in the hope that it might be useful for others as well.

Notes:

  • requires PHP 5 or greater
  • this will most likely only work with the default joomla login module.
  • for security reasons you can not reset super administrator passwords.

 

Available languages files:

Polish by Piotr Gąsiorowski
German by Urs Brülhart
Finnish by Anne Mattila
Greek by Christopher Valmas
Spanish by Manuel Gonzalez
Italian by Marco Maiella
French and Dutch Translation by Irina Malinovskaia
Portuguese by Fernando Andrade


Updates:

Jun 2011: Added option to authenticate user by email instead of username
Jul 2011:  Fixed issues with Joomla 1.6 – admin interface error and language replacement.
Aug 2011: Added Option to send a Random Password instead of a verification email (one step password reset)
Oct 2011:  Security fix (thanks to Leo for finding this) 


Download Component

Download Plugin


If you find the component useful, please consider making a donation to support the development and maintenance. Thanks

The development of this component started out of the need to consolidate different RSS Sources into one feed that is ordered by publishing date.

This comes in handy if you have different components on your site with each of them generating its own RSS Feed and you want to provide a “global” feed to keep your users in the loop.

The source feeds are not limited to feeds on your site  - you can wire up and mix feeds from any site you like.
You could then run this feed through feedburner and let users subscribe per email for example.

Feeds are processed with the simplepie library that is included in Joomla.

Download the component:  RSSConsolidation for Joomla

I’ve been using the Kunena Forum on a few of my websites and the greatest problem is spam. Once the site is well established spammers will come and make your life miserable.
So usually that means switching to an moderated forum or risking having spam on your site until you had time to review each post.
If you decide for a moderated forum you might loose users because it might take some time until you had a chance to approve posts.

The solution:
One pretty much simple rule is that after a legitimate user successfully posted the first post his following posts will most likely not be spam either.
So all really needed is to approve the very first message a user posts to a forum and then have an automated process that will
approve all following messages of this user.

This Kunena Auto Moderation Plugin will handle this simple task. After a new message was posted it will check if the user has any previous approved messages and if yes it will automatically approve the new message and send an email notification to the forum moderators.

This is the first release and I might add more features to control spam in the next version.

Download the plugin: Kunena Auto Moderation Plugin

amfphp 1.9 annoyance

No comments

I love amfphp but here is one thing that has been annoying me for almost a year now since the release of amfphp 1.9 final.
Whenever I download amfphp for a new project and import it into PHP Eclipse I have to fix this little error first.

Obviously the current amfphp developers aren’t using eclipse.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes