WordPress Themes and Blogging Tips


Hits: 1405  

WpThemesPlanet.com is site dedicated to WordPress Themes and to posting interesting articles for the Blogging Community.

Here we can find more blogging tips……..

You need to manage Database, Folders, Files, Images, Code, Webpages……

Success Story

Meld – visual diff and merge tool


Hits: 2620  

Meld is a visual diff and merge tool. Meld is used for comparing two or three files and editing them. We can compare two or three folders and launch file comparisons….

Source: http://meld.sourceforge.net/

Backup Amazon S3 with PHP


Hits: 2481  

This is the source code to backup/download Amazon S3 Bucket’s multimedia files to other server by PHP…

here $bucketurl is XML url of Amazon S3 bucket with full ACL.
$folder is path of the server where S3 files to store.

This script will download all files in Amazon bucket to other server

Php-Code:
 1 
 2 
 3 
 4 
 5 
 6 
 7 
 8 
 9 
 10 
 11 
 12 
 13 
 14 
 15 
 16 
 17 
 18 
 19 
 20 
 21 
 22 
 23 
 24 

<?php

/* url for Amazon Bucket */

$bucketurl "http://BUCKETNAME.s3.amazonaws.com/";

$xml file_get_contents($bucketurl);

/* folder name for server */

$folder "/var/www/html/BUCKETNAME/";

$content getTag'Key'$xml );

foreach($content as $file)

{

exec"wget -O ".$folder.$file." ".$bucketurl.$file );

}

/* function to get node from Amazon Bucket XML */

function getTag$tag$xml )

{

$tag preg_quote($tag);

preg_match_all('{<'.$tag.'[^>]*>(.*?)</'.$tag.'>}'$xml$matchesPREG_PATTERN_ORDER);

return 
$matches[1];

}

?>

amcharts – dynamic data generated with PHP


Hits: 3234  

AmCharts is a set of Flash charts for your websites and Web-based products. AmCharts can extract data from simple CSV or XML files, or they can read dynamic data generated with PHP, .NET, Java, Ruby on Rails, Perl, ColdFusion, and many other programming languages.

Source:

http://www.amcharts.com/
http://www.amcharts.com/download

Help:

http://www.appfire.com/appfire-flashcharts-plugin/FusionChartsFree/Contents/ChartSS/XML_Col2DLineDY.html

Decrypt \x3d


Hits: 1671  

How to decrypt string html like below:

$html=html_entity_decode(urldecode(str_replace(‘\x’, ‘%’, $html)),ENT_QUOTES, “UTF-8”);

MP3 file download link

$mp3_dlink = preg_replace(‘/ /i’, ‘%20’, $mp3_link);

Get popup center


Hits: 1411  

function get_popup_center(popurl)
{

var top = (screen.availHeight/2)-61;
var left = (screen.availWidth/2)-150;
var width = 300;
var height = 150;
//var popurl = ‘http://www.svnlabs.com’;

var oWin = popUp(popurl, top, left, width, height);

}

function popUp(URL, top, left, width, height)
{
day = new Date();
id = day.getTime();

eval(“page” + id + ” = window.open(‘”+URL+”‘, ‘” + id + “‘,’toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=”+width+”,
height=”+height+”,top=”+top+”,left=”+left+”‘);”);
return “page” + id;
}

focus password element from password to ********


Hits: 1306  

/**
*  <form>
*  <input type=”text” name=”password” value=”Password” onfocus=”get_password_focus(this)”>
*  </form>
*  This function can be used for focus password element from password to ********
*/

function password_focus(obj)
{
var newO=document.createElement(‘input’);
newO.setAttribute(‘type’,’password’);
newO.setAttribute(‘name’,obj.getAttribute(‘name’));
obj.parentNode.replaceChild(newO,obj);
newO.focus();
}

Get page size


Hits: 1348  

function get_page_size() {

var de = document.documentElement;
var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
arrayPageSize = new Array(w,h);
return arrayPageSize;

}