Total Pageviews
Wednesday, August 15, 2012
php web developer in Hyderabad
Labels:
Blog Notes,
CodeIgniter,
Drupal,
Images,
jQuery Tutorial,
Magento,
php,
Wordpress
Tuesday, July 3, 2012
Get Blog Notes: Facebook share button on your website:
<script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><a href="http://www.facebook.com/share.php?u=<url>" onclick="return fbs_click()" target="_blank"><img src="/images/facebook.png" alt="Share on Facebook" /></a>
<script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><a href="http://www.facebook.com/share.php?u=<url>" onclick="return fbs_click()" target="_blank"><img src="/images/facebook.png" alt="Share on Facebook" /></a>
Tuesday, May 15, 2012
Active the corresponding link in navigation menu by scrolling the content.
<script type="text/javascript">
//<![CDATA[
$(function() {
$(window).scroll(function() {
var threshold = $(window).height() / 4;
var active_section;
var active_section_top = -Infinity;
$(".scrolling-document-section").each(function(index, section) {
var section_top = $(section).offset().top - $(window).scrollTop();
if (section_top > active_section_top && section_top < threshold) {
active_section_top = section_top;
active_section = section;
}
});
if (active_section) {
$("#menu-explore-features a").removeClass("active");
$("#menu-explore-features a[href$='#" + $(active_section).attr("id") + "']").addClass("active");
}
});
$(window).scroll();
});
//]]>
</script>
Wednesday, April 11, 2012
How to grab tweets from Twitter using php
$tweets = json_decode(file_get_contents ('http://twitter.com/statuses/user_timeline.json?screen_name=USERNAME&count=10'));
var_dump($tweets); //json_decode(file_get_contents()) function
How to add buttons to your website to help your visitors share content and connect with you on Twitter?
https://twitter.com/about/resources/buttons#follow
Add buttons to your website to help your visitors share content and connect with you on Twitter.
Add buttons to your website to help your visitors share content and connect with you on Twitter.
Monday, March 12, 2012
Magento How to add a static CMS block to the side bar
In Magento Go to
CMS > Static Blocks.
Create a new block
Open app/design/frontend/xxxxxx/xxxxxx/layout/catalog.xml
Add your static block to the left or right section in
<!-- Mage_Catalog -->
For example to add to the left sidebar..
<reference name="left">
<block type="cms/block" name="Block Title" >
<action method="setBlockId"><block_id>Identifier</block_id></action>
</block>
</reference>
OR
Open the file app/design/frontend/default/[your-theme]/template/page/Xcolumns-left.phtml by your favorite text editor
Find the line of code
<?php echo $this->getChildHtml('left') ?>
Add the following code line
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId(' Identifier ')->toHtml() ?>
Wednesday, February 22, 2012
Displaying the Preview image of Nextgen Gallery Using a Custom Select Query
You have to choose from an image of your gallery. If you don't want use one of them you can add a new image to the gallery, then click on Gallery settings (Click here for more settings) under the field Preview image choose image from the drop down list!
Paste the bellow code in the template page, where you what to display the preview image of gallery. Don't forgot to change the gallery id.
<?php
$querystr = "SELECT wp_ngg_pictures.*, wp_ngg_gallery.* FROM wp_ngg_pictures, wp_ngg_gallery WHERE wp_ngg_pictures.pid = wp_ngg_gallery.previewpic AND wp_ngg_pictures.galleryid=5 ORDER BY wp_ngg_pictures.pid DESC
";
$pageposts = $wpdb->get_results($querystr, OBJECT);
$name=$pageposts[0]->filename;
$path=get_bloginfo('siteurl')."/".$pageposts[0]->path."/".$pageposts[0]->filename;
echo "<img src='".$path."' title='".$name."' width='100' height='75'/>";
?>
Paste the bellow code in the template page, where you what to display the preview image of gallery. Don't forgot to change the gallery id.
<?php
$querystr = "SELECT wp_ngg_pictures.*, wp_ngg_gallery.* FROM wp_ngg_pictures, wp_ngg_gallery WHERE wp_ngg_pictures.pid = wp_ngg_gallery.previewpic AND wp_ngg_pictures.galleryid=5 ORDER BY wp_ngg_pictures.pid DESC
";
$pageposts = $wpdb->get_results($querystr, OBJECT);
$name=$pageposts[0]->filename;
$path=get_bloginfo('siteurl')."/".$pageposts[0]->path."/".$pageposts[0]->filename;
echo "<img src='".$path."' title='".$name."' width='100' height='75'/>";
?>
Subscribe to:
Posts (Atom)