Friday, October 17, 2008

how to create professional website with typo3 in 1 day

Phase 1:-

->After installing typo3 in ubuntu,go to extension manager and go to import extensions and upload extension file templavoila_1.3.7.t3x.
->Create folder templates in fileadmin folder and paste your template in this folder.
->Click templavoila and start wizard now!
->Choose template file index.html.
->Write the name of the site and username for the site.
->Start the mapping process.
->Go to mapping and map content area,main menu and sub menu if any.
->Click on save and return.
->Click on select html header parts.
->Click header parts and click on save and return.
->Click on write main menu typoscript code and sub menu typoscript code and click on finish wizard!

Phase 2:-

->Click on user settings and click the edit and advanced functions tab and click the recursive delete and save the configuration.
->Click on page and delete all main menus of default.
->Click on templavoila and click the /site/storage folder/.
->Click on update mapping.
->Click on information and click on modify DS/TO/
->Add new fields.
->Write the name of the new field,the parameters are mapping type=element and title=field title and editing type=content element and click on add.
->Map the new field and set it.
->Click on save as.
->Update existing data structure and template object.
->Same for other fields.

Phase 3:-

->For multilanguage site click on page and click the main page file copy the file and paste after.
->Unhide the file.

If the rich text editor takes time to load then import extension htmlRteopenoffice skin and then install it then uninstall it.

Monday, October 13, 2008

Typoscript code

## Menu [Begin]
lib.mainMenu = HMENU
lib.mainMenu.entryLevel = 0
lib.mainMenu.language =fr
lib.mainMenu.wrap =
    |

