Showing posts with label wordpress. Show all posts
Showing posts with label wordpress. Show all posts

Sep 10, 2014

How to add battleforthenet widget on Blogger

This code will add the battleforthenet widget to your blogger site.

1. Go to Layout
2. Add HTML/JavaScript widget
3. Copy/Paste:
<script src="//widget.battleforthenet.com/widget.min.js" async></script>
4. Save

May 17, 2011

1and1 and PHP5

While using Wordpress with 1and1, I wanted to enable the use of PHP5 for a plugin. Couple of mistakes on my part was that I named .htaccess incorrectly as ".htacess" in the folder of my site.

Then after getting PHP5 recognized on my site, I had to uninstall the plugin. Reinstall, and then re-enable, then lastly all was well.

From 1and1:

Enabling PHP5
With 1&1 Linux hosting packages you have the choice between PHP 4 and PHP 5. To distinguish a script as PHP 5, simply name the script with the file extension .php5.

While the PHP developers have done their utmost to ensure compatibility, we cannot guarantee that PHP 4 scripts will function 100% correctly under PHP 5.

Please note that in contrast to PHP 4, the default for the variable RegisterGlobals and allow_url_fopen is "off".

By default Apache uses PHP 4 for .php extension. If you don't want to rename all your scripts to .php5 you can do the following:

Create a .htaccess file and place the following line:

AddType x-mapp-php5 .php 

This will tell Apache to use PHP 5 instead of PHP 4 for the extension .php in the directory the .htaccess is placed and all sub-directories under it.

Checking your PHP version
One way to find out what version of PHP is currently being used by one of your sites is to create a PHP page with the phpversion(); function. Save this file as phpVersion.php to the same folder where all of your site files are located. Then access this page in a browser such as http://domain.com/phpVersion.php and view the output.

<?php 
echo "The current PHP version being used is: " . phpversion ( ); 
?> 

Apr 3, 2011

Add a Logo to your Header Text :: CSS :: Wordpress

Edit your header.php with the following:

<div id="header">
 <div id="samplelogo"><a href="<?php echo get_option('home'); ?>/"><img src="http://www.linktoyour/logo.png" alt="" width="60" height="60" />
 </div>
  
 <p id="logo"><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></p>
 <p id="strapline"><?php bloginfo('description'); ?></p>
   
</div>

Then edit your style.css
#samplelogo {
 float: left;
 padding-right: 10px;
}