コード例 #1
0
 public static function getMultiEditToolbar($toolbar_id)
 {
     global $wgContLang, $wgJsMimeType;
     $toolarray = CreateMultiPage::getToolArray();
     // multiple toolbars...
     $toolbar = "<div id='toolbar" . $toolbar_id . "' style='display: none'>\n";
     $toolbar .= "<script type='{$wgJsMimeType}'>\n/*<![CDATA[*/\n";
     $toolbar .= "CreateAPage.multiEditTextboxes[CreateAPage.multiEditTextboxes.length] = {$toolbar_id};\n";
     $toolbar .= "CreateAPage.multiEditButtons[{$toolbar_id}] = [];\n";
     $toolbar .= "CreateAPage.multiEditCustomButtons[{$toolbar_id}] = [];\n";
     $toolbar .= "jQuery( document ).ready( function() { jQuery( '#wpTextboxes' + {$toolbar_id} ).focus( function( e ) { CreateAPage.showThisBox( e, {'toolbarId' : {$toolbar_id} } ); } ); } ); \n";
     $toolbar .= "/*]]>*/\n</script>";
     $toolbar .= "\n</div>";
     return $toolbar;
 }
コード例 #2
0
</style>
</noscript>

<script type="text/javascript">
/*<![CDATA[*/
CreateAPage.previewMode = '<?php 
echo !$ispreview ? 'No' : 'Yes';
?>
';
CreateAPage.redLinkMode = '<?php 
echo !$isredlink ? 'No' : 'Yes';
?>
';

<?php 
$tool_arr = CreateMultiPage::getToolArray();
$tool_num = 0;
foreach ($tool_arr as $single_tool) {
    ?>
CreateAPage.toolbarButtons[<?php 
    echo $tool_num;
    ?>
] = [];
CreateAPage.toolbarButtons[<?php 
    echo $tool_num;
    ?>
]['image'] = stylepath + '/common/images/' + '<?php 
    echo $single_tool['image'];
    ?>
';
CreateAPage.toolbarButtons[<?php