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.


Reported Content

A new module for reporting content, that can be linked into templates via setting up a URL into that module.

Eventually this addon will probably become a core part of the system, but for now it only exists in non-bundled land without any default integration. It works like the reports posts system in the forum, i.e. actually saves the reports onto the forum in the same way.

I'll give an example for news…

In the NEWS_ENTRY_SCREEN template you'll find the action links are driven by…

Code


{$,Load up the staff actions template to display staff actions uniformly (we relay our parameters to it)...}
{+START,INCLUDE,STAFF_ACTIONS}
1_URL={SUBMIT_URL*}
1_TITLE={$?,{BLOG},{!ADD_NEWS_BLOG},{!ADD_NEWS}}
1_REL=add
1_NOREDIRECT=1
2_URL={EDIT_URL*}
2_ACCESSKEY=q
2_TITLE={!_EDIT_LINK}
2_REL=edit
3_URL={NEWSLETTER_URL*}
3_TITLE={+START,IF_NON_EMPTY,{NEWSLETTER_URL}}{!newsletter:NEWSLETTER_SEND}{+END}
{+END}

change to:

Code


{$,Load up the staff actions template to display staff actions uniformly (we relay our parameters to it)...}
{+START,INCLUDE,STAFF_ACTIONS}
1_URL={SUBMIT_URL*}
1_TITLE={$?,{BLOG},{!ADD_NEWS_BLOG},{!ADD_NEWS}}
1_REL=add
1_NOREDIRECT=1
2_URL={EDIT_URL*}
2_ACCESSKEY=q
2_TITLE={!_EDIT_LINK}
2_REL=edit
3_URL={NEWSLETTER_URL*}
3_TITLE={+START,IF_NON_EMPTY,{NEWSLETTER_URL}}{!newsletter:NEWSLETTER_SEND}{+END}
4_URL={$PAGE_LINK,_SEARCH:reportcontent:content_type=news:content_id={ID}:url={$SELF_URL&}}
4_TITLE=Report this
{+END}

So, you are probably thinking: what does _SEARCH:reportcontent:content_type=download:content_id={ID}:url={$SELF_URL&} mean?
  • _SEARCH – look for the reportcontent module, wherever it is; you could put site instead, it doesn't matter much
  • reportcontent – our reporting module that does the work
  • news – the content type; the name of a file in sources/hooks/systems/content_meta_aware
  • {ID} – content ID; usually it's passed into a template as a parameter named 'ID' like it is here
  • {$SELF_URL&} – the current URL needs to be passed through

License

Licensed on the same terms as ocPortal