running Tomato in client bridge mode

Posted in Tomato by shanDB on May 2, 2011

Log into the tomato interface and navigate to Basic > Network

Change the client routers IP address to a value within the primary router’s subnet. In my case I set it to 192.168.1.50 (the primary routers subnet was 192.168.1.2 to 192.168.1.51

Hit the save button.

Now, enable wireless and change the wireless mode to wireless ethernet bridge.

Type in the ssid of the primary router and match the security logins.

Hit save.

Disable and re-enable the client computers ethernet adaptor. In windows 7 I did this manually by clicking control panel > system > device manager > network adaptors > (my ethernet adaptor) disabling it, then re-enabling it

Installing XBMC on Acer Aspire Revo 3700 (Part 2)

Posted in XBMC by shanDB on January 30, 2011

This tutorial follows on from an earlier tutorial that can be found HERE.
To get Wifi working, follow this procedure:

  • Once XBMC has been installed, boot in and switch to the terminal by pressing CNTRL ALT F2
  • Install wpasupplicant by typing:
    sudo apt-get install wireless-tools wpasupplicant
  • Install the driver for the RT3090:
    sudo apt-get install python-software-properties
    sudo add-apt-repository ppa:markus-tisoft/rt3090
    sudo apt-get update
    sudo apt-get install rt3090-dkms
  • Install wicd-curses (This will manage your newtork connections)
    sudo apt-get install wicd-curses

    Reboot by typing sudo su the reboot now. Once the computer has booted, type wicd-curses

  • You will notice that during the installation you will get an error: starting network connection manager wicd failed.

  • Now encrypt your network passkey with the following:
    wpa_passphrase your_essid your_ascii_key

    * replace the information with your own login details. For instance, my network (or essid) is called homenet, and my wpa passkey is monkey. So I would have typed in the following:

    wpa_passphrase homenet monkey

    The result should be something similar to the following:

    network={
    ssid="homenet"
    #psk="monkey"
    psk=ffe1b80746215def132a6afa2f192c90f5bed672b5793f17362086a7624ebe9d
    }

    Notice the last line. This is your passkey displayed in a hex value. You will need to write this down.

  • Now we have the network and key encrypted we can start adding this information to the interfaces configuration file:
    sudo pico /etc/network/interfaces
  • Add the following lines of code, the wpa-psk line should match the result from wpa_passphrase:
    auto wlan0
    iface wlan0 inet dhcp
    wpa-ssid Wireless Home
    wpa-ap-scan 1
    wpa-proto WPA #RSN
    wpa-pairwise TKIP #CCMP
    wpa-group TKIP #CCMP
    wpa-key-mgmt WPA-PSK
    wpa-psk ffe1b80746215def132a6afa2f192c90f5bed672b5793f17362086a7624ebe9d

    Hit CNTRL X to save this information.
  • Now we should restart the networking services:
    sudo /etc/init.d/networking restart

    By typing ifconfig we can validate that we’re connected to the network.

  • Handy terminal commands

    Posted in Ubuntu by shanDB on January 27, 2011

    sudo su
    Exectues commands as super user.
    reboot now
    Reboots the computer
    iwconfig
    Detects network extensions
    sudo iwlist scan
    Scans for networks

    Installing XBMC on Acer Aspire Revo 3700 (Part 1)

    Posted in XBMC by shanDB on January 27, 2011

    Here are the steps I have used to install XBMClive. At the time of writing, all these steps have worked for me.

  • Download the latest build of XBMC. I have used the standard Dharma version 10.0 which can be found here.
  • Because the Revo 3700 doesn’t have a CD rom drive, To install XBMC we need to create a bootable thumb drive. While many people use Unetbootin for this, it is unsuitable for the Revo as during the installation Unitbootin will ask for a CD-Rom. So instead, we will use Linux Live USB Creator. At the time of writing this, I used the 2.7 Beta which has support for XBMC, and installed XBMC without any problems.
  • Plug your tumb drive in, Install and run Linux Live USB Creator, selecting XBMCLive as the source. This will take a little while.
  • Now plug your thumb drive into the Revo, and boot it up. The revo will automatically start the install procedure for XBMC. At one stage it will ask for you to set a user name and password – This is required later when we need to configure the Revo’s Wi-fi connection through the terminal. So make a note of that password!
  • The installation is a fairly easy procedure. Once it has finished, remove the thumb drive and restart the revo. It will require you to enter that password on your first boot – But don’t worry, it won’t require it again unless you wish to access the terminal.
  • All done! The next tutorial (Which I am still yet to write) will explain how to get your wi-fi connection up and running.

    In part 2, we will connect the Revo to a wifi network.

    VIRTUEMART: Replace “update” & “delete” buttons in shopping cart

    Posted in Joomla by shanDB on January 12, 2011

    To replace the images used for “Update” and “Delete” with a text button:

    Find the file: administrator/components/com_virtuemart/html/basket.php

    Look for the line:
    _('PHPSHOP_CART_UPDATE') .'" src="'. VM_THEMEURL .'images/update_quantity_cart.png" border="0" alt="'. $VM_LANG->_('PHPSHOP_UPDATE') .'" align="absmiddle" />
    and replace with:
    _('PHPSHOP_CART_UPDATE') .'" />

    .htaccess redirecting to a new domain

    Posted in Uncategorized by shanDB on December 7, 2010

    Redirect Old domain to New domain (htaccess redirect)

    Create a .htaccess file with the below code, it will ensure that all your directories and pages of your old domain will get correctly redirected to your new domain.
    The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)

    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

    Please REPLACE www.newdomain.com in the above code with your actual domain name.

    In addition to the redirect I would suggest that you contact every backlinking site to modify their backlink to point to your new website.

    Note* This .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.

    VIRTUEMART: Modifying the Quantity options on product flypages.

    Posted in Joomla by shanDB on November 25, 2010

    To change things such as the text “Qantity” to “Qty”:

    Options for the variable pricing drop down menu can be found at:

    components/com_virtuemart/themes/default/template/productdetails/includes/addtocart_advanced_attribute.tpl.php

    Options for the quantity / Add to cart button can be found at

    components/com_virtuemart/themes/default/template/productdetails/includes/quantity_box_general.tpl.php

    Centering a horizontal un-ordered list

    Posted in HTML / CSS by shanDB on October 18, 2010

    This is a great example of how to center a horizontally displayed list without using tables. It’s a great way to do footer menu’s.
    In this example, the UL is contained in a div container with the class “footerMenu”

    .footerMenu {
    float:left;
    width:100%;
    overflow:hidden;
    position:relative;
    }
    .footerMenu ul {
    clear:left;
    float:left;
    list-style:none;
    margin:0;
    padding:0;
    position:relative;
    left:50%;
    text-align:center;
    }
    .footerMenu li {
    border-left:#FFF 1px solid;
    float:left;
    list-style:none;
    position:relative;
    right:50%;
    padding: 0 10px;
    }
    .footerMenu li a {
    color:#fff;
    text-decoration:none;
    }
    .footerMenu li a:hover, .footerMenu li a:active, .footerMenu li a:focus {
    color: #fff;
    text-decoration:underline;
    }
    .footerMenu ul :first-child {
    border-left: 0;
    padding-left: 0;
    }

    IE Reset CSS

    Posted in HTML / CSS by shanDB on October 6, 2010

    /* Reset CSS */
    html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font-size: 100%;
    vertical-align: baseline;
    background: transparent;
    }
    ol, ul {
    list-style: none;
    }
    blockquote, q {
    quotes: none;
    }
    blockquote:before, blockquote:after, q:before, q:after {
    content: ”;
    content: none;
    }
    :focus {
    outline: 0;
    }
    ins {
    text-decoration: none;
    }
    del {
    text-decoration: line-through;
    }
    .clear {
    clear: both;
    line-height: 0;
    font-size: 0;
    }

    Conditional Statements

    Posted in Joomla, PHP, Wordpress by shanDB on September 28, 2010

    With this example for Joomla, I want to have a condition for every page except the front page:

    To make this apply for Search results (for instance, you might not want a module position displayed when the search results are displayed), just modify the code so: (‘view’)!=’search’

    also – make sure to add style=”xhtml” – this ensure that module headings are wrapped in a h3 tag.

    With this example for WordPress, I want to give the frontpage it’s own unique body class:

    Follow

    Get every new post delivered to your Inbox.