Posted on: 03/22/03 08:25am
By: Anonymous (garry)
I was competing for a job. The present designer did
this[*1] site as his entry. I used geeklog and did
this geeked[*2] site. NO CONTEST. I used some really cool scripts and integrated world news headlines in it as well. Elapsed time for the competitor site, 3 days. Mine: 1 day. I am a PHP Noob too. The support on this site is pretty good too! THANKS GEEKLOG.
You gotta love Geeklog
Posted on: 03/22/03 12:29pm
By: Anonymous (Anonymous)
Nice site. Can I ask how you got the news headlines feed working?
Thanks
You gotta love Geeklog
Posted on: 03/22/03 03:13pm
By: Anonymous (Anonymous)
Well, if I did the hiring you'd win hands down. Nice site.
You gotta love Geeklog
Posted on: 03/24/03 08:38am
By: Anonymous (garry)
By all means, here you go:
Create a "normal block" using your administration interface and copy the text below. Thanks, Jordie, wherever and whoever you are:
<?
// Google World News Grabber
// Author: Jordie Bodlay & Modified for Geeklog by Garry Egan
// Email: jordie@eenc.net, admin@xdrop.com
// About: This is a free script available for anyones to use
// and can be redistributed only for free and with proper credit
// to the authors.
// ---------------------------------------------------------------
// VARIABLES
$resultCount = '5'; // change this to the number of stories you want displayed.
// Maximum of how ever many are shown on the good world news page.
$newsPage = 'http://news.google.com/news/gnworldleftnav.html'; // if the google world news page changes it's url, change this
// to the new URL.
?>
<!-- GOOGLE WORLD NEWS -->
<?php
$open = fopen($newsPage, "r"

;
$read = fread($open, 900000);
fclose($open);
preg_match_all("|<a class=y href="(.*)">(.*)</a><BR>n<font size=-1>n<b><font color=#6f6f6f>(.*) -</font>|U",$read,$result);
echo "<table border=0 width=100% cellspacing=0 cellpadding=1>";
for ($i = 0; $i <= $resultCount; $i++) { // loop through all the news results
?>
<TR>
<TD><font size=-1 face='times new roman'><B>•</B></TD>
<TD><font size=-1 face='verdana'><a href="<?=$result[1][$i]?>"><?=$result[2][$i]?></a> - <?=$result[3][$i]?></TD>
</TR>
<?
}
?>
</TABLE>
<!-- END GOOGLE WORLD NEWS -->
You gotta love Geeklog
Posted on: 03/24/03 02:52pm
By: rawdata
I don't know how you got it to work in "Normal" blocks because they don't execute php code. Try a phpblock instead.
I did something very similar but it appears in the middle. These are the URL's you can use for pulling news off Google:
Top Stories: http://news.google.com/news/gnmainleftnav.html
World News: http://news.google.com/news/gnworldleftnav.html
US News: http://news.google.com/news/gnusaleftnav.html
Business News: http://news.google.com/news/gnbusinessleftnav.html
Science/Tech News: http://news.google.com/news/gntechnologyleftnav.html
Sports: http://news.google.com/news/gnsportsleftnav.html
Entertainment: http://news.google.com/news/gnenterleftnav.html
Health: http://news.google.com/news/gnhealthleftnav.html
Google is great for news. It's updated realtime and their site rarely goes down.
You gotta love Geeklog
Posted on: 03/24/03 03:00pm
By: Anonymous (garry)
I re-checked the admin page. It defintely says "normal block." Thanks for your posting and I will integrate your suggestions as well. Thanks.
You gotta love Geeklog
Posted on: 03/24/03 04:33pm
By: rawdata
That is weird. I tried again all I get is the code displaying. It doesn't execute. Did you modify your setup someway to get php working in normal blocks? I'm just trying to figure out why yours works differently from mine.
You gotta love Geeklog
Posted on: 03/25/03 03:28am
By: Anonymous (garry)
No THIS is weird. I grabbed the code from the World Headlines block, which is listed as normal block (but previously was a PHP block....hhmmm) and created a new Normal Block. It listed the code as you predicted.
www.doggpark.com
I have no explanation....
Interesting...Ill keep messin' with it since I have nothing else better to do in this life..
Garry
You gotta love Geeklog
Posted on: 03/25/03 03:35am
By: Anonymous (garry)
You are gonna lol on this one.
The block, if it is on the RIGHT side, will display the code, if it is on the LEFT side, it works fine. No idea why. This is one for Dirk.
You gotta love Geeklog
Posted on: 08/16/04 12:16pm
By: zeke
bump.
Still happens in 1.3.9sr1
Had me confused for a while till I saw this.
Not sure if it's a bug or feature.
You gotta love Geeklog
Posted on: 06/21/06 03:05am
By: Anonymous (garry)
[QUOTE BY= garry] You are gonna lol on this one.
The block, if it is on the RIGHT side, will display the code, if it is on the LEFT side, it works fine. No idea why. This is one for Dirk.[/QUOTE]
Did they ever get that fixed?
Internet Consultant[*3]