×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: How to have users delete hotspots

How to have users delete hotspots 11 years 9 months ago #19591

  • Shaun Kehoe
  • Shaun Kehoe's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 1
Hey Daniel,

I was trying to figure out how to delete hotspots from the front end on my map. Users can edit the hotspots, but there is no button anywhere to delete them. I can't even delete them myself on the front end and I am the super admin. I was just wondering if there was a line of code somewhere or an option I had to enable to allow my users and myself to be able to delete hotspots in the front end.

Thank you,
Shaun

How to have users delete hotspots 11 years 9 months ago #19605

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
There is no option to delete a hotspot from the frontend. It is currently only possible to do this in the backend.
Regards,
Daniel

How to have users delete hotspots 11 years 8 months ago #19772

  • Shaun Kehoe
  • Shaun Kehoe's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 1
Alright. I know this can be done but I was wondering if you might know an efficient way to do this since you made this whole program lol I was thinking that I would be able to make a little link that says "delete" somewhere(possibly in the edit your hotspot page) that when clicked, changes "display" in the database to a "0" instead of a "1". So that way it pretty much would unpublish the hotspot if a user doesn't want it anymore. That should also make it so I don't have a bunch of users being able to delete their stuff out of the database, instead they would have the illusion of it being deleted when instead it is just not being displayed anymore. Is there a certain way I should go about doing this? or should I create the Database field with the default value of "1" which would display, then put the link on a page, and then have all the hotspots that are set to a value of "1" be displayed on the hotspot map. I don't know if this would work exactly how I am picturing it will lol I know with the other basic php site I had created, I had this feature and it did this but I know this component is way more advanced than what I had, so I didn't know if it would work lol

Thank you,
Shaun

How to have users delete hotspots 11 years 8 months ago #19778

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
That is a good idea actually. Currently we don't have a delete flag. The status of a hotspot can only be published or unpublished or permanently deleted from the db.

You can go ahead and modify the db. Actually what I would do would be to modify the published field to status. (of course update all other code that deals with publish/unpublish) and then add a new status (one can look at com_content to see how they deal with that) of -1 or 10 or whatever -> that will be documented as deleted. If we have such a status we won't load this hotspot in the frontend, but one will have to have a better filter in the backend that shows those hotspots.
  • Page:
  • 1
Time to create page: 0.130 seconds