Forums / Developer / Front end editing and the web site toolbar

Front end editing and the web site toolbar

Author Message

STEVO +

Thursday 03 March 2011 1:07:08 pm

Sorry - forgot to mention that the extension doesn't override attribute_view_gui and node_view_gui but adds new template functions that wrap them - so you'll currently have to do a search + replace throughout all relevant templates - ezwebin, ezflow, custom frontent templates.
Change attribute_view_gui to attribute_sedit_gui
Change node_view_gui to node_sedit_gui
Also there's a couple of regex search/replaces in /temp/regex.txt that should be used for full effect.
The toolbar button doesn't do anything yet.
Clear all caches etc then you should see divs as mentioned above wrapping content areas and rolling over them will reveal the icons.
Cheers

Eirik Alfstad Johansen

Sunday 10 July 2011 1:59:13 pm

OK, so I've been doing some more research on this, and allthough I think that most functionality can be handled by an extension, I think a small kernel modification will result in the best implementation of this functionality. 

Here is what I propose: 

  • The ability to have a template surrounding the templates produced by attribute_view_gui, node_view_gui and other template functions making use of the eZObjectForwarder class (check out kernel/common/eztemplateautoload.php).
  • The names of these templates could be an underscore, followed by the name of the template function, followed by «.tpl» and the template could be placed in the same folder as the template_root of the specific template function (or in the matching template root for those functions which make us of the multi_match template_root type, like attribute_view_gui). To use node_view_gui as an example, the surrounding template would be located in design/standard/templates/node/view/_node_view_gui.tpl. An alternative placement is to have them all in a content/inlineedit template folder. In this case, the node_view_gui template would be located in design/standard/templates/content/inlineedit/node_view_gui.tpl
  • These surrounding templates will only be invoked if a new InlineEditing INI setting is set to enabled/true.
  • The variables accessible in the surrounding template should be the same as the ones that are accessible in the included template.

I was hoping to accomplish this myself, but looking into kernel/common/ezobjectforwarder.php, the class it's quite daunting and not very well documented. So, I was hoping that someone would be able to give me a hand with this before I embark upon the rest of the task.

Any takers?

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Eirik Alfstad Johansen

Monday 11 July 2011 12:30:45 pm

Having taken a closer look at STEVO's project, I can see that he has in fact gone with a very similar approach to the one described above.

However, I'm stilling having trouble getting it to work properly (meaning seeing the icons when I hover over an attribute).

As far as I can tell, there's nothing that actually included the sedit.js file (which I assume holds the logic behind this), so I've added it to JavaScriptSettings > FrontendJavaScriptList of the design.ini file.

I've checked the source to ensure that both sedit.js and YUI are included, but still nothing happens when I hover over an attribute_view_gui which has been replaced with attribute_sedit_gui (and yes, the HTML for the attribute_sedit_gui does get included).

How to troubleshoot from here?

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

eZ debug

Timing: Jan 29 2025 13:43:59
Script start
Timing: Jan 29 2025 13:43:59
Module start 'content'
Timing: Jan 29 2025 13:43:59
Module end 'content'
Timing: Jan 29 2025 13:43:59
Script end

Main resources:

Total runtime0.3020 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 588.5703180.8203
Module start 'content' 0.00650.0112 769.390698.9375
Module end 'content' 0.01780.2842 868.3281533.3594
Script end 0.3020  1,401.6875 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00351.1548200.0002
Check MTime0.00140.4715200.0001
Mysql Total
Database connection0.00060.202610.0006
Mysqli_queries0.203667.40581410.0014
Looping result0.00110.35321390.0000
Template Total0.283793.910.2837
Template load0.00090.300310.0009
Template processing0.282793.614210.2827
Override
Cache load0.00060.209010.0006
Sytem overhead
Fetch class attribute can translate value0.00080.271210.0008
XML
Image XML parsing0.00030.089410.0003
General
dbfile0.055418.3349200.0028
String conversion0.00000.001030.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs