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.


A few catagory theme questions

Login / Search

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

Community saint

1. how do I move the fields around in the entries using template edits.
2. if I have the tabbed category view set and I have an image as one of the fields how do I get the tabs thing to display a thumb nail instead of the full images?

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

Community saint

If you are wondering I am using the 5.1 beta.

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

Hi,

I'm currently mid-way through a 1 week holiday so any topic that is going to take me more than about 6 seconds to reply is going to not get a reply until next week I'm afraid. Sorry about that. Just posting FYI really in case you're wondering why I haven't replied, or if others reading this are wondering why I've been slow to reply on other topics lately.


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

Community saint

Oops sorry, I am not in to big a hurry but did want to mention I was using the beta, which is nice by the way. So far very few issues.


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

Answering '1' first.

There's the easy way and the hard way.

The easy way is to just set the 'Order' of each field when you edit the catalogue, plus you can decide what shows.

The hard way is to rewrite templates. There's a lot you can do, as you can reference individual fields independently. But I won't claim it's easy.

Tempcode programming

It is possibly to achieve template customisation wholely within the default set of templates, by using template programming. The catalogue name is passed into every catalogue template meaning you can use template IF directives to differentiate against that name, producing different output accordingly.

Whilst the main CATALOGUE_DEFAULT_ENTRY.tpl template uses the FIELDS parameter by default (which consists of precomposited template field rows, built using the other templates), it is also given special parameters correlating to each individual field row and each individual field value. You may thus entirely customise the catalogue look using these low level values to make very customised arrangements that are more complex than the simple tabular arrangement used by default.


For example, take the CATALOGUE_DEFAULT_ENTRY.tpl template:

Code

<div class="wide_table_wrap"><table summary="{!MAP_TABLE}" class="wide_table solidborder spaced_table">
   <colgroup>
      <col width="150" />
      <col width="100%" />
   </colgroup>

   {FIELDS}
</table></div>

If we wanted to jazz a 'classifieds' catalogue up a bit, we might change it to something like:

Code

<div class="wide_table_wrap"><table summary="{!MAP_TABLE}" class="wide_table solidborder spaced_table">
   <colgroup>
      <col width="150" />
      <col width="100%" />
   </colgroup>

   {FIELDS}
</table></div>

{+START,IF,{$EQ,{CATALOGUE},classifieds}}
<p>
   This advert was posted by
   <a href="{$PAGE_LINK,_SEARCH:members:view:{SUBMITTER}}">{$USERNAME*,{SUBMITTER}}</a>.<br />
   You might want to
   <a href="{$PAGE_LINK,_SEARCH:contactmember:misc:{SUBMITTER}}">email {$USERNAME*,{SUBMITTER}}</a>
   to query more about {FIELD_0*}.
</p>
{+END}

You can see how you can reference individual fields in the template like {FIELD_0}.
For a full table of fields you can use, put {+START,PARAM_INFO}{+END} temporarily into the template, and it will show you everything defined in a neat table.


Last edit: by Chris Graham


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

2-

It is already a thumbnail, but maybe you're thumbnail size is just too large for what you want. Fortunately we have a fairly new feature that lets you regenerate thumbnails in templates however you like them.
Change CATALOGUE_DEFAULT_ENTRY_FIELD_PICTURE.tpl to:

Code


{+START,IF,{$NEQ,{I},0}}<a href="{URL*}">{+END}<img src="{$THUMBNAIL,{THUMB_URL},100}" alt="{!IMAGE}" />{+START,IF,{$NEQ,{I},0}}</a>{+END}

(change 100 to whatever you want)


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

Community saint

Thanks and on the second one the image was over lapping with the field next to it, only by a little bit though.

What I am going for is a what I had with wordpress.

Agitated Screams of Maggots | Otaku Data
Each of those bulleted items are different fields. Same with the tabbed content at the bottom. Each tab is a separate field.

I am working on moving the content from that site to this new site I am working on so need the same fields and would be nice to have it look close to the same.

Thanks.

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

Very nice. Well you can certainly do it, CATALOGUE_DEFAULT_ENTRY_SCREEN is what you need to edit. Put {FIELD_0} etc around inside your own HTML layout. The {+START,PARAM_INFO}{+END} tip in the doc is very useful to help you know what to put there.

But yeah, not necessarily easy, it's certainly coding.


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

Community saint

Sounds good, wordpress actually did it a almost the same way. Although it was a php code you put in the template that had the field name instead of comcode but basically the same thing so should be easy to do.

Thanks. :)

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
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: