Archive for the 'Tips' Category

geekadmin.com : Putting google AdSense on your PostNuke Site

Monday, November 27th, 2006

To put the google AdSense o­n your PostNuke site there are several ways, the easiest and cleaner way I have found is this o­ne, if you have a better please tell me.
First things first, to use Google AdSense you must be a valid subscriber to the advertising program o­n google.Follow this simple steps:

1- Go to administrator menu;
2- Select the system Bind;
3- Select the blocks options;
4- Choose the Title of the Block (ads is a good ideia);
5- Choose the model, in this case is CORE/HTML;
6- Choose the position (on my case is left);
7- Choose Collapsible;
8- Choose expanded;
9- Choose language All (to make avaliable to all languages);
10- Click o­n update.

When you click o­n Update, it now permits that you put your Google AdSense code in the Content Box.
After that just click o­n update and your block is working.
You can latter change the side and the position of your block, or use multiples blocks (just create another o­ne).

 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (No Ratings Yet)
Loading ... Loading …

linux.com : Fetching email with Mutt

Monday, November 27th, 2006

http://www.linux.com/article.pl?sid=05/10/07/172259

Title Fetching email with Mutt
Date 2005.10.25 4:01
Author StoneLion

What do you look for in an email program? You may find it in Mutt, an easy-to-use text-based messaging client. Here’s all you need to know to get started with Mutt.

To read mail from a POP account using Mutt, you need to have a mail transfer agent such as Sendmail and a mail delivery agent such as Procmail installed, as well as a program that can connect to a POP server and download your emails, such as fetchmail. Most standard *nix systems, have all these programs installed.

If everything is in place, let’s configure Mutt and the other programs to read Google’s Gmail messages, as Gmail allows POP forwarding.

Configuring fetchmail

You can use fetchmail to connect to Gmail’s POP server, log into your account, and retrieve messages. To configure fetchmail, you’ll need to know details about the POP mail server, such as its address and port number. Instructions on enabling POP forwarding in Gmail is available at Google’s help center page.

Next, you need to create a .fetchmailrc file in your home directory that contains these lines:

poll SERVER with proto PROTOCOL
user REMOTE_USER there with password REMOTE_PASSWORD is LOCAL_USER here

The words in capital letters need to be replaced with actual values. SERVER is your POP server. PROTOCOL refers to the protocol you want fetchmail to use to connect to the remote servers. REMOTE_USER is your email ID. LOCAL_USER is the user account on your machine. Below is my .fetchmailrc, configured to retrieve mails from my gmail account:

poll pop.gmail.com with proto POP3 and options no dns
user ‘linuxlala@gmail.com’ is ‘linuxlala’ here options ssl

You can see I used some additional options. no dns means that a dynamic IP address is allocated to your machine. The second line asks fetchmail to connect to the Gmail server using SSL.

To test whether fetchmail works, open a terminal and enter fetchmail -vk . The -v switch enables verbose mode, so you can see what fetchmail is doing. The -k switch ensures that messages are not deleted from the server when they are downloaded.

if all goes well, you’re now ready to use Mutt to read email.

Starting Mutt

Start by typing mutt at the command line. The first time you run Mutt, it will complain that the home directory does not contain a directory called Mail. Mutt will create it for you, along with a file called “mbox” that stores all your messages.

When you run Mutt, you’ll see an index list of messages. To move up and down through the list of messages, use the “k” and “j” keys respectively.

Pressing Enter on the selected message, drops you to the pager, which is akin to a text viewer, much like the *nix program less. You can use the backspace and Enter keys to scroll through your messages. Most of the commands that work in the index work in the pager as well; for instance, pressing “j” or “k” in the pager shows the content of the next-in-line message.

If the received message includes an attachment, you can use “v” to launch the attachment menu. If the received message contains more than one attachment, use the “k” and “j” keys to move up and down through them. Pressing Enter displays an attachment in the pager only if it can be viewed as plain text. If not, Mutt tries to launch a suitable external viewer for the file.

To quit the attachment viewer use “q,” which drops you back to the pager. Press “q” again to return to the index.

Mutt displays a list of all the essential keyboard shortcuts at the top of the screen, and the list changes according to where you are in the program.

From the index, you can reply to a message or create a new one. Pressing “m” creates a new message. Mutt prompts you for the recipient’s email address and the message subject. When you hit Enter after writing the subject, Mutt opens the nano text editor so you can write your message. Once you’ve composed your message, press Ctrl-o to save the message. You will be prompted to provide a name. You can press Enter to use the default, which is in the format mutt-yourhostname-xxxx-x, where the “x”s are numbers. The message is saved in the /tmp directory. After saving the message, press Ctrl-x to quit nano and move to a new screen, where you can review the subject and the recipient’s email address, and under a heading called Attachment you can see the message you just saved, along with “I” written at the extreme left, which indicates that this attachment is being sent in-line in the body of the message.

If you want to attach another file, press “a.” You can then type the location of the file or press “?” for a selection list. You can press “c” to change to a different directory. After selecting the file, you are again dropped to the review screen. Now, under Attachment, two files are listed. Instead of an “I” at the extreme left, the second file appears with “A,” with represents an external attachment.

To send the message, press “y.” Once the email is sent, Mutt deletes the text you saved in the /tmp directory.

The procedure for replying to a message is similar to the one used for creating a new mail. You press “r” to reply from either the pager or the index. Mutt picks up the sender’s ID to fill in the To: field.

Try sending a message to yourself. You should see in the sender field username@localhost.localdomain, because you have not yet configured Mutt to use your POP account to send email.

Configuring Mutt

To configure Mutt, you need to create a .muttrc file in your home directory. Read the sample .muttrc file from /usr/share/doc/mutt/example/muttrc to get an idea of what to put in the file, and take a look at the dotfiles site, where people share their .muttrc files. Here’s an excellent .muttrc, which is very well commented.

To send mail using Mutt, your .muttrc needs to contain a set_envelope field. A basic .muttrc looks like this:

# My email address
set pop_user=”username@gmail.com”

# My email account password
set pop_pass=”password”

# Too many email headers make reading a message difficult
ignore *
unignore From: To: Cc: Subject: Date: #Only these are shown in the header

#To ensure that mutt does not put
#’username@localhost.localdomain in From
set from=”username@gmail.com”
set use_from=yes
set envelope_from=”yes”

#The text editor I want to use to write emails
#The default is nano
set editor=vi

Filtering mail

In addition to sending and receiving messages, you may be filtering email with Procmail. If your filters send messages to mailboxes other than the inbox, you need to tell Mutt about which mailboxes you have. To do so, add lines similar to the following to your .muttrc:

set folder = /home/linuxlala/Mail
mailboxes /home/linuxlala/Main/default
mailboxes /home/linuxlala/Mail/buddies
mailboxes /home/linuxlala/Mail/cc-license
mailboxes /home/linuxlala/Mail/indlinux
mailboxes /home/linuxlala/Mail/spam

You’ll also have to tell fetchmail to run the emails through Procmail to be sorted. Instead of entering only fetchmail -vk , run fetchmail -vk -m “/usr/bin/procmail -d %T”. The -m switch informs fetchmail that all email now needs to be forwarded to a mail delivery agent, and the string within quotes provides the path to the MDA (Procmail).

I enjoyed learning how to use Mutt with fetchmail and Procmail. I found the setup process to be a bit lengthy, but I considered it a good learning opportunity. Today, this Mutt is, indeed, a man’s best friend.

Shashank Sharma is studying for a degree in computer science. He specializes in writing about free and open source software for new users.

Links

1. “Mutt” - http://www.mutt.org/
2. “Sendmail” - http://www.sendmail.org/
3. “Procmail” - http://www.procmail.org/
4. “fetchmail” - http://www.catb.org/~esr/fetchmail/
5. “Gmail” - http://www.gmail.com/
6. “help center page” - http://gmail.google.com/support/bin/answer.py?answer=13273
7. “nano” - http://www.nano-editor.org/
8. “dotfiles site” - http://www.dotfiles.com/index.php3?app_id=27
9. “Here’s” - http://www.dotfiles.com/files/27/192_.muttrc
10. “filtering email with Procmail” - http://www.newsforge.com/article.pl?sid=03/10/10/1359253

‘enable’ kan magic_quotes_gpc dalam .htaccess

Sunday, November 26th, 2006

1. edit fail .htaccess
2. tambahkan barisan ini :

php_flag magic_quotes_gpc on

3. simpan :)

 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (No Ratings Yet)
Loading ... Loading …

NTLDR or NTDETECT.COM Not Found

Saturday, November 25th, 2006

If you get an error that NTLDR is not found during bootup,

If you have FAT32 partitions, it is much simpler than with NTFS. Just boot with a Win98 floppy and copy the NTLDR or NTDETECT.COM files from the i386 directory to the root of the C:\ drive.

For NTFS:

1. Insert and boot from your WindowsXP CD.
2. At the first R=Repair option, press the R key
3. Press the number that corresponds to the correct location for the installation of Windows you want to repair. Typically this will be #1
4. Enter in the administrator password when requested
5. Enter in the following commands (X: is replaced by the actual drive letter that is assigned to the CD ROM drive.

COPY X:\i386\NTLDR C\:
COPY X:\i386\NTDETECT.COM C:\

6. Take out the CD ROM and type exit

 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (No Ratings Yet)
Loading ... Loading …

Corrupted or Missing \WINDOWS\SYSTEM32\CONFIG

Saturday, November 25th, 2006

If you get the error:
Windows could not start because the following files is missing or corrupt
\WINDOWS\SYSTEM32\CONFIG\SYSTEM or \WINDOWS\SYSTEM32\CONFIG\SOFTWARE

1. Insert and boot from your WindowsXP CD.
2. At the first R=Repair option, press the R key
3. Press the number that corresponds to the correct location for the installation of Windows you want to repair. Typically this will be #1
4. Enter in the administrator password when requested
5. cd \windows\system32\config
6. Depending on which section was corrupted:
ren software software.bad or ren system system.bad
7. Depending on which section was corrupted

copy \windows\repair\system
copy \windows\repair\software

8. Take out the CD ROM and type exit

 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (No Ratings Yet)
Loading ... Loading …