About this topic

  • Posted by jonh_mh 1 year ago. There are 4 posts. The latest reply is from byron.
  • This topic is resolved

Tags

  1. Hi Byron, I was wondering if has a way using custom fields to add classes to the images after a checkbox is checked, so it is possible using jquery later to filter the pictures.

    Ex. on the upload form: if is an animal check here, if is a landscape check here, if is a bla bla bla check here.... This way people looking for landscapes wouldn't be bothered with other irrelevant images and vice-verse...

    If you have any thoughts on the matter, I am all ears. Thanks for your time.

  2. Jon,

    Right off hand, you could use tags to accomplish this. Filtering functionality is in the PhotoSmash Extend extension. There is a module called extended navigation that lets you build a navigation block that can have a search box and/or tag drop downs. You can have multiple tag dropdowns that can work together (images have to be tagged with all the selected tags or optionally, only one tag). The search is actually pretty cool...only thing is that it doesn't search custom fields...only tags, captions, contributors, and maybe another field.

    To do the jQuery you could build a layout that would let you put a custom field into the class on the div or li or td (whichever you're using to segregate your images...you'd want to hide/show the whole block, not just the image). To do this, you would: div class='[my_custom_field]'

    Ideally you could put the tags in there, but I don't think I've got a code for just showing the tags unlinked. I'll add at some point since it makes good since.

    My recommendation is to always use tags where possible since you get all the WordPress functionality behind them, in addition to the PhotoSmash functionality.

    Once you've got your classes, I think you know how the jQuery would look. That would be pretty cool.
    BB

  3. Nice Byron! I had thought about the tags and the PS extend, but I am afraid that not everyone will use tags so the div class='[my_custom_field]' seems to me to be the best option now...Will start to work on it right now!

    By the way, about tags I sent a topic last week about tags not being saved after the first picture (http://smashly.net/community/topic/tag-not-saving), that you forgot to answer or the solution was obvious, but I still couldn't find a way to go around it...

    Sorry, just one more question. To change to the PS Extend do I have to copy and paste my custom work or it works as an upgrade?

    Thanks again for your time Byron.

  4. Hi Jon,

    Cool...I did miss that question...I think I've got a bug. Look in that field and see if it comes up with a class like bwb_reset. There's a js function that clears those.

    If you do Extend, you don't have to do anything to your other work unless you've tweaked something that Extend relies on in PhotoSmash. It uses Layouts for creating the blog posts and for forming the Navigation block. So, unless you've changed layouts to work radically different from their normal operation, you should be fine. Extend is non-invasive to the regular plugin, but it does utilize a couple of the functions and relies on a hook or two.

    You're welcome!

    BB

RSS feed for this topic