source: trunk/www.guidonia.net/wp/wp-content/plugins/parteibuch-aggregator/pba-defaultparameter_de.php@ 44

Last change on this file since 44 was 44, checked in by luciano, 15 years ago
File size: 15.2 KB
Line 
1<?php
2
3 function get_pbadefaultparameter($parametername=''){
4
5 $defaultparameter['outputid']=1;
6 $defaultparameter['outputname']='Neuer Output - bitte benennen';
7 $defaultparameter['outputidfromurlallowed']=false;
8 $defaultparameter['searchphrase']="";
9
10 $defaultparameter['feedrequest']=false;
11 $defaultparameter['tickerpage']="1";
12 $defaultparameter['archivdate']="";
13 $defaultparameter['maxitems']="N";
14 $defaultparameter['listid']=false;
15 $defaultparameter['listidfromurlallowed']=false;
16 $defaultparameter['hookintorewriterules']='auto';
17 $defaultparameter['short_cache_link']=false;
18 $defaultparameter['kalreq']=false; //true means, kalenderpage with kalender headers is desired by url
19 $defaultparameter['cacheid']=false;
20 $defaultparameter['formattype']="countrecentitem";
21 $defaultparameter['daterecentitemthreshold']=24 * 60 *60;
22 $defaultparameter['fromtimestamp']=0;
23 $defaultparameter['totimestamp']=0;
24 $defaultparameter['opsfilter']=false;
25 $defaultparameter['orderbysitename']=false;
26 $defaultparameter['sitealphathreshold']=31 * 24 * 60 *60;
27
28 $defaultparameter['getoutputconfigbypageid']=false;
29 $defaultparameter['page2hookin']=0;
30
31//additional parameter to simulate known Parteibuch behaviour
32 $defaultparameter['specialpage1url']='N'; //'http://www.mein-parteibuch.com'; //set to N or to false to disable
33 $defaultparameter['suppressheaderonpage1']='N'; //only 'Y' will enable this feature
34
35//search related values
36 $defaultparameter['searchenabled']=true;
37 $defaultparameter['search_page_baseurl']=""; //if empty, baseurl will be taken
38 $defaultparameter['searchactionhref'] = ""; //will be calculated in parameter bootstrap
39 $defaultparameter['hiddensearchformformvalues'] = ""; //will be calculated in parameter bootstrap
40
41//caching control
42 $defaultparameter['pba_full_cache_time']= 0; //use 0 to disable full this cache
43 $defaultparameter['pba_kalenderquery_cache_time']= 0; //use 0 to disable this cache
44 $defaultparameter['pba_feedlistquery_cache_time']= 0; //use 0 to disable this cache
45
46 //boxonly: if just a box shall be given out, name the box here
47 //this single parameter shall replace parameters displayonlykalender, displayonlysearchbox, makeonlyfeedlist
48 $defaultparameter['displayonlybox']=""; //unset, false and 'N' should also mean, that not only a box was requested
49
50 //parameters just for historic reference, replaced just after parameter bootstrap,
51 $defaultparameter['displayonlysearchbox']='N'; ////to be completely replaced by parameter displayonlybox
52 $defaultparameter['displayonlykalender']='N'; //to be completely replaced by parameter displayonlybox
53 $defaultparameter['makeonlyfeedlist']=false; //to be completely replaced by parameter displayonlybox
54 //just used, when ! displayonlybox )
55 $defaultparameter['opmlrequest']=false; //to be mapped to parameter displayonlybox
56 $defaultparameter['feedlistrequest']=false; //to be mapped to parameter displayonlybox
57
58 //then all default parameters needed for output
59
60 $defaultparameter['maxbodylength']=50;
61 $defaultparameter['maxwordlength']=35;
62 $defaultparameter['tagset']="";
63 $defaultparameter['formattedtagset']=""; //to be calculated later from $defaultparameter['tagset']
64 $defaultparameter['baseurl']="";
65 $defaultparameter['noextralink']="N"; //"Y" will suppress the extra link at the end of the item body
66 $defaultparameter['extralinktemplate']=" [<a href='###ITEM_URL###' >Link</a>]";
67 $defaultparameter['append_cache_link']="Y";
68 $defaultparameter['iscachable']="Y";
69 $defaultparameter['itemdateformat']="\ \(d.m.Y H:i\h\)\:";
70 $defaultparameter['splittitlebyseparator']=true; // separator shall not be clever chosen, but shall not be configurable, was before $useitemtitles
71 $defaultparameter['cacheviewpage']="";
72 $defaultparameter['cachelinktemplate']=" [<a href='###CACHEHREF###' rel='nofollow'>Cache</a>]";
73 $defaultparameter['add_social_bookmarks']='Y';
74 $defaultparameter['itemssbtemplate']='<script type="text/javascript">
75document.write(\' [<a href="#" onclick="sbbview(\\\'sbbpt_id_###ITEM_ID###\\\',\\\'###ITEM_URL###\\\',\\\'###ITEM_NAME###\\\');return false;">Bookmarking</a>]<div id="sbbpt_id_###ITEM_ID###" class="social_bookmark" style="display:none;"></div>\');
76</script>';
77 $defaultparameter['headersbtemplate']='<script type="text/javascript"
78src="###URL2PLUGINDIR###social_bookmarks.php">
79</script>';
80 $defaultparameter['url2plugindir']=""; // where to set such a value? this is a constant from wordpress and plugin installation
81 $defaultparameter['feedpage']="";
82 $defaultparameter['srequri']="";
83
84 //widget values
85 $defaultparameter['show_sidebarwidget'] = 'N';
86 $defaultparameter['template_sidebarwidget'] = <<<HEREDOC
87<li><b style="font-size: 1.2em;"><a title='Zur Seite von ###OUTPUTNAME###' href='###BASEURL###'>###OUTPUTNAME###</a><b>
88(<a title='Zum Feed von ###OUTPUTNAME###' href='###FEEDHREF###'>xml</a>)</li>
89
90###LOOPBEGIN###<li><a href="###SITE_URL###" title="###SITE_DESCRIPTION###">###SITE_NAME###</a><small> (###ITEM_DATETIME###):</small> <b><a href="###ITEM_URL###">###ITEM_NAME###</a></b></li>
91###LOOPEND###
92
93<li><b>Feedroll</b> (<a title='Feedliste von ###OUTPUTNAME### als OPML' href='###FEEDOPMLHREF###'>opml</a>) (<a title='Feedliste von ###OUTPUTNAME###' href='###FEEDLISTHREF###'>feedlist</a>)</li>
94
95###FEEDLISTSIDEBAR_BOX###
96
97<li style="text-align: center;"><br/>###SEARCH_BOX###</li>
98
99<li style="text-align: center;"><br/><small><a title="Der Parteibuch Aggregator ist ein Wordpress-Plugin zum Aggregieren von RSS-Feeds" href="http://www.mein-parteibuch.com/blog/parteibuch-aggregator/">###PBA_VERSION###</a></small></li>
100HEREDOC;
101
102 //cache page values
103 $defaultparameter['template_cache'] = <<<HEREDOC
104<h2>Cache-Eintrag ###ITEM_ID### im <a href='###BASEURL###'>Parteibuch Aggregator</a></h2>
105 <div class='centreblock'><h3><a href='###ITEM_URL###'>###ITEM_NAME###</a></h3>
106 ###ITEM_CACHEBODY###
107 <p class='postbyline'><em> Von: <a href='###SITE_URL###' title='###SITE_DESCRIPTION###'>###ITEM_URL###</a>
108 <br />Geposted: ###ITEM_DATEFEED### (ca.)
109 <br />RSS cached: ###ITEM_UPDATEDATE###
110 <br />Aggregator: <a title="Parteibuch Aggregator ist ein Wordpress-Plugin zum Aggregieren von RSS-Feeds" href="http://www.mein-parteibuch.com/blog/parteibuch-aggregator/">###PBA_VERSION###</a>
111</em></p></div>
112HEREDOC;
113
114 //feed values
115 $defaultparameter['channel_title']= "Parteibuch Aggregator Feed";
116 $defaultparameter['htmlpage']=""; //field channel_link in database, if empty, post->guid from wordpress will be used
117 $defaultparameter['channel_description']= "A fine feed collection generated with Parteibuch Aggregator";
118 $defaultparameter['channel_language']= "de";
119 $defaultparameter['channel_copyright']= "Piratenlizenz";
120 $defaultparameter['template_feed'] = <<<HEREDOC
121<?xml version="1.0" encoding="UTF-8"?>
122<!-- generator="###PBA_VERSION###" -->
123<rss version="2.0"
124 xmlns:content="http://purl.org/rss/1.0/modules/content/"
125 xmlns:wfw="http://wellformedweb.org/CommentAPI/"
126 xmlns:dc="http://purl.org/dc/elements/1.1/"
127 >
128<channel>
129 <title>###CHANNEL_TITLE######ISSEARCHBEGIN### - Artikel mit ###SEARCHPHRASE######ISSEARCHEND######ISDATEBEGIN### - Artikel zum Datum ###ARCHIVEDATE######ISDATEEND###</title>
130 <link>###HTMLHREF###</link>
131 <description>###CHANNEL_DESCRIPTION###</description>
132 <pubDate>###FIRSTITEM_DATEFEED###</pubDate>
133 <generator>###PBA_VERSION###</generator>
134 <language>###CHANNEL_LANGUAGE###</language>
135 <copyright>###CHANNEL_COPYRIGHT###</copyright>
136###LOOPBEGIN### <item>
137 <title>###SITE_NAME###: ###ITEM_NAME###</title>
138 <link>###ITEM_URL###</link>
139 <pubDate>###ITEM_DATEFEED###</pubDate>
140 <dc:creator>###SITE_NAME###</dc:creator>
141 <dc:source>###SITE_URL###</dc:source>
142 <dc:rights><![CDATA[###ITEM_LICENSE###]]></dc:rights>
143 <guid isPermaLink="true">###ITEM_URL###</guid>
144 <description><![CDATA[###ITEM_DESCRIPTION###]]></description>
145 <content:encoded><![CDATA[###ITEM_FEEDBODY###]]></content:encoded>
146 </item>
147###LOOPEND###</channel>
148</rss>
149HEREDOC;
150
151
152 //kalender values
153 $defaultparameter['template_kalender'] = <<<HEREDOC
154<p><a href='###BASEURL###'>PBA</a>: Archive f&uuml;r ###KALENDERDATE###</p>
155<p>###KALENDER_BOX###</p>
156<p>###SEARCH_BOX###</p>
157<p>(<a href='###FEEDLISTHREF###'>Feeds</a>) (<a href='###FEEDOPMLHREF###'>OPML</a>) </p> <p>###FEEDLISTSIDEBAR_BOX###</p>
158<p>###KALENDERLIST_BOX###</p>
159
160<p>Generiert mit <a title="Der Parteibuch Aggregator ist ein Wordpress-Plugin zum Aggregieren von RSS-Feeds" href="http://www.mein-parteibuch.com/blog/parteibuch-aggregator/">###PBA_VERSION###</a></p>
161HEREDOC;
162
163 $defaultparameter['kalender_as_list']=false; // nasty - true shall mean, that we will calculate a kalender as a list, whatever template analysis says
164 $defaultparameter['kalender_as_box']=false; // nasty - true shall mean, that we will calculate a kalender as a list, whatever template analysis says
165 $defaultparameter['kalendermonthslist']="Januar, Februar, M&auml;rz, April, Mai, Juni, Juli, August, September, Oktober, November, Dezember";
166 $defaultparameter['kalendernormaldateformat']='j.n.Y';
167
168 //get parameters for box calendar
169 $defaultparameter['kalender_last']='Fr&uuml;her'; //only needed for kalender as a box
170 $defaultparameter['kalender_next']='Sp&auml;ter'; //only needed for kalender as a box
171 $defaultparameter['kalenderboxdaysofweeklist']="Montag, Dienstag, Mittwoch, Donnerstag, Freitag, Samstag, Sonntag";
172 $defaultparameter['kalenderboxtablecaption']=' style="text-align: center;" id="kalendertable"';
173
174 //feedlist values
175 $defaultparameter['feedlistmaxage'] = (31 * 24 * 60 *60); //age of feeds to be listed in feedlist, in seconds, 0 means disabled age filter
176 $defaultparameter['dateformat_feedlistsidebar_box']='';
177 $defaultparameter['dateformat_feedlist_box']='';
178 $defaultparameter['dateformat_opml_box']='';
179
180 //cache page format values
181
182 //get age function value
183 $defaultparameter['ageunitsstring']="never: Nie, seconds: Sekunden, minutes: Minuten, hours: Stunden, days: Tagen, weeks: Wochen, months: Monaten, years: Jahren, before: Vor, beforeafter: , in: In";
184 $defaultparameter['ageunit']=false; //leave this false, gettheage will calculate an array from into it on first call
185
186 //boundary values
187 $defaultparameter['maxitemslimit']=1000;
188
189 //here are some default templates
190 $defaultparameter['template_ticker'] = <<<HEREDOC
191<p>
192###ISSEARCHBEGIN###
193<a href="###BASEURL###">###OUTPUTNAME###</a>: Artikel mit ###SEARCHPHRASE###
194###ISSEARCHEND###
195
196###ISDATEBEGIN###
197<a href="###BASEURL###">###OUTPUTNAME###</a>: Artikel mit Datum ###ARCHIVEDATE###
198###ISDATEEND###
199
200###ISNODATENOSEARCHBEGIN###
201<a href="###BASEURL###">###OUTPUTNAME###</a>
202###ISNODATENOSEARCHEND###
203
204(###STARTITEM### - ###LASTITEM### von ca ###FOUNDITEMS###) (<a href='###FEEDHREF###'>xml</a>) (<a href='###FEEDLISTHREF###'>Feedlist</a>)</p>
205
206<p>###SEARCH_BOX###</p>
207
208###LOOPBEGIN###<p class="centreblock"><a href="###SITE_URL###" title="###SITE_DESCRIPTION###">###SITE_NAME###</a><small> (###ITEM_DATETIME###):</small> <b><a href="###ITEM_URL###">###ITEM_NAME###</a></b><br /><div class="storyContent">###ITEM_BODY###</div></p>
209###LOOPEND###
210
211<p><span style='position:relative; float:left; overflow:hidden; margin-left:10px;'>###LASTLINKBEGIN###<a href="###LASTPAGEHREF###">Seite zur&uuml;ck</a>###LASTLINKEND###</span><span style='position:relative; float:left; overflow:hidden; margin-left:30px;'>Eintrag (###STARTITEM### - ###LASTITEM### von ca ###FOUNDITEMS###)</span><span style='position:relative; float:right; overflow:hidden; margin-right:10px;'>###NEXTLINKBEGIN###<a href="###NEXTPAGEHREF###">Seite vor</a>###NEXTLINKEND###</span></p>
212
213<p>&nbsp;</p>
214<p>###KALENDERLIST_BOX###</p>
215<p style="text-align: center;">Generiert mit <a title="Der Parteibuch Aggregator ist ein Wordpress-Plugin zum Aggregieren von RSS-Feeds" href="http://www.mein-parteibuch.com/blog/parteibuch-aggregator/">###PBA_VERSION###</a></p>
216HEREDOC;
217
218 $defaultparameter['template_feedlist'] = <<<HEREDOC
219###LOOPBEGIN######FEEDLIST_LOOP_FEEDURL### ###LOOPEND###
220HEREDOC;
221
222 $defaultparameter['template_opml'] = <<<HEREDOC
223 <?xml version="1.0" encoding="UTF-8"?>
224<opml version="1.1">
225 <head>
226<title>Parteibuch Aggregator OPML</title>
227
228<dateCreated>###NOW###</dateCreated>
229<ownerName>PBA</ownerName>
230</head>
231 <body>
232 ###LOOPBEGIN### <outline title="###FEEDLIST_LOOP_SITE###" text="###FEEDLIST_LOOP_SITE###" htmlUrl="###FEEDLIST_LOOP_SITEURL###" type="rss" xmlUrl="###FEEDLIST_LOOP_FEEDURL###" />
233###LOOPEND###</body>
234</opml>
235HEREDOC;
236
237 $defaultparameter['template_error'] = <<<HEREDOC
238Oops! We have got errors: ###ERRORMESSAGE###
239HEREDOC;
240
241//search box
242 $defaultparameter['template_search_box'] = <<<HEREDOC
243<form method="get" id="searchform" action="###SEARCHACTIONHREF###">###HIDDENSEARCHFORMFORMVALUES###
244 <input type="text" value="###SEARCHPHRASE###" name="searchphrase" id="searchphrase" />
245 <input type="submit" id="searchsubmit" value="Suche im Ticker" /></form>
246HEREDOC;
247
248 $defaultparameter['template_opml_box'] = <<<HEREDOC
249<?xml version="1.0" encoding="UTF-8"?>
250<opml version="1.1">
251 <head>
252<title>Parteibuch Aggregator OPML</title>
253<dateCreated>###NOW###</dateCreated>
254<ownerName>PBA</ownerName>
255</head>
256 <body>
257 ###LOOPBEGIN### <outline title="###FEEDLIST_LOOP_SITE###" text="###FEEDLIST_LOOP_SITE###" htmlUrl="###FEEDLIST_LOOP_SITEURL###" type="rss" xmlUrl="###FEEDLIST_LOOP_FEEDURL###" />
258###LOOPEND###</body>
259</opml>
260HEREDOC;
261
262 $defaultparameter['template_feedlist_box'] = <<<HEREDOC
263###LOOPBEGIN######FEEDLIST_LOOP_FEEDURL### ###LOOPEND###
264HEREDOC;
265
266 $defaultparameter['template_feedlistsidebar_box'] = <<<HEREDOC
267###LOOPBEGIN###<li style="margin: 2px 0 0;"><small><a href='###FEEDLIST_LOOP_SITEURL###'
268title='###FEEDLIST_LOOP_SITE###'>###FEEDLIST_LOOP_SITE###</a>&nbsp;<a href='###FEEDLIST_LOOP_FEEDURL###'
269title='Feed - Letztes Update: ###FEEDLIST_LOOP_DATE###'>(xml)</a></small></li>
270###LOOPEND###
271HEREDOC;
272
273 $defaultparameter['template_kalenderlist_box'] = <<<HEREDOC
274<a title="Archive" href="###KALENDERHREF###">Archive</a>:&nbsp;
275 ###EARLIERLINKBEGIN###<a href='###KALENDER_LASTHREF###'>Noch fr&uuml;her</a>###EARLIERLINKEND###
276 ###LOOPBEGIN###<a href='###KALENDERLOOP_HREF###'>###KALENDERLOOP_INLINKDATE###</a> &nbsp###LOOPEND###
277 ###LATERLINKBEGIN###<a href='###KALENDER_NEXTHREF###'>Sp&auml;ter bitte</a>###LATERLINKEND###
278 <br />
279HEREDOC;
280
281 $defaultparameter['template_kalender_box'] = <<<HEREDOC
282###KALENDERBOX###
283HEREDOC;
284
285 //migration && debug values
286 $defaultparameter['forceoldoutput']=false;
287 $defaultparameter['debug']=false;
288 $defaultparameter['profiler_enabled']=false;
289
290 if($parametername=="") {
291 return $defaultparameter;
292 } else {
293 if(isset($defaultparameter[$parametername])) {
294 $returnparameter = $defaultparameter[$parametername];
295 return $returnparameter;
296 }
297 }
298 } //end of function getdefaultparameter
299
300 function get_pbadefaultsite($parametername=''){
301 //feed_url, site_name , description , site_license , site_url
302 $defaultparameter['feed_url']='http://www.mein-parteibuch.com/blog/ticker-feed/';
303 $defaultparameter['site_name']='Parteibuch Ticker';
304 $defaultparameter['description']='Der Feed vom Parteibuch Ticker';
305 $defaultparameter['site_license']='Piratenlizenz';
306 $defaultparameter['site_url']='http://www.mein-parteibuch.com';
307 if($parametername=="") {
308 return $defaultparameter;
309 } else {
310 if(isset($defaultparameter[$parametername])) {
311 $returnparameter = $defaultparameter[$parametername];
312 return $returnparameter;
313 }
314 }
315 } //end of function get_pbadefaultsite
316
317
318?>
Note: See TracBrowser for help on using the repository browser.