Issue on Custom tag

Author Message

Vins Prasad

Wednesday 24 March 2010 5:36:19 am

Hi All,

I have created a custom tag for my own design, something like "factbox". I have issues when I try to add my custom tag to a page in the Edit mode.
Issues
1. If my Custom tag add to the page, its only boxed (aqua color) around the default text, not like adding "factbox" tag.
2. If I paste some text from out, It'll break the tag box
3. If press "Enter" key, again its break tag output to two separate outputs

Could anyone can help me to solve this issue?

Thanks in advance,

Vins

Lukasz Klejnberg

Wednesday 24 March 2010 3:03:17 pm

Hi,

Are you can put somewhere your new custom tag so that I could download it and see what is wrong.

Best regards,
Lukasz

Vins Prasad

Wednesday 24 March 2010 10:01:52 pm

Hi,

Thank you for your reply. I am a newbie and still I am lost with most of my ezpublish developments. So please let me know if I have done any mistakes on my developments or any suggestions. As you requested, I have uploaded .tpl file along with some other information to the rapidshare site. It's just a small file 80KB. I am really appreciate your help.

Link
http://rapidshare.com/files/367844827/ToSend.zip.html

Thanks,
Vins

Lukasz Klejnberg

Thursday 25 March 2010 1:13:34 am

Hi,

Change your line (content.ini.append.php):

IsInline[mycustomtag2]=true

to

IsInline[mycustomtag2]=false

and i think it will be well

Best regards,
Lukasz

Vins Prasad

Thursday 25 March 2010 3:42:20 am

Hi,

Thank you for your reply. you are correct. Its work perfectly after the change. thank you again.

Sorry for asking another help from you, if you can please have a look on below issue which I have entered. There I try to use same custom tag with a template.

http://share.ez.no/forums/developer/how-to-create-sub-items-object-and-show-it-directly-in-pages

Thank you again for your quick response and help.

Regards,
Vins

Vins Prasad

Thursday 25 March 2010 3:54:02 am

Hi Others,

Since rapidshare link will be expired in later time, here I added the code of my custom tag and ini file entries so anyone new to ezpublish might can get a help.

--------- START - code of "mycustomtag2.tpl" ----------

<div>
<table cellpadding="5" cellspacing="0" width="100%">
<tbody>
<tr>
<td style="font-weight: bold; font-size: 11px; background-image: url(/ezpublish2/extension/ezwebin/design/ezwebin/images/topimg.jpg); width: 100%; color: #ffffff; background-repeat: repeat-x; font-family: verdana, arial, helvetica, sans-serif; text-align: left">
{if and(is_set( $linktext ), $linktext )}{$linktext}{/if}
</td>
</tr>
<tr>
<td style="font-weight: bold; font-size: 10px; background-image: url(/ezpublish2/extension/ezwebin/design/ezwebin/images/contents_backgrnd.jpg); color: #ffffff; background-repeat: repeat-y; font-family: verdana, arial, helvetica, sans-serif; text-align: left">
{$content}
</td>
</tr>
</tbody>
</table>
<br>
</div>

--------- END - code of "mycustomtag2.tpl" ----------

--------- START - ini file settings ----------

------------------------ content.ini.append.php -------------------------------------

ini file
C:\inetpub\wwwroot\ezpublish2\settings\siteaccess\ezwebin_site_admin\content.ini.append.php
[CustomTagSettings]
AvailableCustomTags[]=mycustomtag2
IsInline[mycustomtag2]=false
[mycustomtag2]
# Custom attributes list
CustomAttributes[]
CustomAttributes[]=linktext
CustomAttributes[]=marginright
CustomAttributes[]=marginleft
---------------------------- mycustomtag2.tpl ----------------------------------

tpl file location
C:\inetpub\wwwroot\ezpublish2\design\standard\templates\content\datatype\view\ezxmltags\mycustomtag2.tpl

--------- END - ini file settings ----------

regards,

Vins

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 02:19:56
Script start
Timing: Jan 18 2025 02:19:56
Module start 'layout'
Timing: Jan 18 2025 02:19:56
Module start 'content'
Timing: Jan 18 2025 02:19:56
Module end 'content'
Timing: Jan 18 2025 02:19:56
Script end

Main resources:

Total runtime0.7038 sec
Peak memory usage4,096.0000 KB
Database Queries66

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 590.7266152.6094
Module start 'layout' 0.00530.0029 743.335939.4141
Module start 'content' 0.00820.6943 782.7500556.3516
Module end 'content' 0.70250.0012 1,339.101616.1875
Script end 0.7038  1,355.2891 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.4413160.0002
Check MTime0.00130.1783160.0001
Mysql Total
Database connection0.00070.098810.0007
Mysqli_queries0.635890.3392660.0096
Looping result0.00060.0833640.0000
Template Total0.679296.520.3396
Template load0.00170.238320.0008
Template processing0.677596.262520.3387
Template load and register function0.00020.025710.0002
states
state_id_array0.00060.089510.0006
state_identifier_array0.00070.102220.0004
Override
Cache load0.00160.2229890.0000
Sytem overhead
Fetch class attribute can translate value0.00100.145220.0005
Fetch class attribute name0.00130.184170.0002
XML
Image XML parsing0.00210.292920.0010
class_abstraction
Instantiating content class attribute0.00000.002480.0000
General
dbfile0.00220.3108160.0001
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
17content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
10content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
5content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 42
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs