Importing and displaying external RSS feeds on your site is a great way to share your online activity with your visitors. If you are active on Flickr, Delicious, Twitter, or Tumblr, your visitors will enjoy staying current with your updates. Many social media sites provide exclusive feeds for user-generated content that may be imported and displayed on virtually any web page. In this article, you will learn three ways to import and display feed content on your WordPress-powered website — without installing yet another plugin.
Importing and displaying feeds with WordPress & Magpie
What is magpie?
MagpieRSS is an XML-based (expat) RSS parser in PHP. WordPress uses Magpie to parse RSS and Atom feeds and display them on your website. Magpie parses feeds for two different WordPress functions.
wp_rss() - fetches and parses feeds for instant
fetch_rss() - fetches and parses feeds for advanced
You will get black background if you resize a transparent image. To fix it, You need set alpha channel imagecolorallocatealpha to 127. With imagecolorallocatealpha, it will allocate a color for an image.
Usage:
int imagecolorallocatealpha ( resource image, int red, int green, int blue, int alpha)
From PHP manual:
imagecolorallocatealpha() behaves identically to imagecolorallocate() with the addition of the transparency parameter alpha which may have a value between 0 and 127. 0 indicates completely opaque while 127
indicates completely transparent. Returns FALSE if the allocation failed.
Before using it, you must set to false the blending mode for an image and set true the flag to save full alpha channel information.
Description: phpThumb() uses the GD library to create thumbnails from images (JPEG, PNG, GIF, BMP, etc) on the fly. The output size is configurable (can be larger or smaller than the source), and the source may be the entire image or only a portion of the original image.
If you have a wordpress blog with one or more author, then it is most important to list author details in the wordpress post pages. The followings functions will help you list out author details such as
the_author
the_author_description
the_author_login
the_author_firstname
the_author_lastname
the_author_nickname
the_author_ID
the_author_email
the_author_url
the_author_link (Version 2.1)
the_author_aim
the_author_yim
the_author_posts
the_author_posts_link
wp_list_authors
Okay, will discuss in detail below,
the_author
Description: it displays Author's 'Public' Name
Syntax: <?php the_author(); ?>
Example: <p> this post was written by <?php the_author(); ?></p>
the_author_description
Description: Displays the contents of the about yourself field in an author's profile (Administration > Profile > Your Profile). About yourself is a block of text often used to publicly describe the user and can be quite long. This tag must be used within The Loop.
Description: This tag displays the login name of the author of a post. The login is also referred to as the Username an author uses to gain access to a WordPress blog. This tag must be used within The Loop
Note: It's usually not a good idea to provide login information publicly. But it can be used for some other purposes
Description: The following tags display the name for the author of a post. The First Name field is set in the user's profile (Administration > Profile > Your Profile). This tag must be used within The Loop.
Example: <p>This post was written by <?php the_author_firstname(); ?></p>
the_author_ID
Description: Displays the unique numeric user ID for the author of a post; the ID is assigned by WordPress when a user account is created. This tag must be used within The Loop.
Syntax: <?php the_author_ID(); ?>
Example: <a href="/blog/index.php?author=<?php the_author_ID(); ?>">View all
posts by <?php the_author_nickname(); ?></a>
the_author_email
Description: This tag displays the email address for the author of a post. The E-mail field is set in the user's profile (Administration > Profile > Your Profile). This function must be used within The Loop.
Note that the address is not encoded or protected in any way from harvesting by spambots
Syntax: <?php the_author_email(); ?>
Example: <a href="mailto:<?php the_author_email(); ?>">Contact the author</a>
Secure your author’s email:
This example partially 'obfuscates' address by using the internal function antispambot()
to encode portions in HTML character entities (these are read correctly by your browser).
Note the example uses get_the_author_email() function, because the_author_email()
echoes the address before antispambot() can act upon it.
Description: This tag displays the URL to the Website for the author of a post. The Website field is set in the user's profile (Administration > Profile > Your Profile). This tag must be used within The Loop.
Description: This tag displays the AOL Instant Messenger screenname for the author of a post. The AIM field is set in the user's profile (Administration > Profile > Your Profile). This tag must be used within The Loop.
Syntax: <?php the_author_aim(); ?>
Example: <p>Contact me on AOL Instant Messenger: <?php the_author_aim(); ?></p>
the_author_yim
Description: This tag displays the Yahoo IM ID for the author of a post. The Yahoo IM field is set in the user's profile (Administration > Profile > Your Profile). This tag must be used within The Loop.
Syntax: <?php the_author_yim(); ?>
Example: <p>Contact me on Yahoo Messenger: <?php the_author_yim(); ?></p>
the_author_posts
Description: Displays the total number of posts an author has published. Drafts and private posts aren't counted. This tag must be used within The Loop.
Syntax: <?php the_author_posts(); ?>
Example: <p><?php the_author(); ?> has blogged <?php the_author_posts(); ?>
posts</p>
the_author_posts_link
Description: Displays a link to all posts by an author. The link text is the user's Display name publicly as field. The results of clicking on the presented link will be controlled by the Template Hierarchy of Author Templates. This tag must be used within The Loop.
Syntax: <?php the_author_posts_link(); ?>
Example: <p>Other posts by <?php the_author_posts_link(); ?></p>
wp_list_authors
Description: Displays a list of the blog's authors (users), and if the user has authored any posts, the author name is displayed as a link to their posts. Optionally this tag displays each author's post count and RSS feed link.
Syntax: <?php wp_list_authors('arguments'); ?>
Example: <?php $defaults = array(
'optioncount' => false,
'exclude_admin' => true,
'show_fullname' => false,
'hide_empty' => true,
'feed' => ,
'feed_image' => ); ?>
By default, the usage shows:
* Does not display the count of the number of posts
* Excludes the 'admin' author from the list
* Does not display the full name (first and last) but displays the author nickname
SimpleModal Jquery plugin helps you to create Ajax form with style pop up. It is very easy to setup in the web pages. It supports almost alkind of browsers. This download was written in php(contact.php).
This plugin uses "contact.php" where you need to change your email id.
Click this demo button to see the DEMO instantly
For Dot net developers need to change the contact.php according to their needs.
For more reference and Download link:http://www.ericmmartin.com/simplemodal/
Image zooming using JQuery
This Jquery helps you to integrate small magnifier window close to the image or images on your web page easily. It's the best way to display images in incredible detail. Users do not need to click anything - they just move their mouse over the image to see every detail of your product!
Features
Fast - the page loads as normal, then the high-resolution image downloads invisibly in the background.
Easy - add it to your website in minutes.
Customisable - change the size, position, colors to suit your website.
FOR MORE DETAILS AND DOWNLOADS: http://www.mind-projects.it/blog/jqzoom_v10
<head>
<script type="text/javascript">
function makAx() // this function to activate XMLHttpRequest Object
{
try
{
xm = new ActiveXObject("Msxml2.XMLHTTP");
return true;
}
catch (e)
{
try
{
xm = new ActiveXObject("Microsoft.XMLHTTP");
return true;
}
catch (e2)
{
xm = false;
}
}
if (!xm && typeof XMLHttpRequest != ‘undefined’)
{
xm = new XMLHttpRequest();
return true;
}
}
function showImages()
{
if(makAx()) // XMLHttpRequest checked here
{
url = "external-page-for-db-query.php"; // this file will contains your db query
callavail();
}
}
function callavail()
{
xm.open("GET",url,true); // This is ajax functionality. It may have true(for synchronous request) or false(for asynchronous request)
xm.onreadystatechange = cavail;
xm.send(null);
}
function cavail()
{
if(xm.readyState == 4) // If ready state reached
{
var response = xm.responseText;
var str = document.getElementById("showResult"); // result of "external-page-for-db-query.php" will come here
str.innerHTML = response;
setTimeout("showImages()",1000); // here 1000 represents one second for time delay. showImage() function will be called with the specified time delay
}
}
</script>
</head>
<body>
<div id="showResult"></div> <!–page result will be displayed here–>
</body>
</html>