Forums / Setup & design / How to limit which sitedesigns to choose from on preview?

How to limit which sitedesigns to choose from on preview?

Author Message

Nicklas Lundgren

Thursday 30 June 2005 6:45:17 am

Hi folks,

The new preview-function in the 3.6 admin interface is great. However - we are running a multisite environment. Thus, we define in settings/override/site.ini.append.php all the available siteaccesses on our server.

Now, when one of our customers select to preview a page from the admin-interface, he has the possibility to select ALL sitedesigns installed in our server! This is not good. We need to set the customers sitedesign as default, and hide all other sitedesigns.

We thought this would be done in the siteaccess/XYZ/content.ini.append.php, block [VersionView] with AvailableSiteDesignList[] and DefaultPreviewDesign.
But no such luck.....

Has anyone a better idea on how to limit the number of available sitedesigns on preview in a multisite-environment?

Any suggestions greatly appreciated!

Kind regards,
Nicklas

Nicklas Lundgren, Managing Director
Novitell AB, Sweden

Daniel Beyer

Thursday 30 June 2005 8:21:51 am

Hi Nicklas,

check ini-file site.ini. There you will find an array of siteaccess:

[SiteAccessSettings]
AvailableSiteAccessList[]
AvailableSiteAccessList[]=plain
AvailableSiteAccessList[]=admin

The list in the admin-preview is build from those settings.

Daniel Beyer
_________________________________
YMC AG
Kreuzlingen, Switzerland
web: www.ymc.ch
____________________________________

Peter Liscovius

Friday 08 July 2005 3:49:14 am

I have ez 3.6.0, but using the previewselection update in backend (shows translations and all siteaccess with radiobuttons) has no effect on the preview. It shows always the preview with backenddesign in the backend.

my settings/override/content.ini.append.php:

<?php /* #?ini charset="utf-8"?

[VersionView]
AvailableSiteDesignList[]
AvailableSiteDesignList[]=corporate
AvailableSiteDesignList[]=admin

# not used in 3.6? (see documentation)
#DefaultPreviewDesign=corporate
#AllowChangeButtons=enabled
#AllowVersionsButton=enabled

*/ ?>

and settings/override/site.ini.append.php:

...
[SiteAccessSettings]
CheckValidity=false
AvailableSiteAccessList[]=cn
AvailableSiteAccessList[]=de
AvailableSiteAccessList[]=en
AvailableSiteAccessList[]=es
AvailableSiteAccessList[]=fr
AvailableSiteAccessList[]=il
AvailableSiteAccessList[]=jp
AvailableSiteAccessList[]=ru
AvailableSiteAccessList[]=administration
...

Any ideas what could be wrong?

Anja Lundin

Sunday 17 July 2005 11:42:30 pm

Hi!
Like Nicklas said we are running a multisite environment. And we must specify all siteaccesses available (AvailableSiteAccessList) in our installation on our server in override/site.ini.append.php.

But we want our customers to see only the design for their site and no other sites when they use the real preview function in 3.6.0. (Customer A should not be able to choose to see thier sites in customer B's design.) This is however not possible in a multisite environment as far as we can see. By the way, the documentation on the real preview is pretty poor.

The loop in content/view/versionview.tpl loops over $site_access_list. Instead it should be nice if the real preview choose items from content.ini AvailableSiteDesignList. Or if possible create a new list in an ini-file specified for the real preview and use this for the loop.

Is there a nice solution for this?

Kind regards,
Anja

------------------------------------
Anja Lundin
Developer, Novitell AB
Sweden

www.novitell.se

eZ debug

Timing: Jan 18 2025 21:07:05
Script start
Timing: Jan 18 2025 21:07:05
Module start 'content'
Timing: Jan 18 2025 21:07:06
Module end 'content'
Timing: Jan 18 2025 21:07:06
Script end

Main resources:

Total runtime1.1221 sec
Peak memory usage4,096.0000 KB
Database Queries201

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0071 587.9688180.7969
Module start 'content' 0.00710.9732 768.7656644.9141
Module end 'content' 0.98030.1417 1,413.6797337.3359
Script end 1.1221  1,751.0156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.3658210.0002
Check MTime0.00140.1258210.0001
Mysql Total
Database connection0.00130.118310.0013
Mysqli_queries1.048193.40642010.0052
Looping result0.00190.17351990.0000
Template Total1.091797.320.5458
Template load0.00210.189820.0011
Template processing1.089597.093020.5448
Template load and register function0.00010.010710.0001
states
state_id_array0.00090.082110.0009
state_identifier_array0.00120.105920.0006
Override
Cache load0.00180.1631350.0001
Sytem overhead
Fetch class attribute can translate value0.00130.117650.0003
Fetch class attribute name0.00100.087770.0001
XML
Image XML parsing0.00190.171650.0004
class_abstraction
Instantiating content class attribute0.00000.000970.0000
General
dbfile0.00210.1842400.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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs