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.


Forum users: deny upload attachments

Login / Search

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

Well-settled

I'm having a hard time trying to figure out how to prevent users from uploading attachments in the ocforum posting. I have looked at Permission Tree editor, Global Permissions, and in the edit feature of the forum itself. Am I over looking something? Is it possible to do this?

Thanks in advance (v3.2.10)
Back to the top
 
Posted
Rating:
#42884
Avatar

It's not really a feature to do this but you could try setting the quote for their usergroup to zero.


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

Well-settled

Thanks for that.

However, I still want their user group to have access to a certain quota in the Gallery. For me it would be preferable for them to not see the upload attachment option at the forum, which I could block by commenting out the code that generates it.

Can you let me know which php file generates the topic create/reply page?

Again, thanks very much for the assistance!
Back to the top
 
Posted
Rating:
#42896
Avatar

The POSTING_FORM template shows the attachment interface.
(A "Posting form" is essentially a form that allows attachments).

In particular look at this bit of code:

Code

         <tr>
            <td class="dottedborder_divider_continue" colspan="2">
               {ATTACHMENTS}
            </td>
         </tr>

I reckon changing it to this would probably work:

Code

{+START,IF,{$OR,{$IS_STAFF},{$MATCH_KEY_MATCH,cms:cms_galleries}}}
         <tr>
            <td class="dottedborder_divider_continue" colspan="2">
               {ATTACHMENTS}
            </td>
         </tr>
{+END}


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

Well-settled

The only file I could locate named POSTING_FORM was in /themes/theme_name/templates_cached/EN/ and it didn't have a string such as the one you mentioned. Is that the correct file?

Sorry to keep pestering you with such questions, but the assistance is greatly appreciated. For the type site I envision, users would be limited to uploading only in Gallery, and the forum would only be used to link to images in BBCode.

Thanks
Back to the top
 
Posted
Rating:
#42913
Avatar

themes/default/templates/POSTING_FORM.tpl.
However you should either:
  • edit it using the theme editing tools in ocPortal
  • or, manually copy the fiile to themes/default/templates_custom/POSTING_FORM.tpl before editing.

That's to make sure your file change doesn't get lost on upgrades.


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

Well-settled

Chris that was exactly what I was looking for and works perfectly…edited per your advice in the theme editing environment.

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

Quick reply   Contract

Your name:
Your message: