Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Fri, Apr 18, 4:43 AM

in-portal

Index: branches/RC/kernel/units/help/help_config.php
===================================================================
--- branches/RC/kernel/units/help/help_config.php (revision 10025)
+++ branches/RC/kernel/units/help/help_config.php (nonexistent)
@@ -1,16 +0,0 @@
-<?php
-
-$config = Array(
- 'Prefix' => 'h',
- 'EventHandlerClass' => Array('class'=>'HelpEventHandler','file'=>'help_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'HelpTagProcessor','file'=>'help_tag_processor.php','build_event'=>'OnBuild'),
- 'QueryString' => Array(
- 1 => 'prefix',
- 2 => 'icon',
- 3 => 'module',
- 4 => 'title_preset',
- 5 => 'event',
- ),
- );
-
-?>
\ No newline at end of file
Property changes on: branches/RC/kernel/units/help/help_config.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.3
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/RC/kernel/units/help/help_event_handler.php
===================================================================
--- branches/RC/kernel/units/help/help_event_handler.php (revision 10025)
+++ branches/RC/kernel/units/help/help_event_handler.php (nonexistent)
@@ -1,30 +0,0 @@
-<?php
-
- class HelpEventHandler extends kDBEventHandler
- {
-
- /**
- * Saves help file or created new one
- *
- * @param kEvent $event
- */
- function OnSaveHelp(&$event)
- {
- $new_content = $this->Application->GetVar('HelpContent');
-
- $module = $this->Application->GetVar('h_module');
- $title_preset = $this->Application->GetVar('h_title_preset');
-
- $sql = 'SELECT Path FROM '.TABLE_PREFIX.'Modules WHERE LOWER(Name)='.$this->Conn->qstr( strtolower($module) );
- $module_path = $this->Conn->GetOne($sql);
-
- $help_file = FULL_PATH.'/'.$module_path.'module_help/'.$title_preset.'.txt';
- $help_data = $this->Application->GetVar('HelpContent');
-
- $fp = fopen($help_file,'w');
- fwrite($fp,$help_data);
- fclose($fp);
- }
- }
-
-?>
\ No newline at end of file
Property changes on: branches/RC/kernel/units/help/help_event_handler.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.2
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/RC/kernel/units/help/help_tag_processor.php
===================================================================
--- branches/RC/kernel/units/help/help_tag_processor.php (revision 10025)
+++ branches/RC/kernel/units/help/help_tag_processor.php (nonexistent)
@@ -1,107 +0,0 @@
-<?php
-
- class HelpTagProcessor extends kDBTagProcessor
- {
-
- function SectionTitle($params)
- {
- $rets = explode('.', $this->Application->GetVar('h_prefix') );
- $this->Prefix = $rets[0];
- $this->Special = isset($rets[1]) ? $rets[1] : '';
- //$this->Prefix = $this->Application->GetVar('h_prefix');
-
- $title_preset_name = replaceModuleSection($this->Application->GetVar('h_title_preset'));
- $this->Application->SetVar('h_title_preset', $title_preset_name);
- $title_presets = $this->Application->getUnitOption($this->Prefix,'TitlePresets');
-
- $format = $title_presets[$title_preset_name]['format'];
- $format = preg_replace('/[ ]*( ([\'"]{1}) | ([\(]{1}) ) \#.*\# (?(2) \1 | \) )[ ]*/Ux', ' ', $format);
- $title_presets[$title_preset_name]['format'] = $format;
- $this->Application->setUnitOption($this->Prefix,'TitlePresets',$title_presets);
-
- $params['title_preset'] = $title_preset_name;
- return parent::SectionTitle($params);
- }
-
- function getModule()
- {
- $module = $this->Application->GetVar('h_module');
- if (!$module) {
- $module = $this->Application->RecallVar('module');
- }
- return $module;
- }
-
- function ShowHelp($params)
- {
- $module = $this->getModule();
-
- $module = explode(':', $module);
- $module = $module[0];
-
- $title_preset = $this->Application->GetVar('h_title_preset');
-
- $module_path = $this->Application->findModule('Name', $module, 'Path');
- $help_file = FULL_PATH.'/'.$module_path.'module_help/'.$title_preset.'.txt';
-
- if ($this->Application->isDebugMode() && constOn('DBG_EDIT_HELP')) {
- global $debugger;
- $ret = 'Help file: <b>'.$debugger->getLocalFile($help_file).'</b><hr>';
- }
- else {
- $ret = '';
- }
-
- $help_data = file_exists($help_file) ? file_get_contents($help_file) : false;
-
- if( $this->Application->isDebugMode() && constOn('DBG_HELP') )
- {
- $this->Application->Factory->includeClassFile('FCKeditor');
- $oFCKeditor = new FCKeditor('HelpContent');
-
- $oFCKeditor->BasePath = $this->Application->BaseURL('/admin/editor/cmseditor');
- $oFCKeditor->Width = '100%';
- $oFCKeditor->Height = '300';
- $oFCKeditor->ToolbarSet = 'Advanced';
- $oFCKeditor->Value = $help_data;
-
- $oFCKeditor->Config = Array(
- 'UserFilesPath' => FULL_PATH.'kernel/user_files',
- 'ProjectPath' => $this->Application->ConfigValue('Site_Path'),
- 'CustomConfigurationsPath' => rtrim( $this->Application->BaseURL('/admin/editor/inp_fckconfig.js'), '/'),
- );
-
- $ret .= $oFCKeditor->CreateHtml();
- }
- else
- {
- $ret .= $help_data ? $help_data : $this->Application->Phrase('la_section_help_file_missing');
- }
-
- return $ret;
- }
-
- function GetIcon($params)
- {
- $icon_var = getArrayValue($params,'var_name');
- $icon = replaceModuleSection($this->Application->GetVar($icon_var));
-
- if(!$icon) $icon = getArrayValue($params,'default_icon');
- return $icon;
- }
-
- /**
- * Returns templates path for module, which is gathered from prefix module
- *
- * @param Array $params
- * @return string
- * @author Alex
- */
- function ModulePath($params)
- {
- $module_folder = trim( $this->Application->findModule('Name', $this->getModule(), 'Path'), '/');
- return '../../'.$module_folder.'/admin_templates/';
- }
- }
-
-?>
\ No newline at end of file
Property changes on: branches/RC/kernel/units/help/help_tag_processor.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.12
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property

Event Timeline