Hey guys. Does anyone had success in embeding www.SoundCloud.com Codes? I tried HTML block and it just didn't save the code I also tried deano PHP Block and did work.
here is the code:
<iframe width="100%" height="166" scrolling="no" frameborder="no" src="http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F51326529&show_artwork=true"></iframe> |
inject direct into database.
I use it on one music site.
ManOfTeal.COM a Proud UNA site, six years running strong! |
Make BACKUPS
- Create HTML block on desired page for iframe
- Insert your page code (and I suggest when creating this block you insert your Language "key" i.e. "_games, _iframe")
- Open your phpmyadmin from you cPanel
- Open your Dolphin MySQL database
- Open and edit sys_page_compose
- navigate to the last page of list with the ">>" button
- find the caption "_games, _iframe" listed for the index page or the page you inserted the games or iframe code to
- re paste the game, iframes code into the "Content" field
- and click "Go"
- Clear cache
ManOfTeal.COM a Proud UNA site, six years running strong! |
There's no reason you should have to dive into the database if you are trying to post this as an admin. Search the forums for this issue.... it is related to TinyMCE stripping the iframe tag. My opinions expressed on this site, in no way represent those of Boonex or Boonex employees. |
Here's a copy of my /templates/base/scripts/BxBaseConfig.php file
Make note of all the instances of this code and add it to your file:
extended_valid_elements: "iframe[class|src|frameborder=0|alt|title|width|height|align|name]"
Pay close attention to the code where you insert this line. and don't forget any commas. Don't just use my copy of the file, because it calls plugins that you may not have available.
The issue here, for admins anyway, is that TinyMCE is designed to clean up code, and so that webmasters can use it as a standalone product that will strip basic attempts at posting malicious code.... this includes the use of the iframe tag. It is not necessary for TinyMCE to do this in Dolphin, because posts are filtered by HTMLPurifer before they are made permanent. HTMLPurifier is bypassed entirely for site admins... site admins should have enough sense not to post malicious code to their own website.
The above change to BxBaseConfig.php will not affect posts by regular members, and they still wil not be able to use the iframe tag, nor should they.
To allow admin use of the iframe tag in forum posts, you will have to make a similar edit to each of these files:
/modules/boonex/forum/layout/base_en/xsl/canvas_init.xsl
And
/modules/boonex/forum/layout/base_en/xsl/canvas_init.xsl
My opinions expressed on this site, in no way represent those of Boonex or Boonex employees. |
There's no reason you should have to dive into the database if you are trying to post this as an admin. Search the forums for this issue.... it is related to TinyMCE stripping the iframe tag.
So you suggest changing code, and what happens when those file are updated in future upgrades.
There are always different ways, to me edit the database is easy when you have several sites and don't know which ones have been edited, not all use iframes.
You best listen to HL, he does know every single thing there is to know.
ManOfTeal.COM a Proud UNA site, six years running strong! |
RE:
So you suggest changing code, and what happens when those file are updated in future upgrades.
There are always different ways, to me edit the database is easy when you have several sites and don't know which ones have been edited, not all use iframes.
You best listen to HL, he does know every single thing there is to know.
Dude, you seem really insecure, that's all I'm going to say.
My opinions expressed on this site, in no way represent those of Boonex or Boonex employees. |
Hate to quote my own post, but I forgot to attach BxBaseConfig.php so you can see an example. You can of course, directly edit your database every single time you want to post iframe code as an admin.... or you can make a few simple edits to source files, and eliminate the problem. The choice is yours.
Here's a copy of my /templates/base/scripts/BxBaseConfig.php file
Make note of all the instances of this code and add it to your file:
extended_valid_elements: "iframe[class|src|frameborder=0|alt|title|width|height|align|name]"
Pay close attention to the code where you insert this line. and don't forget any commas. Don't just use my copy of the file, because it calls plugins that you may not have available.
The issue here, for admins anyway, is that TinyMCE is designed to clean up code, and so that webmasters can use it as a standalone product that will strip basic attempts at posting malicious code.... this includes the use of the iframe tag. It is not necessary for TinyMCE to do this in Dolphin, because posts are filtered by HTMLPurifer before they are made permanent. HTMLPurifier is bypassed entirely for site admins... site admins should have enough sense not to post malicious code to their own website.
The above change to BxBaseConfig.php will not affect posts by regular members, and they still wil not be able to use the iframe tag, nor should they.
To allow admin use of the iframe tag in forum posts, you will have to make a similar edit to each of these files:
/modules/boonex/forum/layout/base_en/xsl/canvas_init.xsl
And
/modules/boonex/forum/layout/base_en/xsl/canvas_init.xsl
My opinions expressed on this site, in no way represent those of Boonex or Boonex employees. |
RE:
So you suggest changing code, and what happens when those file are updated in future upgrades.
There are always different ways, to me edit the database is easy when you have several sites and don't know which ones have been edited, not all use iframes.
You best listen to HL, he does know every single thing there is to know.
Dude, you seem really insecure, that's all I'm going to say.
not at all..
ManOfTeal.COM a Proud UNA site, six years running strong! |
Newton27. Good to see you around. And thank you for your help here. Hostonlively, Thank you man. Really appreciate.
Guy, I guess I was falling sleep at that time. Today I remember that I should place the code inside a _lang_key and call it from Deano PHP Block. like this.
Create a Deano PHP Block in content place this: echo _t("_lang_key"); and save
Go to Settings > Language Settings and create a New _lang_key. And put the Code inside there for English. In case you have more than one language, place the same code to all langs
work like a charm hehehe
Thank you all
|
You could also just do this in a php block.
echo '<iframe width="100%" height="166" scrolling="no" frameborder="no" src="http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F51326529&show_artwork=true"></iframe> ';
You can echo out html code with a php block. Just a matter of knowing how to do it.
https://www.deanbassett.com |
You could also just do this in a php block.
echo '<iframe width="100%" height="166" scrolling="no" frameborder="no" src="http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F51326529&show_artwork=true"></iframe> ';
You can echo out html code with a php block. Just a matter of knowing how to do it.
Awesome Deano! That works too. Thank you.
|
I guess putting it absolutely anywhere, site-wide as plain old html isn't an option? My opinions expressed on this site, in no way represent those of Boonex or Boonex employees. |
We have just developed a mod called, Sound Cloud Embedder. It works on the profile and also the bands page if you have modzzz bands mod. You can see it here: http://www.boonex.com/m/sound-cloud-embedder-2012-10-08 |
Hi, I refresh this topic since a long time looking for help in this and I can not find it. So maybe here :)
Is it possible to embed a code soundcloud or other (eg zippyshare) in the module "Music"?
I took a screenshot to explain exactly what I mean. Please advice
|
That is a great question, how can we set the sounds module to accept embedding?
soundcloud, reverbnation, youtube, etc?
|
There are 3rd-party modules which add this functionality.
That is a great question, how can we set the sounds module to accept embedding? soundcloud, reverbnation, youtube, etc?
Rules → http://www.boonex.com/terms |