2 # ====================[ orgaddition.pl ]====================
6 org-custom - An Oddmuse module for augmenting the Org Markup module with
7 so-called, unofficial "Org Additions" markup.
11 orgaddition is simply installable; simply:
15 =item First install the Org Markup module; see
16 L<http://www.oddmuse.org/cgi-bin/oddmuse/Org_Markup_Extension>.
18 =item Move this file into the B<wiki/modules/> directory for your Oddmuse Wiki.
25 $ModulesDescription .= '<p>See <a href="http://oddmuse.org/wiki/Org_Markup_Extension">Org Markup Extension</a></p>';
27 *GetOldTitle
= *GetTitle
;
28 *GetTitle
= *OrgGetTitle
;
31 my ($id, $title, $oldId, $nocache, $status, $links) = @_;
35 *GetOldHeader
= *GetHeader
;
36 *GetHeader
= *OrgGetHeader
;
39 my ($id, $title, $oldId, $nocache, $status, $links) = @_;
40 return GetOldHeader
($id, $title, $oldId, $nocache, $status, $links)
41 . GetOldTitle
($id, $title);
44 push(@MyFooters, \
&OrgPrintFooter
);
47 # return $q->div({-class=>'navbar'}, GetGotoBar(@_));
51 use vars
qw($SideBars);
53 # Include this page on every page:
56 # do this later so that the user can customize $SidebarName
57 push(@MyInitVariables, \&SideBarInit);
60 foreach my $sideBar (@SideBars) {
61 $AdminPages{FreeToNormal($sideBar)} = 1;
66 my ($pageName, $className) = @_;
68 $pageName = FreeToNormal($pageName);
69 $className = lc($pageName) unless $className;
70 # While rendering, OpenPageName must point to the sidebar, so that
71 # the form extension which checks whether the current page is locked
72 # will check the SideBar lock and not the real page's lock.
73 local $OpenPageName = $pageName;
74 print $q->start_div({-class=>$className});
75 # This makes sure that $Page{text} remains undisturbed.
76 PrintWikiToHTML(GetPageContent($pageName));
82 foreach my $sideBar (@SideBars) {
83 PrintSideBar($sideBar);
87 =head1 COPYRIGHT AND LICENSE
89 The information below applies to everything in this distribution,
92 Copyright 2013 Jambunathan K <kjambunathan@gmail.com>
94 This program is free software; you can redistribute it and/or modify
95 it under the terms of the GNU General Public License as published by
96 the Free Software Foundation; either version 3 of the License, or
97 (at your option) any later version.
99 This program is distributed in the hope that it will be useful,
100 but WITHOUT ANY WARRANTY; without even the implied warranty of
101 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
102 GNU General Public License for more details.
104 You should have received a copy of the GNU General Public License
105 along with this program. If not, see L<http://www.gnu.org/licenses/>.