Changeset 108
- Timestamp:
- 2007-12-19 21:13:37 (1 year ago)
- Files:
-
- trunk/classes/misc/Format.php (modified) (3 diffs)
- trunk/classes/misc/Post.php (modified) (1 diff)
- trunk/classes/pages/Reply.php (modified) (1 diff)
- trunk/includes/lang/de.php (modified) (1 diff)
- trunk/includes/lang/en.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/classes/misc/Format.php
r61 r108 79 79 public function post($str, $simple = FALSE) { 80 80 // language 81 global $LANG ;81 global $LANG, $F; 82 82 /* debugging messages; 83 83 * printed out directly on the screen, so incompatible with general board structure; … … 85 85 $DEBUG = FALSE; 86 86 // board code 87 $tags_open = Array('[b]', '[i]', '[u]', '[s]', '[color=', '[size=', '[font=', '[align=', '[quote]', '[ code]', '[img]', '[url]', '[url=', '[email]', '[email=');87 $tags_open = Array('[b]', '[i]', '[u]', '[s]', '[color=', '[size=', '[font=', '[align=', '[quote]', '[quote=', '[code]', '[img]', '[url]', '[url=', '[email]', '[email='); 88 88 // closing tags in the SAME order 89 $tags_close = Array('[/b]', '[/i]', '[/u]', '[/s]', '[/color]', '[/size]', '[/font]', '[/align]', '[/quote]', '[/ code]', '[/img]', '[/url]', '[/url]', '[/email]', '[/email]');89 $tags_close = Array('[/b]', '[/i]', '[/u]', '[/s]', '[/color]', '[/size]', '[/font]', '[/align]', '[/quote]', '[/quote]', '[/code]', '[/img]', '[/url]', '[/url]', '[/email]', '[/email]'); 90 90 /* HTML code: 91 91 * In both the opening and closing tag definition, you can use %% as placeholder. Occurences of this string will be replaced with the attribute given in the board tag (e.g. [url=blah] -> attribute is 'blah'; there are some special cases which are handled individually in the switch statement). 92 92 * The string contained between opening and closing board tag will automatically appear between opening and closing HTML part anyway. Note that I wrote 'HTML part', not 'tag', since in some cases (e.g. images), the latter doesn't apply. If you're planning to add more code tags, just look at the existing ones and you should understand the different ways to use those definitions to the best effect... */ 93 $tags_open_html = Array('<b>', '<i>', '<u>', '<s>', '<span style="color:%%">', '<span style="font-size:%%px">', '<span style="font-family:%%">', '<div align="%%">', '<div class="quote1">' . $LANG['Quote'] . ':</div><div class="quote">', '<div class=" code1">' . $LANG['Code'] . ':</div><pre class="code">', '<img src="', '<a target="_blank" href="', '<a target="_blank" href="%%">', '<a href="mailto:', '<a href="mailto:%%">');94 $tags_close_html = Array('</b>', '</i>', '</u>', '</s>', '</span>', '</span>', '</span>', '</div>', '</div>', '</ pre>', '" %% alt="' . $LANG['Image'] . '" />', '">%%</a>', '</a>', '">%%</a>', '</a>');93 $tags_open_html = Array('<b>', '<i>', '<u>', '<s>', '<span style="color:%%">', '<span style="font-size:%%px">', '<span style="font-family:%%">', '<div align="%%">', '<div class="quote1">' . $LANG['Quote'] . ':</div><div class="quote">', '<div class="quote1">%%:</div><div class="quote">', '<div class="code1">' . $LANG['Code'] . ':</div><pre class="code">', '<img src="', '<a target="_blank" href="', '<a target="_blank" href="%%">', '<a href="mailto:', '<a href="mailto:%%">'); 94 $tags_close_html = Array('</b>', '</i>', '</u>', '</s>', '</span>', '</span>', '</span>', '</div>', '</div>', '</div>', '</pre>', '" %% alt="' . $LANG['Image'] . '" />', '">%%</a>', '</a>', '">%%</a>', '</a>'); 95 95 // initialize string for comparison 96 96 $str_prev = ''; … … 183 183 $_attr_close = $_cont; 184 184 break; 185 case '[quote=': 186 // get poster and date of post this quote comes from 187 $p = new Post($_attr); 188 $_attr = str_replace(Array('%poster%', '%date%'), Array($p->getPoster(), $F->datetime($p->getPosttime())), $LANG['quote_from']); 189 break; 185 190 default: 186 191 // nothing to do for the rest of the tags trunk/classes/misc/Post.php
r105 r108 47 47 } 48 48 } /* constructor */ 49 50 /* get poster */ 51 public function getPoster() { 52 return $this->post->poster; 53 } 54 55 /* get post time */ 56 public function getPosttime() { 57 return $this->post->posttime; 58 } 49 59 50 60 /* function setPost - only used if constructor called without id (used in post preview) */ trunk/classes/pages/Reply.php
r88 r108 73 73 $row4 = $q->fetchObject(); 74 74 $q = NULL; 75 $_quote_text = '[quote ]' . $F->htmlentities($row4->post, TRUE) . '[/quote]';75 $_quote_text = '[quote=' . $quote . ']' . $F->htmlentities($row4->post, TRUE) . '[/quote]'; 76 76 } 77 77 // default: not previously subscribed trunk/includes/lang/de.php
r89 r108 310 310 $LANG['View_All'] = 'Alle ansehen'; 311 311 $LANG['per_day'] = 'pro Tag'; 312 $LANG['quote_from'] = 'Geschrieben von %poster% %date%'; 312 313 313 314 /* actual sentences */ trunk/includes/lang/en.php
r89 r108 311 311 $LANG['View_All'] = 'View All'; 312 312 $LANG['per_day'] = 'per day'; 313 $LANG['quote_from'] = 'Originally posted by %poster% %date%'; 313 314 314 315 /* actual sentences */
