Welcome to Geeklog, Anonymous Wednesday, April 24 2024 @ 10:24 pm EDT

Geeklog Forums

Top Newfeeds- how???


Chris

Anonymous
I am a newbie to Geeklog (obviously) and I have spent hours searching for a way to display news from top news sites in the center block on the main index for my website. I assumed this would a highly popular feature, imagine my surprise after hours of searching that not much is said or done about it.

I have tried the "squatty" news plugin but got nothing (most likely my error) and couldn't find one site actually using it to even view an example of it at work. Then I went with the "MyHeadlines" app which is exactly what I want- yet figuring out how to display it on the index page has become impossible. A user, "Scurvydawg" had suggested emabling PHP in a static page then adding this script:

global $myhPath,$_USER;
$myhPath = "MyHeadlines/MyHeadlines";
require_once("$myhPath/MyHeadlines.php");

//Get User Permissions / Values
if(empty($_USER['uid'])){
$isAnon = 1;
$isUser = 0;
$uname = "";
$uid=0;
}else{
$isAnon = 0;
$isUser = 1;
$uname = $_USER['username'];
$uid=$_USER['uid'];
}

//Get Admin Permissions
$isAdmin=SEC_inGroup('Root');


//Init MyHeadlines
$headlines = new MyHeadlines; //create a MyHeadlines Object
$headlines->MYH_INIT("index.php?y=0", "gl", $isAdmin,$uid,$uname,0); //init
the object... (see API.txt)


// Display ...
$myh_output = $headlines->getDashBoardComponent_UserSubscriptions();

//modify some paths so things look right...
$myh_output =
ereg_replace("MyHeadlines.images","MyHeadlines/MyHeadlines/images",$myh_outp
ut);
$myh_output =
ereg_replace("MyHeadlines.index.php.y=0","index.php?y=0",$myh_output);
//just incase some are good... Break them so they can be fixed by the next
line
$myh_output =
ereg_replace("index.php.y=0","MyHeadlines/index.php?y=0",$myh_output);

return $myh_output;

---
after that I get an error:

Parse error: parse error, unexpected T_STRING in /homepages/44/d105060507/htdocs/ivyzoo.net/plugins/staticpages/functions.inc(475) : eval()'d code on line 25

----

At this point it doesn't matter to me how it happens I just need some ANY advice in how to take news from popular feeds and add them to my index. Please help!!!!

Thanks

You can send suggestions or comments to:

cp@radiosilent.com

THANKS!!
 Quote

Status: offline

Euan

Forum User
Full Member
Registered: 04/22/02
Posts: 292
MyHeadlines is integrated into Geeklog:

http://www.geeklog.net/article.php?story=20031229140042760

The Ewiki plugin (download from my site) has a plugin to allow including feeds. Include the following in a page:

Text Formatted Code

<?plugin Syndicate url=http://heatherengineering.com/backend/macosxlinks.rdf ?>


 


and you should (theoretically) get a page with the results of that feed in it. But I just tried, and it doesn't seem to work... so I reported a bug to the ErfurtWiki makers, and will post again when I get a reply. So that wasn't very useful, was it...

Cheers,

Euan.

[update: the rss feed plugin for ewiki is broken. They've added it to their list of things to do and it'll get done at some time, but it doesn't seem to be one of their highest priorities at the moment. It seems that there is more to work on in the wiki itself which understandably takes priority.]
-- Heather Engineering
-- No job too small
 Quote

Chris

Anonymous
Thanks for the reply... anybody else?
 Quote

Status: offline

comicbookguy

Forum User
Regular Poster
Registered: 05/15/04
Posts: 97
caffeinated
MyHeadlines should work just fine if installed correctly. Here are the installation instructions:
Text Formatted Code
1)  Copy the /public_html/MyHeadlines directory and its contents to your site.
    Yes, there should be a path ".../MyHeadlines/MyHeadlines/MyHeadlines.php"  
