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

Moving forward with Composr

ocPortal has been relaunched as Composr CMS. ocPortal 9 is superseded by Composr 10.

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

News - Keeping it in view

Login / Search

 [ Join | More ]
 Add topic 
#59728 (In Topic #12999)

Fan in training

I'm a fairly recent ocPortal convert, coming from Joomla (which I found fairly dreadful, in it's default state).

I love the interface and features of ocPortal but my PHP is rusty and I didn't think I'd have to delve into the code too much in order to customise my layout. I'm happy at the moment with a default theme.

However, I'm a little stuck with how to configure my front page to: -

  1. Always display the full news article, instead of the summary.
  2. Only shorten news articles to headings when there are X number of articles in view.

Essentially, I don't add news on a daily basis. I'm running just a little personal blog with the nice, extra features of downloads, galleries etc.

I'd also like to know if it's possible to limit the number of file downloads, based on either a total number per month, or total GB per month? My hosting package limits me to 20GB/month and if I exceed it, either my site disappears or I'll end up with a massive bandwidth bill. I know I can use 3rd-party file hosting, but I want to make available files less than 10MB in size without having to worry. 3rd-party hosting doesn't give me tracking info. OcPortal's tracking/stats facility has already given me a clue as to what I should change in the one file I'm currently providing for download!
Back to the top



  1. Don't fill out the summary, then in the NEWS_PIECE_SUMMARY template replace the complex lines 39-44 with simply {NEWS}.
  2. Edit the front page, use the 'Add block' button, and re-add the news block. You'll see full options to control it.
  3. Download limit isn't possible out of the box, although the stuff is tracked (I know it is because it's shown in the stats block) so a coder could put in a couple of lines of code to do that. I think it's stored in the ocp4_values table, and you get values out using get_value(). I think downloads are served via code in sources/downloads.php

Back to the top
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: