Hi!
My current software choice (wordpress.org), allows me to keep a list of weblog links and know when they are changed by automatically checking weblogs.com and blo.gs lists.
Is it possible to implement this feature?
Thanks!
Ricardo
Hi!
My current software choice (wordpress.org), allows me to keep a list of weblog links and know when they are changed by automatically checking weblogs.com and blo.gs lists.
Is it possible to implement this feature?
Thanks!
Ricardo
Humm... I guess I didn't explain myself properly. I don't want to use Indexu as a weblog tool, I want to use it as an indexing tool to keep a list of weblogs.
Weblogs.com and blo.gs have a service that list recently changed weblogs. This is done because they receive "pings" from the weblogs, with the name, url and timestamp of the updated weblog.
A lot of weblog scripts like MoveableType, Blogger, etc has this feature.
My current software, downloads the recently changed weblogs' list (in xml format) and allows me to sort my lists by the weblogs' update timestamp.
So, instead of a list sorted by name:
- Site A
- Site B
- Site C
I can have a list sorted by last update:
- Site C (last updated on 2003/09/15 23:32:45)
- Site B (last updated on 2003/09/15 14:11:10)
- Site A (last updated on 2003/09/15 06:44:00)
Since I haven't the chance to look at the code, I want to ask, from a developer point of view, if you consider this possible and doable?
Thanks! =)
Ricardo
Last edited by rbl; 07-14-2003 at 09:33 PM.
That's not a big deal. Some minor changes in a file called browse.php which pases a query value:Originally posted by rbl
I can have a list sorted by last update:
- Site C (last updated on 2003/09/15 23:32:45)
- Site B (last updated on 2003/09/15 14:11:10)
- Site A (last updated on 2003/09/15 06:44:00)
to a library file called link.class.php. The default order is set to bid. Just change this to "date".Code:$links_obj->query .= "order by bid desc";
Joerg
Last edited by tjoerg; 07-15-2003 at 03:10 AM.
--------- applying hacks require a knack ---------
as tjoerg suggests, sorting the links is easy.Originally posted by rbl
I can have a list sorted by last update:
are you looking for more?
How does the date updated?
- Manually???
- by "My current software, [which] downloads the recently changed weblogs' list????"
- by INDEXU downloading the list and updating the link
![]()
esm
"The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."
.
Thanks Tjoerg and Esm!
Like I said before, the idea is to hack indexu so it can download the xml list, parse its contents and then update its listings according to the timestamps found in the xml file.
OUCH! That makes my little brain hurt just thinking about it...
That is what I thought.
It is probably doable but it will take someone with a lot more expertise than me.![]()
can you give us an idea of what the download page looks like? Just a small sample.
esm
"The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."
.
Do you mean the xml list that indexu will have to parse? It's this one this one.
hmm... here I posted a snipped xml code
Parsing xml is quite easy using expat/php. The information in xml is:PHP Code:<weblogUpdates version="1" updated="Wed, 16 Jul 2003 02:54:03 GMT" count="1039767">
<weblog name="traces" url="http://www.sweetnsour.org/traces" when="13" />
<weblog name="Babs - A Day In The Life" url="http://www.babineau.ca/journal/index.php" when="13" />
- name
- url
- when
I'm still not sure how this information will be processed. Please tell us more
From what I can see, 2 simple functions called at the start and at the end of each line, do all the necessary parsing in the xml file.
The startElement looks the most important of the two:
In fact, 3 small php files handle all the necessary functions related to link indexing.Code:function startElement($parser, $tagName, $attrs) { global $updated_timestamp, $all_links; if ($tagName == 'WEBLOGUPDATES') { //convert 'updated' into php date variable $updated_timestamp = strtotime($attrs['UPDATED']); //echo('got timestamp of ' . gmdate('F j, Y, H:i:s', $updated_timestamp) . "\n"); } else if ($tagName == 'WEBLOG') { // is this url in our links? //echo("wblogs.com link " .$attrs['URL']); $link_url = str_replace('www.', '', $attrs['URL']); $link_url = preg_replace('/(?:index|default)\.[a-z]{2,}/i', '', $link_url); //echo(" now equals $link_url\n"); if (isset($all_links[$link_url])) { $all_links[$link_url][1] = gmdate('YmdHis', $updated_timestamp - $attrs['WHEN']); //echo('set link id ' . $all_links[$link_url][0] . ' to date ' . $all_links[$link_url][1] . "\n"); } } }
If you want to see this more carefully, you can download wordpress form their site
I see. That is clear enough. The codes can parse xml easy, you just need to store them in array, then insert them in indexu database.![]()