Get XOOPS XOOPSXOOPS FAQFAQ ForumsForums NewsNews ThemesThemes ModulesModules
New Posts New Topics All Posts All Forums Index General Modules Themes Development International XOOPS.org

Search

Donat-O-Meter

Make donations with PayPal!
Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $65.00
Net Balance: $61.80
Left to go: $38.20

Donations
studioC  ($25)May-17
Anonymous ($15)May-16
Anonymous ($25)May-4

Learn XOOPS Core

Local Support

Advertisement

XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

2 2.5 2.5.5 2.6 3.0 2013 Abuse alimento AntiHarvesting AntiMalUser AntiSpam API ASP Beats billige black block Blocking Blocks blue Bytes Captcha cell Christmas chronolabs Client content Conversion demo Dictionary docek download Dresses editor evden eve facebook floor forms framework free herre Honeypot Human Hymn instant-zero IP jQuery kantor lamps Load log logger mobile module modules Monster MyAlbum-p newbb news online PageRank Party Permissions pink Plugin pollos portal Prevention profile project Protector publisher REST Rights rmcommon Room sale security Server site Smarty Spam SQL stem Studio tag tags tdmcreate Theme themes Transaction userlog website Whitepaper Wishcraft XFriendica xoops Xortify ZendFramework

New Users

Registering user

# 136024

ngochuyen

Welcome to XOOPS!




Bottom   Previous Topic   Next Topic  Register To Post

« 1 (2)


#11 Posted on: 2004/8/12 14:41 Re: Headlines module not functioning
I just found this thread, as I was having the same problem. My hosting provider also has fopen() disabled for security reasons (from what I've been reading, fopen() can be dangerous). But they have curl available. Use phpinfo() to see if curl is available on your server. If so, go into modules/xoopsheadline/class/headlinerender.php and change updateCache() like so:

-----
function updateCache()
{
# comment out the fopen stuff...
#if (!$fp = fopen($this->_hl->getVar('headline_rssurl'), 'r')) {
#$this->_setErrors('Could not open file: '.$this->_hl->getVar('headline_rssurl'));
#return false;
#}
#$data = '';
#while (!feof ($fp)) {
#$data .= fgets($fp, 4096);
#}
#fclose ($fp);

# replace with curl
$fp = curl_init($this->_hl->getVar('headline_rssurl'));
curl_setopt ($fp, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($fp, CURLOPT_HEADER, 0);
$data = curl_exec($fp);
curl_close ($fp);

if (empty($data)) {
$this->_setErrors('Could not open file: '.$this->_hl->getVar('headline_rssurl'));
return false;
}
-----
And don't change the rest of the function...

I got the code for this right the first time I wrote it, but I didn't know it, as I forgot to force updateCache() to run, so I thought it wasn't working. To test, set $force_update = TRUE as the first line inside renderFeed(), and don't forget to remove it when you're done (otherwise you'll probably get banned from the rss services you're using!).

Top

toppa
Just popping in
Just popping in
Joined:
2004/8/12 14:24
Group:
Registered Users
Posts: 1
(Show More) (Show Less)


#12 Posted on: 2006/5/22 8:38 Re: Headlines module not functioning
I can not get this working! Has anyone got this working on godaddy?

http://help.godaddy.com/article.php?article_id=288&topic_id=&&

Top

mlavwilson
Just popping in
Just popping in
Joined:
2006/4/10 10:16
Group:
Registered Users
Posts: 5
(Show More) (Show Less)




« 1 (2)



You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You can vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.

[Advanced Search]