|
#31
|
|||
|
|||
|
Quote:
Code:
<script type="text/javascript">
var imagecount;
var pageLoad = function() {
imagecount = <?php include("templates/mytemplate/carousel.php"); ?>;
var carousel = new YAHOO.extension.Carousel("mycarousel",
{
numVisible: 7,
animationSpeed: .5,
scrollInc: 7,
navMargin: 40,
autoplay: 10000,
size: imagecount,
prevElement: "prev-arrow",
nextElement: "next-arrow",
prevButtonStateHandler: handlePrevButtonState,
nextButtonStateHandler: handleNextButtonState
}
);
};
YAHOO.util.Event.addListener(window, 'load', pageLoad);
</script>
__________________
My Gallery |
|
#32
|
||||
|
||||
|
hacks are cool too! the system has to have something fun for the geeks...but addons let everyone use them, so they are normally better
__________________
i should say more clever stuff |
|
#33
|
||||
|
||||
|
RAitch, I don't think using an include there will do what you want it to. It might work if the only output from carousel.php was the number of images. If the file your including is the PHP code you posted earlier, it won't work because it's going to assign all of the HTML output by PHP not just the number.
Essentially what that translates to is: Code:
imagecount = <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Get Image Count</title>
</head>
<body>
<div id="divInfoToReturn"> 123 </div>
</body>
</html>;
Using an include might work if the carousel.php looked like this: PHP Code:
__________________
My Photoblog If you find my help useful please consider feeding the PixelPost Kitty If you're short on cash just feed my ego Last edited by dakwegmo; 04-05-2007 at 03:45 PM. |
|
#34
|
|||
|
|||
|
I already made that change but didn't post it... just echoing the value. I didn't understand why the HTML code was required (borrowed starting point from another file).
I am echoing the result as mentioned and have tried the code as I've shown, but it doesn't work. Is there something wrong with the include I have? Don't worry, if I don't get it set as an addon... if I get this working I will post everything I did so somebody else can arrange it.
__________________
My Gallery |
|
#35
|
||||
|
||||
|
What exactly doesn't work? I uploaded the files to my server and it seems to work fine.
I created one file called carousel.php that looks like this: PHP Code:
PHP Code:
HTML Code:
<script type="text/javascript">
var imagecount;
var pageLoad = function() {
imagecount = 82 ;
var carousel = new YAHOO.extension.Carousel("mycarousel",
__________________
My Photoblog If you find my help useful please consider feeding the PixelPost Kitty If you're short on cash just feed my ego |
|
#36
|
||||
|
||||
|
bump...
__________________
i should say more clever stuff |
|
#37
|
||||
|
||||
|
Here is my contribution to the challenge:
http://www.pixelpost.org/forum/showthread.php?t=7047
__________________
My photoblog, powered by PixelPost 1.9 dev SVN | My Pixelpost Addons | My Cool Photoblog profile
|
|
#38
|
|||
|
|||
|
That's fabulous! Can't wait for the next versions. A piece of cake to implement, thanks for your efforts!
My implementation: http://seettl.com
__________________
My Gallery |
| Post Reply |
| Thread Tools | |
|
|