Changeset 1396
- Timestamp:
- 03/04/2010 10:55:20 AM (2 years ago)
- Location:
- branches/omcollab_zhongzhen2/wiki/extensions/Help
- Files:
-
- 2 edited
-
HelpExtention.css (modified) (3 diffs)
-
Help_Guide.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/omcollab_zhongzhen2/wiki/extensions/Help/HelpExtention.css
r1391 r1396 7 7 8 8 #wpTextbox1 { 9 width: 92%;9 width: 60%; 10 10 float: left; 11 11 clear: none; … … 25 25 background-color: #EFEFEF; 26 26 float: right; 27 display: none;28 27 margin: 5px; 29 28 width: 30%; … … 35 34 36 35 .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;} 38 37 .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;} 40 39 41 40 .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;} 43 42 44 43 #helpcontent1 {display: block;} -
branches/omcollab_zhongzhen2/wiki/extensions/Help/Help_Guide.php
r1391 r1396 1 1 <?php 2 2 3 if ( !defined( 'MEDIAWIKI' ) ) 3 4 die (); 4 5 5 6 $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 ); 6 15 7 16 function showHelpGuide($editPage) { 8 global $wgOut, $wgParser ;17 global $wgOut, $wgParser, $wgHelpExtentionTitle; 9 18 $section_text = ''; // temp variable for operation 10 19 $matches = array(); // temp variable for operation … … 12 21 $temp = ''; $index = 1; 13 22 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 14 26 // Add css file to Edit page 15 27 $wgOut->addHTML("<link rel='stylesheet' type='text/css' href='extensions/Help/HelpExtention.css' />"); 16 28 $wgOut->addHTML("<script type='text/javascript' src='extensions/Help/tabmenu.js'></script>"); 17 29 18 30 // Add javascript to Edit page 19 31 $wgOut->addHTML("<script> … … 35 47 // Help content - Help article title 36 48 $wgOut->parserOptions()->setEditSection(false); // Hide edit link 37 $title = Title::newFromText( 'Contribution_Guide'); // get title object49 $title = Title::newFromText($wgHelpExtentionTitle); // get title object from Localsettings.php 38 50 $article = new Article($title); // get article object 39 51 … … 68 80 $editPage->editFormTextBeforeContent .= '<div id="shadow"><div id="helpArea">' . $html . '</div></div>'; 69 81 // Help button 70 $editPage->editFormTextBeforeContent .= '<div class="button_class"><img src="extensions/Help/images/button_h elp.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>'; 71 83 72 84 return true;
Note: See TracChangeset
for help on using the changeset viewer.
