Forums / Developer / Editing ezpublish/design/standard/templates/content/datatype/edit/eztext.tpl wont change anything

Editing ezpublish/design/standard/templates/content/datatype/edit/eztext.tpl wont change anything

Author Message

Gabriel Ambuehl

Sunday 06 April 2003 11:03:57 am

I was trying to integrate htmlarea into ezpublish (if OE were working in Mozilla, I could see myself paying the 150 bucks but surely not for an IE only solution) and lazy as I am, I figured I could just as well modify the Text type for this.

So I went and tried changing ezpublish/design/standard/templates/content/datatype/edit/eztext.tpl
but whatever I do, it won't end up on the page (not even something along the lines of adding AAAAAAAAA to the file).

From all I can tell, caching is deactivated so I really can't figure it out.

(If anyone already has integrated HTMLArea 3, I'd like to hear about that, of course ;-)

Visit http://triligon.org

Karsten Jennissen

Monday 07 April 2003 12:52:35 am

http://ez.no/developer/ez_publish_3/contributions/arbitrary_html_inside_ez_xml_text_fields

:-)

Karsten

Gabriel Ambuehl

Monday 07 April 2003 6:10:37 am

That's not really what I'm after.

Basically, I'm fine with saving the data in a text field but I want to change the edit template to support HTMLArea.

Basically, I just need to find a way to add a onLoad call to the body tag and some script tags to the header (so the scripts are already loaded when the onLoad call happens).

Visit http://triligon.org

Karsten Jennissen

Monday 07 April 2003 7:47:53 am

That would go into the general page layout, that is in

/design/(yourdesign)/templates/pagelayout.tpl
and
/design/(yourdesign)/override/templates/pagelayout_section_N.tpl

More info on this at
http://ezwiki.blanko.info/index.php/Custom%20designs%20-%20directory%20structure%20explained%20%283.x%29

Regards,
Karsten

Gabriel Ambuehl

Monday 07 April 2003 4:37:45 pm

I already had come to that solution but it kinda sucks for one reason: you'll end up with ALL textareas being HTML editors, even with such where it doesn't make much sense (descriptions of objects for one).

Now HTMLArea can actually just turn some textareas to editors (by using the name attribute of those) but just how am I supposed to know this before the page is assembled?

It would actually work with onFocus events on the textareas in question but it's not exactly an elegant solution either. Whomever decided that only body may have onLoad evets should be shot ;-).

Ah well, maybe I can figure it out. I'll post it, rest assured (works better with IE than with Mozilla at the moment but the script is alpha so...).

Visit http://triligon.org

Peter Bailey

Tuesday 08 April 2003 6:25:06 am

You can attach onload events with just scripting.

window.onload = someFunctionPointer;

If you need multiple events, then you'll need the DOM methods attachEvent and addEventListener, neither of which work in Opera 6 or less and IE5-Mac.

if ( window.attachEvent )
window.attachEvent( "onload", functionPointer );
else if ( window.addEventListener )
window.addEventListener( "load", functionPointer, false );

Of course, for any function-pointer resource you can substitute-in an anonymous function.

Also, the onload event handler applies not only to <body>, but also to <applet>, <embed>, <frame>, <frameset>, <img>, <link>, and <script>

eZ debug

Timing: Jan 18 2025 03:06:31
Script start
Timing: Jan 18 2025 03:06:31
Module start 'content'
Timing: Jan 18 2025 03:06:32
Module end 'content'
Timing: Jan 18 2025 03:06:32
Script end

Main resources:

Total runtime0.8771 sec
Peak memory usage4,096.0000 KB
Database Queries205

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 589.4453180.7656
Module start 'content' 0.00660.7499 770.2109574.7422
Module end 'content' 0.75660.1204 1,344.9531337.7031
Script end 0.8770  1,682.6563 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.4694210.0002
Check MTime0.00150.1697210.0001
Mysql Total
Database connection0.00090.101010.0009
Mysqli_queries0.804091.65982050.0039
Looping result0.00160.18782030.0000
Template Total0.848896.820.4244
Template load0.00170.192920.0008
Template processing0.847196.578320.4236
Template load and register function0.00020.024210.0002
states
state_id_array0.00110.125710.0011
state_identifier_array0.00110.120920.0005
Override
Cache load0.00140.1610400.0000
Sytem overhead
Fetch class attribute can translate value0.00140.161940.0004
Fetch class attribute name0.00090.100460.0001
XML
Image XML parsing0.00070.080540.0002
class_abstraction
Instantiating content class attribute0.00000.001260.0000
General
dbfile0.00150.1694210.0001
String conversion0.00000.000830.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
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs