Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Wed, Nov 12, 9:33 AM

in-portal

Index: branches/unlabeled/unlabeled-1.3.2/kernel/units/images/image_tag_processor.php
===================================================================
--- branches/unlabeled/unlabeled-1.3.2/kernel/units/images/image_tag_processor.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.3.2/kernel/units/images/image_tag_processor.php (revision 5440)
@@ -0,0 +1,206 @@
+<?php
+
+class ImageTagProcessor extends kDBTagProcessor {
+
+ function Image($params)
+ {
+ $params['img_path'] = $this->ImageSrc($params);
+ if ($params['img_path'] === false) return ;
+ $params['img_size'] = $this->ImageSize($params);
+ if (!$params['img_size']){
+ $params['img_size'] = ' width="'.getArrayValue($params, 'DefaultWidth').'"';
+ }
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), null);
+ $params['alt'] = htmlspecialchars($object->GetField('AltName'));
+ $params['name'] = $this->SelectParam($params, 'block,render_as');
+
+ return $this->Application->ParseBlock($params);
+ }
+
+ function ItemImage($params)
+ {
+ $this->LoadItemImage($params);
+ $params['img_path'] = $this->ImageSrc($params);
+ $params['img_size'] = $this->ImageSize($params);
+ if (!$params['img_size']){
+ if (isset($params['DefaultWidth'])) {
+ $params['img_size'] = ' width="'.getArrayValue($params, 'DefaultWidth').'"';
+ }
+ }
+ $params['name'] = $this->SelectParam($params, 'render_as,block');
+ $object =& $this->Application->recallObject($this->getPrefixSpecial());
+ if ( !$object->isLoaded() && !$this->SelectParam($params, 'default_image,DefaultImage') ) return false;
+
+ $params['alt'] = htmlspecialchars($object->GetField('AltName'));
+ return $this->Application->ParseBlock($params);
+ }
+
+ function LargeImageExists($params) {
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), $this->Prefix, $params);
+ if ( $object->GetDBField('SameImages') == null || $object->GetDBField('SameImages')=='1' )
+ {
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+
+ function LoadItemImage($params)
+ {
+ $parent_item =& $this->Application->recallObject($params['PrefixSpecial']);
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), null, Array('skip_autoload' => true));
+
+ // if we need primary thumbnail which is preloaded with products list
+ $object->Clear();
+
+ // if we need primary thumbnail which is preloaded with products list
+ if (
+ $this->SelectParam($params, 'thumbnail,Thumbnail') &&
+ (
+ (
+ $this->SelectParam($params, 'primary,Primary')
+ ||
+ !isset($params['name'])
+ )
+ &&
+ !$this->Application->GetVar('img_id')
+ &&
+ isset($parent_item->Fields['LocalThumb'])
+ )
+ )
+ {
+ $object->SetDefaultValues();
+ $object->SetDBFieldsFromHash($parent_item->GetFieldValues(), Array('SameImages', 'LocalThumb', 'ThumbPath', 'ThumbUrl', 'LocalImage', 'LocalPath', 'Url') );
+ $object->Loaded = true;
+ }
+ else { // if requested image is not primary thumbnail - load it directly
+ $id_field = $this->Application->getUnitOption($this->Prefix, 'ForeignKey');
+ $parent_table_key = $this->Application->getUnitOption($this->Prefix, 'ParentTableKey');
+
+ $keys[$id_field] = $parent_item->GetDBField($parent_table_key);
+
+ // which image to load?
+ if ( getArrayValue($params, 'Primary') ) { //load primary image
+ $keys['DefaultImg'] = 1;
+ }
+ elseif ( getArrayValue($params, 'name') ) { //load by name
+ $keys['Name'] = $params['name'];
+ }
+ elseif ( $image_id = $this->Application->GetVar($this->Prefix.'_id') ) {
+ $keys['ImageId'] = $image_id;
+ }
+ else {
+ $keys['DefaultImg'] = 1; //if primary was not set explicity and name was also not passed - load primary
+ }
+
+ $object->Load($keys);
+ }
+ }
+
+ function ImageSrc($params)
+ {
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), null);
+ $ret = '';
+ // if we need thumb, or full image is same as thumb
+ if ( $this->SelectParam($params, 'thumbnail,Thumbnail') || $object->GetDBField('SameImages') )
+ {
+ // return local image or url
+ $ret = $object->GetDBField('LocalThumb') ? PROTOCOL.SERVER_NAME.BASE_PATH.'/'.$object->GetDBField('ThumbPath') : $object->GetDBField('ThumbUrl');
+ if ( $object->GetDBField('LocalThumb') && !file_exists(FULL_PATH.'/'.$object->GetDBField('ThumbPath')) ) $ret = '';
+ }
+ else { // if we need full which is not the same as thumb
+ $ret = $object->GetDBField('LocalImage') ? PROTOCOL.SERVER_NAME.BASE_PATH.'/'.$object->GetDBField('LocalPath') : $object->GetDBField('Url');
+ if ( $object->GetDBField('LocalImage') && !file_exists(FULL_PATH.'/'.$object->GetDBField('LocalPath')) ) $ret = '';
+ }
+
+ $default_image = $this->SelectParam($params, 'default_image,DefaultImage');
+ return ($ret && $ret != PROTOCOL.SERVER_NAME.BASE_PATH && $ret != PROTOCOL.SERVER_NAME.BASE_PATH.'/') ? $ret : ($default_image ? PROTOCOL.SERVER_NAME.BASE_PATH.THEMES_PATH.'/'.$default_image : false);
+ }
+
+ function GetFullPath($path)
+ {
+ if(!$path) return $path;
+
+ // absolute url
+ if( preg_match('/^(.*):\/\/(.*)$/U', $path) )
+ {
+ if(strpos($path, PROTOCOL.SERVER_NAME.BASE_PATH) === 0)
+ {
+ $path = str_replace(PROTOCOL.SERVER_NAME.BASE_PATH, FULL_PATH.'/', $path);
+ }
+ return $path;
+ }
+
+ // relative url
+ return FULL_PATH.'/'.substr(THEMES_PATH,1).'/'.$path;
+ }
+
+ /**
+ * Makes size clause for img tag, such as
+ * ' width="80" height="100"' according to max_width
+ * and max_heght limits.
+ *
+ * @param array $params
+ * @return string
+ */
+ function ImageSize($params)
+ {
+ $img_path = $this->GetFullPath( getArrayValue($params, 'img_path') );
+
+ $image_info = @getimagesize($img_path);
+
+// if( !($img_path && file_exists($img_path) && isset($image_info) ) )
+ if( !$image_info )
+ {
+ trigger_error('Image <b>'.$img_path.'</b> <span class="debug_error">missing or invalid</span>', E_USER_WARNING);
+ return false;
+ }
+
+ $orig_width = getArrayValue($image_info, 0);
+ $orig_height = getArrayValue($image_info, 1);
+ $max_width = getArrayValue($params, 'MaxWidth');
+ $max_height = getArrayValue($params, 'MaxHeight');
+
+ $too_large = is_numeric($max_width) ? ($orig_width > $max_width) : false;
+ $too_large = $too_large || (is_numeric($max_height) ? ($orig_height > $max_height) : false);
+
+ if($too_large)
+ {
+ $width_ratio = $max_width ? $max_width / $orig_width : 1;
+ $height_ratio = $max_height ? $max_height / $orig_height : 1;
+ $ratio = min($width_ratio, $height_ratio);
+
+ $width = ceil($orig_width * $ratio);
+ $height = ceil($orig_height * $ratio);
+ }
+ else
+ {
+ $width = $orig_width;
+ $height = $orig_height;
+ }
+
+ $size_clause = ' width="'.$width.'" height="'.$height.'"';
+ return $size_clause;
+ }
+
+
+ // used in admin
+ function ImageUrl($params)
+ {
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), $this->Prefix, $params);
+ if ($object->GetDBField('SameImages') ? $object->GetDBField('LocalThumb') : $object->GetDBField('LocalImage') )
+ {
+ $ret = $this->Application->Phrase(getArrayValue($params,'local_phrase'));
+ }
+ else
+ {
+ $ret = $object->GetDBField('SameImages') ? $object->GetDBField('ThumbUrl') : $object->GetDBField('Url');
+ }
+ return $ret;
+ }
+
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.3.2/kernel/units/images/image_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.3.2/kernel/units/permissions/permissions_config.php
===================================================================
--- branches/unlabeled/unlabeled-1.3.2/kernel/units/permissions/permissions_config.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.3.2/kernel/units/permissions/permissions_config.php (revision 5440)
@@ -0,0 +1,88 @@
+<?php
+
+$config = Array(
+ 'Prefix' => 'perm',
+ 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+ 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+ 'EventHandlerClass' => Array('class'=>'PermissionsEventHandler','file'=>'permissions_event_handler.php','build_event'=>'OnBuild'),
+ 'TagProcessorClass' => Array('class'=>'PermissionsTagProcessor','file'=>'permissions_tag_processor.php','build_event'=>'OnBuild'),
+ 'AutoLoad' => true,
+
+ 'Clones' => Array(
+ 'c-perm' => Array(
+ 'Constrain' => 'Type = 0', // non-system
+ 'ParentPrefix' => 'c',
+ 'ForeignKey' => 'CatId',
+ 'ParentTableKey' => 'CategoryId',
+
+ 'Hooks' => Array(
+ Array(
+ 'Mode' => hAFTER,
+ 'Conditional' => true,
+ 'HookToPrefix' => '#PARENT#',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array('OnPreSave'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnCategorySavePermissions',
+ ),
+ ),
+ ),
+
+ 'g-perm' => Array(
+ 'Constrain' => 'Type = 1', // system
+ 'ParentPrefix' => 'g',
+ 'ForeignKey' => 'GroupId',
+ 'ParentTableKey' => 'GroupId',
+
+ 'Hooks' => Array(
+ Array(
+ 'Mode' => hAFTER,
+ 'Conditional' => true,
+ 'HookToPrefix' => '#PARENT#',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array('OnPreSave'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnGroupSavePermissions',
+ ),
+ ),
+ ),
+ ),
+
+ 'QueryString' => Array(
+ 1 => 'id',
+ 2 => 'page',
+ 3 => 'event',
+ ),
+
+ 'IDField' => 'PermissionId',
+
+ 'StatusField' => Array('PermissionValue'),
+
+ 'TitleField' => 'Permission',
+
+ 'TableName' => TABLE_PREFIX.'Permissions',
+
+ 'AutoDelete' => true,
+ 'AutoClone' => true,
+
+ 'ListSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'),
+ 'ItemSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'),
+
+ 'ListSortings' => Array(
+ '' => Array(
+ 'Sorting' => Array('Permission' => 'asc'),
+ )
+ ),
+ 'Fields' => Array(
+ 'PermissionId' => Array(),
+ 'Permission' => Array('type' => 'string','not_null' => '1','default' => ''),
+ 'GroupId' => Array('type' => 'int','default' => '0'),
+ 'PermissionValue' => Array('type' => 'int','not_null' => '1','default' => '0'),
+ 'Type' => Array('type' => 'int','not_null' => '1','default' => '0'),
+ 'CatId' => Array('type' => 'int','not_null' => '1','default' => '0'),
+ ),
+ );
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.3.2/kernel/units/permissions/permissions_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.3.2/kernel/admin_templates/categories/ci_blocks.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.3.2/kernel/admin_templates/categories/ci_blocks.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.3.2/kernel/admin_templates/categories/ci_blocks.tpl (revision 5440)
@@ -0,0 +1,28 @@
+<inp2:m_DefineElement name="status_mark">
+ <inp2:m_if check="FieldEquals" name="$field" value="1">
+ <img src="img/ic_<inp2:m_param name="type"/>.gif" title="<inp2:m_phrase label="la_{$type}"/>" width="11" height="11" align="absmiddle" />
+ </inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="grid_catitem_td" format="" no_special="">
+ <td valign="top" class="text">
+ <inp2:Field field="$field" grid="$grid" no_special="$no_special" format="$format" cut_first="100"/>
+ <inp2:m_if check="FieldEquals" field="Priority" value="0" inverse="inverse">
+ <span class="priority"><sup><inp2:Field field="Priority"/></sup></span>
+ </inp2:m_if>
+ <inp2:m_RenderElement name="status_mark" field="EditorsPick" type="pick" PrefixSpecial="$PrefixSpecial"/>
+ <inp2:m_RenderElement name="status_mark" field="IsPop" type="pop" PrefixSpecial="$PrefixSpecial"/>
+ <inp2:m_RenderElement name="status_mark" field="IsNew" type="new" PrefixSpecial="$PrefixSpecial"/>
+ <inp2:m_RenderElement name="status_mark" field="IsHot" type="hot" PrefixSpecial="$PrefixSpecial"/>
+ </td>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="no_perm_grid" prefix="" perm_label="">
+ <table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder_full" height="200">
+ <tr class="table_color1">
+ <td align="center" valign="middle" class="text">
+ <inp2:m_phrase name="$perm_label"/>
+ </td>
+ </tr>
+ </table>
+</inp2:m_DefineElement>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.3.2/kernel/admin_templates/categories/ci_blocks.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.3.2/kernel/admin_templates/incs/image_blocks.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.3.2/kernel/admin_templates/incs/image_blocks.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.3.2/kernel/admin_templates/incs/image_blocks.tpl (revision 5440)
@@ -0,0 +1,152 @@
+<inp2:m_DefineElement name="image_block">
+ <img src="<inp2:m_param name="img_path" />" <inp2:m_param name="img_size"/> border="0" /><br />
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="thumbnail_section" prefix="">
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <td class="text">
+ <inp2:m_phrase label="la_fld_Location"/><br>
+ <span class="error"><inp2:$prefix_Error field="ThumbPath"/><inp2:$prefix_Error field="ThumbUrl"/></span>&nbsp;
+ </td>
+ <td>
+ <table border="0">
+ <tr>
+ <td>
+ <inp2:m_inc param="tab_index" by="1"/>
+ <input type="radio" <inp2:m_if check="{$prefix}_FieldEquals" field="LocalThumb" value="1">checked</inp2:m_if> name="<inp2:$prefix_InputName field="LocalThumb"/>" id="<inp2:$prefix_InputName field="LocalThumb"/>_1" value="1">
+ </td>
+ <td>
+ <inp2:m_phrase label="la_fld_Upload"/>:
+ </td>
+ <td>
+ <inp2:m_inc param="tab_index" by="1"/>
+ <input type="file" name="<inp2:$prefix_InputName field="ThumbPath"/>" id="<inp2:$prefix_InputName field="ThumbPath"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" class="<inp2:m_param name="class"/>" onclick="document.getElementById('<inp2:m_param name="prefix"/>[<inp2:$prefix_Field field="ImageId"/>][LocalThumb]_1').checked = true">
+ <input type="hidden" name="<inp2:$prefix_InputName field="ThumbPath"/>[upload]" id="<inp2:$prefix_InputName field="ThumbPath"/>[upload]" value="<inp2:$prefix_Field field="ThumbPath"/>">
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <inp2:m_inc param="tab_index" by="1"/>
+ <input type="radio" <inp2:m_if check="{$prefix}_FieldEquals" field="LocalThumb" value="0">checked</inp2:m_if> name="<inp2:$prefix_InputName field="LocalThumb"/>" id="<inp2:$prefix_InputName field="LocalThumb"/>_0" value="0">
+ </td>
+ <td>
+ <inp2:m_phrase label="la_fld_RemoteUrl"/>:
+ </td>
+ <td>
+ <inp2:m_inc param="tab_index" by="1"/>
+ <input type="text" name="<inp2:$prefix_InputName field="ThumbUrl"/>" id="<inp2:$prefix_InputName field="ThumbUrl"/>" value="<inp2:$prefix_Field field="ThumbUrl"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" class="<inp2:m_param name="class"/>" onclick="document.getElementById('<inp2:m_param name="prefix"/>[<inp2:$prefix_Field field="ImageId"/>][LocalThumb]_0').checked = true">
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td>
+ <inp2:$prefix_Image block="image_block" Thumbnail="1" DefaultImage="../../kernel/images/noimage.gif"/>
+ </td>
+ </tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="fullsize_section" prefix="">
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <td class="text">
+ <inp2:m_phrase label="la_fld_Location"/><br>
+ <span class="error"><inp2:$prefix_Error field="LocalPath"/><inp2:$prefix_Error field="Url"/></span>&nbsp;
+ </td>
+ <td>
+ <table border="0">
+ <tr>
+ <td>
+ <inp2:m_inc param="tab_index" by="1"/>
+ <input type="radio" <inp2:m_if check="{$prefix}_FieldEquals" field="LocalImage" value="1">checked</inp2:m_if> name="<inp2:$prefix_InputName field="LocalImage"/>" id="<inp2:$prefix_InputName field="LocalImage"/>_1" value="1">
+ </td>
+ <td>
+ <inp2:m_phrase label="la_fld_Upload"/>:
+ </td>
+ <td>
+ <inp2:m_inc param="tab_index" by="1"/>
+ <input type="file" name="<inp2:$prefix_InputName field="LocalPath"/>" id="<inp2:$prefix_InputName field="LocalPath"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" class="<inp2:m_param name="class"/>" onclick="document.getElementById('<inp2:m_param name="prefix"/>[<inp2:$prefix_field field="ImageId"/>][LocalImage]_1').checked = true">
+ <input type="hidden" name="<inp2:$prefix_InputName field="LocalPath"/>[upload]" id="<inp2:$prefix_InputName field="LocalPath"/>[upload]" value="<inp2:$prefix_Field field="LocalPath"/>">
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <inp2:m_inc param="tab_index" by="1"/>
+ <input type="radio" <inp2:m_if check="{$prefix}_FieldEquals" field="LocalImage" value="0">checked</inp2:m_if> name="<inp2:$prefix_InputName field="LocalImage"/>" id="<inp2:$prefix_InputName field="LocalImage"/>_0" value="0">
+ </td>
+ <td>
+ <inp2:m_phrase label="la_fld_RemoteUrl"/>:
+ </td>
+ <td>
+ <inp2:m_inc param="tab_index" by="1"/>
+ <input type="text" name="<inp2:$prefix_InputName field="Url"/>" id="<inp2:$prefix_InputName field="Url"/>" value="<inp2:$prefix_Field field="Url"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" class="<inp2:m_param name="class"/>" onclick="document.getElementById('<inp2:m_param name="prefix"/>[<inp2:$prefix_Field field="ImageId"/>][LocalImage]_0').checked = true">
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td>
+ <inp2:$prefix_Image block="image_block" DefaultImage="../../kernel/images/noimage.gif"/>
+ </td>
+ </tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="images_edit_js">
+ function FieldID($field_name) {
+ var $field_mask = '<inp2:$prefix_InputName field="#FIELD#"/>';
+ return $field_mask.replace('#FIELD#', $field_name);
+ }
+
+ function toggle_fullsize() {
+ if (document.getElementById('_cb_' + FieldID('SameImages')).checked) {
+ document.getElementById(FieldID('LocalImage') + '_0').disabled = true;
+ document.getElementById(FieldID('LocalImage') + '_1').disabled = true;
+ document.getElementById(FieldID('LocalPath')).disabled = true;
+ document.getElementById(FieldID('Url')).disabled = true;
+ }
+ else {
+ document.getElementById(FieldID('LocalImage') + '_0').disabled = false;
+ document.getElementById(FieldID('LocalImage') + '_1').disabled = false;
+ document.getElementById(FieldID('LocalPath')).disabled = false;
+ document.getElementById(FieldID('Url')).disabled = false;
+ }
+ }
+
+ if (document.getElementById('_cb_' + FieldID('DefaultImg')).checked) {
+ document.getElementById('_cb_' + FieldID('DefaultImg')).disabled = true;
+ document.getElementById('_cb_' + FieldID('Enabled')).disabled = true;
+ }
+
+ function check_status() {
+ if (document.getElementById('_cb_' + FieldID('DefaultImg')).checked) {
+ document.getElementById('_cb_' + FieldID('Enabled')).checked = true;
+ document.getElementById(FieldID('Enabled')).value = 1;
+ }
+ }
+
+ function check_primary() {
+ if (!document.getElementById('_cb_' + FieldID('Enabled')).checked) {
+ document.getElementById('_cb_' + FieldID('DefaultImg')).checked = false;
+ document.getElementById(FieldID('DefaultImg')).value = 0;
+ }
+ }
+</inp2:m_DefineElement>
+
+<inp2:m_block name="image_caption_td" />
+ <td valign="top" class="text">
+ <input type="checkbox" name="<inp2:$PrefixSpecial_InputName field="$IdField" IdField="$IdField"/>" id="<inp2:$PrefixSpecial_InputName field="$IdField" IdField="$IdField"/>">
+ <img src="<inp2:ModulePath module="In-Portal"/>img/itemicons/<inp2:$PrefixSpecial_ItemIcon grid="$grid"/>">
+ <inp2:Field field="$field" grid="$grid"/><span class="priority"><inp2:m_if prefix="$PrefixSpecial" function="fieldequals" field="Priority" value="0"/><inp2:m_else/><sup><inp2:$PrefixSpecial_field field="Priority"/></sup><inp2:m_endif/></span>
+ </td>
+<inp2:m_blockend />
+
+<inp2:m_block name="image_preview_td"/>
+ <td>
+ <inp2:Image block="image_block" Thumbnail="1" DefaultImage="../../kernel/images/noimage.gif" MaxWidth="120" MaxHeight="120"/>
+ </td>
+<inp2:m_blockend/>
+
+<inp2:m_block name="image_url_td"/>
+ <td valign="top" class="text">
+ <inp2:img_ImageUrl local_phrase="!la_LocalImage!"/>
+ </td>
+<inp2:m_blockend/>
+
+
Property changes on: branches/unlabeled/unlabeled-1.3.2/kernel/admin_templates/incs/image_blocks.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.3.2/core/units/images/image_tag_processor.php
===================================================================
--- branches/unlabeled/unlabeled-1.3.2/core/units/images/image_tag_processor.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.3.2/core/units/images/image_tag_processor.php (revision 5440)
@@ -0,0 +1,206 @@
+<?php
+
+class ImageTagProcessor extends kDBTagProcessor {
+
+ function Image($params)
+ {
+ $params['img_path'] = $this->ImageSrc($params);
+ if ($params['img_path'] === false) return ;
+ $params['img_size'] = $this->ImageSize($params);
+ if (!$params['img_size']){
+ $params['img_size'] = ' width="'.getArrayValue($params, 'DefaultWidth').'"';
+ }
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), null);
+ $params['alt'] = htmlspecialchars($object->GetField('AltName'));
+ $params['name'] = $this->SelectParam($params, 'block,render_as');
+
+ return $this->Application->ParseBlock($params);
+ }
+
+ function ItemImage($params)
+ {
+ $this->LoadItemImage($params);
+ $params['img_path'] = $this->ImageSrc($params);
+ $params['img_size'] = $this->ImageSize($params);
+ if (!$params['img_size']){
+ if (isset($params['DefaultWidth'])) {
+ $params['img_size'] = ' width="'.getArrayValue($params, 'DefaultWidth').'"';
+ }
+ }
+ $params['name'] = $this->SelectParam($params, 'render_as,block');
+ $object =& $this->Application->recallObject($this->getPrefixSpecial());
+ if ( !$object->isLoaded() && !$this->SelectParam($params, 'default_image,DefaultImage') ) return false;
+
+ $params['alt'] = htmlspecialchars($object->GetField('AltName'));
+ return $this->Application->ParseBlock($params);
+ }
+
+ function LargeImageExists($params) {
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), $this->Prefix, $params);
+ if ( $object->GetDBField('SameImages') == null || $object->GetDBField('SameImages')=='1' )
+ {
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+
+ function LoadItemImage($params)
+ {
+ $parent_item =& $this->Application->recallObject($params['PrefixSpecial']);
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), null, Array('skip_autoload' => true));
+
+ // if we need primary thumbnail which is preloaded with products list
+ $object->Clear();
+
+ // if we need primary thumbnail which is preloaded with products list
+ if (
+ $this->SelectParam($params, 'thumbnail,Thumbnail') &&
+ (
+ (
+ $this->SelectParam($params, 'primary,Primary')
+ ||
+ !isset($params['name'])
+ )
+ &&
+ !$this->Application->GetVar('img_id')
+ &&
+ isset($parent_item->Fields['LocalThumb'])
+ )
+ )
+ {
+ $object->SetDefaultValues();
+ $object->SetDBFieldsFromHash($parent_item->GetFieldValues(), Array('SameImages', 'LocalThumb', 'ThumbPath', 'ThumbUrl', 'LocalImage', 'LocalPath', 'Url') );
+ $object->Loaded = true;
+ }
+ else { // if requested image is not primary thumbnail - load it directly
+ $id_field = $this->Application->getUnitOption($this->Prefix, 'ForeignKey');
+ $parent_table_key = $this->Application->getUnitOption($this->Prefix, 'ParentTableKey');
+
+ $keys[$id_field] = $parent_item->GetDBField($parent_table_key);
+
+ // which image to load?
+ if ( getArrayValue($params, 'Primary') ) { //load primary image
+ $keys['DefaultImg'] = 1;
+ }
+ elseif ( getArrayValue($params, 'name') ) { //load by name
+ $keys['Name'] = $params['name'];
+ }
+ elseif ( $image_id = $this->Application->GetVar($this->Prefix.'_id') ) {
+ $keys['ImageId'] = $image_id;
+ }
+ else {
+ $keys['DefaultImg'] = 1; //if primary was not set explicity and name was also not passed - load primary
+ }
+
+ $object->Load($keys);
+ }
+ }
+
+ function ImageSrc($params)
+ {
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), null);
+ $ret = '';
+ // if we need thumb, or full image is same as thumb
+ if ( $this->SelectParam($params, 'thumbnail,Thumbnail') || $object->GetDBField('SameImages') )
+ {
+ // return local image or url
+ $ret = $object->GetDBField('LocalThumb') ? PROTOCOL.SERVER_NAME.BASE_PATH.'/'.$object->GetDBField('ThumbPath') : $object->GetDBField('ThumbUrl');
+ if ( $object->GetDBField('LocalThumb') && !file_exists(FULL_PATH.'/'.$object->GetDBField('ThumbPath')) ) $ret = '';
+ }
+ else { // if we need full which is not the same as thumb
+ $ret = $object->GetDBField('LocalImage') ? PROTOCOL.SERVER_NAME.BASE_PATH.'/'.$object->GetDBField('LocalPath') : $object->GetDBField('Url');
+ if ( $object->GetDBField('LocalImage') && !file_exists(FULL_PATH.'/'.$object->GetDBField('LocalPath')) ) $ret = '';
+ }
+
+ $default_image = $this->SelectParam($params, 'default_image,DefaultImage');
+ return ($ret && $ret != PROTOCOL.SERVER_NAME.BASE_PATH && $ret != PROTOCOL.SERVER_NAME.BASE_PATH.'/') ? $ret : ($default_image ? PROTOCOL.SERVER_NAME.BASE_PATH.THEMES_PATH.'/'.$default_image : false);
+ }
+
+ function GetFullPath($path)
+ {
+ if(!$path) return $path;
+
+ // absolute url
+ if( preg_match('/^(.*):\/\/(.*)$/U', $path) )
+ {
+ if(strpos($path, PROTOCOL.SERVER_NAME.BASE_PATH) === 0)
+ {
+ $path = str_replace(PROTOCOL.SERVER_NAME.BASE_PATH, FULL_PATH.'/', $path);
+ }
+ return $path;
+ }
+
+ // relative url
+ return FULL_PATH.'/'.substr(THEMES_PATH,1).'/'.$path;
+ }
+
+ /**
+ * Makes size clause for img tag, such as
+ * ' width="80" height="100"' according to max_width
+ * and max_heght limits.
+ *
+ * @param array $params
+ * @return string
+ */
+ function ImageSize($params)
+ {
+ $img_path = $this->GetFullPath( getArrayValue($params, 'img_path') );
+
+ $image_info = @getimagesize($img_path);
+
+// if( !($img_path && file_exists($img_path) && isset($image_info) ) )
+ if( !$image_info )
+ {
+ trigger_error('Image <b>'.$img_path.'</b> <span class="debug_error">missing or invalid</span>', E_USER_WARNING);
+ return false;
+ }
+
+ $orig_width = getArrayValue($image_info, 0);
+ $orig_height = getArrayValue($image_info, 1);
+ $max_width = getArrayValue($params, 'MaxWidth');
+ $max_height = getArrayValue($params, 'MaxHeight');
+
+ $too_large = is_numeric($max_width) ? ($orig_width > $max_width) : false;
+ $too_large = $too_large || (is_numeric($max_height) ? ($orig_height > $max_height) : false);
+
+ if($too_large)
+ {
+ $width_ratio = $max_width ? $max_width / $orig_width : 1;
+ $height_ratio = $max_height ? $max_height / $orig_height : 1;
+ $ratio = min($width_ratio, $height_ratio);
+
+ $width = ceil($orig_width * $ratio);
+ $height = ceil($orig_height * $ratio);
+ }
+ else
+ {
+ $width = $orig_width;
+ $height = $orig_height;
+ }
+
+ $size_clause = ' width="'.$width.'" height="'.$height.'"';
+ return $size_clause;
+ }
+
+
+ // used in admin
+ function ImageUrl($params)
+ {
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), $this->Prefix, $params);
+ if ($object->GetDBField('SameImages') ? $object->GetDBField('LocalThumb') : $object->GetDBField('LocalImage') )
+ {
+ $ret = $this->Application->Phrase(getArrayValue($params,'local_phrase'));
+ }
+ else
+ {
+ $ret = $object->GetDBField('SameImages') ? $object->GetDBField('ThumbUrl') : $object->GetDBField('Url');
+ }
+ return $ret;
+ }
+
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.3.2/core/units/images/image_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.3.2/core/units/permissions/permissions_config.php
===================================================================
--- branches/unlabeled/unlabeled-1.3.2/core/units/permissions/permissions_config.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.3.2/core/units/permissions/permissions_config.php (revision 5440)
@@ -0,0 +1,88 @@
+<?php
+
+$config = Array(
+ 'Prefix' => 'perm',
+ 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+ 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+ 'EventHandlerClass' => Array('class'=>'PermissionsEventHandler','file'=>'permissions_event_handler.php','build_event'=>'OnBuild'),
+ 'TagProcessorClass' => Array('class'=>'PermissionsTagProcessor','file'=>'permissions_tag_processor.php','build_event'=>'OnBuild'),
+ 'AutoLoad' => true,
+
+ 'Clones' => Array(
+ 'c-perm' => Array(
+ 'Constrain' => 'Type = 0', // non-system
+ 'ParentPrefix' => 'c',
+ 'ForeignKey' => 'CatId',
+ 'ParentTableKey' => 'CategoryId',
+
+ 'Hooks' => Array(
+ Array(
+ 'Mode' => hAFTER,
+ 'Conditional' => true,
+ 'HookToPrefix' => '#PARENT#',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array('OnPreSave'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnCategorySavePermissions',
+ ),
+ ),
+ ),
+
+ 'g-perm' => Array(
+ 'Constrain' => 'Type = 1', // system
+ 'ParentPrefix' => 'g',
+ 'ForeignKey' => 'GroupId',
+ 'ParentTableKey' => 'GroupId',
+
+ 'Hooks' => Array(
+ Array(
+ 'Mode' => hAFTER,
+ 'Conditional' => true,
+ 'HookToPrefix' => '#PARENT#',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array('OnPreSave'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnGroupSavePermissions',
+ ),
+ ),
+ ),
+ ),
+
+ 'QueryString' => Array(
+ 1 => 'id',
+ 2 => 'page',
+ 3 => 'event',
+ ),
+
+ 'IDField' => 'PermissionId',
+
+ 'StatusField' => Array('PermissionValue'),
+
+ 'TitleField' => 'Permission',
+
+ 'TableName' => TABLE_PREFIX.'Permissions',
+
+ 'AutoDelete' => true,
+ 'AutoClone' => true,
+
+ 'ListSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'),
+ 'ItemSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'),
+
+ 'ListSortings' => Array(
+ '' => Array(
+ 'Sorting' => Array('Permission' => 'asc'),
+ )
+ ),
+ 'Fields' => Array(
+ 'PermissionId' => Array(),
+ 'Permission' => Array('type' => 'string','not_null' => '1','default' => ''),
+ 'GroupId' => Array('type' => 'int','default' => '0'),
+ 'PermissionValue' => Array('type' => 'int','not_null' => '1','default' => '0'),
+ 'Type' => Array('type' => 'int','not_null' => '1','default' => '0'),
+ 'CatId' => Array('type' => 'int','not_null' => '1','default' => '0'),
+ ),
+ );
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.3.2/core/units/permissions/permissions_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.3.2/core/admin_templates/categories/ci_blocks.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.3.2/core/admin_templates/categories/ci_blocks.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.3.2/core/admin_templates/categories/ci_blocks.tpl (revision 5440)
@@ -0,0 +1,28 @@
+<inp2:m_DefineElement name="status_mark">
+ <inp2:m_if check="FieldEquals" name="$field" value="1">
+ <img src="img/ic_<inp2:m_param name="type"/>.gif" title="<inp2:m_phrase label="la_{$type}"/>" width="11" height="11" align="absmiddle" />
+ </inp2:m_if>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="grid_catitem_td" format="" no_special="">
+ <td valign="top" class="text">
+ <inp2:Field field="$field" grid="$grid" no_special="$no_special" format="$format" cut_first="100"/>
+ <inp2:m_if check="FieldEquals" field="Priority" value="0" inverse="inverse">
+ <span class="priority"><sup><inp2:Field field="Priority"/></sup></span>
+ </inp2:m_if>
+ <inp2:m_RenderElement name="status_mark" field="EditorsPick" type="pick" PrefixSpecial="$PrefixSpecial"/>
+ <inp2:m_RenderElement name="status_mark" field="IsPop" type="pop" PrefixSpecial="$PrefixSpecial"/>
+ <inp2:m_RenderElement name="status_mark" field="IsNew" type="new" PrefixSpecial="$PrefixSpecial"/>
+ <inp2:m_RenderElement name="status_mark" field="IsHot" type="hot" PrefixSpecial="$PrefixSpecial"/>
+ </td>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="no_perm_grid" prefix="" perm_label="">
+ <table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder_full" height="200">
+ <tr class="table_color1">
+ <td align="center" valign="middle" class="text">
+ <inp2:m_phrase name="$perm_label"/>
+ </td>
+ </tr>
+ </table>
+</inp2:m_DefineElement>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.3.2/core/admin_templates/categories/ci_blocks.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.3.2/core/admin_templates/incs/image_blocks.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.3.2/core/admin_templates/incs/image_blocks.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.3.2/core/admin_templates/incs/image_blocks.tpl (revision 5440)
@@ -0,0 +1,152 @@
+<inp2:m_DefineElement name="image_block">
+ <img src="<inp2:m_param name="img_path" />" <inp2:m_param name="img_size"/> border="0" /><br />
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="thumbnail_section" prefix="">
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <td class="text">
+ <inp2:m_phrase label="la_fld_Location"/><br>
+ <span class="error"><inp2:$prefix_Error field="ThumbPath"/><inp2:$prefix_Error field="ThumbUrl"/></span>&nbsp;
+ </td>
+ <td>
+ <table border="0">
+ <tr>
+ <td>
+ <inp2:m_inc param="tab_index" by="1"/>
+ <input type="radio" <inp2:m_if check="{$prefix}_FieldEquals" field="LocalThumb" value="1">checked</inp2:m_if> name="<inp2:$prefix_InputName field="LocalThumb"/>" id="<inp2:$prefix_InputName field="LocalThumb"/>_1" value="1">
+ </td>
+ <td>
+ <inp2:m_phrase label="la_fld_Upload"/>:
+ </td>
+ <td>
+ <inp2:m_inc param="tab_index" by="1"/>
+ <input type="file" name="<inp2:$prefix_InputName field="ThumbPath"/>" id="<inp2:$prefix_InputName field="ThumbPath"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" class="<inp2:m_param name="class"/>" onclick="document.getElementById('<inp2:m_param name="prefix"/>[<inp2:$prefix_Field field="ImageId"/>][LocalThumb]_1').checked = true">
+ <input type="hidden" name="<inp2:$prefix_InputName field="ThumbPath"/>[upload]" id="<inp2:$prefix_InputName field="ThumbPath"/>[upload]" value="<inp2:$prefix_Field field="ThumbPath"/>">
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <inp2:m_inc param="tab_index" by="1"/>
+ <input type="radio" <inp2:m_if check="{$prefix}_FieldEquals" field="LocalThumb" value="0">checked</inp2:m_if> name="<inp2:$prefix_InputName field="LocalThumb"/>" id="<inp2:$prefix_InputName field="LocalThumb"/>_0" value="0">
+ </td>
+ <td>
+ <inp2:m_phrase label="la_fld_RemoteUrl"/>:
+ </td>
+ <td>
+ <inp2:m_inc param="tab_index" by="1"/>
+ <input type="text" name="<inp2:$prefix_InputName field="ThumbUrl"/>" id="<inp2:$prefix_InputName field="ThumbUrl"/>" value="<inp2:$prefix_Field field="ThumbUrl"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" class="<inp2:m_param name="class"/>" onclick="document.getElementById('<inp2:m_param name="prefix"/>[<inp2:$prefix_Field field="ImageId"/>][LocalThumb]_0').checked = true">
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td>
+ <inp2:$prefix_Image block="image_block" Thumbnail="1" DefaultImage="../../kernel/images/noimage.gif"/>
+ </td>
+ </tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="fullsize_section" prefix="">
+ <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
+ <td class="text">
+ <inp2:m_phrase label="la_fld_Location"/><br>
+ <span class="error"><inp2:$prefix_Error field="LocalPath"/><inp2:$prefix_Error field="Url"/></span>&nbsp;
+ </td>
+ <td>
+ <table border="0">
+ <tr>
+ <td>
+ <inp2:m_inc param="tab_index" by="1"/>
+ <input type="radio" <inp2:m_if check="{$prefix}_FieldEquals" field="LocalImage" value="1">checked</inp2:m_if> name="<inp2:$prefix_InputName field="LocalImage"/>" id="<inp2:$prefix_InputName field="LocalImage"/>_1" value="1">
+ </td>
+ <td>
+ <inp2:m_phrase label="la_fld_Upload"/>:
+ </td>
+ <td>
+ <inp2:m_inc param="tab_index" by="1"/>
+ <input type="file" name="<inp2:$prefix_InputName field="LocalPath"/>" id="<inp2:$prefix_InputName field="LocalPath"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" class="<inp2:m_param name="class"/>" onclick="document.getElementById('<inp2:m_param name="prefix"/>[<inp2:$prefix_field field="ImageId"/>][LocalImage]_1').checked = true">
+ <input type="hidden" name="<inp2:$prefix_InputName field="LocalPath"/>[upload]" id="<inp2:$prefix_InputName field="LocalPath"/>[upload]" value="<inp2:$prefix_Field field="LocalPath"/>">
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <inp2:m_inc param="tab_index" by="1"/>
+ <input type="radio" <inp2:m_if check="{$prefix}_FieldEquals" field="LocalImage" value="0">checked</inp2:m_if> name="<inp2:$prefix_InputName field="LocalImage"/>" id="<inp2:$prefix_InputName field="LocalImage"/>_0" value="0">
+ </td>
+ <td>
+ <inp2:m_phrase label="la_fld_RemoteUrl"/>:
+ </td>
+ <td>
+ <inp2:m_inc param="tab_index" by="1"/>
+ <input type="text" name="<inp2:$prefix_InputName field="Url"/>" id="<inp2:$prefix_InputName field="Url"/>" value="<inp2:$prefix_Field field="Url"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" class="<inp2:m_param name="class"/>" onclick="document.getElementById('<inp2:m_param name="prefix"/>[<inp2:$prefix_Field field="ImageId"/>][LocalImage]_0').checked = true">
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td>
+ <inp2:$prefix_Image block="image_block" DefaultImage="../../kernel/images/noimage.gif"/>
+ </td>
+ </tr>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="images_edit_js">
+ function FieldID($field_name) {
+ var $field_mask = '<inp2:$prefix_InputName field="#FIELD#"/>';
+ return $field_mask.replace('#FIELD#', $field_name);
+ }
+
+ function toggle_fullsize() {
+ if (document.getElementById('_cb_' + FieldID('SameImages')).checked) {
+ document.getElementById(FieldID('LocalImage') + '_0').disabled = true;
+ document.getElementById(FieldID('LocalImage') + '_1').disabled = true;
+ document.getElementById(FieldID('LocalPath')).disabled = true;
+ document.getElementById(FieldID('Url')).disabled = true;
+ }
+ else {
+ document.getElementById(FieldID('LocalImage') + '_0').disabled = false;
+ document.getElementById(FieldID('LocalImage') + '_1').disabled = false;
+ document.getElementById(FieldID('LocalPath')).disabled = false;
+ document.getElementById(FieldID('Url')).disabled = false;
+ }
+ }
+
+ if (document.getElementById('_cb_' + FieldID('DefaultImg')).checked) {
+ document.getElementById('_cb_' + FieldID('DefaultImg')).disabled = true;
+ document.getElementById('_cb_' + FieldID('Enabled')).disabled = true;
+ }
+
+ function check_status() {
+ if (document.getElementById('_cb_' + FieldID('DefaultImg')).checked) {
+ document.getElementById('_cb_' + FieldID('Enabled')).checked = true;
+ document.getElementById(FieldID('Enabled')).value = 1;
+ }
+ }
+
+ function check_primary() {
+ if (!document.getElementById('_cb_' + FieldID('Enabled')).checked) {
+ document.getElementById('_cb_' + FieldID('DefaultImg')).checked = false;
+ document.getElementById(FieldID('DefaultImg')).value = 0;
+ }
+ }
+</inp2:m_DefineElement>
+
+<inp2:m_block name="image_caption_td" />
+ <td valign="top" class="text">
+ <input type="checkbox" name="<inp2:$PrefixSpecial_InputName field="$IdField" IdField="$IdField"/>" id="<inp2:$PrefixSpecial_InputName field="$IdField" IdField="$IdField"/>">
+ <img src="<inp2:ModulePath module="In-Portal"/>img/itemicons/<inp2:$PrefixSpecial_ItemIcon grid="$grid"/>">
+ <inp2:Field field="$field" grid="$grid"/><span class="priority"><inp2:m_if prefix="$PrefixSpecial" function="fieldequals" field="Priority" value="0"/><inp2:m_else/><sup><inp2:$PrefixSpecial_field field="Priority"/></sup><inp2:m_endif/></span>
+ </td>
+<inp2:m_blockend />
+
+<inp2:m_block name="image_preview_td"/>
+ <td>
+ <inp2:Image block="image_block" Thumbnail="1" DefaultImage="../../kernel/images/noimage.gif" MaxWidth="120" MaxHeight="120"/>
+ </td>
+<inp2:m_blockend/>
+
+<inp2:m_block name="image_url_td"/>
+ <td valign="top" class="text">
+ <inp2:img_ImageUrl local_phrase="!la_LocalImage!"/>
+ </td>
+<inp2:m_blockend/>
+
+
Property changes on: branches/unlabeled/unlabeled-1.3.2/core/admin_templates/incs/image_blocks.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.3
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property

Event Timeline