Get started with PHP-Fusion

Start a New Thread

Users Participated

  • Falk
    Post made: 3
  • Woody
    Post made: 3

  1. PHP-Fusion Support Forums
  2. PHP-Fusion 7 Support
  3. Modifications and Requests - 7

RSS parser system question?

Post your modification and request questions for v7 here.

5 Replies 614 Views Last Updated on 9 months ago

Woody


Junior Member

#1

Posted 9 months ago

i downloaded the rss parser system and infused it. all is well.... but not sure how to get the rss feeds from my site using the parser system. note i have no rss aritcle.php or any others for news and such. where do i get those from? TIA

Posts: 46

Joined: 26/09/2007

Falk


Super Admin

#2

Posted 9 months ago

Try attachment, it might require some mods. Could not find the "fixed" one.

Posts: 3855

Joined: 27/09/2005

Woody


Junior Member

#3

Posted 9 months ago

cool and ty
now the panel comes up with icons but nothing is in rss when i look at it. now i have the feeds in the forum3 dir bostonrockradio.com/forum3
and i see there is no infuse to this one. any ideas?

here is what i get on all i think but total blank on news

XML Parsing Error: no element found
Location: http://www.bostonrockradio.com/forum3/feeds/rss...forums.php
Line Number 1, Column 1:

also shouldn't it open in new window?

looked into the feeds error log and this is what is in there
[09-Jan-2017 14:48:00 Europe/London] PHP Fatal error: Call to undefined function multilang_table() in /home/waynerockon/public_html/forum3/feeds/rss_news.php on line 24

Edited by Falk on 16-01-2017 11:47

Posts: 46

Joined: 26/09/2007

Falk


Super Admin

#4

Posted 9 months ago

Like I said, you need to modify it. All queries with multilang operator need to be re-made

Posts: 3855

Joined: 27/09/2005

Woody


Junior Member

#5

Posted 9 months ago

ok
hmm i'm not a programmer
so not really sure what to fix

looking at articles feed : i see this info but not sure where to change it?

Code Gist: Download source  

<?php
//OS:mFusionME
//version:4.01.20
//type:CORE
// ARTICLES FEEDER for mFUSION 1.x /////////////////////////////////////////////
//Modded and remodelled for mFUSION by www.sumotoy.com
//Features: Full multilanguage with international option (shows the language in multilanguage feeds)
//Note: For link a particular language use this http://www.yoursite.com/feeds/articles.php?lang...g=Japanese
//Note: For All languages use this http://www.yoursite.com/feeds/articles.php?lang...g=Japanese
//status:100%///////////////////////////////////////////////////////////////////
header("Content-Type: text/xml");
require_once "../maincore.php";
require_once THEME."theme.php";

if (file_exists(BASEDIR."feeds/locale/".LANGUAGE.".php")) {
   include BASEDIR."feeds/locale/".LANGUAGE.".php";
} else {
   include BASEDIR."feeds/locale/English.php";
}

$result = dbquery(
"SELECT ta.*,tac.* FROM ".$db_prefix."articles ta
INNER JOIN ".$db_prefix."article_cats tac ON ta.article_cat=tac.article_cat_id
WHERE ".groupaccess('article_cat_access').(multilang_table("A")?" AND article_cat_language='".LANGUAGE."'":"")."
ORDER BY article_datestamp DESC LIMIT 0,10");

echo "<?xml version=\"1.0\" encoding=\"".$locale['charset']."\"?>\n\n
   <!DOCTYPE rss PUBLIC \"-//Netscape Communications//DTD RSS 0.91//EN\"\n
   \"http://my.netscape.com/publish/formats/rss-0.91.dtd\">\n\n
   <rss version=\"0.91\">\n\n
   <channel>\n";

echo "<title>".$settings['sitename'].$locale['rss002'].(multilang_table("A")?" ".$locale['rss007']." ".LANGUAGE:"")."</title>\n<link>".$settings['siteurl']."</link>\n";

echo "<description>".$settings['description']."</description>\n";
while ($row=dbarray($result)) {
   $rsid = intval($row['article_id']);
   $rtitle = $row['article_subject'];
   $description = stripslashes(nl2br($row['article_snippet']));
   // Add allowable HTML tags below, all others will be stripped
   $description = strip_tags($description, "<A><P><BR><BR /><HR>");
   echo "<item>\n";
   echo "<title>".htmlspecialchars($rtitle).(multilang_table("A")?" - ".$locale['rss007'].$row['article_language']:"")."</title>\n";
   echo "<link>".$settings['siteurl']."readarticle.php?article_id=".$rsid."</link>\n";
   echo "<description>".htmlspecialchars($description)."</description>\n";
   echo "</item>\n";
}
echo "</channel></rss>";
?>

Edited by Falk on 16-01-2017 11:46

Posts: 46

Joined: 26/09/2007

Falk


Super Admin

#6

Posted 9 months ago

The trick is in the Query,

Try replace $result part with
Code Gist: Download source  

$result = dbquery(
"SELECT ta.*,tac.* FROM ".$db_prefix."articles ta
INNER JOIN ".$db_prefix."article_cats tac ON ta.article_cat=tac.article_cat_id
WHERE ".groupaccess('article_cat_access')." ORDER BY article_datestamp DESC LIMIT 0,10");


Basically, everything with multilang_table() need to go.

Posts: 3855

Joined: 27/09/2005

Jump to Forum:
6 users are online
0 member and 6 guests