• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 Imbedding Yahoo Finance charts/iframe

#2
I need an option to type in both the ID and the name of the ticker - in this case it's JASO, but this has to be customizable when I post the bb-code. Or I guess the {$id} could just start after /1.0/ ?

Also; I would like to have this chart embedded in every last post of certain threads on my forum. Is this doable on XenForo?
 
Last edited:

Brogan

XenForo moderator
Staff member
#5
It will be possible but you will need to create a custom BB code.
Which parts of the URL are configurable?
If there is more than one option you will probably need to do a PHP callback.
 
#6
I tried making a custom BB code, as [media]{$id}[/media]

with http://api.finance.yahoo.com/instrument/1.0/{$id} as "Match Url" and

Code:
<iframe allowtransparency="true" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" src="http://api.finance.yahoo.com/instrument/1.0/{$id}" width="200px" height="603px"><a href="[a href="http://finance.yahoo.com/q?s=JASO/">Quote[/a] for JASO/</a></iframe>
as "Embed HTML"

I then posted
Code:
[media]JASO/badge;chart=1y;news=3;quote/HTML?AppID=G3C_6ydNtWKEZeO8EBbEpQumONr_qdR5Z0a62xglFy4hnlP0uw--&sig=IRkmepku9zkDCxSJCYRvYUMcZtw-&t=1395040327895[/media]
but got no results. I also tried changing the {$id} to be just after "AppID=", but that didn't do anything either.

Are you able to make this work?