Page 1 of 1

Hello!

Posted: 13 Oct 2014, 16:30
by MOB
Been working with phpBB since 2005. I've done some mods myself to make forums I run have a bit more enhancements here and there. I'm glad to be here!

I signed up, because I wanted to offer a fix for the phpBB Radio MOD. Seems I can't reply to the official thread. Just need to know how I can do that?

Hello!

Posted: 13 Oct 2014, 16:45
by Stoker
Nice to see you here MOB :)
What kind of fix?

Hello!

Posted: 13 Oct 2014, 18:00
by MOB
Hey there! Stoker! Good to be here!

I wanted to share an issue I discovered with your version--I don't know if it's a fix or more like a bug report.

I've been using the Original Version: 1.4.0 since phpBB2 of this Radio MOD since 2005. Recently I've modified it so it can also accept and switch to mixcloud[dot]com stream accounts--a popular stream site for my type of members (DJs).

Yesterday when I found your mod for phpBB3 (which I like), I noticed that the PHP portion that handles the media players was split to HTML and the problem is the auto switch for the "radio type".

Let me explain:
On the original version, if in the radio.xml if I place the "radio type" to wm, the Windows Media Player will be used. If it's "rm" it should load the Real Media Player.

So on my modification, if I place "mc", it will switch to the embedded code for mixcloud and it loads fine.

The problem:
The problem is that on your version, it doesn't seem to obey the command to switch to the mixcloud media player. Maybe a bug on your version?

Here is the PHP code I am currently using on the old PHP Radio Mod version, which works on my site. ~~sorry had to attach the code in txt format, since I am not authorized to post url links. -- the url links are within the code...
mixcloud_code.txt
Mixcloud Live Radio Player
(2 KiB) Downloaded 116 times
You can test my live radio link on my site found here: mixingonbeat[dot]com (top right menu next to FAQs link) -- if you click on the last link "MOB"s TagTeams and Mixes" it will change to a mixcloud media player.
live_radio_mixcloud.jpg

On your new Radio MOD version this code needs to be added to the radio.html template file. So I added the following mixcloud code within. See attachment below again.
mixcloud_code_2.txt
(1.94 KiB) Downloaded 106 times
As you can see, basically I added: <!-- ELSEIF NP_TYPE eq "MC" --> , but it doesn't seem to switch.

So did I do something incorrectly or is the ELSEIF not the correct syntax command?

Out of curiosity what does the "eq" stand for after NP_TYPE?

Hello!

Posted: 14 Oct 2014, 06:42
by Sniper_E
<!-- ELSEIF NP_TYPE eq "MC" --> is the same as <!-- ELSEIF NP_TYPE == "MC" -->
If it is equal to

<!-- ELSEIF not NP_TYPE eq "MC" --> is the same as <!-- ELSEIF NP_TYPE != "MC" -->
If it is not equal to

Hello!

Posted: 14 Oct 2014, 16:18
by MOB
Would those syntax still work on an HTML file? Maybe that is where the issue is?

Hello!

Posted: 15 Oct 2014, 07:39
by Sniper_E
Sure, we use <!-- IF --> statements in the html templates all the time. <!-- ENDIF -->

If NP_TYPE = MC then it should show what is in that section...
Is the mixcloud media file defined somewhere as MC? I don't know this mod.
Or is ($oidar[$radio]['type'] defined as NP_TYPE to use in a template?

In one of those txt files it looks like you are trying to use an <!-- IF --> statement inside the <?php codes
Maybe that is the problem. I'l have to leave this issue with you smarter people. Over my head.

Hello!

Posted: 15 Oct 2014, 19:17
by MOB
@Sniper_E, yeah, you are bit confused.

The first TXT is code that works if all the html code is within PHP--it's the old Radio MOD since phpBB2 and that one handles the media player switching according to what I put in the radio.xml file -- that file is where "mc" is entered so it switches to that media player for that channel.

The second TXT is the one I am trying to make work with this new version of the Radio MOD (which splits to an HTML file for it's template, unlike the original version), but I have a feeling that this auto switch is broken because it's on a HTML file or I am not using the right Syntax?

Thanks for at least trying to provide some support. :)

Hello!

Posted: 17 Oct 2014, 05:25
by Sniper_E
Yes MOB I stay very confused. You work way over my head with this coding stuff.
There are a few good developers that could work with you on this.
Good luck with your project! I have a feeling you will figure it all out.