PDA

View Full Version : Dynamic-FX Slide-In Menu (v 6.5)



taydu
10-24-2006, 01:09 AM
1) Script Title: Dynamic-FX Slide-In Menu (v 6.5)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/davidmenu.htm

3) Describe problem: I would like to use Dynamic FX Slide-In Menu with SMF (PHP Forum) to display the latest post of each category in Dynamic FX Slide-In Menu.

For example I have the following categories in SMF:

Category 1
Category 2
Category 3
..............
..............
..............
Category N

And in Dynamic FX Slide In Menu

Display Latest Post in Category 1
............................................
............................................
............................................
Display Latest Post in Category N

The forum already have the variable for the lastest post in each category, but how do I use that variable in Dynamic-FC Slide-In Menu so it will pull it straight from the forum.

Thanks for helping

mjunior
11-05-2006, 11:30 PM
This would be perfect for my site too...

I'd like to know something else (simplier)..
How to shift the slider direction from left to right?

jscheuer1
11-06-2006, 03:14 AM
To answer taydu's question, generally with PHP you have tokens or whatever that represent the server-side data that you want to have become a part of the HTML that is served to the user. How exactly these are placed on a page with the .php extension varies depending upon the package. The most common I've seen is something like this:


<? $Some_var ?>

or


<? echo $Some_var ?>

You can tell I'm not real up on PHP. These same tokens can go in a javascript file. For this script, particularly in this section:


// ssmItems[...]=[name, link, target, colspan, endrow?] - leave 'link' and 'target' blank to make a header
ssmItems[0]=["Menu"] //create header
ssmItems[1]=["<? echo $Some_var ?>", "<? echo $Some_var_link ?>", ""]
ssmItems[2]=["What's New", "http://www.dynamicdrive.com/new.htm",""]
ssmItems[3]=["What's Hot", "http://www.dynamicdrive.com/hot.htm", ""]
ssmItems[4]=["Message Forum", "http://www.codingforums.com", "_new"]
ssmItems[5]=["Submit Script", "http://www.dynamicdrive.com/submitscript.htm", ""]
ssmItems[6]=["Link to Us", "http://www.dynamicdrive.com/link.htm", ""]

ssmItems[7]=["FAQ", "http://www.dynamicdrive.com/faqs.htm", "", 1, "no"] //create two column row
ssmItems[8]=["Email", "http://www.dynamicdrive.com/contact.htm", "",1]

ssmItems[9]=["External Links", "", ""] //create header
ssmItems[10]=["JavaScript Kit", "http://www.javascriptkit.com", ""]
ssmItems[11]=["Freewarejava", "http://www.freewarejava.com", ""]
ssmItems[12]=["Coding Forums", "http://www.codingforums.com", ""]

of ssmItems.js - once you have placed them in there though, for the server to translate them to their value in the database or wherever it is held, the file must be named with the .php extension:

ssmItems.php

and called that way on the page that is using it:


<script src="ssmItems.php" type="text/javascript"></script>

mjunior
11-06-2006, 10:15 AM
Thanks,

It worked using response.write(variable) ...now I'm able to show the unreaded messages and other server-side updated information using a loop timer to retrieve the newest information...

Regarding the slide show direction...It's hard to get it sliding from my right?

jscheuer1
11-08-2006, 10:43 PM
Thanks,
Regarding the slide show direction...It's hard to get it sliding from my right?

You're welcome. Getting it to slide from the right is easy. But, then it would be sliding out of the page altogether and be mirrored in a way. I know this because I had tried modifying this script before for exactly that effect. The problem I had then was that the code was too sloppy (it includes code for (now) ancient browsers and the markup tags it used to generate its markup are coded in a very disorganized manner) for me to figure out and that I didn't realize that to slide in from the right would require a different sort of markup (generated or otherwise) and different motion engines to begin with.

I thought about this some more recently because of this thread, checked around using Google to see if there were any similar scripts readily available (didn't find one) and then decided to rewrite the code from scratch. I've got a working demo but, it isn't organized like the original at all and could use some commenting at least or perhaps a sort of 'front end' (similar to the ssItems.js file from the original) to make it more user friendly. I'm currently leaning toward a combination of the two and will let you know when I have that down.

There are some minor features I'm not certain I like the way they are worked out in my current working example:

http://home.comcast.net/~jscheuer1/side/menu_test.htm

But, you can have a look, if for no other reason than to get your hopes up and, if you are savvy, you can use it as is.

I would also appreciate it if you would at least try out the page and post any feedback on features it may not have or things that you think should be different.