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
1_ICON=menu/_generic_admin/add_one
2_URL={EDIT_URL*}
2_ACCESSKEY=q
2_TITLE={!_EDIT_LINK}
2_REL=edit
2_ICON=menu/_generic_admin/edit_this
3_URL={NEWSLETTER_URL*}
3_TITLE={+START,IF_NON_EMPTY,{NEWSLETTER_URL}}{!newsletter:NEWSLETTER_SEND}{+END}
3_ICON=menu/site_meta/newsletters
{+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
1_ICON=menu/_generic_admin/add_one
2_URL={EDIT_URL*}
2_ACCESSKEY=q
2_TITLE={!_EDIT_LINK}
2_REL=edit
2_ICON=menu/_generic_admin/edit_this
3_URL={NEWSLETTER_URL*}
3_TITLE={+START,IF_NON_EMPTY,{NEWSLETTER_URL}}{!newsletter:NEWSLETTER_SEND}{+END}
3_ICON=menu/site_meta/newsletters
4_URL={$PAGE_LINK,_SEARCH:report_content:content_type=news:content_id={ID}:url={$SELF_URL&}}
4_TITLE=Report this
4_ICON=buttons/report
{+END}

So, you are probably thinking: what does _SEARCH:report_content:content_type=download:content_id={ID}:url={$SELF_URL&} mean?
  • _SEARCH – look for the report_content module, wherever it is; you could put site instead, it doesn't matter much
  • report_content – 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

Licence

Licensed on the same terms as Composr
Back to Top