'; # Toggle 'linebreaks' on
##-- Button bar while editing -------------------------------------------
$EnableGUIButtons = 1;
##-- *large buttons* (shall be loaded) ----------------------------------
$GUIButtonDirUrlFmt = '$FarmPubDirUrl/guiedit32';
$GUIButtons ['pagetoc'] = array(90, '\\n(:toc:)\\n', '', '',
'$GUIButtonDirUrlFmt/toc.gif"$[Table of content]"');
$GUIButtons ['underline'] = array(95, '{+', '+}', '$[text]',
'$GUIButtonDirUrlFmt/underline.gif"$[Underline]"');
$GUIButtons ['image'] = array(620, 'Img:', '', '$[MyImage.jpg]',
'$GUIButtonDirUrlFmt/image.gif"$[Insert image]"');
$GUIButtons ['rule'] = array(630, '\\n----\\n', '', '',
'$GUIButtonDirUrlFmt/hr.gif"$[Horizontal rule]"');
$GUIButtons ['snote'] = array(640, '{=', '=}', '$[text]',
'$GUIButtonDirUrlFmt/snote.gif"$[Sticky note]"');
include_once("cookbook/tabtable.php"); #Conversion excel table -> pmwiki
##---- Edit table -------------------------------------------------------
include_once('cookbook/tabledit.php');
$HTMLStylesFmt['tabledit'] ="
div.tabledit { text-align:right; font-size:smaller; clear:both;
margin-bottom:0; border-bottom-width:0; padding-bottom:0; }
div.tabledit a, div.sectionedit a:visited { color:#b0b0b0; }
";
##---- Section edit -----------------------------------------------------
include_once('cookbook/sectionedit.php'); # Édition par sections
$HTMLStylesFmt['sectionedit'] ="
div.sectionedit { float:right; margin-left:5px; font-size:smaller; }
div.sectionedit a, div.sectionedit a:visited { color:#b0b0b0; }
";
##---- Traditional shortcuts --------------------------------------------
Markup("'~", "inline", "/'~(.*?)~'/", "$1"); # '~italic~'
Markup("'*", "inline", "/'\\*(.*?)\\*'/", "$1"); # '*bold*'
##---- Preview in pink --------------------------------------------------
if (@$_POST['preview'])
$HTMLStylesFmt[] = ' body {background-color:#ffeeee;} '; # Prévisu en rose !
##---- PDF management ---------------------------------------------------
include_once('cookbook/pmwiki2pdf/pmwiki2pdf.php');
$avoidPage[] = 'Menu';
$avoidPage[] = 'IndexGroupe';
$avoidPage[] = 'ModifsDuGroupe';
##---- Presentation scripts ---------------------------------------------
include_once("cookbook/menus.php"); #Incorpore menu développables (css modifié)
//$HTMLHeaderFmt[] =
// ''."\n";
include_once("cookbook/dictindex.php"); #Inclut l'index Incomptible w/ Wikipublisher
##include_once("cookbook/publish.php"); #Inclut la publication des trails
include_once("cookbook/addlink.php"); # Crée un favori pour enregistrer page courante
##-- Sticky-notes, taken from addon extended markup from John Rankin ----
$HTMLStylesFmt['stknextend'] = "
span.stickynote {
font-size: smaller;
float: right;
padding: 8px;
margin-left: 10px;
margin-bottom: 10px;
width: 160px;
border-top: 1px dotted;
border-bottom: 1px dotted;
text-align: center;
color: navy;
background-color: #ffffcf;
}";
Markup("{=",'inline',"/{=(.*?)=}/",'$1');
##---- Standard styles -----------------------------------------------------
$WikiStyle['cat']['class'] = "frame rfloat";
$WikiStyle['cat']['font-size'] = 'smaller';
$WikiStyle['cat']['background-color'] = '#ffffcc';
$WikiStyle['com']['background-color'] = '#dfd';
$WikiStyle['com']['border'] = '1px solid green';
$WikiStyle['com']['apply'] = 'block';
##---- Searched words are shown in yellow ----------------------------------
include_once ('cookbook/searchterms.php');
##---- Adding comments -----------------------------------------------------
// $MPItemFmt = "\n----";
include_once("cookbook/commentbox.php");
$MPDateFmt = "\n----\n!!!!\$Date\n";
$MPTimeFmt = "\n----\n!!!!\$Time par '''\$Author'''\n";
##---- Markup for TinyWebGallery insertion ---------------------------------
Markup('twg', 'Your browser don\'t support Iframe')");
#---- Interpage reference count --------------------------------------------
if ($action=='refcount' && RetrieveAuthPage($pagename,'admin'))
include_once('scripts/refcount.php');
##--- Uploads --------------------------------------------------------------
$EnableUpload = 1; # Valide le téléchargement vers le serveur
$UploadMaxSize = 200000; # Taille maxi téléchargement->serveur, défaut 50000
$EnableUploadOverwrite = 0; #Interdit l'écrasement d'un téléchargement
$UploadPrefixFmt = '/$FullName'; # fichiers sur un répertoire par *page*
$UploadExts['dxf'] = 'image/x-dxf'; # autorisation extension fichier
$UploadExts['dwg'] = 'image/x-dwg';
$UploadExts['iso'] = 'application/x-iso';
##--- Performances management ----------------------------------------------
$EnableIMSCaching=1; # Mise en cache sur le navigateur
##---- Safety and antispam -------------------------------------------------
include_once("cookbook/blocklist.php"); # Bloque liste de mots ou d'adresses IP
include_once('scripts/urlapprove.php');
$UnapprovedLinkCountMax = 5; #défaut 100000
##==== Links management and references =====================================
$MetaRobots =
($action!='browse' || preg_match('#^PmWiki#',$pagename))
? 'noindex,nofollow' : 'index,follow'; // pas de recherche dans groupes PmWiki*
##---- Links type @ --------------------------------------------------------
function CHX($x,$y) { if ($y=='') return NULL; return $y; }
## @"target | text" or @'target | text' or @'target ; tex't or @"target, tx"
Markup('@_','links',"/@([\\x22\\x27])([^|,;]+?)(?:[|,;](.*?))*\\1($SuffixPattern)/e",
"Keep(MakeLink(\$pagename,PSS('$2'),CHX(PSS('$2'),PSS('$3')),'$4'),'L')");
## @link @"text -> target"
Markup('@->','<@_',"/@(\\x22)([^\\x22]+?)\\s*-+>\\s*(\\S[^\\x22]+?)\\x22/e",
"Keep(MakeLink(\$pagename,PSS('$3'),PSS('$2'),NULL),'L')");
## @link (after a non alphanum char)
Markup('@','