![]() |
|
#1
|
||||
|
||||
|
hey gang -
i've been getting a few emails about using FPP w/ wordpress, so i thought i'd share my latest code here for example, see my site - http://www.samrohn.com 1st thing is to always use absolute, complete url paths in XML, etc, relative url's seem to cause probs i had been using kimli flash embed (see post 4 and after on this page) i've got WP rigged up now to display all my panos using a single xml and php file, all i need do is upload a .mov & .jpg file for each pano, put the file name into a custom field and hit publish currently, this involves 3 WP plugins, but this could also be done without any plugins at all, with a few small changes to the code below More Fields lets you create a custom box on the edit post page, i gave mine fields for pano file name, pano title, pan, tilt, zoom, one could do custom xml per pano too enzymes lets you pull these custom field values right into your posts (or sniplets), which are passed as url vars to the single php file which embeds the panos sniplets lets you include a predefined block of text inside a post,basically making a custom wp shortcode, like [snip pano1] sniplet code looks something like this, you could also put this right into you post as-is, or in a template with a few changes Code:
<a href="http://www.DOMAIN.com/path/to/panorama.php?pano={[ .pano-file ]}&pan={[ .pan ]}&tilt={[ .tilt ]}&zoom={[ .zoom ]}"><img src="http://www.DOMAIN.com/path/to/pano/{[ .pano-file ]}.jpg"/></a>
Code:
<embed src="http://www.DOMAIN.com/path/to/pano.swf?xml_file=http://www.DOMAIN.com/path/to/panorama.xml&panoName=http://www.DOMAIN.com/path/to/<?php echo $_GET['pano']; ?>&panHome=<?php echo $_GET['pan']; ?>&tiltHome=<?php echo $_GET['tilt']; ?>&zoomHome=<?php echo $_GET['zoom']; ?>" type="application/x-shockwave-flash" allowFullScreen="true"></embed> you could skip enzymes & sniplets by putting the code (with a few changes) into you template files, and more fields is basically just for convenience - please post any questions here, not to email or fpp mailing list - thanks sam Last edited by Sam Rohn; 02-07-2009 at 02:56 PM. |
|
#2
|
|||
|
|||
|
Hi There;
And there is a wordpress plugin for FFP here ...http://wordpress.org/extend/plugins/.../installation/ |
|
#3
|
||||
|
||||
|
the FPP-Pano plugin for wordpress only displays the panos in-line with no preview, so it can end up loading multiple panos on the same page which can slow things down quite a bit if you want more than one pano per page...
also, no support for lightbox-style overlay with the plugin this way you have a nice jpg for non-flash browsers like iphone, google can also index this image, etc, plus visitors don't load the pano until they request it, panos are loaded and closed one at a time - i had similar issues w/ multiple panos being open on one page using kimli & preview.swf, which is why i cooked this up... sam Last edited by Sam Rohn; 02-07-2009 at 07:22 PM. |
|
#4
|
|||
|
|||
|
Hi Sam,
I'm trying to get this to work (but unfortunately, I'm lost). Let me share my thoughts: 1st thing is to always use absolute, complete url paths in XML, etc, relative url's seem to cause probs O.K., by that, do you mean that I should open up my xml file and put absolute paths to the files (i.e. the FPP swf files)? or do you just mean something else? i've got WP rigged up now to display all my panos using a single xml and php file, all i need do is upload a .mov & .jpg file for each pano, put the file name into a custom field and hit publish This sounds great ... I'd love to be able to upload two files and publish!! I'm confused as to what that single xml file looks like and what exactly the php file is. More Fields lets you create a custom box on the edit post page, i gave mine fields for pano file name, pano title, pan, tilt, zoom, one could do custom xml per pano too I installed the above. Made one "box" for "Pano Fields" and two fields "Pano file" and Pano Title. enzymes lets you pull these custom field values right into your posts (or sniplets), which are passed as url vars to the single php file which embeds the panos I installed the plug in, but don't know what to do. sniplets lets you include a predefined block of text inside a post,basically making a custom wp shortcode, like [snip pano1] Same as enzyme above. sniplet code looks something like this, you could also put this right into you post as-is, or in a template with a few changes Code:
<a href="http://www.DOMAIN.com/path/to/panorama.php?pano={[ .pano-file ]}&pan={[ .pan ]}&tilt={[ .tilt ]}&zoom={[ .zoom ]}"><img src="http://www.DOMAIN.com/path/to/pano/{[ .pano-file ]}.jpg"/></a>
object/embed in pano.php looks something like this - Code:
<embed src="http://www.DOMAIN.com/path/to/pano.swf?xml_file=http://www.DOMAIN.com/path/to/panorama.xml&panoName=http://www.DOMAIN.com/path/to/<?php echo $_GET['pano']; ?>&panHome=<?php echo $_GET['pan']; ?>&tiltHome=<?php echo $_GET['tilt']; ?>&zoomHome=<?php echo $_GET['zoom']; ?>" type="application/x-shockwave-flash" allowFullScreen="true"></embed> So my main questions are. When you say to have absolute paths with XML, are you saying that anything referring to the XML should be absolute (which I'm pretty sure that's trued) but in addition, does anything written INSIDE of the xml need absolute paths? And I see that there's a pano.php file that you are referencing above. When and how does that get made in this process? I wish I felt a little closer to getting the WP blog to display panos, but I feel like I'm still pretty far from putting the pieces together. I'd be more than happy to pay you for your time if you could help, as I'd like to use this type of functionality with 3 different wordpress blogs. Thanks Sam!!!! |
|
#5
|
|||
|
|||
|
Quote:
I also tried to follow and understand Sams post. I've written a tutorial, on how to integrate Flash Panorama Player into WordPress. Based on that tut, you just upload your panorama, and insert one/two line of text to get your pano into your post. http://designest.de/2009/07/how-to-f...press/#english Best, Michael |
|
#6
|
|||
|
|||
|
Quote:
I am using WP2.8 and when i installed the required plugins like Enzymes and "More fields" I got the warnings that they are not yet tested for WP2.8 ,anyway I went ahead and installed them. Could that be the problem . Any help please. |
|
#7
|
|||
|
|||
|
the plugins could be a problem. but enzymes for example is just tested up to wp version 2.5. and for me, it works fine with 2.7.. and "more fields" is not really necessary..
can you supply a link to a (test-)page where you try to embed your pano and where the alt-text is shown? |
|
#8
|
|||
|
|||
|
Quote:
Solved the problem ,but using Kimli Flash embed plugin, which I had not activated earlier. In your method you did not mention about Kimli Flash Embed, does your method needs it or not clear to me. I just followed the instructions at the KFE plugin instructions and it is working fine. You can see my pano here: http://kvssetty.imagegallery.in/vr-tours-and-panos Thanks for the help and support. Regds KVS Setty |
|
#9
|
|||
|
|||
|
Good to here, that you solved the problem.
Actually, I don't have Kimili Flash Plugin installed. I got all my flash code included with the PHP script I mentioned in my tut. PS: Nice panos! |
![]() |
| Thread Tools | |
| Display Modes | |
|
|