The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Member Topic Music

2 posters

Go down

Member Topic Music Empty Member Topic Music

Post by SpyroDragon January 8th 2015, 8:10 am

Is there a way where  members can insert custom background music into their topics.... Heres the challenge.... Automatically for every topic they create?
SpyroDragon
SpyroDragon
Forumember

Posts : 455
Reputation : 2
Language : English

http://tlos.forumotion.net/

Back to top Go down

Member Topic Music Empty Re: Member Topic Music

Post by Mad Scientist January 11th 2015, 10:35 pm

Hello @SpyroDragon,

Your demand is very weird but it is possible to do it (even if the solutions can vary and be very demanding for such a minor detail).

For example, one of the ways would be to use youtube of course because people don't just go and upload and host their music on some servers. Also, youtube has like all songs possible and embedding it you would not violate any copyrights. So, since youtube bbcode has no options (as far as I know) to autoplay, hide player etc, you would have to go with normal youtube embed code which looks like this:

Code:
<iframe  width="1" height="1"  src="//www.youtube.com/embed/OPf0YbXqDm0?autoplay=1" frameborder="0" allowfullscreen></iframe>

If you wish to have those buttons (play/pause), then extend width and height to something like 60/30px:

Code:
<iframe  width="60" height="30"  src="//www.youtube.com/embed/OPf0YbXqDm0?autoplay=1" frameborder="0" allowfullscreen></iframe>

For this code to work you will have to enable HTML in your posts. This is done via admin panel. Note that if you enable HTML, people could abuse it with using script tags to insert javascript code and possibly play with your forum's look a bit.

After all this, you need to create some javascript that would do your "automatic" work. It is not clear what you mean by automatically add music. It could be that your code randomly chooses a song from the pile and embeds it within post, or you might want something like: make javascript code to modify "New Topic" page and add an additional line below topic title for the youtube link, so that people would just paste the link and then you make a button next to it saying something like "Add music" (upon clicking, it would take the link and embed the whole code above into the post).

This would be one approach, but as you can see it's too much of a hassle for such a minor detail. Also, background music in topics would not sound so cool as you think it would.
Mad Scientist
Mad Scientist
New Member

Male Posts : 18
Reputation : 2
Language : English

http://www.duelacademia.com/

Back to top Go down

Member Topic Music Empty Re: Member Topic Music

Post by SpyroDragon January 12th 2015, 3:56 am

Bump
SpyroDragon
SpyroDragon
Forumember

Posts : 455
Reputation : 2
Language : English

http://tlos.forumotion.net/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum