Forums / Setup & design / 3.5 Design Look and Feel SiteAccess Selector

3.5 Design Look and Feel SiteAccess Selector

Author Message

Luc Chase

Friday 08 April 2005 10:59:49 am

How can I add a SiteAccess Selector to the Look and Feel screen? It's available in several other places and it seems it ought to be there too.

The Web Application Service Provider

Frederik Holljen

Monday 11 April 2005 7:35:54 am

That functionality requires some code to be added. This functionality will most probably be improved for eZ publish 4.0.

Luc Chase

Monday 11 April 2005 1:31:01 pm

Ok, thanks Fredrik. Over the weekend we found how to make it set Look & Feel for the Current SiteAccess only (instead of a Global Override). Two simple line changes in the Kernel. Also, had to change one more line so that the SiteName is also set for the current SiteAccess only. Works well because we already allow simple edits from the user-site SiteAccess, but of course it would still be better if we could use a SiteAccess Selector instead; then it could be used from the Admin SiteAccess instead of only from the user-site SiteAccess.

The Web Application Service Provider

Esteban Rodriguez

Tuesday 12 April 2005 10:05:29 am

I think we've found a "cleaner" way to do this. You have to do it on every site though.
If you edit the "Template Look" class, you'll find that you can choose on which SiteAccess each inisetting will be modified, just pick the siteaccess for the particular site and voilĂ , you're done.

HTH.

Esteban

I have great faith in fools; self-confidence my friends call it.

http://presencia.net

Luc Chase

Tuesday 12 April 2005 3:44:46 pm

Esteban,
yes that is true. But in the method I used you actually get another SiteAccess in the datatype of the class called 'CurrentAccess' (just below 'override')so don't need to edit it for each site.
However, haven't yet found how to make the Banner Image SiteAccess Specific.

The Web Application Service Provider

Esteban Rodriguez

Wednesday 13 April 2005 8:42:49 am

Ok, sounds good.
On the other hand, now I realize that doing what I said we still can't avoid having the Template Look edit the design.ini in the override dir, instead of the one in the current siteaccess.
This is somewhat of a problem, since it makes it harder to administrate several sites with one install.

Any clues?

Esteban

I have great faith in fools; self-confidence my friends call it.

http://presencia.net

Luc Chase

Wednesday 13 April 2005 11:12:16 am

That,a where the three Kernel edits come in. But still working on getting the Logo to be site specific. ThenThe menu layouts next...

The Web Application Service Provider

Esteban Rodriguez

Wednesday 13 April 2005 11:25:30 am

Ok, Luc, could you show me what you edited in the kernel?
I'm generally quite afraid of touching the kernel, since I don't want to spoil upgradeability, but I really need to have this solved.

Thanks,

Esteban

I have great faith in fools; self-confidence my friends call it.

http://presencia.net

Luc Chase

Wednesday 13 April 2005 1:51:49 pm

Ok this is as far as we've got. Remember this only works if you edit while in the site access you want to change (not while in the Admin siteAccess).
Change line 134 of ezpackagetype.php from

$iniPath = "settings/siteaccess/$siteAccess"; 

to

$accessArray = $GLOBALS['eZCurrentAccess'];
$access = $accessArray['name'];
$iniPath = "settings/siteaccess/$access"; 

next change line 332 (I don't know yet if Line 195 might also benefit from a similar change ) of ezinisettingtype.php from

$path = 'settings/siteaccess/'.siteAccessArray[$iniInstance];

to

$path = $iniInstance == 1 ? 'settings/siteaccess/' . $GLOBALS['eZCurrentAccess']['name'] : 'settings/siteaccess/' . $siteAccessArray[$iniInstance];

then change line 601 of the same ezinisettingtype.php file from

$siteAccessList = 'override';

to

$siteAccessList = 'override;currentSite'; 

then edit the sitedesign class (the one for the choice of designs)to use 'currentSite'
We're also making progress with siteAccess specific Logo changes but it's quite long winded and too early to call it a solution.
Please don't blame me if the above totally mucks-up your installation. If and when it's all done, dusted and tested I'll publish the whole thing as a clean extension with instructions etc.

The Web Application Service Provider

Esteban Rodriguez

Wednesday 13 April 2005 2:20:08 pm

Gee, that was quick, thanks for the trouble.
Rest assured I won't blame you if I screw up. I'll post whatever develoments we can get starting off from what you've changed.

thanks,

Esteban

I have great faith in fools; self-confidence my friends call it.

http://presencia.net

eZ debug

Timing: Jan 18 2025 18:20:22
Script start
Timing: Jan 18 2025 18:20:22
Module start 'content'
Timing: Jan 18 2025 18:20:23
Module end 'content'
Timing: Jan 18 2025 18:20:23
Script end

Main resources:

Total runtime0.9185 sec
Peak memory usage4,096.0000 KB
Database Queries217

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0088 587.8516180.8125
Module start 'content' 0.00880.7566 768.6641670.7266
Module end 'content' 0.76540.1530 1,439.3906344.4297
Script end 0.9184  1,783.8203 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.4469210.0002
Check MTime0.00150.1618210.0001
Mysql Total
Database connection0.00200.221110.0020
Mysqli_queries0.812888.49252170.0037
Looping result0.00230.24562150.0000
Template Total0.881696.020.4408
Template load0.00240.260120.0012
Template processing0.879295.716920.4396
Template load and register function0.00020.025510.0002
states
state_id_array0.00160.179310.0016
state_identifier_array0.00120.131420.0006
Override
Cache load0.00200.2226570.0000
Sytem overhead
Fetch class attribute can translate value0.00140.150640.0003
Fetch class attribute name0.00110.1206120.0001
XML
Image XML parsing0.00320.348140.0008
class_abstraction
Instantiating content class attribute0.00000.0033150.0000
General
dbfile0.00720.7821330.0002
String conversion0.00000.003730.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
10content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
16content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
6content/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: 46
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs