Posted: Oct 02 | Filed under: General

If you created a symbolic link to a folder via “ln -s /source/ /target/” you have to be careful.
Should you accidently remove the symbolic link in your FTP application the real folder will be deleted as well. To avoid that simply use the command “rm -r /symboliclinkfolder” .

  Posted: Jul 19 | Filed under: General

Well I wanted to try out Adtoll Peel Ads, that are those corner ads that are pretty neat.
As soon as I implemented it I noticed that it was asking me to install the Flash Player, this might be pretty annoying if you don’t want your visitors to install flash just for an advert.

 

Here is the solution, you can simply add before the tag.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 
<SCRIPT LANGUAGE="JavaScript">
<!-- use this comment tag to hide the enclosed code from old browsers.
 
if ((navigator.appName == "Microsoft Internet Explorer" &&
    navigator.appVersion.indexOf("Mac") == -1 
     &&   navigator.appVersion.indexOf("3.1") == -1) ||
 
    (navigator.plugins && navigator.plugins["Shockwave Flash"])
                       || navigator.plugins["Shockwave Flash 2.0"]){
 
</SCRIPT>
 
 
<!-- START ADTOLL.COM CODE V1.0 -->
<SCRIPT src="XXXXX YOUR ADTOLL URL XXXXX" type="text/javascript"></SCRIPT>
<!-- END ADTOLL.COM CODE V1.0 -->
 
 
<SCRIPT LANGUAGE="JavaScript">	
}
// Close the comment tag. -->
</SCRIPT>
  Posted: Jul 14 | Filed under: General

To manage your cronjobs it is good to know that you can easily manage them via crontab instead of adding them cron.d

crontab -l will show you your currently set up cron jobs on the server.
crontab -r will delete your current cron jobs.
crontab -e will allow you to add or edit your current cron jobs by using your default text editor to edit your “crontab file”.

Source: http://drupal.org/node/31548

To execute some commands just create a file with the extension .ssh, add #!/bin/sh at the first line, chmod it to 711 and add this cron to your crontab using the command above.

  Posted: May 17 | Filed under: General

One of the tools I recommend to edit the files on your server (instead of editing them directly via SSH) is WinSCP.
A necessary step if you set the crucial setting “PermitRootLogin = yes” in your ssh.conf is to switch to a specific user while loggin on. To do that you can define a shell with the following command:

 

sudo su - "user"

 

I’m going to post a screenshot of this if it requires a detailed explanation, but you should be able to find the option in the advanced menu.

  Posted: May 17 | Filed under: General

In order to import large XML files you will have to make sure that the following settings are set in your PHP.ini :

max_filesize_upload Default : 2M -> increase to 10M or larger

That is the size that is displayed close to the submit button on the import page.
In order to get it running you should also check your settings for memory_limit and max_execution_time. The first one is the setting for the amount of memory a script can handle and the latter one the maximum time for transactions. If the import takes too long it might get cancel’d because of that setting.

  Posted: May 17 | Filed under: General

Bug: IE won’t send the referrer if you use javascript to open a new window, firefox will.

Solution:
Nathanm.com

  Posted: May 17 | Filed under: Wordpress

I noticed that there is a small bug in Wordpress 2.3 if you are using seo friendly url’s.
The “Trackback” and “Subscribe to the comments feed” links on the single.php have two slashs at the end and return a 404 page.
If you want to fix that open: /wp-includes/link-template.php
Find “get_post_comments_feed_link” and remove “trailingslashit(” as well as the closing round bracket after “($post_id)”.

  Posted: May 14 | Filed under: General

Well a lot of people don’t know that the body tag has different values in each browser.
That’s why sometimes absolute objects have different positions in IE and Firefox.
To fix it simply add margin:0; padding:0; to your body tag via CSS.

  Posted: May 14 | Filed under: General

If you want to optimize your website loading speed I can recommend you the following
site: Websiteoptimization.com
Analyzing your site will help you to understand why certain parts might load slowly.

  Posted: May 12 | Filed under: General

If you want to create a popup window to inform people about something before they visit a site, then it’s clearly a good way to use body onload in combination with javascript.


Use this little snippet inside your tag:

<script type="text/javascript">
function poponload()
{
ewindow=window.open("http://yoururl.com","mywindow1",
"location=1,status=1,scrollbars=1,
width=800,height=800");ewindow.moveTo(0,0);
}
</script >

And call it via the body tag.

<body onload="poponload()">