Welcome to Geeklog Thursday, October 21 2021 @ 10:58 pm EDT

Geeklog Forums

You gotta love Geeklog


garry

Anonymous
I was competing for a job. The present designer did this site as his entry. I used geeklog and did this geeked 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.
 Quote

Anonymous

Anonymous
Nice site. Can I ask how you got the news headlines feed working? Thanks
 Quote

Anonymous

Anonymous
Well, if I did the hiring you'd win hands down. Nice site.
 Quote

garry

Anonymous
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"Wink; $read = fread($open, 900000); fclose($open); preg_match_all("|<a class=y href="(.*)">(.*)</a><BR>n<font size=-1>n<b><font color=#6f6f6f>(.*)&nbsp;-</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>&#149;</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 -->
 Quote

Status: offline

rawdata

Forum User
Full Member
Registered: 17/02/03
Posts: 236
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.
 Quote

garry

Anonymous
I re-checked the admin page. It defintely says "normal block." Thanks for your posting and I will integrate your suggestions as well. Thanks.
 Quote

Status: offline

rawdata

Forum User
Full Member
Registered: 17/02/03
Posts: 236
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.
 Quote

garry

Anonymous
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
 Quote

garry

Anonymous
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

Status: offline

zeke

Forum User
Newbie
Registered: 14/08/04
Posts: 1
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.
 Quote

garry

Anonymous
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.

Did they ever get that fixed?

Internet Consultant
 Quote

All times are EDT. The time is now 10:58 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content