WordPress: Allowing contributors to upload media

  This is the simplest way I found to allow for contributors to upload media on your WordPress blog:   Add this to the functions.php file in your current theme:       if ( current_user_can('contributor') && !current_user_can('upload_files') ) add_action('admin_init', 'allow_contributor_uploads');   function allow_contributor_uploads() { $contributor = get_role('contributor'); $contributor->add_cap('upload_files'); }… Continue reading

Intranet: setup DJBDNS to respond for *.local to help development

  0. Follow instructions to setup a DNS Cache   1. Create an alias for eth0: # nano /etc/network/interfaces auto eth0:0 iface eth0:0 inet static address netmask network broadcast gateway 2 . restart networking # /etc/init.d/networking restart   3. Use tinydns-conf to setup djbdns  #… Continue reading

Code:: css-message-box

I just started a Google Code hosted project since I’m always in need of pretty message boxes for my HTML things. Let me know if you want/can contribute to it. It’s currently licensed under GPL 2.0 Here’s the address: http://code.google.com/p/css-message-box/   Why: This seems to have been dead for a… Continue reading

Installing DropBox on Slackware 13.1 64-bit

Before you start, let's make sure you have gnome docutils installed: Get the package: http://www.linuxfromscratch.org/blfs/view/cvs/gnome/gnome-doc-utils.html Install GNOME Doc Utils (this part is borrowed from LinuxFromScratch book) ./configure –prefix=$(pkg-config –variable=prefix ORBit-2.0) –mandir=$(pkg-config –variable=prefix ORBit-2.0)/share/man make Test it make check and then install as root: make install switch to Dropbox installation folder… Continue reading

LAMP: Installing on Slackware 13.37 64-bit

Ongoing post:   1. Download Apache ( http://httpd.apache.org ) tar -xvjf httpd-2.2.21.tar.bz2 cd httpd-2.2.21 I like Slackware, but I also like the Apache layout installed in Debian distributions, so: ./configure –enable-layout=Debian–enable-module=most –enable-mods-shared=most –enable-ssl=shared make make install 2. PostgreSQL ./configure –with-perl –with-openssl gmake all gmake install     PHP ./configure –with-pgsql… Continue reading

Kohana 3.2 tutorial : 2 – Setting up and basic Redirect controller

1. Edit bootstrap.php under “application”: —————————— date_default_timezone_set(‘America/Los_Angeles’); Kohana::init(array( ‘base_url’ => ‘/’, ‘index_file’ => ”, )); ——————– 2. Change the default route to a redirect controller (so we can deal with redirections for misplaced content/old content): Route::set(‘default’, ‘(<request>)’, array( ‘request’ => ‘(.*)’, )) ->defaults(array( ‘controller’ => ‘redirect’, ‘action’ => ‘index’, ));… Continue reading

Kohana 3.2 tutorial : 1 – Installation

1. Go to kohana’s website   http://kohanaframework.org/   2. Download latest stable   $ wget http://dev.kohanaframework.org/attachments/download/1670/kohana-3.2.0.zip –11:08:44– http://dev.kohanaframework.org/attachments/download/1670/kohana-3.2.0.zip => `kohana-3.2.0.zip’ Resolving dev.kohanaframework.org…, Connecting to dev.kohanaframework.org[]:80… connected. HTTP request sent, awaiting response… 200 OK Length: 1,043,281 [application/zip] 100%[==============================================================================================================================================================>] 1,043,281 1.53M/s 11:08:45 (1.53 MB/s) – `kohana-3.2.0.zip’ saved [1043281/1043281] 3. Uncompress… Continue reading