Advertisement:

Author Topic: Only admin may post images to adds [solved]  (Read 597 times)

madmin

  • Newbie
  • *
  • Posts: 20
Only admin may post images to adds [solved]
« on: August 24, 2015, 11:23:59 pm »
I want to prevent the users of my site from posting the item images while they publish the add.
But  the admin should be able to  place an image of the category  or add listings with images.
So, that the users should not be able to place images to items.. its like they can click the image of category and place their add.
 Is there any way I can do this here? Any suggestion is appreciated.
Thanks.
« Last Edit: August 25, 2015, 03:50:38 pm by madmin »

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Preventing users to add item image while posting the add
« Reply #1 on: August 25, 2015, 12:00:13 am »
Hi,

Look for this in your theme item-post.php (maybe also in item-edit.php, depends on the theme):

Code: [Select]
if( osc_images_enabled_at_items() ) {
and replace it with:

Code: [Select]
if( osc_images_enabled_at_items() && osc_is_admin_user_logged_in()) {
Regards

madmin

  • Newbie
  • *
  • Posts: 20
Re: Preventing users to add item image while posting the add
« Reply #2 on: August 25, 2015, 02:53:16 pm »
Its working!! Thanks ..

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Preventing users to add item image while posting the add
« Reply #3 on: August 25, 2015, 03:24:20 pm »
You're welcome. :)

Would you mind changing the title of this thread to something more descriptive such as "Only admin may post images [Solved]". Thanks.

Regards

madmin

  • Newbie
  • *
  • Posts: 20
Re: Only admin may post images to adds [solved]
« Reply #4 on: August 25, 2015, 03:55:00 pm »
@teseo

But as I asked is there any way that the categories can have images and on posting the adds in that category, all the adds in that category can take the image of the category..??
Hope you understood what I asked. So, that the admin sets the images for categories and the users can add the items for those.
Thanks.