New Extension: tagthis-1.08.zip
[vanilla-miry.git] / extensions / FeedPublisher / categories_config.php
blob3f71e55795a4662de546febefaf99764d45c4fcb
1 <?php
2 /**
3 * Below are two examples of manually placed feeds links.
5 * The first one places an link in the sidebar and an auto-discovery feed
6 * link into the header of the "all discussions" page. This url will notify
7 * you about any event in all categories.
9 * The second example places the links when browsing the category whose id
10 * is "1". Syndicate to this url will notify you about any event in this
11 * category only.
13 * You should create a new statement for each category on your site.
15 * NOTE: the if condition says 'in which page do I want the link',
16 * the url says 'what do I want to syndicate to'.
18 * Be sure to replace the example urls below in both places:
19 * - side panel feed link ($Panel->AddString)
20 * - and the auto-discovery feed link tag ($Panel->AddString))
21 * with the appropriate url for your categories.
23 * To determine the proper url for each category, perform an "advanced"
24 * search for comments in a particular category -- without keywords --
25 * and copy & paste the resulting url (after adding '&Feed=the_feed_type'
26 * to it, where the_feed_type is RSS2, ATOM...)
27 * in the config section below (or to your feedburner account).
29 * NOTE: Links (panel and head) to a feed is automatically set for every
30 * discussion and for any search in Topics or in Comments,
31 * so this section only deals with index.php pages.
34 // manual placement for the "all discussions" feed links
35 if ( 0 == ForceIncomingInt( 'CategoryID', 0 ) )
37 $content = '
38 <ul>
39 <li><h2>'.$Context->GetDefinition( 'Feeds' ).'</h2>
40 <ul>
41 <li><a href="'.$Context->Configuration['WEB_ROOT'].'search.php?PostBackAction=Search&Type=Comments&Feed=RSS2" title="All Discussions - RSS Feed" class="RSS2">'.$Context->GetDefinition('RSS2Feed').'</a></li>
42 <li><a href="'.$Context->Configuration['WEB_ROOT'].'search.php?PostBackAction=Search&Type=Comments&Feed=ATOM" title="All Discussions - ATOM Feed" class="ATOM">'.$Context->GetDefinition('ATOMFeed').'</a></li>
43 </ul>
44 </li>
45 </ul>';
46 // add link to the panel
47 $Panel->AddString( $content, 10 );
49 // add auto-discovery link to head
50 $Head->AddString( '<link rel="alternate" type="application/rss+xml" href="'.$Context->Configuration['WEB_ROOT'].'search.php?PostBackAction=Search&Advanced=1&Type=Comments&Feed=RSS2" title="All Discussions - RSS Feed" />' );
51 $Head->AddString( '<link rel="alternate" type="application/atom+xml" href="'.$Context->Configuration['WEB_ROOT'].'search.php?PostBackAction=Search&Advanced=1&Type=Comments&Feed=ATOM" title="All Discussions - ATOM Feed" />' );
54 // manual placement for an example category named "general" (RSS2)
55 // this example category has a categoryid == 1
56 if ( 1 == ForceIncomingInt( 'CategoryID', 0 ) )
58 $content = '
59 <ul>
60 <li><h2>'.$Context->GetDefinition( 'Feeds' ).'</h2>
61 <ul>
62 <li><a href="'.$Context->Configuration['WEB_ROOT'].'search.php?PostBackAction=Search&Advanced=1&Type=Comments&Categories=General&Feed=RSS2" title="General - RSS Feed" class="RSS2">'.$Context->GetDefinition('RSS2Feed').'</a></li>
63 <li><a href="'.$Context->Configuration['WEB_ROOT'].'search.php?PostBackAction=Search&Advanced=1&Type=Comments&Categories=General&Feed=ATOM" title="General - ATOM Feed" class="ATOM">'.$Context->GetDefinition('ATOMFeed').'</a></li>
64 </ul>
65 </li>
66 </ul>';
67 $Panel->AddString( $content, 10 );
69 // add auto-discovery link to head
70 $Head->AddString( '<link rel="alternate" type="application/rss+xml" href="'.$Context->Configuration['WEB_ROOT'].'search.php?PostBackAction=Search&Advanced=1&Type=Comments&Categories=General&Feed=RSS2" title="General - RSS Feed" />' );
71 $Head->AddString( '<link rel="alternate" type="application/atom+xml" href="'.$Context->Configuration['WEB_ROOT'].'search.php?PostBackAction=Search&Advanced=1&Type=Comments&Categories=General&Feed=ATOM" title="General - ATOM Feed" />' );