', '\\n', '$[Indented text]', '$GUIButtonDirUrlFmt/indent.gif"$[Indented text]"'); $GUIButtons ['outdent'] = array($ArrayCount++, '\\n-<', '\\n', '$[Hanging indent]', '$GUIButtonDirUrlFmt/outdent.gif"$[Hanging indent]"'); $GUIButtons [$SpaceCount++] = array($ArrayCount++, '', '', '', $GUIButtonSpace1); $GUIButtons ['big'] = array($ArrayCount++, "[+", "+]", '$[Big Text]', '$GUIButtonDirUrlFmt/big.gif"$[Big Text]"'); $GUIButtons ['bigger'] = array($ArrayCount++, '[++', '++]', '$[Bigger Text]', '$GUIButtonDirUrlFmt/bigger.gif"$[Larger Text]"'); $GUIButtons ['small'] = array($ArrayCount++, "[-", "-]", '$[small text]', '$GUIButtonDirUrlFmt/small.gif"$[small text]"'); $GUIButtons ['smaller'] = array($ArrayCount++, '[--', '--]', '$[smaller text]', '$GUIButtonDirUrlFmt/smaller.gif"$[tiny text]"'); $GUIButtons [$SpaceCount++] = array($ArrayCount++, '', '', '', $GUIButtonSpace1); # $GUIButtons ['h1'] = array($ArrayCount++, '\\n! ', '\\n', '$[Heading1]', # '$GUIButtonDirUrlFmt/h1.gif"$[Heading1]"'); $GUIButtons ['code'] = array($ArrayCount++, '[@', '@]', '$[Text or Code]', '$GUIButtonDirUrlFmt/code.gif"$[Preformatted text]"'); $GUIButtons ['h2'] = array($ArrayCount++, '\\n!! ', '\\n', '$[Heading2]', '$GUIButtonDirUrlFmt/h2.gif"$[Heading2]"'); $GUIButtons ['h3'] = array($ArrayCount++, '\\n!!! ', '\\n', '$[Heading3]', '$GUIButtonDirUrlFmt/h3.gif"$[Heading3]"'); $GUIButtons ['h4'] = array($ArrayCount++, '\\n!!!! ', '\\n', '$[Heading4]', '$GUIButtonDirUrlFmt/h4.gif"$[Heading4]"'); $GUIButtons [$SpaceCount++] = array($ArrayCount++, '', '', '', $GUIButtonSpace1); $GUIButtons ['table'] = array($ArrayCount++, '||border=1 width=80%\\n||!Hdr ||!Hdr ||!Hdr ||\\n|| || || ||\\n|| || || ||\\n', '', '', '$GUIButtonDirUrlFmt/table.gif"$[Table]"'); #Must be changed to one line! $GUIButtons ['advtable'] = array($ArrayCount++, "(:table border=1 width=80%:)\\n(:cellnr:)'''Header'''\\n(:cell:)'''Header'''\\n(:cell:)'''Header'''\\n(:cellnr:)\\n(:cell:)\\n(:cell:)\\n(:tableend:)\\n",'', '','$GUIButtonDirUrlFmt/tableadv.gif"$[Advanced table]"'); #Must be changed to one line! $GUIButtons ['sig'] = array($ArrayCount++, '\\n~~~~', '', '', '$GUIButtonDirUrlFmt/sig.gif"$[Stamp your name and current date]"'); #Must be changed to one line - the $ must be escaped ! $GUIButtons [$SpaceCount++] = array($ArrayCount++, '\\n->', '\\n', '$[2nd Line]', '
'); $GUIButtons ['pagelink'] = array($ArrayCount++, '[[',']]', '$[Page link]', '$GUIButtonDirUrlFmt/pagelink.gif"$[Link to internal page]"'); $GUIButtons ['extlink'] = array($ArrayCount++, '[[',']]', '$[http:// | link text]', '$GUIButtonDirUrlFmt/extlink.gif"$[Link to external page]"'); $GUIButtons ['anchor'] = array($ArrayCount++, '[[#', ']]', '$[AnchorName]', '$GUIButtonDirUrlFmt/anchor.gif"$[Invisible Anchor to Link To]"'); $GUIButtons ['anchorlink'] = array($ArrayCount++, '[[#', '$[| text]]]', '$[AnchorName]', '$GUIButtonDirUrlFmt/anchorlink.gif"$[Link to Anchor in SAME page]"'); $GUIButtons ['anchor2'] = array($ArrayCount++, '[[', '$[#AnchorName | text]]]', '$[PageName]', '$GUIButtonDirUrlFmt/anchor2.gif"$[Link to Anchor on DIFFERENT page]"'); $GUIButtons [$SpaceCount++] = array($ArrayCount++, '', '', '', $GUIButtonSpace3); $GUIButtons ['attach'] = array($ArrayCount++, 'Attach:','', '$[file.ext]', '$GUIButtonDirUrlFmt/attach.gif"$[Attach File]"'); $GUIButtons ['image'] = array($ArrayCount++, '%rframe text-align=left height=50px margin-top=7px margin-left=10px% [[Attach:', " | Attach:$[SameImageName.jpg]"$[MOUSE HOVER TEXT]"]] | '$[-SUBTITLE-]'", '$[SameImageName.jpg]', '$GUIButtonDirUrlFmt/image.gif"$[Thumbnail of Image floating right]"'); $GUIButtons ['ol'] = array($ArrayCount++, '\\n# ', '\\n', '$[Numbered list element]', '$GUIButtonDirUrlFmt/ol.gif"$[Ordered list]"'); $GUIButtons ['ul'] = array($ArrayCount++, '\\n* ', '\\n', '$[Bullet list element]', '$GUIButtonDirUrlFmt/ul.gif"$[Unordered list]"'); $GUIButtons ['hr'] = array($ArrayCount++, '\\n----\\n', '', '', '$GUIButtonDirUrlFmt/hr.gif"$[Horizontal rule]"'); $GUIButtons [$SpaceCount++] = array($ArrayCount++, '', '', '', $GUIButtonSpace1); $GUIButtons ['textblue'] = array($ArrayCount++, '%blue%', '%%', '$[Blue Text]', '$GUIButtonDirUrlFmt/hightextblue.gif"$[Blue Text]"'); $GUIButtons ['textgreen'] = array($ArrayCount++, '%green%', '%%', '$[Green Text]', '$GUIButtonDirUrlFmt/hightextgreen.gif"$[Green Text]"'); $GUIButtons ['textred'] = array($ArrayCount++, '%red%', '%%', '$[Red Text]', '$GUIButtonDirUrlFmt/hightextred.gif"$[Red Text]"'); $GUIButtons ['textyellow'] = array($ArrayCount++, '%yellow%', '%%', '$[Yellow Text]', '$GUIButtonDirUrlFmt/hightextyellow.gif"$[Yellow Text]"'); $GUIButtons [$SpaceCount++] = array($ArrayCount++, '', '', '', $GUIButtonSpace1); $GUIButtons ['bgblue'] = array($ArrayCount++, '%bgcolor=blue%', '%%', '$[Background Blue]', '$GUIButtonDirUrlFmt/highbgblue.gif"$[Blue Background]"'); $GUIButtons ['bggreen'] = array($ArrayCount++, '%bgcolor=green%', '%%', '$[Background Green]', '$GUIButtonDirUrlFmt/highbggreen.gif"$[Green Background]"'); $GUIButtons ['bgred'] = array($ArrayCount++, '%bgcolor=red%', '%%', '$[Background Red]', '$GUIButtonDirUrlFmt/highbgred.gif"$[Red Background]"'); $GUIButtons ['bgyellow'] = array($ArrayCount++, '%bgcolor=yellow%', '%%', '$[Background Yellow]', '$GUIButtonDirUrlFmt/highbgyellow.gif"$[Yellow Background]"'); $GUIButtons [$SpaceCount++] = array($ArrayCount++, '', '', '',$GUIButtonSpace1); $GUIButtons ['nextline'] = array($ArrayCount++, '\\\\\\\\\\n', '', '', '$GUIButtonDirUrlFmt/nextline.gif"$[Line Break]"'); $GUIButtons ['nextline2'] = array($ArrayCount++, '\\\\\\\\\\\\\\n', '', '', '$GUIButtonDirUrlFmt/nextline2.gif"$[2 Line Breaks]"'); $GUIButtons ['return'] = array($ArrayCount++, '[[<<]] \\n', '', '', '$GUIButtonDirUrlFmt/return.gif"$[ Return]"'); ///////////////////////////////////////////////////////////////// // SECTION TAKEN FROM GuiButtons.php RECIPE // // http://www.pmwiki.org/wiki/Cookbook/GuiButtons // // modified 2008-06-29 by Adam Overton // ///////////////////////////////////////////////////////////////// $HTMLHeaderFmt[] = "\n"; SDV($SmileyButtonsDirUrlFmt,"{$GUIButtonDirUrlFmt}/smileys"); # display smilie images Markup("happy2","block","/\{happy\}/","happy smiley"); Markup("wink2","block","/\{wink\}/","winking smiley"); Markup("cool","block","/\{cool\}/","cool smiley"); Markup("confused","block","/\{confused\}/","confused smiley"); Markup("eek","block","/\{eek\}/","shrieking smiley"); Markup("mad","block","/\{angry\}/","angry smiley"); Markup("rolleyes","block","/\{rolleyes\}/","rolling eyes smiley"); Markup("sad2","block","/\{sad\}/","frowning smiley"); Markup("tongue2","block","/\{tongue\}/","laughing smiley"); Markup("redface2","block","/\{redface\}/","embarrassed smiley"); Markup("biggrin2","block","/\{biggrin\}/","grinning smiley"); Markup("mad2","block","/\{mad\}/","angry smiley"); // *** AO -- THIS ADDS SMILEYS TO THE $GuiButtons ARRAY *** // if($Smileys) { # smiley gui-edit buttons $GUIButtons [$SpaceCount++] = array($ArrayCount++, '', '', '', $GUIButtonSpace1); $GUIButtons['happy'] = array($ArrayCount++, '\{happy\}', '', '', '$SmileyButtonsDirUrlFmt/happy.gif"$[Happy]"'); $GUIButtons [$SpaceCount++] = array($ArrayCount++, '', '', '', "$SmileyButtonsDirUrlFmt/pixspace.gif"); $GUIButtons['wink'] = array($ArrayCount++, '\{wink\}', '', '', '$SmileyButtonsDirUrlFmt/wink.gif"$[Wink]"'); $GUIButtons [$SpaceCount++] = array($ArrayCount++, '', '', '', "$SmileyButtonsDirUrlFmt/pixspace.gif"); $GUIButtons['cool'] = array($ArrayCount++, '\{cool\}', '', '', '$SmileyButtonsDirUrlFmt/cool.gif"$[Cool]"'); $GUIButtons [$SpaceCount++] = array($ArrayCount++, '', '', '', "$SmileyButtonsDirUrlFmt/pixspace.gif"); $GUIButtons['confused'] = array($ArrayCount++, '\{confused\}', '', '', '$SmileyButtonsDirUrlFmt/confused.gif"$[Confused]"'); $GUIButtons [$SpaceCount++] = array($ArrayCount++, '', '', '', "$SmileyButtonsDirUrlFmt/pixspace.gif"); $GUIButtons['eek'] = array($ArrayCount++, '\{eek\}', '', '', '$SmileyButtonsDirUrlFmt/eek.gif"$[Eek]"'); $GUIButtons [$SpaceCount++] = array($ArrayCount++, '', '', '', "$SmileyButtonsDirUrlFmt/pixspace.gif"); $GUIButtons['rolleyes'] = array($ArrayCount++, '\{rolleyes\}', '', '', '$SmileyButtonsDirUrlFmt/rolleyes.gif"$[Roll eyes]"'); $GUIButtons [$SpaceCount++] = array($ArrayCount++, '', '', '', "$SmileyButtonsDirUrlFmt/pixspace.gif"); $GUIButtons['sad'] = array($ArrayCount++, '\{sad\}', '', '', '$SmileyButtonsDirUrlFmt/sad.gif"$[Sad]"'); $GUIButtons [$SpaceCount++] = array($ArrayCount++, '', '', '', "$SmileyButtonsDirUrlFmt/pixspace.gif"); $GUIButtons['mad'] = array($ArrayCount++, '\{mad\}', '', '', '$SmileyButtonsDirUrlFmt/mad.gif"$[Mad]"'); $GUIButtons [$SpaceCount++] = array($ArrayCount++, '', '', '', "$SmileyButtonsDirUrlFmt/pixspace.gif"); $GUIButtons['biggrin'] = array($ArrayCount++, '\{biggrin\}', '', '', '$SmileyButtonsDirUrlFmt/biggrin.gif"$[Big grin]"'); } Markup('guibuttons', 'directives', '/\\(:guibuttons:\\)/e', "Keep(FmtPageName(GUIButtonsMarkup(\$pagename), \$pagename))"); function GUIButtonsMarkup($pagename) { global $GUIButtons, $ArrayCount, $SpaceCount; // *** AO *** // $cmpfn = create_function('$a,$b', 'return $a[0]-$b[0];'); usort($GUIButtons, $cmpfn); $out = "'; return $out; }