Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Sun, Feb 2, 4:18 AM

in-portal

Index: branches/unlabeled/unlabeled-1.14.10/admin/help/help.php
===================================================================
--- branches/unlabeled/unlabeled-1.14.10/admin/help/help.php (revision 5707)
+++ branches/unlabeled/unlabeled-1.14.10/admin/help/help.php (revision 5708)
@@ -1,76 +1,80 @@
<?php
// new startup: begin
define('REL_PATH', 'admin/help');
$relation_level = count( explode('/', REL_PATH) );
define('FULL_PATH', realpath(dirname(__FILE__) . str_repeat('/..', $relation_level) ) );
require_once FULL_PATH.'/kernel/startup.php';
// new startup: end
$pathtolocal = $pathtoroot."kernel/";
require_once ($pathtoroot.$admin."/include/elements.php");
//require_once ($pathtoroot."kernel/admin/include/navmenu.php");
//require_once ($pathtolocal."admin/include/navmenu.php");
require_once($pathtoroot.$admin."/toolbar.php");
$section = $_REQUEST["section"];
$envar = BuildEnv();
int_help_header();
$section = explode(':', $section);
if($section[0] == 'in-portal') $section[0] = 'kernel';
$help_directory = FULL_PATH.'/'.$section[0].'/'.$admin.'/include/help';
$topic_path = $help_directory.'/'.$section[1].'.txt';
// for debugging: save new help content
if( GetVar('action') == 'save_help' )
{
$fp = fopen($topic_path, 'w');
if ($fp) {
fwrite($fp, stripslashes(GetVar('help_content')) );
fclose($fp);
}
else {
trigger_error('Help file was not saved to <b>'.$topic_path.'</b>', E_USER_WARNING);
}
}
$help_data = file_exists($topic_path) ? file_get_contents($topic_path) : GetVar('help_content');
if($section[0] == 'kernel') $section[0] = 'in-portal';
?>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<tr>
<td bgcolor="F6F6F6">
<div class="help_box">
<?php
+ if (constOn('DBG_EDIT_HELP')) {
+ echo 'Filename: <b>'.$section[1].'.txt</b><br />';
+ }
+
if( file_exists($topic_path) )
echo $help_data;
else
echo defined('DBG_HELP') && DBG_HELP ? 'missing section help file <b>'.$section[1].'.txt</b><br>' : admin_language('la_help_in_progress');
?>
</div>
<?php
if( defined('DBG_HELP') && DBG_HELP )
{
?>
<br><input type="button" onclick="document.save_help.submit();" value="Save Changes" style="font-weight: bolder; background-color: #F6F6F6;"><br>
<form name="save_help" id="save_help" method="post" action="<?php echo $_SERVER['PHP_SELF'].'?env='.$envar; ?>">
<textarea id="help_content" name="help_content" rows="15" cols="85"><?php echo $help_data; ?></textarea>
<input type="hidden" name="section" value="<?php echo implode(':',$section); ?>">
<input type="hidden" name="action" value="save_help">
<?php if( GetVar('help_usage') ) { ?>
<input type="hidden" name="help_usage" value="<?php echo GetVar('help_usage'); ?>">
<?php } ?>
</form>
<?php
}
?>
</td>
</tr>
</table>
<? int_footer(); ?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.14.10/admin/help/help.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.14
\ No newline at end of property
+1.14.10.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.6.2/kernel/admin_templates/help.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.6.2/kernel/admin_templates/help.tpl (revision 5707)
+++ branches/unlabeled/unlabeled-1.6.2/kernel/admin_templates/help.tpl (revision 5708)
@@ -1,61 +1,61 @@
<inp2:m_include t="incs/header" nobody="yes"/>
<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
<!-- section header: begin -->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr class="section_header_bg">
<td valign="top" class="admintitle" align="left">
- <img width="46" height="46" src="img/icons/<inp2:h_GetIcon var_name="h_icon" default_icon="icon46_help"/>.gif" align="absmiddle" title="<inp2:m_phrase name="la_Help"/>">&nbsp;<inp2:m_phrase name="la_Help"/><br>
+ <img width="46" height="46" src="<inp2:h_ModulePath/>img/icons/<inp2:h_GetIcon var_name="h_icon" default_icon="icon46_help"/>.gif" align="absmiddle" title="<inp2:m_phrase name="la_Help"/>">&nbsp;<inp2:m_phrase name="la_Help"/><br>
<img src="img/spacer.gif" width="1" height="4"><br>
</td>
</tr>
</table>
<!-- section header: end -->
<!-- blue_bar: begin -->
<table border="0" cellpadding="2" cellspacing="0" class="tableborder_full" width="100%" height="30">
<tr>
<td class="header_left_bg" nowrap width="80%" valign="middle">
<span class="tablenav_link"><inp2:h_SectionTitle/></span>
</td>
<td align="right" class="tablenav" width="20%" valign="middle">
</td>
</tr>
</table>
<!-- blue_bar: end -->
<inp2:m_if check="m_ConstOn" name="DBG_HELP">
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('h','OnSaveHelp');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
window.close();
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
</inp2:m_if>
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td class="help_box">
<inp2:h_ShowHelp/>
</td>
</tr>
</tbody>
</table>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.6.2/kernel/admin_templates/help.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.6
\ No newline at end of property
+1.6.2.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.11.2/kernel/units/help/help_tag_processor.php
===================================================================
--- branches/unlabeled/unlabeled-1.11.2/kernel/units/help/help_tag_processor.php (revision 5707)
+++ branches/unlabeled/unlabeled-1.11.2/kernel/units/help/help_tag_processor.php (revision 5708)
@@ -1,90 +1,107 @@
<?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 ShowHelp($params)
+ function getModule()
{
$module = $this->Application->GetVar('h_module');
- if (!$module) $module = $this->Application->RecallVar('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');
- $sql = 'SELECT Path FROM '.TABLE_PREFIX.'Modules WHERE LOWER(Name)='.$this->Conn->qstr( strtolower($module) );
- $module_path = $this->Conn->GetOne($sql);
-
+ $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') )
- {
+ if ($this->Application->isDebugMode() && constOn('DBG_EDIT_HELP')) {
global $debugger;
$ret = 'Help file: <b>'.$debugger->getLocalFile($help_file).'</b><hr>';
}
- else
- {
+ 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/unlabeled/unlabeled-1.11.2/kernel/units/help/help_tag_processor.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.11
\ No newline at end of property
+1.11.2.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.11.2/core/units/help/help_tag_processor.php
===================================================================
--- branches/unlabeled/unlabeled-1.11.2/core/units/help/help_tag_processor.php (revision 5707)
+++ branches/unlabeled/unlabeled-1.11.2/core/units/help/help_tag_processor.php (revision 5708)
@@ -1,90 +1,107 @@
<?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 ShowHelp($params)
+ function getModule()
{
$module = $this->Application->GetVar('h_module');
- if (!$module) $module = $this->Application->RecallVar('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');
- $sql = 'SELECT Path FROM '.TABLE_PREFIX.'Modules WHERE LOWER(Name)='.$this->Conn->qstr( strtolower($module) );
- $module_path = $this->Conn->GetOne($sql);
-
+ $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') )
- {
+ if ($this->Application->isDebugMode() && constOn('DBG_EDIT_HELP')) {
global $debugger;
$ret = 'Help file: <b>'.$debugger->getLocalFile($help_file).'</b><hr>';
}
- else
- {
+ 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/unlabeled/unlabeled-1.11.2/core/units/help/help_tag_processor.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.11
\ No newline at end of property
+1.11.2.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.4.2/kernel/admin_templates/custom_fields/custom_fields_list.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.4.2/kernel/admin_templates/custom_fields/custom_fields_list.tpl (revision 5707)
+++ branches/unlabeled/unlabeled-1.4.2/kernel/admin_templates/custom_fields/custom_fields_list.tpl (revision 5708)
@@ -1,69 +1,69 @@
<inp2:m_RequireLogin perm_event="cf:OnLoad" system="1"/>
<inp2:m_include t="incs/header" nobody="yes"/>
<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
<inp2:m_ParseBlock name="section_header" prefix="cf" icon="icon46_settings_custom" title="!la_tab_ConfigCustom!"/>
-<inp2:m_ParseBlock name="blue_bar" prefix="cf" title_preset="custom_fields_list" module="in-portal" icon="icon46_settings_custom"/>
+<inp2:m_ParseBlock name="blue_bar" prefix="cf" title_preset="custom_fields_list" icon="icon46_settings_custom"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
//do not rename - this function is used in default grid for double click!
function edit()
{
std_edit_item('cf', 'custom_fields/custom_fields_edit');
}
var a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_CustomField" escape="1"/>',
function() {
std_precreate_item('cf', 'custom_fields/custom_fields_edit')
} ) );
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('cf')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
<inp2:m_if check="m_isDebugMode">
a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone" escape="1"/>',
function() {
submit_event('cf', 'OnMassClone')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
</inp2:m_if>
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_block name="cf_grid_data_td" />
<td valign="top" class="text"><inp2:$PrefixSpecial_field field="$field" grid="$grid" no_special="no_special" as_label="1" /></td>
<inp2:m_blockend />
<inp2:m_block name="preview" />
<inp2:m_ParseBlock name="preview_td" PrefixSpecial="$PrefixSpecial" field="$field" type="auto" max_width="100" max_height="100"/>
<inp2:m_blockend />
<inp2:m_ParseBlock name="grid" PrefixSpecial="cf" IdField="CustomFieldId" grid="Default" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
<script type="text/javascript">
Grids['cf'].SetDependantToolbarButtons( new Array('edit','delete', 'clone') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.4.2/kernel/admin_templates/custom_fields/custom_fields_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.4
\ No newline at end of property
+1.4.2.1
\ No newline at end of property

Event Timeline