2)  Log in as administrator (Root) and access the module via the MyHeadlines
    directory
    Example:  Your web root is      - http://www.yoursite.com
              MyHeadlines Module is - http://www.yoursite.com/MyHeadlines
3)  Click on Administration (Menu item within MyHeadlines module)
4)  Click on Import
5)  Import the headline database file(s).
 


Remember the default installation does not have anything in the database. You must import the Headline DB from the Administration->Import menu item.

When creating the static page (as Scurvydawg suggested) to display your headlines make sure you select the Centerblock option. Make sure you select wrap Static page in a block and execute PHP(return).

I have this running on two sites PlanetDouglas and Blogweiser and it works like a charm.
 Quote

Chris

Anonymous
Thanks-

I am going to try to give it a go in the morning... I just noticed I do not HAVE an import in the admin... where is that?
 Quote

Chris

Anonymous
- I still get the parse error:

Parse error: parse error, unexpected T_STRING in /homepages/44/d105060507/htdocs/ivyzoo.net/plugins/staticpages/functions.inc(472) : eval()'d code on line 25
 Quote

Status: offline

comicbookguy

Forum User
Regular Poster
Registered: 05/15/04
Posts: 97
This thread might help you track down the problem you are having http://www.geeklog.net/docs/install.html#corrupted. Do a thorough search of the site and you will probably find the answer to your problem.
 Quote

Chris

Anonymous
Thanks for the response- I have already read that documentation. It seems it was a error in the php (typo) that caused the first parse error I got but now I am getting:

arning: Unknown(MyHeadlines/MyHeadlines/MyHeadlines.php): failed to open stream: No such file or directory in /homepages/44/d105060507/htdocs/ivyzoo.net/public_html/staticpages/index.php(84) : eval()'d code on line 4

Fatal error: (null)(): Failed opening required 'MyHeadlines/MyHeadlines/MyHeadlines.php' (include_path='/homepages/44/d105060507/htdocs/ivyzoo.net/system/pear/:.:/usr/local/lib/php') in /homepages/44/d105060507/htdocs/ivyzoo.net/public_html/staticpages/index.php(84) : eval()'d code on line 4


--
The fun never ends- nothing like creating a news site that displays no news..
 Quote

Chris

Anonymous
What it seems to be getting stuck on is:

require_once("$myhPath/MyHeadlines.php");

in the code for the static page that Scurvydawg passed my way. All the paths are right. I installed it exactly where the instructions say to install.

 Quote

Status: offline

comicbookguy

Forum User
Regular Poster
Registered: 05/15/04
Posts: 97
The static page you are using looks correct. Did you copy MyHeadlines into your exisitng public_html directory?

I don't know if this is your problem but in looking at the instructions I could see where someone might make the mistake of creating a second public_html directory. Which of course will not work. The GL instructions should probably read:

Text Formatted Code
1)  Copy the /MyHeadlines directory and its contents to your public_html directory.
    Yes, there should be a path ".../MyHeadlines/MyHeadlines/MyHeadlines.php"  
2)  Log in as administrator (Root) and access the module via the MyHeadlines
    directory
    Example:  Your web root is      - http://www.yoursite.com
              MyHeadlines Module is - http://www.yoursite.com/MyHeadlines
3)  Click on Administration (Menu item within MyHeadlines module)
4)  Click on Import
5)  Import the headline database file(s).



 


In other words you only want to copy the contents of the public_html directory to your existing public_html directory. I hope that helps.
 Quote

Chris

Anonymous
Yes... if I search www.mysite/myheadlines/ everything shows up just fine but when I try to get them on the main index I get that error.
 Quote

Status: offline

comicbookguy

Forum User
Regular Poster
Registered: 05/15/04
Posts: 97
If thats the case then the problem is most likely with your static page. I would delete that page and create a new one. Don't use a text editor either as that can cause problems.

If you like send me an email and I will reply with a text file with the code snippet.

By the way what version of gl are you using?
 Quote

All times are EDT. The time is now 10:24 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