HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Right Panel

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#27185 (In Topic #6272)
Avatar

Community saint

Can it be 'selectively' hidden . . . ?

I would like to be able to hide the right panel for selected pages - specifically Comcode pages into which I need to squeeze an iframe.

1. Has anybody done this successfully?
2. Can it be done?
3. If 1. and/or 2. above, how?

Any help would be appreciated.

Thanks.

 :(

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#27188
Avatar

Community saint

well I got ride of it completely on PPY.

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#27194
Avatar

Community saint

Thanks Amy, but not the answer I was looking for. I want to remove the right panel for SELECTED pages only, not a standard 'remove'.

But thanks for the input.

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#27200
Avatar

Change line 33 of GLOBAL.tpl from:

Code

      {$SET,right_width,{$?,{$GET,helper_panel},425px,{$?,{$IS_EMPTY,{$GET,panel_right}},0,14.3em}}}
to:

Code

      {$SET,right_width,{$?,{$GET,helper_panel},425px,{$?,{$OR,{$EQ,{$PAGE},x},{$EQ,{$PAGE},y},{$EQ,{$PAGE},z},{$IS_EMPTY,{$GET,panel_right}}},0px,14.3em}}}

(this particular example disables the right-hand panel for pages 'x' 'y' and 'z'.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#27201
Avatar

Community saint

How do I find x, y and z?

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#27202
Avatar

In Chris' example, each page is specified after a {$PAGE} symbol, in an EQ.

e.g. {$EQ,{$PAGE},x} for page x. They're all inside an OR symbol.

Back to the top
 
Posted
Rating:
#27203
Avatar

One would substitute 'x' 'y' and 'z' in the example for the names of whatever pages the panel should not be displayed for. One would also add extra {$EQ,{$PAGE},<page-name>}, segments with whatever page names were appropriate, if more pages were to not have panels, or remove segments if less than 3 were to not have panels. :).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#27212
Avatar

Community saint

Thanks for asking the question I was going to ask, Amy.

Now I just have to get my head around how to ident the pages, but hey, who said using OCP was not an interesting pastime?

Chris & Philip, thanks for amplifying - I should be able to home in on what you guys are saying. Rest assured I'll be back (as Arnie would say) if I can't decipher the 'help'!

 :lol:

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#27213
Avatar

Community saint

Humphhhh!

I'm back already!

Does the ident have to be specific to a page ID, or would a generic reference to, say, "Comcode" pages be sufficient?

 :(

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#27214
Avatar

If you wanted to do it for Comcode pages in general, you'd have to go about it a different way. What you probably want to do is put a {+START,SHIFT_ENCODE,is_comcode_page}_true{+END} at the end of COMCODE_PAGE.tpl, and then change line 33 of GLOBAL.tpl from:

Code

      {$SET,right_width,{$?,{$GET,helper_panel},425px,{$?,{$IS_EMPTY,{$GET,panel_right}},0,14.3em}}}
to:

Code

      {$SET,right_width,{$?,{$GET,helper_panel},425px,{$?,{$OR,{$SHIFT_DECODE,is_comcode_page},{$IS_EMPTY,{$GET,panel_right}}},0px,14.3em}}}

This is off the top of my head though, so there may be problems.

Back to the top
 
Posted
Rating:
#27216
Avatar

Community saint

Thanks Philip - NOT! But I think you've partially answered my dilema.

I really don't want to 'cripple' all Comcode pages by removing the right panel. I only want to be specific about those Comcode pages in which I've inserted an 'iframe' that requires a wider display area than is available when the right panel is being displayed. The 'iframe' content on these specific pages end up with horizontal scrollbars, and that isn't my idea of a good display.

Hope all that makes sense.

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#27217
Avatar

Well in that case, you could put the {+START,SHIFT_ENCODE,is_comcode_page}_true{+END} under the iframe on each Comcode page on which you want the right panel to be hidden.

Back to the top
 
Posted
Rating:
#27219
Avatar

Community saint

Thanks for all the help!

I'll go away and 'play' with this in the sandbox. Shouldn't take long - month, perhaps two at the outside!

 :(

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#27222
Avatar

If it helps, what I'm basically doing is to take any page for which you want the right panel to be hidden, and put Tempcode in it to set a variable which can be examined by the Tempcode for the right panel itself.
If the Tempcode for the right panel can see that the variable set is true, the right panel won't be displayed. If a page doesn't have the Tempcode to set the variable, the right panel should assume it's false.

Back to the top
 
Posted
Rating:
#27229
Avatar

I've been in discussion with Chris, and we've decided that his method is better, due to complex Tempcode caching issues.

In addition to his changes detailed above, you'll want to change line 55 of GLOBAL.tpl from:

Code

{+START,IF,{$OR,{$IS_NON_EMPTY,{$GET,panel_right}},{$GET,helper_panel}}}
to:

Code

{+START,IF,{$OR,{$AND,{$IS_NON_EMPTY,{$GET,panel_right}},{$NEQ,{$GET,right_width},0px}},{$GET,helper_panel}}}

Back to the top
 
Posted
Rating:
#27242
Avatar

Community saint

This post is by way of bringing up to date anybody that has tried to follow this thread.

My original request (wish-list) has been resolved, but it took a lot of behind-the-scenes work by the staff to unravel the code and apply it to my specific problem.

If others have an interest in this topic please PM (or is it PT) me and I will try to explain in 'simple' terms what was achieved, and how.

If you just want to take a look, then trawl on down to The Garden and you'll get a feel for my percieved problem and how it has been overcome!

 :thumbs:

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#27448
Avatar

Community saint

Back again . . . !!

This is for either Philip or Chris - whichever hasn't taken off for the Christmas frolics - not that the FOG is going to let you.

Tried to 'add' another entry to GLOBAL.tpl to allow a wide display (sans right_panel) for a 'News' item, but failed miserably.

This is the URL of the actual page:
and these are the attempts I made to insert the relevant code, but it seems I'm missing something, perhaps the fact that it is a 'News' item and not a Comcode page?

Code

,{$AND,{$EQ,{$PAGE},news},{$EQ,{$TYPE},view},{$EQ,{$ID},52},{$EQ,{$ZONE},site}}

-AND-

,{$AND,{$EQ,{$PAGE},news},{$EQ,{$ID},52},{$EQ,{$ZONE},site}}

-AND-

,{$AND,{$EQ,{$ID},52},{$EQ,{$ZONE},site}}

Please point me in the right direction, just like you would Santa if he landed on your roof by mistake!

 :o

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#27451
Avatar

Your first attempt was the closest, with two (easy to make) faults:

Code

,{$AND,{$EQ,{$PAGE},news},{$EQ,{$TYPE},view},{$EQ,{$ID},52},{$EQ,{$ZONE},site}}

While {$PAGE} exists as a symbol, neither {$TYPE} or {$ID} do, because neither of them are required for every page.
You could use {$GET,type} and {$GET,id} to extract them from the URL, but I believe it would be simpler if you used a match-key for this one, as otherwise the line of Tempcode would get excessively long and unwieldy.

Code

,{$MATCH_KEY_MATCH,site:news:type=view:id=52}

:)

Back to the top
 
Posted
Rating:
#27453
Avatar

Community saint






Thanks Philip.

Nearly worked, and now I'm wondering if it has always been like this (see the attachments) or whether I was so pleased to get a display across the whole screen that I hadn't noticed that the right_panel sneaks in, just off-screen.

The relevant code I have in GLOBAL.tpl is the following:

Code

{$SET,right_width,{$?,{$GET,helper_panel},425px,{$?,{$OR,{$AND,{$EQ,{$PAGE},garden},{$EQ,{$ZONE},site}},{$AND,{$EQ,{$PAGE},jindaroo},{$EQ,{$ZONE},site}},{$AND,{$MATCH_KEY_MATCH,site:news:type=view:id=52}}{*Insert more pages here*},{$IS_EMPTY,{$GET,panel_right}}},0px,14.3em}}}

Can you spot anything?

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#27455
Avatar

There was a small problem with line 55 of GLOBAL.tpl, where all I had to do was change "0" to "0px". All should be working now. :)

Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Expand