Login or create new account.

By registering on joomprod.com, you will have immediate access to all our free products and to the public side of our support forum.

Enjoy our subscriptions.

Each of our subscriptions allow you to enjoy the private side of the support forum and all the update of our products for a period ranging from 3 months to 1 year.

Payment And immediate download.

After subscribing to one of our subscription, the products are immediately downloadable.

Login

Or Register
Accueil / forum / Public Forum / Main Forum / Frontend moderator user

Support Availability Because we must sleep sometimes

Working days: Monday to Friday.
Reply time: Depending on the complexity of your support issue it's usually between a few hours to 48 hours.

Support is only guaranteed to paid subscribers

AdsManager - End of life

It is with great regrets that we have chosen to end the developpement of Adsmanager and its other associated components.

AdsManager is born 10 years ago and, as of today, the number of new subscriptions and downloads have fallen and we cannot maintain the component anymore.

All active subscribers will be able to continue enjoying support until the end of their subscription.

The components will be free and no support will be provided anymore for the other users.

×

Notice

The forum is in read only mode.

× OLD Forum post could be checked here : forum.joomprod.com

Frontend moderator user

  • maxximmikhaylov
  • Topic Author
  • Offline
  • User
  • User
More
8 years 2 months ago #23741 by maxximmikhaylov
Frontend moderator user was created by maxximmikhaylov
I want to create a moderator user, who will be able to remove at the frontend other users ads.
because some dumb users creates dumb ads

I changed line 661 in components/com_adsmanager/controller.php
if (($content == null) || (($content->userid != $user->id) && ($user->id != moderator_id)))

and line 92 in components/com_adsmanager/views/details/tmpl/default.php to show delete link
if ($this->content->userid != 0 && ($this->userid == $this->content->userid || $this->userid == moderator_id))	{

it seems to work, but what the developers say:
it is safe? the system does not crash? is there a more elegant solution?

---
if it is a useful addition, if it can be added to the settings in the next version?
More
8 years 2 months ago #23753 by loic
Replied by loic on topic Frontend moderator user
Hello,

first be carefull with the variable moderator_id, written like that, it will cause the website to crash, it must be $moderator_id - ignore that warning if it is a constant variable :)

Other than that it looks good but the second condition will not display anything if the user that have posted the ad as an id at 0.

Best regards.
Moderators: perry
Time to create page: 0.131 seconds
Powered by Kunena Forum