What if there is no Flash support client-side

bre_mak - June 16, 2009 - 13:32
Project:Open Flash Chart API
Version:6.x-2.10
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

In a current project of mine, why used OFCA to build up a graph. It works fine :-).

The only thing that matter is when the page (which include the Flash Chart) is loaded by a browser that don't support Flash (i.e. the Adobe plug-in is not installed). In this case, the browser don't see that Flash is needed and then don't ask for the user to install it (it should ask for the user to install it).

Maybe if a tag was used instead of a tag (to include the chart in the page), it would solve the problem.

Another cool feature would be to add a function, in the API :

set_alt_message($string);

We could use it to :

set_alt_message(t("The chart can't be loaded since you're missing the Flash Plugin"));

The $string would be printed if Flash is not supported. It's esay to implement HTML-side with the element.

P.S : sorry if I describe the issue with wrong style. This is my first issue and i'm not native english-speaker.

#1

bre_mak - June 17, 2009 - 08:04

Sorry, i forgot to escape HTML, please read :

"Maybe if a <object> tag was used instead of a <embed> tag (to include the chart in the page), it would solve the problem."

and

"It's easy to implement HTML-side with the <object> element."

#2

pounard - July 6, 2009 - 12:33

I'm experiencing the same issue. If there is no flash support, there is just nothing.
Maybe it's an issue with the 1.5 version of SWFObject.

I tried to use 2.x version of this lib (hosted on google code), and tried to rewrite the PHP api to handle it right, but I experienced some problems, because JS code is like hanging all arround PHP class, there is no wrapper to write it right and alter it easily.

#3

pounard - July 6, 2009 - 15:27
Status:active» needs review

I made a quick and dirty patch which applies to latest stable release.
It adds a set_alternate_text($text) method to open_flash_chart_api class.

Hope it helps.

AttachmentSize
open_flash_chart_api.module-alternate_text.patch 1.28 KB
 
 

Drupal is a registered trademark of Dries Buytaert.