EnglishDeutsch
newsletter icon
user icon password icon forgot password icon forgot username icon Registrieren
Bitte spenden Sie eine kleine Summe, wenn Sie Software von WebConstruction.ch verwenden, dass ich die Software weiter entwickeln und aktuell halten kann. mehr...
 
Betrag: 

 

Dear Forum Users. Please don't spam this forum. Your spam will be deleted and your account deactivated (I just click your username and you are gone). So don't mess around with your and my time.

Welcome, Guest
Please Login or Register.    Lost Password?

Dynamic Variables in Flashvars
(1 viewing) (1) Guest
Here you can ask all your questions about SWFContent Pro.
Go to bottomPage: 1
TOPIC: Dynamic Variables in Flashvars
#393
Dynamic Variables in Flashvars 1 Year, 8 Months ago Karma: 0
Hi Webconstruction
Is it possible to have a dynamic variable in a Flashvar paramater?

like...

upload_id=180

...whereby the '180' is generated by the query string in the URL

I have found a way using PHP, javascript etc, but wondered if it was possible within your component

Any help would be greatly appreciated
Many Thanks
silo71
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#398
Re:Dynamic Variables in Flashvars 1 Year, 8 Months ago Karma: 4
Hi,

The most easiest way, is to use a placeholder like {get}, which gets replaced with the request query after the rendering of the SWF-Object.

Example:

(Change 'upload_id' to how the request is called.)

Add...
Code:

$html = str_replace('{get}',JRequest::getInt('upload_id',0),$html);


...to the file /components/com_swfcontent/classes/swfcontent.class.php around line 651 right before ...

Code:

 $content = $this->_str_replaceFirst($swfPlaceHolders[$i], $html, $content);


In the SWFContent Pro Interface you would have to add {get} to your Flashvars (e.g. upload_id={get}).

Let me know if this helped you further or solved the problem.

Regards,

Milton
webconstructor
Admin
Posts: 329
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#399
Re:Dynamic Variables in Flashvars 1 Year, 8 Months ago Karma: 0
Ah!
Thank You so much!!
works perfectly, your assistance is greatly appreciated, just going to head over to JED to write a glowing review!

You da man!
silo71
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#400
Re:Dynamic Variables in Flashvars 1 Year, 8 Months ago Karma: 4
It's a pleasure.
webconstructor
Admin
Posts: 329
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1