Add php...

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Add php...

ORiOn16
I'm trying to add php on the shadowbox.js at the 'main:'

like this:


            main:       '<div id="shadowbox_overlay"></div>' +
                        '<div id="shadowbox_container">' +
                            '<div id="shadowbox">' +
                                '<div id="shadowbox_title">' +
                                    '
<div id="shadowbox_title_inner"></div><div id="shadowbox_toolbar_inner"></div>
' +
                                '</div>' +
                                '<div id="shadowbox_body">' +
                                    '<div id="shadowbox_body_inner"></div>' +
                                    '<div id="shadowbox_loading"></div>' +
                                '</div>' +
                                '<div id="shadowbox_toolbar">' +
                                '</div>' +
                               '<?php echo "text here..."; +
                            '</div>' +
                        '</div>',

but it does not work :(


or how can i add another, thing, that i can write for ex:
<*a rel='shadowbox;width=405;height=340' title='title of video here' href='link for youtube video' embedcode='embed code of the video'>click here</a*>

and then it show on the bottom of the video (when click) the embend code?

plz i really need that :(
Reply | Threaded
Open this post in threaded view
|

Re: Add php...

Straifer
I have asked the same question.  But, I believe that it has to do that the shadowbox.js file around line 360, utilizes just basic HTML which can not interprit PHP/ASP/JSP etc.  I modified the lines of code to include the required header content to interprit PHP/ASP/JSP but I have had no luck.

There has to be a variable in the code somewhere that that creates the overlay with HTML only.  If I could find it, perhaps I could define it as as ASP or PHP page.

If you get an answer please let me know because I would love to add links to download my vids.

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Add php...

Cykaos
In reply to this post by ORiOn16
To add a line of php you could use javascript in the shadowbox.js file to call a .php file that returns the html you need using ajax. You call link.php?params=whatever using javascript and that returns the html code you need for the dynamic link for that shadowbox and it inserts the html in the correct spot.

There might be better ways to do it but this is the easiest way I can think of.
Reply | Threaded
Open this post in threaded view
|

Re: Add php...

Straifer
In reply to this post by Straifer
Can you write an example of how you would call it?  I have tried various versions but can't even call a simple Javascript function.