Tuesday, February 07, 2012
Saturday, October 08, 2011
Create XML in PHP
<?php
// THIS IS ABSOLUTELY ESSENTIAL - DO NOT FORGET TO SET THIS
@date_default_timezone_set("GMT");
$writer = new XMLWriter();
// Output directly to the user
$writer->openURI('php://output');
$writer->startDocument('1.0');
$writer->setIndent(4);
// declare it as an rss document
$writer->startElement('rss');
$writer->writeAttribute('version', '2.0');
$writer->writeAttribute('xmlns:atom', 'http://www.w3.org/2005/Atom');
$writer->startElement("channel");
//----------------------------------------------------
//$writer->writeElement('ttl', '0');
$writer->writeElement('title', 'Latest Products');
$writer->writeElement('description', 'This is the latest products from our website.');
$writer->writeElement('link', 'http://www.domain.com/link.htm');
$writer->writeElement('pubDate', date("D, d M Y H:i:s e"));
$writer->startElement('image');
$writer->writeElement('title', 'Latest Products');
$writer->writeElement('link', 'http://www.domain.com/link.htm');
$writer->writeElement('url', 'http://www.iab.net/media/image/120x60.gif');
$writer->writeElement('width', '120');
$writer->writeElement('height', '60');
$writer->endElement();
//----------------------------------------------------
//----------------------------------------------------
$writer->startElement("item");
$writer->writeElement('title', 'New Product 8');
$writer->writeElement('link', 'http://www.domain.com/link.htm');
$writer->writeElement('description', 'Description 8 Yeah!');
$writer->writeElement('guid', 'http://www.domain.com/link.htm?tiem=1234');
$writer->writeElement('pubDate', date("D, d M Y H:i:s e"));
$writer->startElement('category');
$writer->writeAttribute('domain', 'http://www.domain.com/link.htm');
$writer->text('May 2008');
$writer->endElement(); // Category
// End Item
$writer->endElement();
//----------------------------------------------------
// End channel
$writer->endElement();
// End rss
$writer->endElement();
$writer->endDocument();
$writer->flush();
?>
// THIS IS ABSOLUTELY ESSENTIAL - DO NOT FORGET TO SET THIS
@date_default_timezone_set("GMT");
$writer = new XMLWriter();
// Output directly to the user
$writer->openURI('php://output');
$writer->startDocument('1.0');
$writer->setIndent(4);
// declare it as an rss document
$writer->startElement('rss');
$writer->writeAttribute('version', '2.0');
$writer->writeAttribute('xmlns:atom', 'http://www.w3.org/2005/Atom');
$writer->startElement("channel");
//----------------------------------------------------
//$writer->writeElement('ttl', '0');
$writer->writeElement('title', 'Latest Products');
$writer->writeElement('description', 'This is the latest products from our website.');
$writer->writeElement('link', 'http://www.domain.com/link.htm');
$writer->writeElement('pubDate', date("D, d M Y H:i:s e"));
$writer->startElement('image');
$writer->writeElement('title', 'Latest Products');
$writer->writeElement('link', 'http://www.domain.com/link.htm');
$writer->writeElement('url', 'http://www.iab.net/media/image/120x60.gif');
$writer->writeElement('width', '120');
$writer->writeElement('height', '60');
$writer->endElement();
//----------------------------------------------------
//----------------------------------------------------
$writer->startElement("item");
$writer->writeElement('title', 'New Product 8');
$writer->writeElement('link', 'http://www.domain.com/link.htm');
$writer->writeElement('description', 'Description 8 Yeah!');
$writer->writeElement('guid', 'http://www.domain.com/link.htm?tiem=1234');
$writer->writeElement('pubDate', date("D, d M Y H:i:s e"));
$writer->startElement('category');
$writer->writeAttribute('domain', 'http://www.domain.com/link.htm');
$writer->text('May 2008');
$writer->endElement(); // Category
// End Item
$writer->endElement();
//----------------------------------------------------
// End channel
$writer->endElement();
// End rss
$writer->endElement();
$writer->endDocument();
$writer->flush();
?>
Friday, September 09, 2011
play youtube video with mute sound
<script src="http://www.google.com/jsapi"></script>
<script src="http://ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject.js"></script>
<div id="ytapiplayer">You need Flash player 8+ and JavaScript enabled to view this video.</div>
<script type="text/javascript">
google.load("swfobject", "2.1");
function onYouTubePlayerReady(playerId) {
ytplayer = document.getElementById("myytplayer");
ytplayer.playVideo();
ytplayer.mute();
}
var params = { allowScriptAccess: "always" };
var atts = { id: "myytplayer" };
swfobject.embedSWF("http://www.youtube.com/v/YOUR-CODE-HERE?enablejsapi=1&playerapiid=ytplayer&allowFullScreen=true&version=3",
"ytapiplayer", "290", "160", "8", null, null, params, atts)
</script>
<script src="http://ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject.js"></script>
<div id="ytapiplayer">You need Flash player 8+ and JavaScript enabled to view this video.</div>
<script type="text/javascript">
google.load("swfobject", "2.1");
function onYouTubePlayerReady(playerId) {
ytplayer = document.getElementById("myytplayer");
ytplayer.playVideo();
ytplayer.mute();
}
var params = { allowScriptAccess: "always" };
var atts = { id: "myytplayer" };
swfobject.embedSWF("http://www.youtube.com/v/YOUR-CODE-HERE?enablejsapi=1&playerapiid=ytplayer&allowFullScreen=true&version=3",
"ytapiplayer", "290", "160", "8", null, null, params, atts)
</script>
Wednesday, September 07, 2011
sql select order by specific order
select * from tablename
Where id in (15,12,34,44,2)
Order by (Case When id = 15 then 0
When id = 12 then 1
When id = 34 then 2
When id = 44 then 3
When id = 2 then 4 Else id End)
Where id in (15,12,34,44,2)
Order by (Case When id = 15 then 0
When id = 12 then 1
When id = 34 then 2
When id = 44 then 3
When id = 2 then 4 Else id End)
Thursday, July 28, 2011
coverflow effect
http://addyosmani.com/blog/jqueryuicoverflow/
http://www.deensoft.com/lab/protoflow/
http://blarnee.com/wp/an-improved-javascript-coverflow-demo-using-canvas-and-html5/
http://www.weberdesignlabs.com/blog/2007/09/flash-itunes-cover-flow/
http://jacksasylum.eu/ContentFlow/docu.php
http://www.deensoft.com/lab/protoflow/
http://blarnee.com/wp/an-improved-javascript-coverflow-demo-using-canvas-and-html5/
http://www.weberdesignlabs.com/blog/2007/09/flash-itunes-cover-flow/
http://jacksasylum.eu/ContentFlow/docu.php
Friday, June 10, 2011
CSS wide layout
to make the background going to wide of the site of any size of browser.
#wrapper{
width:100%; min-width:1200px;
position:relative;
}
#wrapper{
width:100%; min-width:1200px;
position:relative;
}
Friday, April 01, 2011
scrolling vertical and horizontal
http://www.webdesignbooth.com/create-a-vertical-scrolling-news-ticker-with-jquery-and-jcarousel-lite/
http://sorgalla.com/jcarousel/
http://sorgalla.com/jcarousel/
Wednesday, March 30, 2011
Lightbox
http://www.zimbio.com/Interesting+webthings/articles/97/Web+2+0+Round+up+Modal+Window+Lightbox+Effect
http://www.hiddenpixels.com/designer-and-developer-resources/lightbox/
http://www.bugninja.com/code/rounded-corners-tooltip-lightbox-example/#
http://planetozh.com/projects/lightbox-clones/
http://www.hiddenpixels.com/designer-and-developer-resources/lightbox/
http://www.bugninja.com/code/rounded-corners-tooltip-lightbox-example/#
http://planetozh.com/projects/lightbox-clones/
Tuesday, March 22, 2011
Centering (horizontally and vertically) an image in a div box
<style type="text/css">
.wraptocenter {
display: table-cell;
text-align: center;
vertical-align: middle;
width: ...;
height: ...;
}
.wraptocenter * {
vertical-align: middle;
}
/*\*//*/
.wraptocenter {
display: block;
}
.wraptocenter span {
display: inline-block;
height: 100%;
width: 1px;
}
/**/
</style>
<!--[if lt IE 8]><style>
.wraptocenter span {
display: inline-block;
height: 100%;
}
</style><![endif]-->
And that’s the relevant HTML
<div class="wraptocenter"><span></span><img src="..." alt="..."></div>
http://www.brunildo.org/test/img_center.html
.wraptocenter {
display: table-cell;
text-align: center;
vertical-align: middle;
width: ...;
height: ...;
}
.wraptocenter * {
vertical-align: middle;
}
/*\*//*/
.wraptocenter {
display: block;
}
.wraptocenter span {
display: inline-block;
height: 100%;
width: 1px;
}
/**/
</style>
<!--[if lt IE 8]><style>
.wraptocenter span {
display: inline-block;
height: 100%;
}
</style><![endif]-->
And that’s the relevant HTML
<div class="wraptocenter"><span></span><img src="..." alt="..."></div>
http://www.brunildo.org/test/img_center.html
Friday, March 11, 2011
CSS Opacity
/* for IE */
filter:alpha(opacity=85) !important;
/* CSS3 standard */
opacity: 0.8;
-moz-opacity:1;
position:relative;
filter:alpha(opacity=85) !important;
/* CSS3 standard */
opacity: 0.8;
-moz-opacity:1;
position:relative;
Thursday, March 10, 2011
Tuesday, March 08, 2011
Jquery Plugins
http://www.malsup.com/jquery/
http://slidesjs.com/ - slide show plugins
http://webdesignerwall.com/tutorials/jquery-tutorials-for-designers
http://slidesjs.com/ - slide show plugins
http://webdesignerwall.com/tutorials/jquery-tutorials-for-designers
back-and-forth scrolling effects
http://www.malsup.com/jquery/cycle/scrollhv.html
http://cssglobe.com/post/3783/jquery-plugin-easy-image-or-content-slider
http://www.ndoherty.biz/demos/coda-slider/
http://web.enavu.com/tutorials/making-a-nice-jquery-content-scroller-with-ease/
http://cssglobe.com/post/3783/jquery-plugin-easy-image-or-content-slider
http://www.ndoherty.biz/demos/coda-slider/
http://web.enavu.com/tutorials/making-a-nice-jquery-content-scroller-with-ease/
Sunday, January 16, 2011
Friday, February 05, 2010
Floating div on top and bottom
Top - http://roshanbh.com.np/2008/07/top-floating-message-box-using-jquery.html
Bottom - http://www.matto1990.com/jquery/catfish/
Bottom - http://www.matto1990.com/jquery/catfish/
Monday, February 01, 2010
52 Blogs that Accept Guest Posts
http://piggybankpie.com/guest-blogging/52-blogs-that-accept-guest-posts/
http://www.hellboundbloggers.com/blogging/list-of-cool-blogs-to-write-guest-articles/
http://www.hellboundbloggers.com/blogging/list-of-cool-blogs-to-write-guest-articles/
SEO Steps
Very useful tips on how to optimize a website.
- Website analysis
- Keyword Research
- Adding Emphasis with Header Tags
- Adding Emphasis with Tail Tags
- Bold, Italic effect to main keywords
- Canonicalization
- Competition Analysis
- CSS Validation
- Google Base Feeds
- H Tags Optimization (Eg: H1, H2, H3)
- Header Tag Optimization
- HTML Code Clean Up & Optimization
- Image & Hyperlink Optimization
- In depth site Analysis
- Link Validation
- Meta Description Tags Optimization
- Meta Keywords Tags Optimization
- Navigation & Design Optimization
- PR Sculpting
- Robots.txt Optimization
- Text Modification Tags Optimization
- Title Tag Optimization
- URL Rewrite
- W3C Validation
- Working on HTML Source Code
- Link Development
- Authoritative Submissions
- Broken Links Checking
- Directory Submissions
- Extraction of Site Url’s ( Link Level Depth)
- Internal Link Structuring
- Link Building ( Link Bait )
- Manual Link Request to Related Sites
- One way link (PR4 or Greater)
- Site Back-links count
- Local Search Engine Optimization
- Custom Review Submission
- h card Integration
- Local Search Engine Submission
- Testimonial Submission
- Updating pages for local searches
- Website Usability & Conversion
- Being Webmaster Tools account setup & monitoring
- Google Webmaster Tools account setup & monitoring
- Installing Usability Tools on Website
- Monthly Website Conversion Tracking
- Optimization for Multiple Browsers
- Article Submission
- Blog Comment on Relevant Blogs
- Blog Designing for the website
- Blog Submission
- Classified submission
- Creating Promotional pages on hubpages, squidoo, etc
- Face Book Twitter Marketing
- Integration of page bookmarking tools
- Integration of page sharing tools
- Paid Submission
- Photo Sharing
- PPT Submission
- Press Release
- Product Indexing on Google Base
- Rss Feeds
- Social Bookmarking
- Video Submission
- Content Writing & Optimization
- Article Writing
- Blog Writing
- Content Modification
- Press Release Writing
- Thematically Optimization of content pages
- Website content writing through Latent Semantic Indexing
- Website Spell Check
- XML Site Map Creation & Submission
- SE Saturation Checking ( Google, Yahoo & Bing)
- Log file analysis
- Google, Yahoo & Bing Site Map Creation
- Google Analytics Funnel Creation
- Google Analytics Account Setup
- Deep Indexing Recommendations
- Checking server response code for each URL
- Check Search Engine Road Blocks
- Check PR of each url
Wednesday, January 06, 2010
css Div height 100%
html {MIN-HEIGHT: 100%; HEIGHT: 100%}
body{
HEIGHT: 100%
}
#container{
min-height: 100%;
_height: 100%;
}
body{
HEIGHT: 100%
}
#container{
min-height: 100%;
_height: 100%;
}
Subscribe to:
Posts (Atom)