Forums / Developer / Issue on Custom tag

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

eZ debug

Timing: Jan 17 2025 23:49:17
Script start
Timing: Jan 17 2025 23:49:17
Module start 'content'
Timing: Jan 17 2025 23:49:17
Module end 'content'
Timing: Jan 17 2025 23:49:18
Script end

Main resources:

Total runtime0.9670 sec
Peak memory usage4,096.0000 KB
Database Queries203

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 588.7266180.8438
Module start 'content' 0.00530.8334 769.5703561.4141
Module end 'content' 0.83870.1283 1,330.9844337.3828
Script end 0.9670  1,668.3672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.4052210.0002
Check MTime0.00140.1496210.0001
Mysql Total
Database connection0.00080.085810.0008
Mysqli_queries0.883991.40142030.0044
Looping result0.00210.22142010.0000
Template Total0.942397.420.4712
Template load0.00220.227620.0011
Template processing0.940197.211120.4700
Template load and register function0.00010.015410.0001
states
state_id_array0.00100.107410.0010
state_identifier_array0.00070.071420.0003
Override
Cache load0.00200.2053890.0000
Sytem overhead
Fetch class attribute can translate value0.00120.128630.0004
Fetch class attribute name0.00110.110570.0002
XML
Image XML parsing0.00220.225130.0007
class_abstraction
Instantiating content class attribute0.00000.002080.0000
General
dbfile0.00400.4112270.0001
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 42
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs