Picture in Blogger Post

Posted by Planeta Srbija | 20.7.11 | | 6 comments »

On Macro of micro I've found a script which makes it possible to publish picture within a Blogger post. To use it, you need to add this javascript to your blog template (place the below codes in your blog template design- Edit HTML just above </body> tag):

<script src='http://hosting.gmodules.com/ig/gadgets/file/105066904960012479556/nccode.js' type='text/javascript'/>

To insert it use this tag:
[im]your image url[/im]
eg: [im]http://website.com/folder/image.jpg[/m]

Read More......

Convert online HTML Entities

Posted by Planeta Srbija | 28.6.11 | | 5 comments »

If you want to show HTML code within your post, you have to change entities like <, > or ".


Here is online tool

Read More......

It's not recommended but sometimes I use to insert table inside a post and there is often a ned to define some aditional style beside CSS. For example:





Never call me Jack or James


Barnaby The Bear's my name. I will sing my way to fame, Barnaby the Bear's my name. Birds taught me to sing, when they took me to their king, first I had to fly, in the sky so high so high, so high so high so high, so - if you want to sing this way, think of what you'd like to say, add a tune and you will see, just how easy it can be. Treacle pudding, fish and chips, fizzy drinks and liquorice, flowers, rivers, sand and sea, snowflakes and the stars are free. I will sing my way to fame, Barnaby the Bear's my name.


<table width="100%" border="0" cellspacing="0" cellpadding="10">
<tr>
<td bgcolor="#000" style="padding: 15px 10px !important;" ><font color="white"><span style="font-size:180%;"><p>Never call me Jack or James</p></span>
<p>Barnaby The Bear's my name. I will sing my way to fame, Barnaby the Bear's my name. Birds taught me to sing, when they took me to their king, first I had to fly, in the sky so high so high, so high so high so high, so - if you want to sing this way, think of what you'd like to say, add a tune and you will see, just how easy it can be. Treacle pudding, fish and chips, fizzy drinks and liquorice, flowers, rivers, sand and sea, snowflakes and the stars are free. I will sing my way to fame, Barnaby the Bear's my name.
</p></font></td>
</tr>
</table>

Read More......

This solution is placed outside of this blog but a great one!

LINK: Bloggersentral

Read More......

Background picture in WordPress post

Posted by Planeta Srbija | 15.9.10 | | 21 comments »

Keep in mind that background picture coul make your post unreadable!
Just before text, add this:

<div style="background:url('http://path-to-your-picture.jpg')no-repeat">(open tag)

Here comes the text

</div> (close tag)

Read More......

When upgrading Wordpress, a error messages occured “Fatal error: Allowed memory size of 33554432 bytes exhausted…"

If you spend some time googling for the solution, you'll find out that this error happened when execution of a php file exceed allowed php memory on the server. In this case, the allowed php memory is 33554432 bytes (32 Mb).

The solution is increasing allowed php memory, and you'll do that by editing wp-config.php file, adding right after “<?php”:

ini_set("memory_limit","128M");

This increased allowed php memory to 128 Mb.

Read More......

BM Custom login is a very cute WordPress Plugin for designing your WordPress login page.

Login-picture contains actually of two pics: one main for login data and a footer pic. They should "merge" but in reality they "overlap", so if you made your pics transparent, result will be ugly!

Official plugin page is not up-to-date and comments ain't getting any response! Dave, for example, wrote:

I have made the area around the border transparent but now it shows the background image below the footer image. How can I make it so the background image from the top part stops and lines up with the footer instead of bleeding through the bottom where it's transparent?

Because on the plugin page comments are held for moderation for eternity, here is my solution:




















And my final result looks like this:


Read More......

Sometimes the most stupid things take most of your time. It can happen when you need to enter the full path of a folder on you web server (e.g. for sheaduled backups of your MySQL Database).

I can give you a great tool for that:

1) Copy this part of code, paste it into your Notepad and save it as "path.php".

<?php
echo getcwd();
?>


2) Upload that file to a folder which full path you need.

3) Call the file thru your browser: e.g. http://www.yourdomain.com/bckp/path.php

4) That's it, you've got it!

Read More......

Blogger shows by default 20 posts per page when you click specific label from your labels widget. But maybe you want to show less because page loads too long... or you want to show maximum (which is 100)?!

Go to Dashboard > Layout > Page Elements > Edit Html > Expand Widgets

Search for this:

<a expr:dir='data:blog.languageDirection' expr:href='data:label.url'>
<data:label.name/>
</a>
</b:if>
<span dir='ltr'>(<data:label.count/>)</span>


And replace it with this:

<a expr:dir='data:blog.languageDirection' expr:href='data:label.url + "?max-results=5"'>
<data:label.name/>
</a>
</b:if>
<span dir='ltr'>(<data:label.count/>)</span>


Note: the red "5" determins number of your posts before Blogger shows "Read older posts" link. It could be anything between 1 and 100.

Read More......

Random banner or header rotation

Posted by Planeta Srbija | 15.6.10 | | 1 comments »

Showing a different header or page background picture each timr the page loads can look pretty refreshing. There are milions of ways to do that, but this one is very simple and it works like a charm! Credits to: Matt Mullenweg.

1) Put all of pictures into a specific folder on your web server. They should have extension: jpg, jpeg, png or gif and apropriate dimensions.

2) Copy this code and paste it into Notepad:

<?php
/*
By Matt Mullenweg > http://photomatt.net
Inspired by Dan Benjamin > http://hiveware.com/imagerotator.php
Latest version always at:
http://photomatt.net/scripts/randomimage
*/// Make this the relative path to the images, like "../img" or "random/images/".
// If the images are in the same directory, leave it blank.
$folder = '';
// Space seperated list of extensions, you probably won't have to change this.
$exts = 'jpg jpeg png gif';
$files = array(); $i = -1; // Initialize some variables
if ('' == $folder) $folder = './';
$handle = opendir($folder);
$exts = explode(' ', $exts);
while (false !== ($file = readdir($handle))) {
foreach($exts as $ext) { // for each extension check the extension
if (preg_match('/\.'.$ext.'$/i', $file, $test)) { // faster than ereg, case insensitive
$files[] = $file; // it's good
++$i;
}
}
}
closedir($handle); // We're not using it anymore
mt_srand((double)microtime()*1000000); // seed for PHP < 4.2
$rand = mt_rand(0, $i); // $i was incremented as we went along
header('Location: '.$folder.$files[$rand]); // Voila!
?>


3) Save the document as rotate.php and upload it to the same folder with pictures.

4) In your header or wherever you want to show random pictures, put following line of code to call the rotate.php
<img src="http://www.path to folder with pictures/rotate.php" alt="A Random Image" />

Read More......

Take a look on my other postings: