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.


Just some questions this time

Login / Search

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

Community saint

  • Just under the top menu, in the Personal zone, the Forums zone and the Admin zone, there is a sub-menu.  Is it possible to do those in all zones?  Is it possible to change what they link to (i.e., customize the menu)?
  • Is it possible to reorder the Zones links at the top?
  • Is it possible to change, or remove altogether, the titles of blocks, and if so, how?

I guess that's it for now.  I'm certain to have bunches more later!

 
Back to the top
 
Posted
Rating:
#26349
Avatar

Community saint

That is some thing I have been looking into and have not had enough time to fine out. How ever I think it can be done but only though template edits unless I am wrong.
I will have a few skins that will have a zone menu as well as a submenu.

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:
#26357
Avatar

1) The 'GLOBAL' template puts together the panels and special menus. In there at the very top is this:

Code

{$SET,SHOW_MANAGEMENT,{$AND,{$OR,{$EQ,{$ZONE},adminzone},{$EQ,{$ZONE},cms}},{$HAS_ZONE_ACCESS,adminzone}}}
{$SET,SHOW_FORUM,{$AND,{$OCF},{$OR,{$EQ,{$PAGE},recommend},{$EQ,{$PAGE},onlinemembers},{$EQ,{$PAGE},points},{$EQ,{$PAGE},warnings},{$EQ,{$PAGE},contactmember},{$EQ,{$PAGE},groups},{$EQ,{$PAGE},rules},{$EQ,{$PAGE},members},{$EQ,{$ZONE},forum},{$EQ,{$ZONE},personalzone}}}}
{+START,IF,{$OR,{$GET,SHOW_FORUM},{$GET,SHOW_MANAGEMENT}}}
   {+START,IF,{$GET,SHOW_MANAGEMENT}}{$MANAGEMENT_NAVIGATION}{+END}
   {+START,IF,{$GET,SHOW_FORUM}}{$FORUM_NAVIGATION}{+END}
{+END}

That is basically what loads up those special menus you pointed out. It's code that determines whether to show them based on the zone/page the viewer is currently viewing, and then shows them by calling up the special code in ocPortal (e.g. {$MANAGEMENT_NAVIGATION}).

You can't really edit those menus but you can replace them with your own. To do that you'd remove the big chunk of code I just pointed out and put something else in it's place. I'm not pretending it's easy, but it's very possible without needing to know how to do PHP programming.

Elsewhere in the file is this:

Code

   {+START,IF_NON_EMPTY,{$GET,panel_top}}
      <div>
         {$GET,panel_top}
      </div>
   {+END}

What that means is that if there is a Comcode Page called 'panel_top' in the zone currently being viewed, it'll be shown in that spot. That spot is specially positioned so it works as a horizontal menu.
There are no 'panel_top's included in ocPortal by default (unlike 'panel_left' which is), but you can create one. Again, I'm not pretending this is easy, because this kind of customisation makes no assumptions and hence the technical aspects of setting it all up can't be avoided. Alternatively you can just write XHTML for a menu directly into the GLOBAL template if you don't want to use Comcode. You can use Tempcode to include advanced behaviour – so, for example, you could program in a menu that only shows in the site zone, by adding something like this to an appropriate place in the file:

Code

   {+START,IF,{$EQ,{$ZONE},site}}
      <div>
         <a href="{$PAGE_LINK*,site:downloads}">Downloads</a> | <a href="{$PAGE_LINK*,site:galleries}">Galleries</a>
      </div>
   {+END}

(that's just a crude example – it'd look pretty rubbish if that code was used directly)

2) The 'TOP' template uses a list of zones that is given to it from ocPortal's PHP code. You can rewrite that template to hard-code whatever you like into it, but you'd need to know Tempcode, XHTML, and CSS really.

3) (this has been answered in another topic)


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:
#26362
Avatar

Community saint

Okay, so not easy, but doable.  A future project, then.  Thanks!
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: