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.


Link to use for "Reported Content" addon.

Login / Search

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

Fan in action

I installed the "Reported Content" addon to allow for reporting of user submitted news, blogs, galleries, etc. but I can't seem to call it up from the blocks I want. What link are we suppose to be using for this?

Back to the top
 
Posted
Item has a rating of 5 (Liked by Shinuk)  
Rating:
#83035
Avatar

Ah yes, I can see this is not explained anywhere.

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_FULL_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


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

Fan in action

You rock. Worked perfectly for news (and blogs), and for galleries after changing the content type. Thanks.  :thumbs:
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: