URL to your eFiction: http://www.acciofanfiction.com/index.php
Your version of eFiction: 3.2.1
Latest Patche(s): Yes
Any mods installed?: challenges
Have you modified your eFiction?: No.
Version of PHP: 4.3.11
Version of MySQL: 4.1.21-standard
Have you searched for your problem: Yes
Other Notes: Even 3.1.1 had this problem.
State the nature of your problem:
Ratings in the RSS feed are displayed as numbers (the ids) rather than with their names. I got the same problem with every eFiction3 site I visited and with both Firefox and IE feed readers. I suppose it's due to the fact that in eFiction2 ratings were stored (with their name) in the fanfiction_stories table, while now they're on a separate table, and the rss.php file hasn't been updated. (I think I also spotted a typo - on line 51, $langauge instead of $language?)
Thank you.
URL to your eFiction: http://www.acciofanfiction.com/index.php
Your version of eFiction: 3.5.1 (Italian language)
Version of PHP: 4.4.8
Version of MySQL: 4.1.22
This will be fixed in the next update.
Fix:
Change line 58 from this:
<title>".strip_tags(xmlentities($story['title']))." "._BY." ".strip_tags(xmlentities( $story['penname']))." [".$story['rid']."]</title>
to this:
<title>".strip_tags(xmlentities($story['title']))." "._BY." ".strip_tags(xmlentities($story['penname']))." [".$rating."]</title>
and add this section:
$rid = strip_tags(xmlentities($story['rid']));
$query2 = "SELECT rating FROM ".$tableprefix."fanfiction_ratings WHERE FIND_IN_SET(rid, '$rid')";
$results2 = dbquery($query2);
while($rate = dbassoc($results2)) {
$rating = strip_tags(xmlentities($rate['rating']));
}
right after line 56, which looks like this:
while($story = dbassoc($results)) {
No you shouldn't do it that way. You're doing multiple calls to the database that aren't necessary.
If I had the time (or even desired to do it) necessary to spend on rewriting all the queries so they were actually done correctly and in the most optimized fashion, and *then* testing them to make sure it doesn't break anything else, I would. But I don't. So yes, this is a cludge, but since a) I don't want to spend all afternoon rewriting things when I have fifty million other more important things to do, and b) Livia's issue still hasn't been fixed in well over a month, a temporary fix is much more helpful than nothing.
Another cludge to 'fix' this would be:
Change line 58 from this:
<title>".strip_tags(xmlentities($story['title']))." "._BY." ".strip_tags(xmlentities( $story['penname']))." [".$story['rid']."]</title>
to this:
<title>".strip_tags(xmlentities($story['title']))." "._BY." ".strip_tags(xmlentities( $story['penname']))." [Rated: ".$rating[$story['rid']]."]</title>
and add this :
$rating=array(1 => "K", "K+", "T", "YA", "R", "M"); // or whatever your ratings are
before the line:
$rss="<?xml version="1.0" encoding=""._CHARSET.""?>n";
This will cause story titles in your RSS feed to appear like: Chronicles of a Sniper by GoldWolf [Rated: K]
NOTE: This is a quick-and-dirty fix, one which depends upon your fiction ratings being just a few in number and unlikely to change, because it foregoes reading your ratings from the SQL database. It creates an array, $rating(), and assigns the text values of your fiction ratings in the declaration statement. The '1 =>' is a necessary part of the declaration, as it forces the index of the array to start at 1, which matches the eFiction SQL database, rather than at 0 which is the default for arrays in PHP.
Can someone please verify if this is fixed or not? Thank you. π
Whoever said nothing is impossible never tried slamming a revolving door.
url: https://www.potionsandsnitches.org/fanfiction
php: 7.4.33 msql: 5.6.51-community GPL
efic version: 3.5.5 latest patches: yes
bridges: none mods: challenges, tracker, story end, beta, word
This is fixed, but now it's the whole rss.php script that doesn't work.
URL to your eFiction: http://www.acciofanfiction.com/index.php
Your version of eFiction: 3.5.1 (Italian language)
Version of PHP: 4.4.8
Version of MySQL: 4.1.22
just confirming : I haven't had an RSS feed either since upgrading to 3.3 either
why is nothing ever easy?
url: http://www.pretendercentre.com/missingpieces/
php: 5.2.5 msql: 5.0.45-community
efic version: 3.4.3 latest patches: yes
bridges: none mods: challenges, displayword, beta-search
Okay, I'll move this to solved since the other one is still open. π
Thanks Tammy for the fix, and thanks Livia and jacci for updating us on the status. π
Whoever said nothing is impossible never tried slamming a revolving door.
url: https://www.potionsandsnitches.org/fanfiction
php: 7.4.33 msql: 5.6.51-community GPL
efic version: 3.5.5 latest patches: yes
bridges: none mods: challenges, tracker, story end, beta, word