Hi there,
I am looking to add a link alongside the 'Add photo' - Example - Delete photos which links to the admin page as there is no way of deleting an image on the front end of the website - shame.
Any help?
resolvedHi there,
I am looking to add a link alongside the 'Add photo' - Example - Delete photos which links to the admin page as there is no way of deleting an image on the front end of the website - shame.
Any help?
There are a couple of ways of deleting images from the front end.
1) As an admin, if one of your users uploads an image and it goes into moderation, you can moderate from the front-end..."bury" deletes the image.
2) On SavorySights.com, we did some custom javascript that allows user to preview the image and the delete it if they don't like it. So you can do custom coding to accomplish things like that.
But those don't sound like what you're looking for. It's not really feasible to add the link at this time...the thing that is missing is that the Gallery Wrapper in the Layout Editor doesn't get run through the full field replacement routine like the image blocks do. And then to really add what you're wanting, you'd have to have some conditional code that determines whether the user is an Admin or not (non-admins can't get to the Photo Manager page).
BB
Hi Byron:
"On SavorySights.com, we did some custom javascript that allows user to preview the image and the delete it if they don't like it. So you can do custom coding to accomplish things like that."
This is exactly what i am looking for. Any information on how i would do this? Or do you have a file that i could have a look at?
However, the idea for this post was that i want to add a straight forward next to 'Add photo'. Like a mini menu.
Ive had a look at the script but couldnt see anything.
What i have done with you nice neat plugin is added it to Wordpress MU. Works fantastic. I have created a website where it is based on a picture profile. Similar to Deviantart.com. A user registers, get their own profile and photosmash is automatically set up. All they need to do is log in and away they can go. Superb. A neat addition would be the ability to delete images on the front end.
Dean,
It's exciting to hear that you've got MU working with PS, and it sound like you're doing some cool things with it!
I'll tell you what I can do...I think...I will try to put a filter in on the Add Photos link, that way you could add a menu, change the link, or do all sorts of things to it.
Send me an email through Contact and I'll give you some more detail on deleting.
BB
hello I just had some users ask for this on my site ... just wondering whether there was some code that could be used for this ?
Hi bels,
Not yet, officially...but, you could use the Development version (see my Beta message at the top of 0.8.00). It has the filter bwbps_add_photo_link (passes the ‘Add Photo’ html for filtering), which you could hook into through your functions.php file by doing:
add_filter('bwbps_add_photo_link', 'your_function');
function your_function( $add_photo_html ){
// Do something to the Add Photo Html and return it.
// ...
return $add_photo_html;
}
That would let you tack on a new link after the add photo link. The filter basically sends the HTML as a parameter to the function you specify, and expects to get some text/html back to use for the Add Photo link. So, you can add to it or replace the default.
Let me know how it goes if you give it a try.
Cheers,
Byron