Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.6
Author Message
Himmel
Regular
Regular



Joined: May 08, 2004
Posts: 77

PostPosted: Mon Jan 10, 2005 6:36 pm Reply with quote

Did try to add rss news. Block is showing ok for the admin.
But i cant change it to show it to all.

The block is activated, but when im changing it to all it just wont do this.. it stays admin only...

Any1?
 
View user's profile Send private message
sixonetonoffun
Spouse Contemplates Divorce



Joined: Jan 02, 2003
Posts: 2496

PostPosted: Mon Jan 10, 2005 7:32 pm Reply with quote

Will permissions change on other blocks? Or is it only that one?
If it is only that one try creating one with Ravens backend.php and when creating it set view to all.

If it is all blocks try deleting and uploading the admin/modules/blocks.php just to verify it was overwritten during the upgrade.

_________________
[b][size=5]openSUSE 11.4-x86 | Linux 2.6.37.1-1.2desktop i686 | KDE: 4.6.41>=4.7 | XFCE 4.8 | AMD Athlon(tm) XP 3000+ | MSI K7N2 Delta-L | 3GB Black Diamond DDR
| GeForce 6200@433Mhz 512MB | Xorg 1.9.3 | NVIDIA 270.30[/size:2b8 
View user's profile Send private message
Himmel







PostPosted: Tue Jan 11, 2005 3:46 am Reply with quote

Where can i find Ravens backend.php? Its not in the download-section. Embarassed
 
sixonetonoffun







PostPosted: Tue Jan 11, 2005 6:42 am Reply with quote

Sorry I thought you meant a auto rss feed like http://www.ravenphpscripts.com/backend.php

Is the block a hard coded block-News_RSS.php?
 
Himmel







PostPosted: Tue Jan 11, 2005 10:52 am Reply with quote

Nope.. I used the option to add a block with RSS in the blocks module...
 
VinDSL
Life Cycles Becoming CPU Cycles



Joined: Jul 11, 2004
Posts: 614
Location: Arizona (USA) Admin: NukeCops.com Admin: Disipal Designs Admin: Lenon.com

PostPosted: Tue Jan 11, 2005 9:46 pm Reply with quote

My site does the same thing. I think it's a bug in 'mainfile.php'. It's probably something simple, but I'm too lazy to go hunt it down. I just delete the block and create a new one, with the changes that I want to make.

If I remember correctly, you can't save a 'name change' or anything, once a RSS block has been created...

_________________
.:: "The further in you go, the bigger it gets!" ::.
.:: Only registered users can see links on this board! Get registered or login! | Only registered users can see links on this board! Get registered or login! ::. 
View user's profile Send private message Visit poster's website ICQ Number
Himmel







PostPosted: Wed Jan 12, 2005 6:32 am Reply with quote

Ah ok thanks.. New block works Wink

Another question about this.. I use http://www.telegraaf.nl/rss/ and its displaying to many items in the block.. How can i limit it for example 4 or 5 items?
 
VinDSL







PostPosted: Thu Jan 13, 2005 3:52 am Reply with quote

Himmel wrote:
Another question about this.. I use http://www.telegraaf.nl/rss/ and its displaying to many items in the block.. How can i limit it for example 4 or 5 items?

I only run 1 news feed (Drudge Report), and I want it to display 15 items, so I hacked 'mainfile.php'.

In the Headline function, I patched the 'otime bug', changed the number of items to be displayed to 15, and got rid of the ' read more...' link.

Here's the code I use:

Code:


function headlines($bid, $cenbox=0) {
    global $prefix, $db;
    $bid = intval($bid);
    $row = $db->sql_fetchrow($db->sql_query("SELECT title, content, url, refresh, time FROM ".$prefix."_blocks WHERE bid='$bid'"));
    $title = $row['title'];
    $content = $row['content'];
    $url = $row['url'];
    $refresh = intval($row['refresh']);
    $otime = $row['time'];
    $past = time()-$refresh;     // Patch by VinDSL
    if ($otime < $past) {
    $btime = time();
    $rdf = parse_url($url);
    $fp = fsockopen($rdf['host'], 80, $errno, $errstr, 15);
    if (!$fp) {
        $content = "";
        $db->sql_query("UPDATE ".$prefix."_blocks SET content='$content', time='$btime' WHERE bid='$bid'");
        $cont = 0;
        if ($cenbox == 0) {
        themesidebox($title, $content);
        } else {
        themecenterbox($title, $content);
        }
        return;
    }
    if ($fp) {
        if ($rdf['query'] != '')
            $rdf['query'] = "?" . $rdf['query'];

        fputs($fp, "GET " . $rdf['path'] . $rdf['query'] . " HTTP/1.0\r\n");
        fputs($fp, "HOST: " . $rdf['host'] . "\r\n\r\n");
        $string    = "";
        while(!feof($fp)) {
            $pagetext = fgets($fp,300);
            $string .= chop($pagetext);
        }
        fputs($fp,"Connection: close\r\n\r\n");
        fclose($fp);
        $items = explode("</item>",$string);
        $content = "<font class=\"content\">";
        for ($i=0;$i<15;$i++) {               // Hack by VinDSL
        $link = ereg_replace(".*<link>","",$items[$i]);
        $link = ereg_replace("</link>.*","",$link);
        $title2 = ereg_replace(".*<title>","",$items[$i]);
        $title2 = ereg_replace("</title>.*","",$title2);
        $title2 = stripslashes($title2);
        if ($items[$i] == "" AND $cont != 1) {
            $content = "";
            $db->sql_query("UPDATE ".$prefix."_blocks SET content='$content', time='$btime' WHERE bid='$bid'");
            $cont = 0;
            if ($cenbox == 0) {
            themesidebox($title, $content);
            } else {
            themecenterbox($title, $content);
            }
            return;
        } else {
            if (strcmp($link,$title2) AND $items[$i] != "") {
            $cont = 1;
            $content .= "<strong><big>&middot;</big></strong><a href=\"$link\" target=\"new\">$title2</a><br>\n";
            }
        }
        }

    }
    $db->sql_query("UPDATE ".$prefix."_blocks SET content='$content', time='$btime' WHERE bid='$bid'");
    }
    $siteurl = ereg_replace("http://","",$url);
    $siteurl = explode("/",$siteurl);
    if (($cont == 1) OR ($content != "")) {
//  $content .= "<br><a href=\"http://$siteurl[0]\" target=\"blank\"><b>"._HREADMORE."</b></a></font>";     // Hack by VinDSL
    } elseif (($cont == 0) OR ($content == "")) {
    $content = "<font class=\"content\">"._RSSPROBLEM."</font>";
    }
    if ($cenbox == 0) {
 
Himmel







PostPosted: Thu Jan 13, 2005 9:24 am Reply with quote

Did use this to change the number to 6 items:
Code:
for ($i=0;$i<6;$i++) {  //hack by VinDSL


That didnt work.

The readmore hack is working fine.

dont know what the 'otime bug' is so i didnt change that1 yet...


Edit: 6 items is working... I guess it takes some time... Smile
Thanks
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.6

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©