Lines Matching +full:d +full:- +full:link

3 # gCalendar "gcal_read.php" - responsible for reading the data into the big gCal_data-array 
7 * read the pages given in the pages=(...) parameter into the "gCal_data"-array
9 * @author Frank Hinkel <frank@hi-sys.de>
11 * @param array $options contains a list of parameters passed to the plugin at the wiki-page
12 * @param array pages the wiki-pages to read the data from
17 global $gCal_data; # this array receives all the date-entries
19 # reset data-array
22 # memory for wiki-pages allready read to avoid duplicates
28 $page_list = substr($page_list,0,-1);
56 # generate a link to the wiki page, except option pagelinks is set to 'hide'.
64 # now read this page into the calendar-array
72 * read a page into the gCal_data-array
74 * @author Frank Hinkel <frank@hi-sys.de>
76 * @param array $options contains a list of parameters passed to the plugin at the wiki-page
77 * @param array page_key the column number where the data is stored into the gCal_data-array
78 * @param string wikipage the wiki-page to read the data from
85 global $gCal_data; # this array contains all the date-entries
96 # find path to actual wiki-page. skip if file not exists
100 # read data from wiki-page
106 # check line against all category-patterns. see user/conf.php
116 # check line against all event-patterns. see user/conf.php
121 # grab date- and time-spans from the beginning of each line
126 # check for time-spans indicated by a dash
127 if($buffer{0}=="-") {
137 # insert the event into the whole date-range
138 for($d=$start_date ; $d <= $end_date ; $d++) {
141 # initialize event with event-source
144 # set the category, even when there is no event-text
147 # generate an event, when event-text or start-time or end-time is given
150 # of the event-text. can be used to force an event-icon without text
160 if(is_array($end_time) && ($d==$end_date) ) {
161 $entry = "- ".$end_time[0]. " ".$entry;
164 if(is_array($start_time) && ($d==$start_date)) {
169 # write the event-entry to global array
174 $gCal_data[$page_key][$d][] = $event;
185 # Utility-functions
196 # '#^' --> # string has to start with the pattern.
197 # '(?=($|\D))#' --> # look-ahead => any non-digit or end-of-string terminates pattern
199 if(preg_match('#^'.$conf['gCal_date_dmy'].'(?=($|\D))#',$text,$match)) {
200 $d=$match[1];$m=$match[2];$y=$match[3];
201 }elseif(preg_match('#^'.$conf['gCal_date_mdy'].'(?=($|\D))#',$text,$match)) {
202 $d=$match[2];$m=$match[1];$y=$match[3];
203 }elseif(preg_match('#^'.$conf['gCal_date_ymd'].'(?=($|\D))#',$text,$match)) {
204 $d=$match[3];$m=$match[2];$y=$match[1];
209 if(strlen($d)==1) $d='0'.$d;
215 return $y.$m.$d; // return format yyyymmdd
228 $pattern = '([0-9]{1,2})\:([0-9]{2})\s*(am|pm|)';
230 $pattern .= '(?=($|\\D))#i'; # look-ahead => any non-digit or end-of-string terminates pattern
245 * returns the inline-category
252 # get the preg-expr from $conf. sting has to start with this pattern
268 * Expand namespaces in the form :namespace:* to every wiki-page in this ns.
270 * @author Frank Hinkel <frank@hi-sys.de>
274 * @param boolean nested if true -> subnamespaces are also expanded into single-pages
282 if(substr($page,-1)=="*") {
285 $dir = wikiFN(substr($page,0,-1).$start);
286 $dir = substr($dir,0,-(strlen($start)+4)); # strip filename - only the dir is needed
294 $pl[] = substr($page,0,-1).substr($file,0,-4);
296 $subNS[] = substr($page,0,-2).':'.cleanID($file).':*';
321 * @author Frank Hinkel <frank@hi-sys.de>
329 # do some fundamental-rendering: bold, italic, underline, ...
338 $text = str_replace('->','&rarr;',$text);
339 $text = str_replace('<-','&larr;',$text);
349 $drx->doc = '';
351 list($link,$name)=explode("|",substr($wl,2,strlen($wl)-4),2);
353 if ( preg_match('/^[a-zA-Z\.]+>{1}.*$/u',$link )) {
355 if(count($drx->interwiki)==0) $drx->interwiki = getInterwiki();
357 list($wikiname,$wikiuri) = preg_split('/>/u',$link,2);
358 $drx->interwikilink('',$name,strtolower($wikiname),$wikiuri);
359 }elseif ( preg_match('/^\\\\\\\\[\w.:?\-;,]+?\\\\/u',$link) ) {
361 $drx->windowssharelink($link,$name);
362 }elseif ( preg_match('#^([a-z0-9\-\.+]+?)://#i',$link) ) {
363 // external link (accepts all protocols)
364 $drx->externallink($link,$name);
365 }elseif ( preg_match('#([a-z0-9\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i',$link) ) {
366 // email-link
367 $drx->emaillink($link,$name);
368 }elseif ( preg_match('!^#.+!',$link) ){
369 // local link
370 $drx->locallink($link,$name);
372 $drx->internallink($link,$name);
375 $text=str_replace($wl,$drx->doc,$text);
378 # remove all html-tags which are not explicitly allowed