Forums / Setup & design / i need help plz,,,how can i do this ?!

i need help plz,,,how can i do this ?!

Author Message

Selmah Maxim

Wednesday 14 May 2003 2:18:40 am

hi ..

really i need help, i gived up :(

in the folder class i had added radiobutton, called 'user_access' , if is active user cann`t not enter this folder.

now, in the browse module, i need to check the first folder, coz it`s come all the radiobuttons come unchecked, so how can i do this ?

my 1st code i worte to check if this the 1st folder, if yes the make it the selected one :

{section show=eq($Object:index,0)}
<input type="radio" name="SelectedNodeIDArray[]" value="{$Object:item.node_id}" checked/>

{section-else}
<input type="radio" name="SelectedNodeIDArray[]" value="{$Object:item.node_id}" />
{/section}

it`s work fine, but how can hide the radio button if user_acces is 0 ?

i had tried almost every thing, but no result :(

any help please ?

Vivienne van Velzen

Wednesday 14 May 2003 2:35:21 am

Maybe this'll work (haven't tested it, though...):

{* section that loops through folders on browse page *}

name folder -
{section show=eq($:item.contentobject_version_object.data_map.user_access.content, 0)}
<input type="radio" ...>
{/section}

{* /section loop *}

Selmah Maxim

Wednesday 14 May 2003 3:04:13 am

it`s work, i had tried befor, but in this case i cann`t make radio button checked !

what i need : checked the radio button, but just 1 radiobutton, and just if user_access is true.

the result is : 3 status, 1. just 1 radiobutton is checked from the user_access group. 2. else radiobutton in user_access is unchecked. 3. what is not in user_access no radiobutton, just n/a.

i got this code work fine, but am still not sure about it, i got what am need but i think there are better way to do it , coz by thinking this will check up the just the 1st radiobutton if is user_access, but my 1st radionbutton user_access is false, coz of this is strange for me it`s work ?!

{section show=eq($Object:index,0) and show=eq($Object:item.data_map.user_access.content,1) }

<input type="radio" name="SelectedNodeIDArray[]" value="{$Object:item.node_id}" checked/>
{section-else}
{section show=eq($Object:item.data_map.user_access.content,1)}
<input type="radio" name="SelectedNodeIDArray[]" value="{$Object:item.node_id}" />
{section-else}
n/a
{/section}
{/section}

eZ debug

Timing: Jan 18 2025 04:27:40
Script start
Timing: Jan 18 2025 04:27:40
Module start 'content'
Timing: Jan 18 2025 04:27:40
Module end 'content'
Timing: Jan 18 2025 04:27:40
Script end

Main resources:

Total runtime0.1610 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.0075 588.8516180.8281
Module start 'content' 0.00750.0054 769.679793.7734
Module end 'content' 0.01290.1480 863.4531523.0781
Script end 0.1610  1,386.5313 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00372.3241200.0002
Check MTime0.00140.8898200.0001
Mysql Total
Database connection0.00060.359110.0006
Mysqli_queries0.114370.97871410.0008
Looping result0.00160.97771390.0000
Template Total0.147591.610.1475
Template load0.00100.644110.0010
Template processing0.146590.978610.1465
Override
Cache load0.00080.468210.0008
Sytem overhead
Fetch class attribute can translate value0.00090.568910.0009
XML
Image XML parsing0.00030.194410.0003
General
dbfile0.00181.1403200.0001
String conversion0.00000.004930.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