|
Moodle
2.2.1
http://www.collinsharper.com
|
Go to the source code of this file.
Namespaces | |
| namespace | core |
Functions | |
| rss_add_http_header ($context, $componentname, $componentinstance, $title) | |
| rss_get_link ($contextid, $userid, $componentname, $id, $tooltiptext='') | |
| rss_get_url ($contextid, $userid, $componentname, $additionalargs) | |
| rss_print_link ($contextid, $userid, $componentname, $id, $tooltiptext='') | |
| rss_delete_file ($componentname, $instance) | |
| rss_enabled_for_mod ($modname, $instance=null, $hasrsstype=true, $hasrssarticles=true) | |
| rss_save_file ($componentname, $filename, $contents, $expandfilename=true) | |
| rss_get_file_full_name ($componentname, $filename) | |
| rss_get_file_name ($instance, $sql) | |
| rss_standard_header ($title=NULL, $link=NULL, $description=NULL) | |
| rss_add_items ($items) | |
| rss_standard_footer ($title=NULL, $link=NULL, $description=NULL) | |
| rss_geterrorxmlfile ($errortype= 'rsserror') | |
| rss_get_userid_from_token ($token) | |
| rss_get_token ($userid) | |
| rss_delete_token ($userid) | |
| rss_start_tag ($tag, $level=0, $endline=false, $attributes=null) | |
| rss_end_tag ($tag, $level=0, $endline=true) | |
| rss_full_tag ($tag, $level=0, $endline=true, $content, $attributes=null) | |
| rss_add_enclosures ($item) | |
| rss_add_enclosures | ( | $ | item | ) |
Adds RSS Media Enclosures for "podcasting" by including attachments that are specified in the item->attachments field. Note also that iTunes does some things very badly - one thing it does is refuse to download ANY of your files if you're using "file.php?file=blah" and can't use the more elegant "file.php/blah" slasharguments setting. It stops after ".php" and assumes the files are not media files, despite what is specified in the "type" attribute. Dodgy coding all round!
Authors
object
| $item | object representing an RSS item |
Definition at line 428 of file rsslib.php.


| rss_add_http_header | ( | $ | context, |
| $ | componentname, | ||
| $ | componentinstance, | ||
| $ | title | ||
| ) |
| rss_add_items | ( | $ | items | ) |
Definition at line 257 of file rsslib.php.


| rss_delete_file | ( | $ | componentname, |
| $ | instance | ||
| ) |
Given an object, deletes all RSS files associated with it. Relies on a naming convention. See rss_get_filename()
| string | $componentname | the name of the module ie 'forum'. Used to construct the cache path. |
| object | $instance | An object with an id member variable ie $forum, $glossary. |
Definition at line 92 of file rsslib.php.

| rss_delete_token | ( | $ | userid | ) |
| rss_enabled_for_mod | ( | $ | modname, |
| $ | instance = null, |
||
| $ | hasrsstype = true, |
||
| $ | hasrssarticles = true |
||
| ) |
Are RSS feeds enabled for the supplied module instance?
| object | $instance | An instance of an activity module ie $forum, $glossary. |
| boolean | $hasrsstype | Should there be a rsstype member variable? |
| boolean | $hasrssarticles | Should there be a rssarticles member variable? |
Definition at line 114 of file rsslib.php.


| rss_end_tag | ( | $ | tag, |
| $ | level = 0, |
||
| $ | endline = true |
||
| ) |
Return the xml end tag
Definition at line 390 of file rsslib.php.

| rss_full_tag | ( | $ | tag, |
| $ | level = 0, |
||
| $ | endline = true, |
||
| $ | content, | ||
| $ | attributes = null |
||
| ) |
Return the start tag, the contents and the end tag
Definition at line 402 of file rsslib.php.


| rss_get_file_full_name | ( | $ | componentname, |
| $ | filename | ||
| ) |
| rss_get_file_name | ( | $ | instance, |
| $ | sql | ||
| ) |
| rss_get_link | ( | $ | contextid, |
| $ | userid, | ||
| $ | componentname, | ||
| $ | id, | ||
| $ | tooltiptext = '' |
||
| ) |
This function returns the icon (from theme) with the link to rss/file.php
object object
Definition at line 49 of file rsslib.php.


| rss_get_token | ( | $ | userid | ) |
Definition at line 356 of file rsslib.php.


| rss_get_url | ( | $ | contextid, |
| $ | userid, | ||
| $ | componentname, | ||
| $ | additionalargs | ||
| ) |
This function returns the URL for the RSS XML file.
object
| int | contextid the course id | |
| int | userid the current user id | |
| string | modulename the name of the current module. For example "forum" | |
| string | $additionalargs | For modules, module instance id |
Definition at line 69 of file rsslib.php.


| rss_get_userid_from_token | ( | $ | token | ) |
Definition at line 347 of file rsslib.php.
| rss_geterrorxmlfile | ( | $ | errortype = 'rsserror' | ) |
This function return an error xml file (string) to be sent when a rss is required (file.php) and something goes wrong
Definition at line 321 of file rsslib.php.


| rss_print_link | ( | $ | contextid, |
| $ | userid, | ||
| $ | componentname, | ||
| $ | id, | ||
| $ | tooltiptext = '' |
||
| ) |
This function prints the icon (from theme) with the link to rss/file.php
Definition at line 79 of file rsslib.php.

| rss_save_file | ( | $ | componentname, |
| $ | filename, | ||
| $ | contents, | ||
| $ | expandfilename = true |
||
| ) |
This function saves to file the rss feed specified in the parameters
object
| string | $componentname | the module name ie forum. Used to create a cache directory. |
| string | $filename | the name of the file to be created ie "1234" |
| string | $contents | the data to be written to the file |
Definition at line 143 of file rsslib.php.


| rss_standard_footer | ( | $ | title = NULL, |
| $ | link = NULL, |
||
| $ | description = NULL |
||
| ) |
This function return all the common footers for every rss feed in the site
Definition at line 304 of file rsslib.php.


| rss_standard_header | ( | $ | title = NULL, |
| $ | link = NULL, |
||
| $ | description = NULL |
||
| ) |
This function return all the common headers for every rss feed in the site
object object
Definition at line 186 of file rsslib.php.


| rss_start_tag | ( | $ | tag, |
| $ | level = 0, |
||
| $ | endline = false, |
||
| $ | attributes = null |
||
| ) |
Return the xml start tag
Definition at line 372 of file rsslib.php.
