Web development , php , ajax , symfony, framework, zend
In: web resources
19 Feb 2010Everyday Design Reviver Answers is offering solutions via useful snippets of code, helpful resources and general tips for all your web design issues. And as such we would like to share with you our favorite code snippets from this last week.
It has been yet another good week, thanks for your support!
“Have you asked a question yet?“
We do this by accessing the persons Twitter account RSS feed, then fetching it and embedding it on your site.
Replace the example RSS’s with the ones you’d like.
get_item_quantity(3);
$rss_items = $rss->get_items(0, $maxitems);
?><?php if ($maxitems == 0) echo '
- No items.
';
else
// Loop through each feed item and display each item as a hyperlink.
Foreach ( $rss_items as $item ) : ?>- <a href='get_permalink(); ?>'>
get_title(); ?>
If you want to display their info at the bottom or beginning of the post, then use this and place it in the corresponding area of your WordPress files. (i.e. Single.PHP or Comments.PHP)
Edit the author box as necessary.
You can add the following jQuery code anywhere you want on the site (i.e. Sidebar, footer, etc.) Just remember to replace and specify which feed you’ll be recalling.
$(document).ready(function(){
$.ajax({
type: "GET",
url: "http://feeds.feedburner.com/examplefeed",
success: Function(data){
$("#date").text($(data).find("item:first>pubDate:first").text());
$("#title").html("link:first").text()+"'>"+$(data).
find("item:first>title:first").text()+"");
$("#description").html($(data).
find("item:first>description:first").text());
}
If you’re refering to having your images and boxes with a drtop shadow, then you need the Box Shadow CSS feature to work for you. Here’s what you need to place in your CSS:
.shadow {
box-shadow: 3px 3px 3px #f2f2f2;
-moz-box-shadow: 3px 3px 3px #f2f2f2;
-webkit-box-shadow: 3px 3px 3px #f2f2f2;
}
If you want to redirect users to another site once they enter a specific area on your site then you just have to use some of this Javascript code in the page to be redirected from:
Replace the www.google.com with the URL address you wish to redirect to.
There are always some questions that seem to get through the net, can you help us answer them?
Thanks again, firstly to everyone who asked a question, but most importantly thanks to everyone that took the time to offer always helpful and useful answers.
This blog delivers stylish and dynamic news for designers and web-developers on all subjects of design, ranging from: CSS, Ajax, Javascript, web design, graphics, typography, advertising & much more. Our goal is to help you communicate effectively on the web with an engaging website or functional interface.
6 Responses to A Selection of Code Snippets from Design Reviver Answers
Generalist
March 4th, 2010 at 6:53 pm
Suggestion: Don't even wait for the answer to this short question.
Just Plain American
March 8th, 2010 at 5:38 am
I want to keep the health care I worked for and have.I don't believe anything he or the libs say regarding healthcare
emmasnw
March 20th, 2010 at 10:10 pm
hey!

i was looking for some photos for using in websites awhile ago. i have tried some stock photo companies. the best website i recommend everybody is i have used over 30 of their photos in over 50 local websites in orange county, huntington beach, newport beach, seal beach, laguna beach,irvine, santa ana,…
good luck man!
Ashli
March 20th, 2010 at 11:41 pm
converse or nikes
look at these
FOX News is the best
March 27th, 2010 at 5:13 pm
Yes for that you need marijuana.
Michael
May 16th, 2010 at 8:09 am
Have a look in here, might help.
http://myaolblog.aol.com/category/myaol-widgets/