Custom color-schemes in PsPad editor

17. Mai 2010

PsPad is a quite famous file editor for Windows. If you’re developing on a netbook or laptop you might want to consider switching to a dark color scheme. This increases the battery lifetime and is an easy action to save energy in general. You can change the color settings for programming languages separately in the Settings menu of PsPad. Click on Highlighter Settings... and choose the desired settings.

You can also save your setings or load pre-made settings from an .INI file.

I have set-up a little subversion repository and uploaded my PsPad color settings if you want to give it a try.
Since I mainly work with CSS, (X)HTML, PHP, XML XSL(T) and plain text files, other languages might not be pretty.

Download

Download my INI file here: PsPad Dark Syntax Highlighting Scheme.

Instructions

1. Download the INI file.
2. Save it to :\Program Files\PsPad editor\Colors
3. Load the setting in the Syntax Highlighter Settings.

Weblication und passwortgeschütze Verzeichnisse

5. Mai 2010

Ein Beispiel: Man hat eine CMS-Installation auf die Entwickler und der Kunde Zugriff haben und möchte sicherstellen dass die Seiten nicht von Suchmaschinen-Bots indiziert werden und unerwartet Besucherströme herbeilotsen, die die Seite noch nicht sehen dürfen. In der Regel tut es eine einfache .htaccess-Authentifizierung mit Benutzern und Passwörtern.
Es sei denn: man hat ein Verzeichnis mit Passwortschutz in welchem man die Möglichkeit braucht, HTTP-Requests auszuführen (z.B. wenn man mit PHP’s Output Buffering arbeitet, Gegenargumente mal Beiseite gelassen).

Um Weblication in einem geschütztem Verzeichnis zu betreiben benötigt man also zunächst einen regulären .htaccess-Verzeichnisschutz. Die .htaccess könnte zB. so aussehen:

AuthUserFile /var/www/html/.htpasswd
AuthName "Login"
AuthType Basic
require valid-user

(in der .htpasswd hat man entsprechend Benutzer und kodierte Passwörter angelegt)

Nun wird die Benutzerauthentifizierung mit einer “deny all, allow from”-Anweisung gekapselt, die der lokalen IP (und/oder dem Domainnamen) des Servers freie Bahn läßt. In der Regel dürfte der Eintrag localhost oder die IP (127.0.0.1) funktionieren (, was aber bei spezielleren Konfigurationen auch abweichen kann). Die letzte Zeile satisfy any zeigt an, dass entweder die IP/Domain oder die Authentifizierung erfüllt sein muss.

deny from all
allow from 127.0.0.1
allow from .contactsheet.de
AuthUserFile /var/www/html/.htpasswd
AuthName "Login"
AuthType Basic
require valid-user
satisfy any

WordPress RSS-Combiner 1.1

19. April 2010

Merge several feeds into a single ressource


The WordPress RSS-Combiner is intended to merge several Atom, RSS, RDF, etc. Feeds into one single stream. This might be useful for you if you have several social network accounts like Twitter, SoundCloud, Last.fm, a flickr photostream, etc. that you want to include in your weblogs’ RSS-Feed.

Changes since v1.0:

After a bit, well actually it’s been around 2.5 years, I updated my RSS-Combiner Plugin for WordPress this weekend. There are mostly minor changes, and the final, combined feed output can still be improved a bit (which is on my todo list). But for now there are some enhancements made:

  • the SimplePie caching is activated so the plugin uses less server-side ressources.
  • the admin page was updated so that it integrates better into the WordPress admin theme.
  • Limiting the number of items in the output feed was implemented.
  • Changing the length of the articles content and description was implemented.
  • Some warnings, that showed on the plugins first run were fixed.

Download & Demo

WordPress RSS-Combiner v1.1 (tar.gz archive, 170KB)
See the demo feed.

