Changeset 1396


Ignore:
Timestamp:
03/04/2010 10:55:20 AM (2 years ago)
Author:
zhongzhen
Message:

Some changes in Help Extention

Location:
branches/omcollab_zhongzhen2/wiki/extensions/Help
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/omcollab_zhongzhen2/wiki/extensions/Help/HelpExtention.css

    r1391 r1396  
    77 
    88#wpTextbox1 { 
    9     width: 92%; 
     9    width: 60%; 
    1010        float: left; 
    1111        clear: none; 
     
    2525    background-color: #EFEFEF; 
    2626    float: right;  
    27     display: none; 
    2827    margin: 5px; 
    2928    width: 30%; 
     
    3534 
    3635.help_menu_ul {list-style-type: none; margin: 0px; padding: 5px 5px 0px 5px; background-color: #EEEEEE; } 
    37 .help_menu_ul li {display: inline; text-align: center; padding: 3px; font-size: 10px; margin-right: 3px;} 
     36.help_menu_ul li {display: inline; text-align: center; padding: 3px 5px; font-size: 10px; margin-right: 3px;} 
    3837.tab_active {background-color: #FFFFFF; border-left: 1px solid #AEAEAE; border-top: 1px solid #AEAEAE; border-right: 1px solid #AEAEAE; border-bottom: 1px solid #FFFFFF; color: #000000;} 
    39 .tab_normal {color: #666666; cursor: pointer;} 
     38.tab_normal {color: #FFF; cursor: pointer; background-color: #AEAEAE;} 
    4039 
    4140.button_class {float: right; text-align: center; width: 7%;} 
    42 .help_content {padding: 10px; display: none;} 
     41.help_content {padding: 10px; display: none; color:#444;} 
    4342 
    4443#helpcontent1 {display: block;} 
  • branches/omcollab_zhongzhen2/wiki/extensions/Help/Help_Guide.php

    r1391 r1396  
    11<?php 
     2 
    23if ( !defined( 'MEDIAWIKI' ) ) 
    34        die (); 
    45  
    56$wgHooks['EditPage::showEditForm:initial'][] = 'showHelpGuide'; 
     7 
     8$wgExtensionCredits['specialpage'][] = array( 
     9    'name'           => 'Help_Guide', 
     10    'author'         => 'zhongzhen - yzz.webman@gmail.com', 
     11    'version'        => '1.0', 
     12    'description'    => 'When users contribute articles in article edit page, this extention helps them by giving article posting guide.', 
     13    'url'            => 'http://mike2.openmethodology.org', 
     14); 
    615  
    716function showHelpGuide($editPage) { 
    8         global $wgOut, $wgParser; 
     17        global $wgOut, $wgParser, $wgHelpExtentionTitle; 
    918        $section_text = ''; // temp variable for operation 
    1019        $matches = array(); // temp variable for operation 
     
    1221                $temp = ''; $index = 1; 
    1322         
     23        // If your site has not included jquery.js file in other parts, Please make below code works.  
     24        //$wgOut->addHTML("<script type='text/javascript' src='extensions/Help/jquery.js'></script>"); 
     25                 
    1426                // Add css file to Edit page 
    1527                $wgOut->addHTML("<link rel='stylesheet' type='text/css' href='extensions/Help/HelpExtention.css' />"); 
    1628        $wgOut->addHTML("<script type='text/javascript' src='extensions/Help/tabmenu.js'></script>"); 
    17  
     29         
    1830                // Add javascript to Edit page 
    1931                $wgOut->addHTML("<script> 
     
    3547                // Help content - Help article title 
    3648        $wgOut->parserOptions()->setEditSection(false); // Hide edit link 
    37         $title = Title::newFromText('Contribution_Guide'); // get title object 
     49        $title = Title::newFromText($wgHelpExtentionTitle); // get title object from Localsettings.php 
    3850        $article = new Article($title); // get article object 
    3951         
     
    6880        $editPage->editFormTextBeforeContent .= '<div id="shadow"><div id="helpArea">' . $html . '</div></div>';  
    6981                // Help button 
    70                 $editPage->editFormTextBeforeContent .= '<div class="button_class"><img src="extensions/Help/images/button_help.gif" style="cursor: pointer;" onclick="changeIcon(this)"/></div>';  
     82                $editPage->editFormTextBeforeContent .= '<div class="button_class"><img src="extensions/Help/images/button_hide.gif" style="cursor: pointer;" onclick="changeIcon(this)"/></div>';  
    7183 
    7284        return true; 
Note: See TracChangeset for help on using the changeset viewer.