View Full Version : swfAddress & mod_rewrite
willfaulds
07-23-2009, 11:20 AM
I've searched and searched and though the answer seems to be 'no' i wanted to propose some ideas... Any thoughts would be really welcome.
Firstly I'll let you in on the bigger picture. I would like to offer visitors the option of HTML or flash content. So if you have flash installed and swfObject shows you the flash content - embeded in the flash would be a link to degrade to HTML if you wish (no splash pages!). That choice would be stored in a cookie and used on init of swfObject for futures visits.
Is it possible by any means to remove the hash from all URLs and still use swfAddress deep linking? For instance could I customise the swfAddress library to be specific to my domain.
I understand that swfAddress reads the url after the hash - so would it be possible to set it up to read url after "mydomain.com/"?
I'd like to find a solution to the problem of users being able to copy paste links with the hash and then those links not really working for SEO.
I'm also concerned about cloaking. Does anyone have opinions on the best SEO solution for flash. My content is all supplied by a flash cms (I've been nearly 2 years building a really robust solution) and I'm looking to improve its SEO integration before release.
willfaulds
07-23-2009, 06:06 PM
I have now digested more of the inner workings of swfAddress and is seems removing the hash would be impossible without a browser refresh - which would ruin the fluidity of flash in my opinion.
However I wonder if anyone here has any ideas about implementing a cookie controlling whether to display the flash or not.
At first I thought this would be very simple (at least controlling swfObject should be) but having pondered more about the hash addresses I'm looking for advice. Which script controls the redirection from hash addresses to non hash addresses when the required flash version is not found?
willfaulds
07-24-2009, 09:54 PM
I hope someone can help me decipher the purpose of the swfaddress-optimizer.js
As I understand it is responsible for the redirects (to the swfaddressed # version if you landed on the non-# version but have flash and vice versa). Please tell me if it does more or if I'm totally wrong.
I am trying to add a user preference to the swfaddress functionality. So a user may choose to view plain html is they prefer. The choice is stored in a cookie. That is checked by the js function isCookie. This all works BUT I can't figure out how to use the swfaddress-optimizer.js as if flash is disabled. I thought I might get away with setting an impossibly high version requirement (see "?flash=99" below) but that doesn't seem to work...
Below is a sample from a template file which is published via php (the [@tag]'s are replaced by the php script).
if (isCookie("flash")) {
//goto swfAddress url
document.write('<script src="[@js_url]swfaddress-optimizer.js?flash=[@flash_version]&swfaddress=[@deeplink_url]&base=[@base_url]" type="text/JavaScript"><\/script>');
} else {
//goto NON-swfAddress url
document.write('<script src="[@js_url]swfaddress-optimizer.js?flash=99&swfaddress=[@deeplink_url]&base=[@base_url]" type="text/JavaScript"><\/script>');
}As I have worked out so far; The swfaddress-optimizer.js takes 3 queries
flash = Number (required flash version)
swfaddress = String (url after #)
base = String (desired url before #)
Any ideas?
Does the SEO example help any... ?
http://www.actionscript.org/forums/showpost.php3?p=823780&postcount=4
willfaulds
07-25-2009, 10:24 AM
The SEO sample is where I've extracted my limited understanding of swfaddress-optimizer.js
Only 4/5 of the samples actually utilize swfaddress-optimizer.js
EDIT:
The swfaddress.js is the main JavaScript that provides deep linking functionality. The swfadress-optimizer.js performs some tricky redirections and is used only in the SEO enabled samples.
http://sourceforge.net/forum/message.php?msg_id=6390710
willfaulds
07-25-2009, 01:17 PM
[swfAddress 2.3]
Ok I made some progress but any thoughts really appreciated.
So as I said before I have worked out that swfaddress-optimizer.js can take 3 queries;
flash = Number (required flash version)
swfaddress = String (???)
base = String (url to file invoking the swfaddress-optimizer.js minus the domain*)
*I'm not exactly sure what it does yet but to get swfaddress-optimizer.js to function if its being called by a .php address in the address bar you need to set base = *.php . Weirdly it really doesn't seem to matter what the name is as long as the suffix is ok!
So I now have hash urls redirecting to non-hash urls (when flash is disabled). This redirect takes no notice of the swfaddress variable.
But I cannot get it to work from non-hash urls to hash urls. This is probably where the swfaddress variable should be used but I can't get it to work at all!
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.