How can I open Shadowbox from xml?

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

How can I open Shadowbox from xml?

pgk-2
Please, somebody can tell me How can I open Shadowbox from xml?

Best regards
Reply | Threaded
Open this post in threaded view
|

Re: How can I open Shadowbox from xml?

pgk-2
Help please :(

I need call a shadowbox into my wordpress from a xml file. Is very important for me.
I need your help


Sorry for my english

Best regards
Reply | Threaded
Open this post in threaded view
|

Re: How can I open Shadowbox from xml?

zulaica
Sorry, but I'm not familiar with calling JavaScript from an XML file. You might want to search for that.
Reply | Threaded
Open this post in threaded view
|

Re: How can I open Shadowbox from xml?

mjijackson
Administrator
In reply to this post by pgk-2
If you expect to receive some help, you'd better be a little more specific. By nature, XML is static and can't call anything.
Reply | Threaded
Open this post in threaded view
|

Re: How can I open Shadowbox from xml?

pgk-2
In reply to this post by pgk-2
Hello, sorry for my question :(

I have this:

        <tree name="Useful Links">
                        <folder name="Generales" type="documento">
                        <item name="Catálogo General" type="documento" url="http://www.eresalcantara.com/documentacion/TSD_escaleras_MoM.pdf"/>
                        <item name="Catálogo de Materiales" type="documento"  url="http://www.pgk.es" <b>rel="shadowbox;width=520;height=400"/>
                        </folder>
</tree>

But not found, i have a flash movie with a xml file and i embed that to my wordpress but i need to call the shadowbox function from the xml file to show a PDF file like the example.

I write in the xml file this: rel="shadowbox;width=520;height=400"/ but not found.

Any help?

Best regards
Reply | Threaded
Open this post in threaded view
|

Re: How can I open Shadowbox from xml?

Wizzud
As the documentation points out, Shadowbox will only work on A and AREA tags.

Also, PDFs are not supported! (because of the unreliability of scripts purporting to be able to determine whether the browser supports PDF).

You have the option of using a library, such as jQuery, to find your shadowboxable media, but you would have to do some parsing yourself (and gallery mode would not be available) ...

eg. (jQuery)...

Shadowbox.init({skipSetup:true});
var soptions = Shadowbox.getOptions();
$('item[rel^=shadowbox]').bind('click', function(){
    var me = $(this)
       , rel = me.attr('rel')
       , obj = { player : 'iframe' //default?
                 , content : me.attr('url')||''
                 , title : me.attr('name')||''
                 , width : 1*((rel.match(/width=(\d+)/)||[])[1]||0) //will zero open full screen?
                 , height : 1*((rel.match(/height=(\d+)/)||[])[1]||0) //don't know; could try 1000?
                 }
       , c = obj.content.split('.') //doesn't account for '?'!
       , typ = c[c.length-1]
       ;
    $.each(soptions.ext, function(p, a){ if(a[typ]){ obj.player = p; return false; } });
    if(obj.content){
      Shadowbox.open( obj );
    }
  });

NOTE : since I do not use XML myself, all the above is off the top of my head, and totally untested!
Combine literacy with curiosity and a whole world of information opens up to you
Reply | Threaded
Open this post in threaded view
|

Re: How can I open Shadowbox from xml?

pgk-2
Thanks so much for your help but... i don´t understend anything. This code goes....? and in the xml file, what i have to do?

Thank you
regards
Reply | Threaded
Open this post in threaded view
|

Re: How can I open Shadowbox from xml?

mjijackson
Administrator
Basically he's saying two things:

1) You need to parse the link to your content (in this case the PDF) out of your XML and inject it somewhere into your HTML document before you even start to use Shadowbox.

2) You can't use Shadowbox with a PDF.
Reply | Threaded
Open this post in threaded view
|

Re: How can I open Shadowbox from xml?

Wizzud
In reply to this post by pgk-2
What is happening with your XML?
- Is it a data file being read into an application?
...... If it is then it should be the resultant (X)HTML (and possibly the application) that is being looked into, not the XML
- Is it being displayed in the browser as a page in its own right?
...... Then, how do you load and run javascript and stylesheets?

If you don't know, I can't help. My experience of XML is purely as data files.

And please note what I said about PDF files - if that is the sole reason for you attempting to use Shadowbox then don't!
Combine literacy with curiosity and a whole world of information opens up to you
Reply | Threaded
Open this post in threaded view
|

Re: How can I open Shadowbox from xml?

pgk-2
In reply to this post by mjijackson
Hi , thanks for the answers. Now i have this url http://issuu.com/alcantara/docs/news_press_portu?mode=embed&documentId=080717193013-68cdaa9789614aa9a0c6d6d5f46c2478&layout=grey to show my pdf.

And now i need open this url from my xml file into my wordpress with shadowbox. From my wordpress haven't problems but from the xml file i can't, i don't know what can i do.

I try to do your comments...

thanks
regards
Reply | Threaded
Open this post in threaded view
|

Re: How can I open Shadowbox from xml?

Wizzud
Now it seems we are no longer talking about a PDF, but a web page.
However, I am still confused.
If it "works" in your Wordpress blog, please show us? Maybe we can then figure out what you need to do!

My problem is that I'm beginning to think the 'XML' is a bit of a red herring, and it's really Shadowbox within Wordpress wherein the problem lies!
I'm just not sure what is being opened from where and to show what!
Which of these are you trying to achieve?...
1. Get Wordpress to open the quoted url in a Shadowbox iframe
2. Get some other page to open Wordpress in a Shadowbox iframe (but then where does the XML come in?)
3. Get the XML (as a web page?) to open the quoted url in a Shadowbox iframe (but then where does Wordpress fit in?)

There are 2 (and only 2!) web pages involved here:
A. the page that contains the Shadowbox
B. the page that Shadowbox is required to display (in an iframe!)

Page B is (now!) obvious - it's the quoted url.
But what is Page A? Is it a Wordpress page, or some other page?
Combine literacy with curiosity and a whole world of information opens up to you
Reply | Threaded
Open this post in threaded view
|

Re: How can I open Shadowbox from xml?

pgk-2
Hello, this is the wordpress page: http://www.eresalcantara.com/productos/documentacion/es/

There is a flash with some icons. The flash works with a xml file and the icons call a web page.

Now i need show this page into shadowbox like, for example, the botom CUENTA in the rigth header.

The problem is that i don't know how call shadowbox from de xml needed in the flash icons.

Thank for your help

thanks
Regards
Reply | Threaded
Open this post in threaded view
|

Re: How can I open Shadowbox from xml?

Wizzud
So are you trying to activate Shadowbox from within a Flash object?


[PS. Your page errors out in IE7 and FF2 - and in FF2 I can't see the Flash.]
Combine literacy with curiosity and a whole world of information opens up to you