lib.mainMenu.1 = TMENU
lib.mainMenu.1.NO {
allWrap =
  • |
  • }

    lib.mainMenu.1.ACT = 1
    lib.mainMenu.1.ACT {
    allWrap =
  • |
  • }
    ## Menu [End]

    lib.subMenu = HMENU
    lib.subMenu.entryLevel = 1
    lib.subMenu.wrap =
      |

    lib.subMenu.1 = TMENU
    lib.subMenu.1.NO {
    allWrap =
  • |
  • }

    lib.subMenu.1.ACT = 1
    lib.subMenu.1.ACT {
    allWrap =
  • |
  • }



    config.spamProtectEmailAddresses = 1

    page = PAGE
    page.typeNum = 0
    page.10 = USER
    page.10.userFunc = tx_templavoila_pi1->main_page
    }




    Localization:

    config{
    linkVars = L
    sys_language_mode = content_fallback
    sys_language_overlay = hideNonTranslated


    }
    config.sys_language_uid = 0


    config.language = en

    [globalVar = GP:L=20]

    config{
    sys_language_uid = 15
    language = fr
    locale_all = fr_FR




    }
    page.10{
    styles.content.get = CONTENT
    styles.content.get {
    table = tt_content
    select.orderBy = sorting
    select.where = colPos=0
    select.languageField = sys_language_uid


    }


    [global]

    Saturday, October 11, 2008

    my view

    "Don't think anything visually"
    "Forget everything in 60 seconds"

    "The whole cumbersome things happens in the mind - so don't get afraid"


    ->the above things are not to think but to exist in daily life"

    Monday, September 29, 2008

    How to install typo3 in ubuntu

    ->Go to sourceforge.net
    ->Download the source and dummy packages of typo3
    source package:-typo3_src-4.2.1.tar.gz
    dummy package:-dummy-4.2.1.tar.gz
    ->Extract the files to the desktop
    ->Copy the files to /var/www/cms
    ->Apply all permissions to the folders
    sudo chmod 777 -R -v /var/www/cms/*
    ->Make a database typo3 in phpmyadmin
    ->Open http://localhost/cms
    ->Follow the steps

    How to install caldev server in ubuntu

    >>>>>>>>>>>>>process to install caldev server in ubuntu>>>>>>>>>>>>

    a>Open terminal.
    b>sudo gedit /etc/apt/sources.list.
    c>Add (deb http://debian.mcmillan.net.nz/debian unstable awm ) to the end of the line.
    d>Save and close gedit.
    e>sudo apt-key advanced --keyserver subkeys.pgp.net --recv-keys CCA377BD77494424B0DB674F8C90347F8F068012
    f>sudo apt-get update


    sudo apt-get install libawl-php
    sudo apt-get install rscds
    g>Install postgresql in ubuntu

    $ sudo apt-get install postgresql postgresql-client postgresql-contrib
    $ sudo apt-get install pgadmin3

    h>Reset the password for the ‘postgres’ admin account for the server, so we can use this for all of the system administration tasks. Type the following at the command-line (substitute in the password you want to use for your administrator account):

    $ sudo su postgres -c psql template1
    template1=# ALTER USER postgres WITH PASSWORD 'password';
    template1=# \q

    That alters the password for within the database, now we need to do the same for the unix user ‘postgres’:

    $ sudo passwd -d postgres
    $ sudo su postgres -c passwd

    Now enter the same password that you used previously.

    i>Then, from here on in we can use both pgAdmin and command-line access (as the postgres user) to run the database server. But before you jump into pgAdmin we should set-up the PostgreSQL admin pack that enables better logging and monitoring within pgAdmin. Run the following at the command-line:

    $ sudo su postgres -c psql < /usr/share/postgresql/8.3/contrib/adminpack.sql j>Finally, we need to open up the server so that we can access and use it remotely - unless you only want to access the database on the local machine. To do this, first, we need to edit the postgresql.conf file:

    $ sudo gedit /etc/postgresql/8.3/main/postgresql.conf

    Now, to edit a couple of lines in the ‘Connections and Authentication’ section…

    Change the line:

    #listen_addresses = 'localhost'

    listen_addresses=localhost

    and also change the line:

    #password_encryption = on

    to

    password_encryption = on

    Then save the file and close gedit.

    Now for the final step, we must define who can access the server. This is all done using the pg_hba.conf file.

    $ sudo gedit /etc/postgresql/8.3/main/pg_hba.conf

    Comment out, or delete the current contents of the file, then add this text to the bottom of the file:

    # DO NOT DISABLE!
    # If you change this first entry you will need to make sure that the
    # database
    # super user can access the database using some other method.
    # Noninteractive
    # access to all databases is required during automatic maintenance
    # (autovacuum, daily cronjob, replication, and similar tasks).
    #
    # Database administrative login by UNIX sockets
    local all postgres ident sameuser
    # TYPE DATABASE USER CIDR-ADDRESS METHOD

    # "local" is for Unix domain socket connections only
    local all all md5
    # IPv4 local connections:
    host all all 127.0.0.1/32 md5
    # IPv6 local connections:
    host all all ::1/128 md5

    # Connections for all PCs on the subnet
    #
    # TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
    host all all localhost 255.255.255.0 md5

    That’s it, now all you have to do is restart the server:

    $ sudo /etc/init.d/postgresql-8.3 restart

    And all should be working.


    j>install Apache, PHP and finally MySQL.

    k> Database Stuff

    Once all the package installations are done you start by making the DAViCal database in PostgreSQL. To this purpose you create 2 functional accounts in postgreSQL. Assuming you have root or sudo rights;

    >sudo su
    >su postgres -c "createuser davical_app"

    You will get asked about superusers, roles and databases, but "just say NO" to all questions, this functional ID needs only minimum rights. Repeat the process to create one more user, "davical_dba".

    l>Once these 2 functional IDs are created go to "/etc/postgresql/8.1/main/" and open the file pg_hba.conf with an editor of choice. (You may want to back up the file before editing, just in case.) Add the following 3 lines near or at the top;

    local all all trust
    local davical davical_dba trust
    local davical davical_app trust

    Then restart your postgreSQL server by;

    >/etc/init.d/postgresql-8.1 restart

    Now you can run the script to create the DAViCal database. This is done as follows;

    >su postgres -c /usr/share/rscds/dba/create-database.sh

    (previously I had ">su postgres -c /usr/share/davical/dba/create-database.sh" but that was a
    mistake due to me doing a cut'n'paste from an older document. Someone was kind enough to
    point that out in an edit.)

    i>Once the creation script has run correctly, go back to the pg_hba.conf file and remove the line

    local all all trust


    m>restart the database daemon. (This step is not strictly necessary for the installation, but do you really want just anybody with a local account free access to all the databases? Thought not.)

    If you want to test that your database creation was successful,

    >sudo su
    >su postgres
    >psql davical
    davical=# \z

    You should see about 30 tables all with some sort of access permission to "davical_dba". (Type "\q" to exit pqsl)

    n>

    cd /var/www
    sudo mkdir cal

    sudo ln -s /usr/share/rscds/htdocs/ cal/




    sudo /etc/init.d/apache2 restart


    Next step is to actually configure DAViCal. Go to "/etc/davical/". Currently it should be an empty directory. Create a configuration file with the naming convention localhost-conf.php,
    The content of the configuration file should be as follows;

    domain_name = "localhost";
    // $c->sysabbr = 'rscds';
    $c->admin_email = 'admin@example.net';
    $c->system_name = "Really Simple CalDAV Store";
    // $c->collections_always_exist = true;
    // $c->enable_row_linking = true;
    $c->default_locale = en_US.UTF-8;
    $c->pg_connect[] = 'dbname=davical port=5432 user=davical_app';
    ?>



    Creating a symbolic link to localhost-conf.php helps when you want to test or administer the installation from the server locally.

    cd /etc/rscds/
    ln -s localhost-conf.php localhost-conf.php


    cd /usr/share/rscds/inc
    ln -s /usr/share/awl/inc/* .


    1. In a browser go to "http://localhost/cal/".
    2. You will find a login screen.
    3. Enter "admin" for username.
    4. Enter the password obtained after running the database creation script.

    Congratulations! You should now find yourself in the administration screen, with the ability to create new users.


    If you forgot the Admin Password

    If at this point you are saying, "d*mn, where is that admin password I wrote down...", no sweat. Do the following;

    >sudo su
    >su postgres
    >psql davical -c 'select username, password from usr;'

    Only the initial "admin" password is stored in plain text. All subsequent users have their password stored in an encrypted state. If you change the admin password through the web interface it will also be encrypted from that point forward.



    give me the half share of the money after the installation.

    Friday, June 27, 2008

    how to backup ubuntu os

    I have two hard disks one running ubuntu Os and the other is empty unformatted partition.I had to backup the ubuntu Os to the unformatted hard disk. I did the following steps.
    ->I installed gparted. I formatted the unformatted partition /dev/sdb with ext3
    filesystem.
    ->It created the partition table sdb1.
    ->I then mounted that partition to /mnt/backupdrive/backup
    ->I installed sbackup from apt-get
    sudo apt-get install sbackup.
    ->I then used it to backup my ubuntu Os to sdb1

    Tuesday, June 17, 2008

    how to setup lamp in ubuntu

    This guide is divided into 3 steps: installing/tesing Apache, PHP and finally MySQL.
    Lets start with Apache:
    1. Open the terminal (we will be using it through most of my guide) from Applications > Accessories > Terminal
    2. Install apache2 using apt-get by typing the following
    sudo apt-get install apache2
    Note that you should know the root password.
    Now everything should be downloaded and installed automatically.
    To start/stop apache2 write:
    sudo /etc/init.d/apache2 start
    sudo /etc/init.d/apache2 stop
    Your www folder should be in: /var/www/
    If everything is OK you should see an ordinary HTML page when you type: http://localhost in your firefox browser
    Finished with Apache ? lets conquer PHP:
    1. Also in terminal write:
    sudo apt-get install php5 libapache2-mod-php5
    or any php version you like
    2. restart apache
    sudo /etc/init.d/apache2 restart
    This is it for PHP D
    Wanna test it ? Just create an ordinary PHP page in /var/www/ and run it.
    Example:
    sudo gedit /var/www/test.php
    and write in it: < ?php echo “Hello World”; ?>
    Now run it by typing http://localhost/test.php in firefox… You should see your ” Hello World ”
    66 % is over, lets continue to installing MySQL:
    1. Again and again in terminal execute:
    sudo apt-get install mysql-server
    2. (optional) If you are running a server you should probably bind your address by editing bind-address in /etc/mysql/my.cnf and replacing its value (127.0.0.1) by your IP address
    3. set your root password (although mysql should ask you about that when installing)
    mysql> SET PASSWORD FOR ‘root’@’localhost’ = PASSWORD(’xxxxxx’);
    4. Try running it
    mysql -uroot -pxxx
    where xxx is your password.
    Note: You can install PHPMyAdmin for a graphical user interface of MySQL by executing
    sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
    5. restart apache for the last time
    sudo /etc/init.d/apache2 restart
    Congratulions your LAMP system is installed and running D
    Happy Coding
    UPDATE:
    Due to the large number of people emailing about installing/running phpmyadmin.
    Do the following:
    sudo apt-get install phpmyadmin
    The phpmyadmin configuration file will be installed in: /etc/phpmyadmin
    Now you will have to edit the apache config file by typing
    sudo vi /etc/apache2/apache2.conf
    and include the following line:
    Include /etc/phpmyadmin/apache.conf
    Restart Apache
    sudo /etc/init.d/apache2 restart
    Another issue was making mysql run with php5
    First install these packages:
    sudo apt-get install php5-mysql mysql-client
    then edit php.ini and add to it this line : ” extensions=mysql.so” if it isnt already there
    sudo vi /etc/php5/apache2/php.ini
    Restart Apache
    sudo /etc/init.d/apache2 restart