By zeezack on
I am looking for a sorting view module like this..
http://razorjack.net/quicksand/
how will one go about applying a dynamic sortable view like this
I am looking for a sorting view module like this..
http://razorjack.net/quicksand/
how will one go about applying a dynamic sortable view like this
Comments
Isotope
The isotope plugin has the same functionality, there's a sandbox project: http://drupal.org/sandbox/funkym/1072712
Nicolas
-------------------------
I'm looking for the same
I'm looking for the same thing.
Quicksand for drupal
Don't expect too much... I set this up in about 10 minutes...
http://pixelass.pixelass.de/graphicdesign
Using quicksand in Drupal 6...
It was a lot easier than expected... (using easeInBack right now...)
This might be offline within the next few days.. But I'll post a link when the site is done.
I'm using a lot of advanced mods to make drupal 6 work with jquery 1.4.x, 1.5.x and even 1.6.x
Hope you like it...
Greg this is awesome, can you
Greg this is awesome, can you post up a walkthrough/resource list?
Are you using views tabs with an ajax view to get this working?
Drupal Web Designers Surrey South East England www.lightflows.co.uk
Quicksand for drupal
-....duplicate post.... Sorry
I am currently trying to get
I am currently trying to get this to work in drupal 7
What I basically did is the following.
DRUPAL 6
1. get the term to display in the classes of the li elements of a list-view (in template.tpl.php)
2. modify the list output of the view (views-view-list.tpl.php)
PREFIX can be changed to anything you like
3. include the scrpits and stylesheet in the header for that page ( I have a custom folder just for the addons themes/extra/)
BE CAREFUL I am overriding the jQuery for that page so many modules will not work (anything that relies on jQuery and/or Ajax)
So you would need a wokaround if you need any of those modules or try the really complicated version of updating D6 to jQuery 1.4.1
I would basically just include tabs or accordeons in the same way if needed
so I include jQuery, the quicksand-script, the customized js for the behavior of quicksand, easing to use easing for a nicer animation.
4. that basically does the trick.. once set up it's pretty much dynamic and extendable via Views and Taxonomy.
(I hope I didn't forget anything) Since this is definitely nothing for newbies I guess the people interested can figure it out with the info given.
I am trying to get it to work in Drupal 7 since it can be done in a much cleaner way. since jQuery 1.5.1 is supported.
differences for for Drupal 7
- modify the output of the view list to include unique "id" AND a "data-type" for each li element. (the data-type is the the taxonomy term and used for sorting the elements)
this could also be done for Drupal 6 but I used a different approach.
- no need to add the terms to the classes in template.php (this is done via views by inclluding the term in a class.
- no need to replace jQuery so this can be fully integrated.
current Problems:
the taxonomy ter has to be the last term in the class.
the taxonomy terms need to be a certain number of characters for example all therms need to be 5 charachters long
I guess those two problems could be fixed but I don't have time right now to look at it.
I will use this for a webpage within this month so I can then tell you how it worked out for Drupal 7
I am just trying to get used to D7 (second approach) but I'm still a hater. THe only reason right now for giving this a try is the fact that jQuery is updated.
I am using a lot of jQuery and non-drupal plugins which I integrate in the same way I did with the quicksand module for my webpages and the cool new jQuery modules need 1.4.x or above.
SO ONCE AGAIN
THIS WILL BREAK jQuery MODULES ON DRUPAL 6
THIS WILL NOT WORK OUT OF THE BOX BUT REQUIRES SOME CONFIGS IN VIEWS TOO
THIS IS NOT FOR DRUPAL NEWBIES
THIS IS A WORKAROUND
THIS IS AN APPROACH I DID IN 10 MINUTES SO DON'T EXPECT IT TO WORK PERFECTLY
THE CODE ABOVE IS NOT THE ACTUAL CODE USED ON THE SAMPLE I POSTED EARLIER BUT A MODIFIED VERSION WHICH IS A LITTLE CLEANER
I'm more a workaround-finder than a module-writer but I think it should be very easy to make a cool module for this.. so if anybody is interested I am glad to help in any kind of way.
forgot to mention.... I am
forgot to mention.... I am currently looking at the isotope module mentioned above
DEMO: http://isotope.metafizzy.co/demos/basic.html
I think this one could also be integrated in a nice way maybe even a lot nicer than quicksand
gonna give it a try when I find the time...
Isotope works like a charm
here's a demo for Isotope in Drupal 7
http://web.pixelass.de/isotope
works like a charm so far.. (tested Chrome, Safari Firefox on Mac OS X so far)
I'll keep you updated and write a how to as soon as I have it perfect..
This is another 10 minute approach... still need a bit of tweaking and configuring..
Greg, many thanks for posting
Greg, many thanks for posting back - been away for a few days and didn't see you'd added comments.
Looks like a thorough write up, I'll have a good look when I'm in the office and check it out properly,
Many thanks!
Drupal Web Designers Surrey South East England www.lightflows.co.uk
You should definitely go with
You should definitely go with the isotpe module... It's a paid project for commercial sites but it's worth a lot more than it's actual price.
Free for all non commercial sites.
I was able to get it to work with Drupal7 in a pretty clean manner. Having problems in IE8 below.. All other browsers work perfectly. I only did browsershots so I can't really test it (testet 82 on browsershots.org)
I am using an Adaptive subtheme.. I guess I could opensource it since all the features are built into the theme itself.
Here's a quick how to on how I did this. (Including variable sizes and a few filters)
DRUPAL 7 ONLY DRUPAL 7 ONLY DRUPAL 7 ONLY DRUPAL 7 ONLY DRUPAL 7 ONLY
BEFORE
<?php print $styles; ?>BEFORE
<?php print $scripts; ?>(you need to include the jQuery too even though it will be overiden by the scripts from Drupal.)
(I couldn'nt get it to work if it is AFTER the scripts)
The code is not completely cleaned and modified, but works like a charm..
I changed the li elements to div elements for testing purpose
That's practically it.... I guess Internet Explorer is having a problem because of the way I inserted the scripts but I can't test it right now.
Next step
I managed to get infinite-scrollling to work too (built into isotope)
BUT....somehow the 2nd page will not load. The plugin loads all other pages. Can't figure out why. The setup is pretty basic but maybe there's something I didn't see. Well I post here If I figure it out.
.....EDIT:
OK I fixed it. The default currPage was set to 1 in the jQuery.ininite-scroll.min.js
I needed to change it to 0 since page 1 in Drupal has an id of 0 instead of 1.
Fixed the problem, so I guess it's pretty much perfect right now.
.....
.....EDIT again:
Stuff I changed:
only one BIG item at a timeStuff that needs to be changed:
only load new items from the selected category when scrolling (currently any new object will load)(fixed)when no scrollbar is visible new objects can't be loaded(fixed)....If anybody needs this, just ask. The setup should't take longer than 30 minutes.
.....EDIT
I just set this up for my little sister's webpage in about 10 minutes.
.....
If needed I can post a NEW how-to that is a lot cleaner and a bit more specific and detailed.
Still trying to figure out a few things about isotope.
....
Here's a demo of the isotope plugin WITH infinite-scrolling per category and URL-updating
http://web.pixelass.de/showcase
How to for D7
Hi Greg. Thank you for sharing your setup so far. I would very much like to see a clean and detailed setup guide, also if you've added any new tweaks fixes, it'd be great to see those too. Thanks!
This is a quick roundup. I
This is a quick roundup.
I will explain how to integrate the isotope-plugin in Drupal 7.
Features:
Dependencies:
Lets call the vocabulary "test-vocab" and the terms "type1" and "type2"
select unformatted list (default) as the display type.
create some fields. We definitely need three. The "Node title", "All Taxonomy Terms" and "Content:test-vocab".
You can exclude the terms from the display, since we only need these to create custom classes for that view
[term_node_tid] [field_test_vocab]as the Row class.make sure to put a space between those two patterns.
You need to make a text-field with php enabled.
In the header we will put the filters. It should look something like this.
We can now filter by type and change the order of the view elements.
this is a little customized to fit nicely in a 960 fixed layout. I included infinite scrolling and back-button support. Don't worry. I have a license for this so everything is fine with modifying the code.
(you should also buy a license even if you don't actually need it. The developer definitely deserves the money.
this doesn't have to be exactly the same, but this one will definitely work
the scripts need to be before the Drupal scripts
I added a "pusher" to make the viewport scrollable at any time (we need this to make sure we can load objects if the viewport is smaller than the user's screen)
it's best to create a custom html.php.tpl for that view to make sure you won't mess up anything else in your theme. (this is basic Drupal stuff)
the pusher (put this in your theme CSS
we need the isotope's css data. This has to be stripped to the needed classes as it will mess up your theme if you do not.
isotope is a pretty big package, so we really need to get rid of a lot of stuff.
Maybe I will find some time to make a custom css for this, but right now mine is pretty much modified to fit my theme. But I will definitely make this accesible for you guys.
the basic elements should be 130px x 130px the width2 and height2 classes should be set to 270px (height for height2 and width for width2) and the large elements should be set to width:550px; height:270px;
(remember this is needed if you are using my modified script in the footer of the view)
with filters I mean this part in your header of the view
That's it. The rest is dynamic and extendable via taxonomy.
I know this seems like a really long setup, but it should only take you a few minutes to actually do this. Most of it is pretty basic Drupal stuff.
look at a working sample here http://pixelass.de/showcase
You might want to hide the pagers (do not use display:none)
this is described here: http://drupal.org/node/1234704#comment-4869324 (includes a non javascript hack)
And again.. if anybody is interested in developing a module with me... please tell me. This would be a very cool module.
Hey Greg
I would be interested in developing this module with you. I I left a comment in the Views Isotope sandbox, but it seems the maintainer doesn't see or know how to use the issue queue yet. I'm very interested in seeing this in Drupal contrib and I already maintain a few Drupal that use jQuery plugins so can definitely help out. It would be good to get the maintainer of the Views Isotope sandbox on board too, will try a direct e-mail. We could develop the work on that sandbox with patches, or if we want to take a different approach, you can create a new sandbox and I can work on it by uploading patches to the queue. Are you on IRC btw?
Nicolas
-------------------------
So.. any news on this? I am
So.. any news on this?
I am currently looking into making modules, so I guess I will create a fresh (new) module for isotope. The creator of the first approach (the sandboxed module) seems to be an offliner.
Well, like I said, I'm not a pro-coder and this would be my first module, but I'm willing to give it a try...
Great tutorial ! I'm still
Great tutorial ! I'm still having some little problems : Could you make a link to
your view export txt file
(/admin/structure/views/view/isotope_view/exportso we can import the view and check it out in detail.Thanks
Views EXPORT
This is the view I am using for http://pixelass.com/showcase
But maybe if you tell me what problem you are having, I can give you some advice...
This should pretty much just plug 'n' play...
Would like to contribute
Greg,
We've recently been developing almost the exactly same behavior on a d6 site for one of our clients: http://mexicotoday.org
We make use of the JSON service module, and a custom states handler which basically uses jqbbq for browsers that support hashchange, but uses history.popState for more modern browsers (so we can actually have pretty urls [no #hashes]).
Our application states handler looks at the request url, and passes it as arguments to our view via service calls. We've extended JSON Service to support localized content as well.
We've built in infinite scroll but our implementation needs improved.
We started from scratch on this a while ago based on mosaic (pre-isotope), and we're actually going to be re-writing/refactoring a lot of the functionality for d7.
One thing we need to address is that depending on implementation, users may want to write their own javascript to handle application state changes. To address this, I intend to define a js "plugin" based solution. The way we intend to move forward with a module for this is to provide a "STARTERKIT" similar to how the zen theme does. The idea is that when a link is clicked, we use our states module set the URL/hash and to call a "Drupal.states.plugins" function which will define what the application should do.
JQ bbq is nice, but i think that we should roll our own that makes use of modernizr so we can support popStates with pretty URLs where available.
Basically, I'm of the opinion that while isotope is AMAZING, the functionality for hashchanges/popStates should be extendable and separate per implementation, that way the end user can define what the application does when the state changes.
I'm not sure if any d7 projects exist for this, but if not I'll start one. I'd like for us to develop these modules to easily interact. I think that the isotope/infinite scroll stuff could really benefit/make use of a solid states handler module. With d7, this should be made easier by the fact that JSON is built in.
Let me know your thoughts,
RJ
feature export
Wonder If you could export your content type & view via the features module :
http://drupal.org/project/features
This way we can import everything real easy.
Thanks for your great work !
open access demo
I cannot install a module on the site just to export things for you... sorry...
Do you think an open access demo site would help?
I could just make a demo with the isotope plugin and views, so everybody could look into the setup.
Just need to find some spare time.. I'm currently kinda lazy in my free time (work is killing me right now).
But I guess it's best to wait until someone decides to give me a chance... and teams up for module-development...
Please do setup an open source version.
Greg,
I greatly appreciate your effort.... I have been playing around with the isotope setup that you recommended since yesterday.
While I have made great progress in configuring things, being able to see exactly how you configured everything yourself would be greatly appreciated.
(Especially, the cool expandable boxes that give greater details when clicked.... then shrink back down if the user clicks again.)
Thanks.....
I have made a few more
I have made a few more websites using the isotope plugin.
Here's another approach for resizing the boxes and changing the content...(for Wordpress) http://dream-world.us. (The theme already used isotope, but I made some major changes to it's behavior)
The more I use this plugin, the more I realize what a really amazing plugin this is.
I am currently making a website that includes multiple isotope views on one page with different functionalities.
I am also integrating editable_fields to use the isotope plugin as an inline editor.
the size of each box can be set to relative or absolute with a grid system (inline editing)
the weight can be changed inline....
the content can be changed inline....
the images can be changed inline....
the terms can be changed inline...etc.
After this website is done I will start making a theme that integrates the isotope plugin, provide view exports, taxonomy exports and content-type exports.
That way the setup should only take as long as it takes to install a theme and import a few files.
I haven't had time to look into making a module for this but writing an entire theme for this seems to make more sense to me right now.
I guess I will be using the amazing ADAPTIVETHEME Core and create a subtheme for that.
Views Quicksand module (Sandbox)
Hi,
if anyone is still interested..
I created a Views Quicksand sandbox module (d7) which integrates into views as a style plugin. Therefore it should work with any content you can provide with views.
It would be nice if a few people could test it and provide feedback
making a module and theme
OK, so I have started writing a module but it's gonna take a little, since i'm pretty new to this stuff.
I have also started making a theme. it's a subtheme for ADAPTIVETHEMES.
The theme is still pretty blank, but includes a few jQuery scripts.
here's a new Demo of the isotope plugin for Views in Drupal7.
http://isotope.pixelass.com
The module is going to start off as a small module since I'm just learning how to make one.
The Module will provide two Views Style plugins, Taxonomies and a Content type. Of course other Taxonomies and Content types can also be used.
Progress:
To Do:
Create custom TaxonomiesWhy a theme AND a module?
The module itself should give a lot of options and the possibility to fit into any theme.
The theme will optimize and extend the workflow and behavior of the module.
History.js
https://github.com/balupton/History.js
Looks like it might work better than bbq -- features popState with hashchange fallback.
http://balupton.github.com/history.js/demo/ for the demo.
Let me know what you think
RJ
Sandbox for Isotope
http://drupal.org/sandbox/GregAdams/1308126