Menu

#80 XML News not working

Current_Release
closed
None
5
2012-09-15
2005-06-27
Anonymous
No

yes, we have a xml feed news that send you to an
incorrect link.

the xml tell us is the link:
http://www.backstageservice.com/cgi-bin/yawps/topics.cgi?op=view_topic;id=21

but the right link is:

http://www.backstageservice.com/cgi-bin/yawps/topics.cgi?op=view_topic;cat=exp;id=22

what i have to modify to make it work some can tell me.
because i'am not a programer

thanks
Luis Ibarra
nic name: backsta

Discussion

  • Nobody/Anonymous

    Logged In: NO

    in yawps.pm goto sub rdf_export and change it to:

    sub rdf_export
    {
    my $top_news = get_latest_articles($cfg{max_items_per_page});
    my ($channel, $item) = ('', '');

    # Get the latest headlines.
    foreach (@{$top_news})
    {
        my ($num, $subject, undef, undef, undef, undef, $cat) =
            split (/\|/, $_);
    
        $channel .=
            qq(<rdf:li
    

    resource="$cfg{pageurl}/topics.$cfg{ext}?op=view_topic;cat=$cat;id=$num"
    />);
    $item .= <<RDF; <item="" rdf:about="$cfg{pageurl}/topics.$cfg{ext}?op=view_topic;cat=$cat;id=$num">
    $subject
    <link>$cfg{pageurl}/topics.$cfg{ext}?op=view_topic;cat=$cat;id=$num</link>
    </item>
    RDF
    }

    # Export data to XML file.
    sysopen(FH, "$cfg{yawpsnewsdir}/yawpsnews.xml",
        O_WRONLY | O_TRUNC | O_CREAT);
    if ($cfg{use_flock}) { flock(FH, LOCK_EX); }
    print FH <<RDF;
    

    <?xml version="1.0" encoding="$cfg{codepage}"?>
    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/">

    <channel rdf:about="$cfg{yawpsnewsurl}/yawpsnews.xml">
    $cfg{pagename}
    <link>$cfg{pageurl}/index.$cfg{ext}</link>
    <description>$cfg{pagetitle}</description>
    <items>
    <rdf:Seq>
    $channel</rdf:Seq>
    </items>
    </channel>
    $item
    </rdf:RDF>
    RDF
    close(FH);
    }

     
  • Adrian Heissler

    Adrian Heissler - 2005-07-19

    Logged In: YES
    user_id=294842

    fixed in yawps.pm,v 1.2.2.3

     

Log in to post a comment.