Tuesday, February 23, 2010

Strange myFxSearchImg:base64 code in wordpress posts

When writing and pasting text into a wordpress blog post, I found that some strange code like


<img style="border: medium none"
src="image/png;base64,iVBORw0KGgoAAAANS ......

was added automatically at the end of the post.
First thought was some trojan/virus. After looking deeper into it, I found it's only a Vista Aero(Firefox theme) error.

And that code is nothing but this image:




To fix this issue, either remove Vista Aero or update it to the latest version.

Sunday, February 14, 2010

Paste into terminal End Of LiNe problem

Sometimes, when you SSH to a Linux box, pasting large amounts of text into a terminal can be problematic.

In pico/nano you will get some auto wrapping that could damage your code or outline your text.

To fix this you can use: nano -w yourfile.txt


-w (--nowrap)
Disable wrapping of long lines.


In vi/vim you can get a "staircase" effect.
To fix this, in command mode, type:

:set paste

to turn it back off:

:set nopaste

Wednesday, February 03, 2010

Howto paste HTML/PHP code on blogspot

There are many ways to do this, but one of the simpliest is to use francois.schnell.free.fr/tools/BloggerPaste/BloggerPaste.html.
Happy pasting!

Include PHP files or code in phpBB HTML templates

Adding php code in your phpBB templates using the classical <?php ?> tags won't work.

To make things possible first go to your Administration Control Panel -> General -> Security Settings and enable Allow php in templates option.

Then you can use the following syntax to add php code:

<!-- PHP --> echo "PHP Code!"; <!-- ENDPHP -->

To include php files:

<!-- PHP --> include("/path/to/file.php"); <!-- ENDPHP -->