FeedAgg.com Logo
Your Account | Sign In | Sign Up

Add Feed | Search | Home | Help | Contact | Blog

Feed: Webdevelopment at huuah.com - AggScore: 45.6



Summary: Webdevelopment at huuah.com


webdevelopment, cms, php, javascript etc

feuserreg released on TER at typo3.org


Today was the day where I finally released the new extension feuserreg to Typo3 Extension Repository (TER). The extension is developed as an easy, quick and flexible solution to implement Front End User registration on any TYPO3 webpage.

The extension is based on a template, where one can customize the layout and input fields as required for the current solution. Simply add a the set of input fields, that you require. The only rule is, that the name of the field, must reflect the names from the fe_users table.

When this is done, you can enter a list of mandatory fields, that the front end user must fill out. It is furthermore possible to enter a list of options, which will be set for any new user as default. All this is done from the template configuration for your site.

The feuserreg extension is available from TER as of today. At the moment is has been released without any manual. The options can be viewed from the Template Analyzer and from within the HTML template.

feusereg is available from this address: http://typo3.org/extensions/repository/view/feuserreg/current/.

Date Published: Nov 20, 2011 - 1:23 pm



How to make tabs bookmarkable with jQuery


There it was. A web layout with tabs. Everything is loaded when on first page load or when needed. This is great for the user experience and it minimizes the page load time. Super.

Tabs are not good for bookmarking

HOWEVER – the content is not than userfriendly is you would like the users to bookmark the page. When a page is bookmarked you would expect the bookmark would lead you to the same content as when it was bookmarked. So what to do, when a tab is loaded on the fly or if is just a div or something else, being changed from hidden to visible?

Layout:

Tab 1
Tab 2
Tab 3
Tab content 1
Tab content 2
Tab content 3

HTML code:


Tab 1
Tab 2
Tab 3
Tab content 1
Tab content 2
Tab content 3

jQuery tab code:

$(document).ready(function() {

    $(".tab1").click( function() {
        $(".tabs div").removeClass("selectedtab");
        $(this).addClass("selectedtab");
        $(".tabcontent div").hide();
        $(".tabcontent .tab1").show();
        $(".tabcontent .tab1").addClass("selectedtab");
    });
    $(".tab2").click( function() {
        $(".tabs div").removeClass("selectedtab");
        $(this).addClass("selectedtab");
        $(".tabcontent div").hide();
        $(".tabcontent .tab2").show();
        $(".tabcontent .tab2").addClass("selectedtab");
    });
    $(".tab3").click( function() {
        $(".tabs div").removeClass("selectedtab");
        $(this).addClass("selectedtab");
        $(".tabcontent div").hide();
        $(".tabcontent .tab3").show();
        $(".tabcontent .tab3").addClass("selectedtab");
    });

    $(".tabs .tab1").click();
});

I know the layout is ugly. I know the tab function can be done better and smarter. This is not what this post is about.

The example shows one way of making a tab function and this is all nice and great. But it does not allow the user to bookmark the page and expect the page to show to correct tab when returning at a later time.

Tabs that are cool and ready for the archive

