January 10, 2006
I am almost too embarrassed to admit this, but thanks to an email from Keith K, it was pointed out the CSS class names used by Feed2JS are not exactly W3C valid since they use underscores (e.g..rss_box
) and this may/will cause display problems in Internet Explorer (See Underscores in class and ID Names)feed2js
script gets changed and saved as a new name (feed2js2.php
or feedtojs.php
) that generates the proper classes, and the style builder will reference a copy of the original set of styles. This would mean old instances of the script will stay as is, but newer builds will be set up for the correct CSS declaration.I am sorry you feel complicated, but there is really not much I can do without specific questions. "How did I get here" sounds like a metaphysical question.
Posted by Alan at January 13, 2006 01:59 PMIt's so simple. (2) is a good decision. Hear on RSS if feed2js2.php is published.
Posted by Gabor at January 16, 2006 07:50 AMHi There:
I know that this is not the place to put this question, but I don't kjnow where I should... so here's keeping my fingers crossed.
I uploaded the files directed everything carefully etc and successfully displayed RSS feeds onto my site where I wanted to... of course using javascript. I, however, would like the spiders to catch my feeds as more than links, therefore, I have to use php. As I understand theres this page:
http://feed2js.org/index.php?s=php
and it explains how to usurp the displaying of the javascript by changing it into php using the feed2php.inc text. Which makes sense... but no matter what... I get an error when trying to use your example or any of my own. Where exactly to I put this piece of code? On the Index page where I want the rss to display? on the feed2html.inc? On the feed2js.php? feed2js_config.php?
Im lost. I need this to be in PHP otherwise it defeats my purpose and I love the easy way the build.php lets you style text using magpie to display etc. How do I do this? Please help...
Thanks in advance,
Athene
Athene,
The PHP code listed under "usage" goes in the location on your web page where you want the feed to appear (just like cutting and pasting the javascript.
You have to edit the values of the variables to make them work for you.
Posted by Alan at January 26, 2006 01:15 PMSorry to annoy but the javascript works great so I know I have the directories installed correctly etc... but when I put in
I get:
Warning: main(/feed2php.inc): failed to open stream: No such file or directory in /home/nosillyc/public_html/wp-content/themes/zine/index.php on line 16
Line 16 of index.php being (include '/feed2php.inc';)
I also tried using complete address of 'http://www.nosilly.com/feed/feed2php.inc'
Any ideas?
Posted by at January 27, 2006 02:29 PM// declare Feed2Js variables
$src = 'http://www.nosilly.com/feed/feed2js.php';
$chan = 'y';
$num = 4;
$desc = 200;
$date = 'y';
$targ = 'n';
// include the feed2php include file
include '/feed2php.inc';
This is what I put in.... of course with the <?P etc
Posted by Athene at January 27, 2006 02:33 PMThe value of $src is the URL of the RSS feed you are trying to display. This will not work as you have it because the URL entered is not an RSS feed.
Posted by Alan at January 27, 2006 04:00 PMTrue I saw that and changed it to this:
http://www.athene.biz/wp-rss2.php
and still get the same thing. I sure I can do this because I finally grasped how to use multiple styles with the style.php and this rocks :-)
Anyway, I still get error when it tries to find feed2php.inc, but its there where it should be.
Posted by Athene at January 27, 2006 05:12 PMand one other question I have Alan is.... will using the PHP code instead of the Javascript change the styles? In other words, do I have to make changes in the CSS because I use 3 different styles for 3 different columns and with Javascript I just add in the CSS bottom part of Build.php. Im thinking no since it appears what youre doing is just redirecting through .inc.
Also, I didnt have any problems with IE or any of the broswers showing the Feed boxes as they should be. That W3 doesnt validate it doesnt annoy, I use wordpress and that system never quite validates anyway.... as long as proper and fast... Im happy.
Alan, once again, thanks in advance for the help and the hack... I really need it :-)
Posted by Athene at January 27, 2006 06:43 PMThanks so much for this script. You're an angel. I have .Mac and cannot use php, perl, etc. to deal with rss on the server. Javascript only in .Mac. I tried every free script out there and yours is about the only one that works well with Apple iTunes rss. My pages are XHTML, popping in your script in utf-8.
My comment-- You might consider using lowerCamelCase for classes. Of course, you say it is better not to require users to edit their classes to the new names anyway. But maybe in a future version you will offer the actual css cases (cleaner js), requiring a little editing on user's part, and lowerCamelCase is very convenient for people using webservices. It blends well when, for instance, XSLT assigns a div class from the UpperCamelCase node name. An easy way to grab a class name, and easy to see that it is directly from the XML node name since it is upperclass while other css ids and classes are lowerCamelCase.
I'm actually going to the trouble of cleaning up my css sitewide so that I don't have a mix of - and CamelCase in my classes. It's a bit of trouble, but it's wonderful for my brain to see a consistent format in css. Also, the use of lowerCamelCase in css seems to be the trend out on the web among developers, probably because it works neatly with XML.
Cheers,
Carole
Thanks Carole,
Your advice (which I am thankful for) is timely since I need to change the CSS output to remove my prior use of invalid "_" in the class names.
I am still trying to figure out how to do this without messing up a lot of people's current use (I have tried to follow a self iposed rule of "do no harm" to past uses of our script, so every new feature added has not changed the function of any feed2JS parameter).
Posted by Alan at January 29, 2006 04:53 PMAtene,
The CSS option works just the same in the PHP version of the script; in your embedded PHP code just use an new line:
$css = "cool";
to have that feed use a style you have defined built on the same structure, except the div name is "rss_box_cool"
Posted by Alan at January 29, 2006 04:54 PM
hi gus, i'm having a hard time to use this thing
Posted by Roger at January 12, 2006 04:01 AM