Dec 04, 2008, 01:35 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Search via SMF or Google: modx forums all of modxcms.com web
  MODxCMS.com   Forums   Help Login Register  
News:Donate to MODx: Donations
Pages: [1]   Go Down
  Print  
Author Topic: Fisheye / Dock Menu  (Read 3196 times)
0 Members and 1 Guest are viewing this topic.
bunk58
Committed to MODx
*****
Posts: 996


David Bunker


WWW
« on: Dec 17, 2007, 05:18 PM »

Here is a simple port of a Fisheye or Dock menu.
It is meant to be fairly quick and easy to get up and running so has a limited set of additional features.
Aimed at smaller sites and or users who aren't confident with template chunks?
See a working demo in two level mode at http://www.3913.co.uk.
The snippet embeds the standalone Javascript within the page.

The default set-up :
images based on the doc id e.g. 1.gif & 1_small.gif for the home page
image sizes to be 128 px & 64px respectively
directory path to be assets/snippets/fisheye/
outputs top level pages that are both published and show in menu

You can customise any of the above and more with a smallish range of optional parameters.

It's very basic PHP (my skill level) and could do with some tidying!
In particular the SELECT COUNT(*) query I used to check for no records to avoid output of useless HTML & JS.
I'm sure there's a better way of doing it along with the SELECT * FROM query to get the document data, if someone can offer advice.
Any help or feedback appreciated before possible release to a wider audience.

Regards,

David


* fisheye.jpg (13.46 KB, 450x141 - viewed 366 times.)
* fisheye.zip (109.13 KB - downloaded 308 times.)
« Last Edit: Dec 24, 2007, 11:17 AM by bunk58 » Logged

rthrash
Foundation
*
Posts: 9,577



WWW
« Reply #1 on: Dec 17, 2007, 10:20 PM »

Very cool and even plays nice with Safari!
Logged

MODx is a framework that allows web professionals to turn over sites to end-users for daily maintenance without worrying. Community participation and questions are encouraged, especially when you help us help you, read the wiki, and review snippet parameters – even if you have to look at the source. Searching the forums helps, too.
Ryan Thrash
MODx Co-Founder
Principal @ Collabpad
work productively.
work intelligently.
work together.
bunk58
Committed to MODx
*****
Posts: 996


David Bunker


WWW
« Reply #2 on: Dec 24, 2007, 11:21 AM »

I've updated the snippet to include an &orderField
I've also streamlined the DB Query using one of the DBAPI functions (must look into what else they can do!)

David
Logged

ganeshXL
Testers
*
Posts: 1,552



WWW
« Reply #3 on: Dec 24, 2007, 12:52 PM »

Works nicely once it's fully loaded, but for approx. 1-2 seconds, I see the big images overlapping content (see screenshot). Any chance to add a preloader or something?



* 3913.gif (112.47 KB, 999x610 - viewed 243 times.)
Logged

bunk58
Committed to MODx
*****
Posts: 996


David Bunker


WWW
« Reply #4 on: Dec 24, 2007, 01:12 PM »

I wondered if a preloader would help or not.
My thinking was that the large menu images are called earlier in the HTML than the JS that controls the transition from large to small  and therefore the delay was in waiting for the JS to do it's thing.
Or should I look at preloading the small images ready for the JS, which might minimise the delay?
Any help appreciated as I'm a beginner!
David
Logged

sinbad
Committed to MODx
*****
Posts: 506



« Reply #5 on: Sep 15, 2008, 08:53 PM »

David this looks HOT. I saw it few days ago and I think this is as close as I ever going to get to my Mac workstation im dreaming about.
but the large images do ruins it for me too, there gotta be a way and I wish you'll find it soon.
thanks for sharing!
Logged
VanMeter
Jr. Member
*
Posts: 32


« Reply #6 on: Oct 29, 2008, 03:42 PM »

Why don't you make it initially load the smaller images as the placeholder image? Seems like this would make more since anyways since they start small anyways until they are hovered. I didnt look at the script at all but it appears that the small image expands until it reaches full size and then is swapped out for the full size image to get rid of the pixelation.
Logged
bunk58
Committed to MODx
*****
Posts: 996


David Bunker


WWW
« Reply #7 on: Oct 30, 2008, 03:24 AM »

Thanks for the pointer.
The JS is not my strong point, but I'll look a bit deeper.
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP

Copyright © 2005-2008 MODxCMS, All rights reserved. Contact Us
Styles by ziworks.com

Powered by SMF 1.1.4 | SMF © 2005, Simple Machines LLC

Valid XHTML 1.0! Valid CSS!