Forums / Setup & design / HideSettings problem

HideSettings problem

Author Message

Saravanan .R

Monday 17 April 2006 11:54:40 pm

Hi All,

I have to hide the two product nodes for a specific dates between 17th April 2006 and 18th April 2006. I have set the Hide Settings in Content.ini with override settings. I have given the settings done in my content.ini.append.php ( override). But its not working.

Please guide me in this reg.

[HideSettings]
RootNodeList[]
RootNodeList[]= 61
RootNodeList[]= 62
HideDateAttributeList[]
HideDateAttributeList[]= 04/18/2006

Thanks

Saravanan.R

Łukasz Serwatka

Tuesday 18 April 2006 12:00:32 am

Hi Saravanan,

Your settings are wrong. HideDateAttributeList[] takes the attribute ID from your content class. So if your product class has attribute ID "hide_date" then use it like:

HideDateAttributeList[]
HideDateAttributeList[]=hide_date

For RootNodeList[] use the parent node id of your products.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Saravanan .R

Tuesday 18 April 2006 2:14:23 am

Hi Serwatka,

Thanks Serwatka. I am confused about the attribute ID and Node Id. I will show my CONTENT Structure and Node Id in my ezPublish.

<i> [-] Products ( Node Id 60 )
[-] Voix ( Node Id 66 ) ( Object Id 65 )
|__# Voix ( Node Id 65 ) ( Object Id 64 )
[-] Black Box ( Node Id 62 ) ( Object Id 60 )
[-] Cube ( Node Id 61 ) ( Object Id 59 )
[-] Contact us ( Node Id 59 ) ( Object Id 57 )
</i>

In above which is attribute ID for my product class ? and what should i give in RootNodeList[] ?

expecting your reply

Thanks in advance

Łukasz Serwatka

Tuesday 18 April 2006 11:13:03 pm

Hi there,

If you want to hide your product at specified date then you need to extend product class with one more attribute (date or datetime datatype).

Go to Setup->Classes then choose Content class group. Edit product class and add one more attribute (Name: Hide date, Identifier: hide_date). Save your changes.

Then put in content.ini.append.php

[HideSettings]
RootNodeList[]
RootNodeList[]= 60
HideDateAttributeList[]
HideDateAttributeList[]=hide_date

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Saravanan .R

Tuesday 18 April 2006 11:53:34 pm

hi Serwa

Thanks Serwa.

I have created an attribute in the product content class. After I was put the settings in content.ini.append.php i have run the runcronjobs.php still that product is visible.

I need to hide the products between two dates.

Saravanan.R

Saravanan .R

Friday 21 April 2006 1:01:37 am

Hi All,

I am not able to find my error... please guide me in this reg. expecting earliest reply.

Regards
Saravanan.R

Łukasz Serwatka

Friday 21 April 2006 1:11:26 am

Did you republish product object with today date for test? Does cronjob run hide.php script? Do you have any errors?

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Saravanan .R

Friday 21 April 2006 2:09:55 am

Hi

thanks for your reply.

I did like that. but i don't get any errors while run the runcronjobs.php. Instead when i was debugging the HIDE.php

    while( true )
    {
        $nodeArray =& $rootNode->subTree( array( 'ClassFilterType' => 'include',
                                                 'ClassFilterArray' => $hideClasses,
                                                 'Offset' => $offset,
                                                 'Limit' => $limit ) );

        if ( !$nodeArray ||
             count( $nodeArray ) == 0 )
        {
            break;
        }

In the file hide.php the $nodeArray returns only 0 thats why it break at this line.

eZ debug

Timing: Jan 18 2025 19:28:51
Script start
Timing: Jan 18 2025 19:28:51
Module start 'content'
Timing: Jan 18 2025 19:28:52
Module end 'content'
Timing: Jan 18 2025 19:28:53
Script end

Main resources:

Total runtime1.4161 sec
Peak memory usage4,096.0000 KB
Database Queries209

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 587.7031180.8438
Module start 'content' 0.00611.2082 768.5469603.6016
Module end 'content' 1.21430.2017 1,372.1484341.0703
Script end 1.4160  1,713.2188 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.2875210.0002
Check MTime0.00150.1064210.0001
Mysql Total
Database connection0.00090.063610.0009
Mysqli_queries1.318693.11902090.0063
Looping result0.00280.19452070.0000
Template Total1.374697.120.6873
Template load0.00230.159220.0011
Template processing1.372396.910320.6862
Template load and register function0.00030.018010.0003
states
state_id_array0.00270.189710.0027
state_identifier_array0.00210.150820.0011
Override
Cache load0.00200.1390600.0000
Sytem overhead
Fetch class attribute can translate value0.00160.110630.0005
Fetch class attribute name0.00160.113590.0002
XML
Image XML parsing0.00090.066530.0003
class_abstraction
Instantiating content class attribute0.00000.0019110.0000
General
dbfile0.00200.1392290.0001
String conversion0.00000.000430.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
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
13content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.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: 32
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs