Rāda ziņas ar etiķeti html. Rādīt visas ziņas
Rāda ziņas ar etiķeti html. Rādīt visas ziņas

2011-06-03

2011-01-19

Getting categories out of blogspot/blogger feeds

Previous post about coding was about syndicating images in PicasaWeb with JonDesign`s Javascript gallery which uses mootools. Next task was mixing blogspot/blogger feeds in standalone web page. And again using easyXML in PHP5 it is easy as pie. In this script the interesting part is learning what the "child" is. If there is one big main structure, where similar smaller structures are built in, then these structures are like children to this main one. And in blogspot/blogger feeds there are possible to get tags or categories for each post. Additionaly, the term of the category is as attribute name inside the feed`s tag. It`s necessary to use attributes()->term, where term is attribute which has different possible names. And as these attributes could be more than one in each post or entry, then there it is where child is born. A new, child simpleXML object is created within this entry, and, correctly parsing, it is possible to get multiple items in each post. "foreach" entry categories loop inside of "foreach" entries loop.
And here is code to see it how it looks like and another DEMO link how it works.

Thus it is possible to get new blogspot/blogger feeds which are based on given tag/category, when building the hyperlink just add "/-/$category_name" in the end of blogger/blogspot full feeds link.

by the way the full blogger/blogspot feeds link is
"http://blogspotuser.blogspot.com/feeds/posts/default"
And modified link should look like

http://blogspotuser.blogspot.com/feeds/posts/default/-/category

2011-01-17

Javascript + mootools + picasa

At last. Not so easy task finished. Finally combining Google provided Picasa online XML RSS feeds with PHP through EasyXML options with JonDesign`s Smooth Gallery which works with mootools. And here all hard work explained in simple words.
Problem - need nice web gallery. Building myself - no thanx. Using ready product - sounds good.
Problem needs. Just one need. Compatability with image servers like flickr, picasa, photobucket, etc.
Solution is combination of Javascript based web gallery with correct feed parsing.
And personally for me it includes learning new things for me, like EasyXML in php5.
Ok, how to combine these two?
1) Download JonDesign`s with mootools here.
2)Get your rss feed and learn google api here
3)And look for source here

2010-01-14

parsing web pages.

Long time ago I was thinking that I`d like to see National Geographic NGM "Your Shoot Daily Dozen" pictures not in the flash, but simple embedded in web pages. Mostly because at that time i was using some of these pictures in another blog, making picture selection by myself, and i needed hyperlinks. It is almost impossible to get picture hyperlinks from flash based web page, but I found that this flash script is taking picture localizations from xml file. And that`s it - all I need to do is to get contents and parse this xml, and finally build the webpage.

The source code you can find here

http://paste.php.lv/dad8d34469fb4558edabac62aa83dea7?lang=php

2009-07-23

remove the navbar

And the last thing what I wanted to do tonight is to remove that ugly blogspot navbar in top of hompeage.

Copy/paste

#navbar-iframe {
display: none !important;
}

into your blog html editor




found it here

http://blogger-templates.blogspot.com/2005/01/remove-navbar.html 

Lat/Long

Solution how to find latitude and longitude using google maps is here, if you haven`t google earth ->

http://www.itouchmap.com/latlong.html

Homepage is using not very complicated OOP based javascript to find parameters, centering the map as the pointer is in the true center thus giving the true coordinats of pointer, and calculates from decimal (default in google maps) to degrees.

bloggggin`

Naisī

Now i have blog. What`s next?

I should write something here, shouldn`t I?

..

Once I had a blog, where i wrote in my native language, but it`s so weird that i blogged, when i had job. But now, when i quitted it, there`s no time for blogging, hah.