Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/rsslib.php File Reference

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)

Function Documentation

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

Parameters:
$itemobject representing an RSS item
Returns:
string RSS enclosure tags

Definition at line 428 of file rsslib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

rss_add_http_header ( context,
componentname,
componentinstance,
title 
)

Definition at line 29 of file rsslib.php.

Here is the call graph for this function:

rss_add_items ( items)

Definition at line 257 of file rsslib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

rss_delete_file ( componentname,
instance 
)

Given an object, deletes all RSS files associated with it. Relies on a naming convention. See rss_get_filename()

Parameters:
string$componentnamethe name of the module ie 'forum'. Used to construct the cache path.
object$instanceAn object with an id member variable ie $forum, $glossary.
Returns:
void

Definition at line 92 of file rsslib.php.

Here is the caller graph for this function:

rss_delete_token ( userid)

Definition at line 360 of file rsslib.php.

Here is the call graph for this function:

rss_enabled_for_mod ( modname,
instance = null,
hasrsstype = true,
hasrssarticles = true 
)

Are RSS feeds enabled for the supplied module instance?

Parameters:
object$instanceAn instance of an activity module ie $forum, $glossary.
boolean$hasrsstypeShould there be a rsstype member variable?
boolean$hasrssarticlesShould there be a rssarticles member variable?

Definition at line 114 of file rsslib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

rss_end_tag ( tag,
level = 0,
endline = true 
)

Return the xml end tag

Definition at line 390 of file rsslib.php.

Here is the caller graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

rss_get_file_full_name ( componentname,
filename 
)

Definition at line 171 of file rsslib.php.

Here is the caller graph for this function:

rss_get_file_name ( instance,
sql 
)

Definition at line 176 of file rsslib.php.

Here is the caller graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

rss_get_token ( userid)

Definition at line 356 of file rsslib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

rss_get_url ( contextid,
userid,
componentname,
additionalargs 
)

This function returns the URL for the RSS XML file.

object

Parameters:
intcontextid the course id
intuserid the current user id
stringmodulename the name of the current module. For example "forum"
string$additionalargsFor modules, module instance id

Definition at line 69 of file rsslib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Here is the call graph for this function:

rss_save_file ( componentname,
filename,
contents,
expandfilename = true 
)

This function saves to file the rss feed specified in the parameters

object

Parameters:
string$componentnamethe module name ie forum. Used to create a cache directory.
string$filenamethe name of the file to be created ie "1234"
string$contentsthe data to be written to the file

Definition at line 143 of file rsslib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

rss_start_tag ( tag,
level = 0,
endline = false,
attributes = null 
)

Return the xml start tag

Definition at line 372 of file rsslib.php.

Here is the caller graph for this function:

 All Data Structures Namespaces Files Functions Variables Enumerations