Michael Bemmerl
33737982af
Added support for sub-elements of the author element in ATOM feeds.
It's now possible to specify an email address and an URI.
11 years ago
Michael Bemmerl
cc62d12c2e
Built-in support for author elements in RSS2 feeds.
This was previously already possible by using the custom addElement function.
11 years ago
Michael Bemmerl
aba31248df
Die when setEncloser is used on a non-RSS 2 feed.
11 years ago
Michael Bemmerl
0f4c077d5f
Do allow the content element in ATOM feeds only.
11 years ago
Michael Bemmerl
f0bcb31422
Added a check for a restriction in the ATOM specification regarding the number of atom:link entites.
11 years ago
Michael Bemmerl
c79ef09e08
Merge pull request #11 from sparkfun/master
Add setContent() for Atom feed items
11 years ago
Michael Bemmerl
2c73dabb3c
Updated README
11 years ago
Michael Bemmerl
ee8d341505
Implemented function to add multiple custom link elements. This fixes #10 .
11 years ago
Brennen Bearnes
384783b5f5
add Item&setContent() for Atom feeds
- Make it easy to get a <content> element on Atom entries
- Also spells "enclosure" correctly - "setEncloser" -> "setEnclosure"
- Fixes Atom test file on case-sensitive filesystems
- Tack a date_default_timezone_set() on tests, to avoid warnings
11 years ago
Michael Bemmerl
d67feb4b66
Updated README.
11 years ago
Michael Bemmerl
81e7520894
Implemented function to add custom XML namespaces. This fixes #9 .
The namespace prefix and name can be set by invoking the addNamespace method of the Feed class.
11 years ago
Michael Bemmerl
762764ad77
Fixed warning on minimum RSS2 example: Image title didn't match channel title.
11 years ago
Michael Bemmerl
4f172e9ff8
Merge branch 'examples'
11 years ago
Michael Bemmerl
763f33f5a9
Fixed warning on RSS2 example: Image title didn't match channel title.
11 years ago
Michael Bemmerl
1581c88968
More comments
11 years ago
Michael Bemmerl
46df278a65
Added support for atom:link elements with relation=self. Fixes #5
See http://validator.w3.org/feed/docs/warning/MissingAtomSelfLink.html
11 years ago
Michael Bemmerl
6c1935f05f
Renamed the getContentType() method.
It's actually the MIME type which is returned and then used for the HTTP Content-Type header field.
11 years ago
Michael Bemmerl
1b1a3d0334
Fixed attribute string: Removed double whitespace between the key-value pairs.
11 years ago
Michael Bemmerl
ae59019c9f
Merge branch 'master' into examples
11 years ago
Michael Bemmerl
bf09994e24
Use printFeed() instead of generateFeed()
11 years ago
Michael Bemmerl
631cce83eb
Examples with including files
11 years ago
Michael Bemmerl
240b9c8c04
Merge pull request #7 from sparkfun/master
namespace FeedWriter
11 years ago
Brennen Bearnes
7182691709
break out feed types; add printFeed(); namespace everything
A minimal set of changes to support PSR-0-style autoloading:
- rename base class to \FeedWriter\Feed and FeedItem to \FeedWriter\Item
- break types out into \FeedWriter\ATOM, \FeedWriter\RSS1, and
\FeedWriter\RSS2
- use class constants for versions
- make generateFeed() return a string rather than doing any IO itself
- add printFeed() to do output, if needed
My rationale for the last 2 items on that list is that our web framework
expects me to pass around strings, not do direct IO. I imagine needing
to grab the output and stash it in a variable or what-have-you is
a common use case, and it felt silly to have to wrap this in an
output buffer to accomplish that.
12 years ago
Michael Bemmerl
6b692f5ab2
Merge pull request #4 from paulferrett/master
ATOM feed <author> element fix
Thanks for the fix!
12 years ago
Paul Ferrett
429d961e59
Fix for incorrectly created `author` element for ATOM feed items.
12 years ago
Michael Bemmerl
1a31258e9a
Comments and updated README
12 years ago
Michael Bemmerl
063023134e
Implemented usage of the new classes, which were introduced in 4926cd6a1b
.
12 years ago
Michael Bemmerl
4926cd6a1b
Added wrapper classes for each feed type. Fixes #2 .
The FeedWriter class is now abstract, which means it is not possible to directly create an instance of it. Use the new wrapper classes in FeedTypes.php instead. This also obsoletes the constructor's version parameter for end-users.
12 years ago
Michael Bemmerl
f6356d2484
Removed __DIR__ constant for compatibility with PHP < 5.3
12 years ago
Michael Bemmerl
a45095963f
Some data integrity checks on public method addItem():
* Only accept instances of FeedItem
* Only accept instances of FeedItem with the same feed type
12 years ago
Michael Bemmerl
7d1ddfee53
Some small changes:
* Fixed spelling mistakes
* All \n's were replaced by PHP_EOL's
12 years ago
Michael Bemmerl
901b713f81
Merge pull request #1 from quizlet/master
require_once -> require due to APC issues
13 years ago
Phil Freo
a9bbe20a94
making feeditem require path absolute
13 years ago
Phil Freo
26918c7707
Using class_exists and require instead of require_once because of performance improvements in relationship to APC.
APC shouldn't have to open files more than once, but it does if you use require_once instead of require. More details here:
http://www.techyouruniverse.com/software/php-performance-tip-require-versus-require_once
13 years ago
Michael Bemmerl
e4f7aad8b7
Encode special chars in XML attributes, which would otherwise break the XML.
13 years ago
Michael Bemmerl
57fc7997d2
Removed the PHP closing braket in FeedItem.php. Otherwise the line ending would be printed when require'ing the FeedItem.php.
13 years ago
Michael Bemmerl
b0cfed933b
Removed superfluous whitespaces.
13 years ago
Michael Bemmerl
18c19ebc2a
Removed duplicated code
13 years ago
Michael Bemmerl
ec32294a3d
Don't use a (actually not working) database for retrieving item information.
The minimal example should have minimal requirements...
13 years ago
Michael Bemmerl
4499232da8
Fixed image URL in the examples.
13 years ago
Michael Bemmerl
6210aac244
Some cosmetic fixes
13 years ago
Michael Bemmerl
635b6da956
Fixed error message formatting.
13 years ago
Michael Bemmerl
a49324e1d2
Sanitize user input which contains <![CDATA[ ... ]]>, which would otherwise break the XML.
13 years ago
Michael Bemmerl
9e5411ffb4
Reactivated conversion of special chars in non-CDATA tags.
This time using htmlspecialchars instead of htmlentities, because we need a encoding for XML, not for HTML.
13 years ago
Michael Bemmerl
6aa594ad6e
Included FeedItem.php in FeedWriter.php.
So this has now not to be done by the user. Another benefit of this change: The examples do work now. ;-)
13 years ago
Michael Bemmerl
edb8321bd9
* Implemented function name change introduced in 3b49744b2f
13 years ago
Michael Bemmerl
c6805868fe
* Fixed include path in the examples.
13 years ago
Michael Bemmerl
fccb684ba9
Added basic README
13 years ago
Michael Bemmerl
6ebd01341e
Added copyright and license notices (GPL) to all files
13 years ago
Michael Bemmerl
294179725b
Fixed 'Content-Type' header field spelling.
13 years ago