Instructions

  • Download and unpack the archive.
  • Upload its contents to the /wp-content/plugins/ folder of your WordPress installation.
  • Make sure the folder /wp-content/plugins/rss-combiner/simplepie/cache is writeable by the server.
  • Activate the plugin, and add some input feeds.
  • Check that it’s working by accessing www.mydomain.com/blog/?feed=combined-rss2 in your browser.
  • Finally, you’ll want to link to the new combined feed. (eg: <link rel="alternate" type="application/rss+xml" title="WordPress » Feed" href="http://mydomain.com/blog/rss2.php" />)
  • If you need a file-like URL (parameter-free) for the generated feed, you could optionally add something like this to your WordPress .htaccess file:


    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule rss2.xml ?feed=combined-rss2 [L]
    </IfModule>

    (this should be placed outside of the WordPress block)

DaDaBIK Revised

8. März 2010

DaDaBik is a “Database Interfaces Kreator”, which helps you building web-interfaces to a database easily. It has been developed by Eugenio Tacchini. Since this is a rather old, yet working, piece of software, no wonder there’s a lot of PHP4 involved :O

I did a redesign of the template in late 2009 and took some time this weekend to get it polished up a bit. What I like about DaDaBIK is that you can provide data editing functionality and are able to adjust the look to a clients CI quickly (just replace one logo and change some colours - the PSD is included).

  • Insert data
  • Login
  • Listing

Although the code of DaDaBIK is from another pre-PHP5-decade, I didn’t see much of a need to change the inner workings of DaDaBIK. So what I did is putting some fresh paint on it using CSS. Since there is no template-engine imlemented into DaDaBik, I had to edit core files here and there for simple markup changes. So! The only thing that makes sense is to offer one complete package here: DaDaBik itself and the new design included.

Installation:
If you’re about to use DaDaBIK for the first time, you might want to take a look at www.dadabik.org as well, since there’s a documentation online giving you more insight. Anyways, the setup is quite easy:

  1. Download the archive
  2. Extract the files, and upload the dadabik folder to your server.
  3. Edit the file includes/config.php and enter your DB settings according to your setup.
  4. Open up the URL yourdomain.com/pathtodadabik/install.php.
  5. DaDaBIK will now set up some internal tables and you’re done.
  6. DaDaBIKs default username is root and the password is letizia

Notes:
It’s important that you have created the database, you entered in the config.php file first. (for example using phpmyadmin).
If you want to, you can use a pre-made MySQL table structure with some dummy entries that I have included in the zip: just copy and paste the contents of dadabik-example-db.sql into the SQL window of the new database in phpmyadmin.

Once you’re done with the basic installation, head over to the admin.php which gives you all the admin options you need to include/remove secific tables and set human readable aliases for the tables.

The last step to perfect interfaces is to click the Interface configurator link on that admin page.
The configurator gives you all the options to customize the appearance, set default values, define which fields are mandatory, etc. etc.

Demo:
Check out the demo of DaDaBIK with the new design.
You’ll have to enter username test and password: test@ddbdemo to enter.
(please keep in mind that a lot of features are disabled in the demo, since the test-user doesn’t have admin-rights.)

Download:
DaDaBIK Revised 1.0 (1MB, tar.gz)

Subversion Repository:
There is a Subversion repository in case you want to make use of the open source idea or really want to see some old school PHP4 :O

Changelog:
2010-03-09 initial release of DaDaBIK Revised

Alles so schön Kubrick hier…

25. Januar 2010

Nichts gegen das Standard-Design von WordPress - doch die Entscheidung ist getroffen: ich werde von WordPress auf ein anderes CMS umsteigen. Es kann sich also nur um eine kleine Ewigkeit handeln, bis es hier wieder optisch ansprechend, individuell zugeht. Das CMS der Wahl ist die Enterprise Edition 4 von Weblication. Grund für den Wechsel ist das starre Layoutgerüst von WordPress. Irgendwie zu unflexibel, zu umständlich und obendrein in letzter Zeit sehr gern ein Opfer von Updates. Sprich: Änderungen in WordPress-Versionen und Template-Tags machten bei Updates immerwieder Änderungen erforderlich. Man darf also gespannt sein :)

Nachtrag: Das könnte mich ja schon wieder aufregen: nun hab ich mich doch mal getraut ein “on-the-fly”-Update in WordPress zu machen… mit dem Ergebnis, dass er erstmal brav das Default Theme überschrieben hat. :(