This is where we can use the BBQ plugin by Ben Alman (URL: http://benalman.com/projects/jquery-bbq-plugin/).
Download it and include it on your page and you are ready to got. Well. Almost.

Bookmarkable tabs with jQuery and the nice and juicy BBQ plugin:

Tab content 1
Tab content 2
Tab content 3

HTML Code:


Tab content 1
Tab content 2
Tab content 3

As you can see the HTML code is almost the same. Only thing changed is that there is added a link to the tabs. This links add the hash-value to the URL and this is the value we can use. When a user bookmarks the page with a hash-value in the url, all we have to do is read the value and “click” the matching tab.

jQuery code

    $(window).bind( 'hashchange', function(e) {
        var url = $.param.fragment();
        $(".tablayoutbbq .tabs ."+url).click();
    });

    $(window).trigger( 'hashchange' );

The end

There you go. Tabs that can be bookmarked.

Over and out. Comment if you like.

Thanks to Ben Alman for the great BBQ-plugin.

Date Published: Nov 22, 2010 - 1:20 pm



Choose which google to use in Firefox and Internet Explorer


3 Step guide into installing a new Google search engine in your Firefox or Internet Explorer browser.

I am using Firefox as my primary browser for many different reasons. I think it is doing a good job and I like the way it is possible to extent its features by installing new plugins.

However – there is one thing, that has bothered me for a long time now. There is no simple way (as far as I have found) to change which country the internal google search uses. The default is google.com and there is no obvious way of changing this.

The only way I have found to do this, is either by editing some xml configuration files, but this does not seem like “the right way” to do this.

So I decided to make my own search engine thingy and have afterwards made this small tool below for easier updating.

There is 3 steps into installing a new google search engine.

Step 1 – Choose which google engine to install
Step 2 – Install the new search engine in the top search field
Step 3 – Select the new search engine

Step 1:

If you would like to define your own search parameters sent to google, simply copy/paste your search url below:

Step 2:

Go to the google toolbar in your browser (this is tested with Firefox and Internet Explorer) and there will be an option, where it is possible to install the new search engine:
step2googlesearchengine
I’m currently browsing from a Firefox with Danish localization, but it will of course say “Add” or something similiar in the language you are running.

Click the install section and we are ready to go.

Step 3:

The final step is to select the newly installed search engine.
step3googlesearchengine

That’s it

I hope this small tool is usefull to you. Please post a comment below.

Date Published: Nov 19, 2010 - 2:36 pm


jQuery shake / attention plugin


Getting peoples attention is sometimes needed, although it is often quite annoying when other people does it. You know. Shakes things on their webpages. Almost as annoying as webpages with background music.

In some situations it can actually be useful, if the user interface can take it. It’s all up to you.

Shake and attention plugin for jQuery

The shake and attention plugin for jQuery is easy to use and should be available on all selectable elements within jQuery.

This is the first version that gets published, so I would really appreciate all the feedback I can get.

What can it do

It can shake things left and right and right and left.

  $(".shakethisbutton").shake();

Another shake:

    $(".shakethisbutton1").click( function() {
        $(this).shake({
            shake_speed: 70,
            shake_repeats: 10
            });
    });

Yet another shake

    $(".shakethisbutton2").click( function() {
        $(this).shake({
            shake_random_length: 'yes',
            shake_repeats: 10
            });
    });

Options

The complete list of settings for the Shake and Attention jQuery plugin is:

            shake_random_length: 'no',      // should we shake all the way every time or random shakes. 'yes'/'no'
            shake_random_direction: 'no',   // should the direction be left-right-left etc. or random. 'yes'/'no'
            shake_left: 30,                 // how many pixels can we move to the left
            shake_right: 30,                // how many pixels can we move to the right
            shake_speed: 100,               // how fast to shake
            shake_repeats: 1,               // how many repetition
            shake_easing: 'linear'          // 'linear' or 'swing'

Support this

If you like this plugin please post a comment or perhaps make a small PayPal donation to support further development.

alt

Download

Download shake-0.8.js here – download

Something is missing

Please post a comment if you have any comments for this jQuery plugin.

Date Published: Nov 17, 2010 - 1:17 pm


itsplanned.com source code ready for download


The source code for itsplanned.com has been released to github today and is also available as download directly from itsplanned.com.

Itsplanned.com is released under the GPL license and any feedback will be highly appreciated.

Date Published: Sep 04, 2010 - 4:55 pm


itsplanned.com just launched


The new project management tool itsplanned.com has been launched today.

Itsplanned.com

Itsplanned.com is created as an alternative to the more advanced project management tools that already exists. It is built based on the goal that it should be very easy to use, with a simple set of functions that quickly gives the user a clear and clean view of the tasks that are planned.

Own tasks

Itsplanned.com gives the use a set of tool, where the users can create there own tasks or project, that they need to track. When the tasks are created, the user can sort and change priority of the tasks, simply by drag’n'drop the tasks up and down in the task overview.

Groups and moves

Tasks can also be moved into another task, where it will be a subtask. Itsplanned.com opens for the possibility, where every single tasks easily is movable among the other tasks.

Overview and userability

The overview can quickly be changed from listing a task summary to be listing a more detailed output. The overview can both display or hide closed and finished tasks, by selecting a checkbox.

Task descriptions are changed with the user friendly built-in HTML (WYSIWYG) editor.

When the first real-world tests have been completed, the source-code will be released to download.

More details and screenshots can be found at itsplanned.com

Date Published: Aug 24, 2010 - 3:28 pm


Autofs and NFS on Ubuntu 10.04


I’ve been messing around with some weird behavior on the Ubuntu 10.04 while setting up Autofs to auto mount some NFS shares from a remote server.

My setup

Server:
Debian Lenny (IP 192.168.1.123)
Standard NFS-server
A simple export setup (1 share) /mnt/storage

Client:
Ubuntu 10.04
Autofs 5.0.4-3.1ubuntu5
Autofs5 5.0.4-3.1ubuntu5

Autofs configuration

The first problem is this:

syntax error in nsswitch config near [ syntax error ]

This error message appears in my message log file on my client after installing Autofs. No configuration has yet been changed. So this is by default not working.
There are, as far as I have tested, two workarounds:
1: outcomment the line with ‘+auto.master’ at the bottom of the /etc/auto.master
2: insert a line with ‘automount:files’ in the /etc/nsswitch.conf

Now – restart autofs and verify that the error message is gone:

#sudo service autofs restart

The Autofs setup step 1

Edit /etc/auto.master and add a line like this:

/media/nfsshares /etc/auto.nfs

This will tell autofs to create a folder named nfsshares inside the /media/ folder and that there are further configuration entries in the file /etc/auto.nfs

The Autofs setup step 2

Create a file called auto.nfs in the /etc/ folder and edit it with your favorite editor:

# vim /etc/auto.nfs

Enter one or more shares like this:

myservershare 192.168.1.123:/mnt/storage

Save the file and we are done.

Starting and testing Autofs

All options are now created, so lets (re)start Autofs and move on:

# service autofs restart

The Autofs is now running and we should see a newly created folder inside your /media directory:

# cd /media

# ls -al
...
drwxr-xr-x  3 root root     0 2010-07-15 21:22 nfsshares
...

Try to change directory to the nfsshares folder:

# cd nfsshares

# ls -al

What the …. It’s empty. Where is the myservershare folder? Don’t worry, just try and cd’e into the folder:

# cd myservershare

Well well well. The directory is now accessible and visible.

If you would like the directory structure to be visible at all times – even at first entry – add the ghost parameter to the auto.master like this:

/media/nfsshares /etc/auto.nfs --ghost

The Autofs is now up and running.

Date Published: Jul 15, 2010 - 1:38 pm


Restore Debian / (root) from backup and boot it.


A failing hard drive is something everybody fears. Are all data lost forever or can they be restored from a backup? Hopefully the latter.

I have a setup, where I with the dump/restore utilities on my Debian box are running a set of scheduled backup jobs. To make it short, I use the dump utility to backup the different mount points on my system.

How to backup with dump

To backup the root (/) partition I run a command like this:

dump -0 -u -f - / | gzip > /mnt/backup/root-gziped.gz

This runs the dump utility with a set of options (please referrer to the man page for further options). -0 means a level 0 backup, -u updated a log file with the date of the last update and -f outputs everything to standard output. Afterwards the gzip command will pack the dump data and store it in a file.
This is the way I do it. Feel free to use other options.

alt
alt
alt
alt
alt

How to restore a backup made with dump

If your hard drive is failing or perhaps running low on disk space and you need to upgrade it, one way is to do it by restoring from a backup.

What you need, is some kind of running Unix system where you can access the new hard drive and you also need access to the backup file. I have plugged my new drive in another Unix machine as a secondary drive. In this case I am using an Ubuntu 10.4 workstation, where I have installed the dump utility.

Partitioning the new hard drive

To get access to the new drive we need to partition it first. I am using the GParted program in my Ubuntu and have created a partition layout like this:
GParted
NB. This screenshot shows disk usage, because the screenshot it taken after a successful restore.

Mounting the new layout

Before we can start the restore, we need to mount the new partition. This is done from the console (terminal) like this:

#mkdir /media/root

#mount /dev/sdb1 /media/root

NB. Please note that I am using sdb (and not sda like the screenshot above shows). This is because the hard drive is not the system drive yet.

The hard drive is now mounted in the /media/root directory and we can begin the restore.

Restoring data

I am using the restore command with the interactive shell to select the files and directories that I need to restore.

# gunzip root-gziped.tar.gz  | restore -ivf -
Verify tape and initialize maps
Input is from a local file/pipe
Input block size is 32
Dump   date: Thu Jul  8 21:35:37 2010
Dumped from: the epoch
Level 0 dump of / on myserver.mynetwork.com:/dev/sda1
Label: none
Extract directories from tape
Initialize symbol table.
restore >

At the prompt it is possible to browse the media with the normally used ‘cd’ and ‘ls’ commands. When we have found what we need we can go ahead a add it to the queue. To help the restore utility getting the folder permissions correct I usually runs the command setmodes as the first thing.

restore > setmodes
Set directory mode, owner, and times.
restore > add boot
restore > add bin
...
...
restore > extract

The ‘add’ command adds folders or files to the queue and the extract command will start the restoring process.

When this is finished you will be asked if you want to set folder permissions on ‘.’. Answer Yes here.

...
Add links
Set directory mode, owner, and times.
set owner/mode for '.'? [yn] y
restore >

This is it. The files are now restored and the hard drive is almost ready to begin its new life.

alt
alt
alt
alt
alt

Installing grub boot loader

Before the disk can boot up and start the operating system, it needs to have a boot manager. My previously system was using Grub, so I will just reinstall this on the new drive. For this job, we can use an Ubuntu Live cd-rom and boot this.

When this is done and the Ubuntu Live version has booted we need to get access to the new drive (now known as /dev/sda).

Open up a terminal window and enter:

#mkdir /mnt/root

#sudo mount /dev/sda1 /mnt/root

#sudo chroot /mnt/root /bin/bash

#grub-install /dev/sda

These commands will create a mount point, mount the new drive, get root access to the new content and install a grub boot loader on the new.

Power off the machine, pull out the hard drive and install it in the old server again.

Date Published: Jul 15, 2010 - 8:33 am


Debian NFS server – Ubuntu NFS client


NFS is a great way to share and get access to files across a network. The NFS system gives the option to mount a NFS from an external system and a local mount point on your locale system.

To get this working, you need two systems – a server and a client.

Installing the NFS Server

I have en Debian server running, where I would like easy access to some of the folders from my workstation. To do this, I will install the nfs-kernel-server and the portmap packages like this:

# aptitute install nfs-kernel-server portmap

The NFS server and the portmap service is now installed and up and running.

Which folders to share

To defined which folder we want to share and to which client, we have to take a look at the /etc/exports file. So open /etc/exports in you favorite editor and insert a line like this:

/home/js 192.168.1.2(rw)

This tells the NFS service, that I want to share my home folder /home/js to the client at IP 192.168.1.2 with read-write (rw) access.

To reload the defined exports I have to run the exportfs command like this:

# exportfs -a

That’s it – we done here

alt
alt
alt
alt
alt

Access the NFS share from an Ubuntu Client

I am using Ubuntu 10.4 as my primary workstation, so I would like to access my home folder on my server. To do this, I have to install the nfs-common package, so I will select my System menu, goto Administration and click on Synaptic Package Manager. Here I will find the nfs-common package and install it as shown here:
nfs-commoninsynapticpackagemanager

All that’s left is to mount the share. I will just enter the share to my fstab file and it will then be ready to mount (and automatically mounted on the startup). Again – use your favorite editor to add a line to the /etc/fstab:

192.168.1.1:/home/js /media/serverhome   nfs rw 0 0

This will let the system mount the /home/js share located on the server with the IP 192.168.1.1, into the local folder /media/serverhome with read-write (rw) access.

When this is done, we must create the folder /media/serverhome on the locale machine and then, either reboot the system or manually mount the share like this:

# mount /media/serverhome

And we are done.

Date Published: Jul 12, 2010 - 12:50 pm


Installing OpenQRM on Debian 5.0


The OpenQRM installation is quite difficult if you ask me. I have tried installing on both Debian and Ubuntu with the precompiled .deb packages and directly from the Debian and Ubuntu repository. Everything seems to fail in one way or the other. But I finally got it working and here is how I did it.

Installing a fresh Debian 5.0

I am using Virtual Box on my Ubuntu Workstation. This gives me the option to install the OpenQRM in a closed internal network, without having access to new hardware.

To start with I am doing a fresh installation of Debian 5.05 without any additions. No server software, no desktop software, nothing. Just like this:
DebianInstallation

Installing the basic packages for building the OpenQRM source

Now I have the most basic Debian installation. The OpenQRM will be installed from the svn repository, so I have to install the subversion and make programs. I will also install the mysql-server-5.0 and postfix manually before starting, as it seems something gets messed up if the OpenQRM installation handles these two:

root@openqrm:~# aptitude install subversion make postfix mysql-server-5.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done
The following NEW packages will be installed:
  bsd-mailx{a} ca-certificates{a} file{a} libapr1{a} libaprutil1{a} libdb4.5{a} libdbd-mysql-perl{a} libdbi-perl{a}
  libexpat1{a} libhtml-template-perl{a} libldap-2.4-2{a} liblockfile1{a} libmagic1{a} libmysqlclient15off{a}
  libneon27-gnutls{a} libnet-daemon-perl{a} libplrpc-perl{a} libpq5{a} libserf-0-0{a} libsqlite3-0{a} libsvn1{a}
  libterm-readkey-perl{a} libxml2{a} mailx{a} make mime-support{a} mysql-client-5.0{a} mysql-common{a}
  mysql-server-5.0 openssl{a} openssl-blacklist{a} perl{a} perl-modules{a} postfix psmisc{a} python{a}
  python-minimal{a} python2.5{a} python2.5-minimal{a} sgml-base{a} ssl-cert{a} subversion xml-core{a}
0 packages upgraded, 43 newly installed, 0 to remove and 0 not upgraded.
Need to get 64,1MB of archives. After unpacking 189MB will be used.
Do you want to continue? [Y/n/?] Y

During the installation of mysql-server-5.0 you will be asked to type in a MySQL root user password. I am entering ‘openqrm’ – you can choose whatever you like, as long as you can remember it later on.
The postfix packages will ask how to deliver mail from the system. This depends on your setup, but I will select the “Internet Site” option, so that the server can delivery mail directly on the internet.

Download OpenQRM from the svn repository

When this is done, the next step is the fetch the newest version from the svn repository:

root@openqrm:~# svn co https://openqrm.svn.sourceforge.net/svnroot/openqrm openqrm
...
Checked out revision 1998.

This can take a few minutes and it finishes by displaying which revision I have checked out.

Compiling the OpenQRM source

Next step is to change to the src-folder and start the code compiling by running the ‘make’ command:

openqrm:~# cd openqrm/trunk/src/
openqrm:~/openqrm/trunk/src# make
...
...

This will download and install all the needed Debian packages by itself.

Installing the OpenQRM source

To install the OpenQRM software run the ‘make install’ command, when the previously ‘make’ command has finished:

openqrm:~/openqrm/trunk/src# make install

This will copy all files to the correct positions on the system.

OpenQRM system scripts

The final installation step is to run the ‘start’ command, which activates all startup scripts and installs the last required system software:

openqrm:~/openqrm/trunk/src# make start
...

Accessing the Web interface

All software has now been installed and the final step is to prepare the MySQL-database.

This is done by accessing the OpenQRM website. My server has the IP address 192.168.1.26, so I will point my browser at http://192.168.1.26/openqrm/ and type in ‘openqrm’ in the username and password prompt.

Step 1

I am clicking ‘next’:
OpenQRMStep1

Step 2

I am selecting the MySQL option:
OpenQRMStep2

Step 3

Now enter the password for the MySQL root user and click ‘Initialyze’
OpenQRMStep3

All done

The OpenQRM should now be installed without any errors:
OpenQRMStep4

The browser will now redirect to the main screen and we are ready to go.

Date Published: Jul 11, 2010 - 3:37 am


 
Visitor Rating: 5 (1) (Rate)

Story Clicks: 0

Feed Views: 32

Lenses (Add|?)

Comments (Log in to add)

Feed Details
Date Added: 01/15/2011
Date Approved: 01/15/2011
By: Anonymous
Search FeedAgg.com




3600 sp1520 serv 5.5302 seconds to generate.