Welcome, Guest
Username Password: Remember me

Broken pop-up, related to podcast
(1 viewing) (1) Guest
  • Page:
  • 1
  • 2

TOPIC: Broken pop-up, related to podcast

Broken pop-up, related to podcast 04 Jun 2009 13:49 #922

When I access a study through the Studies List, the URL looks like this:

listeningtohope.com/index.php?option=com...id=175&Itemid=58

But when I click on the link given in the podcast feed, it looks like this, with special characters encoded:

listeningtohope.com/index.php?option%3Dc...dydetails%26id%3D175

In both cases, it loads the page fine. But in the second, the Listen button is shown above the Download instead of next to it--and when I hit Listen, it shows "Popup database error"

Attachment bsms_podcast.txt not found



Update: Whoops. I meant to edit the post below to add ths attachment, but I accidentally edited the wrong one. And I can't see how to delete an attachment.
Attachments:
Last Edit: 07 Jun 2009 15:23 by Tim Margheim.

Re:Broken pop-up, related to podcast 05 Jun 2009 07:29 #923

  • Tom
  • OFFLINE
  • Administrator
  • Posts: 860
In FireFox the download button appears below. Not sure what popup database error means. Probably something with AVR?
"You shall know the truth and the truth shall set you free." JC

Re:Broken pop-up, related to podcast 05 Jun 2009 15:23 #925

I suppose so, but I think the bug is being caused by the encoding in the second URL.

The podcast is generating URLs that say "option%3Dcom_biblestudy" instead of "option=com_biblestudy", and somehow that causes the buttons to display differently, and breaks the player.

Or... Hang on, I just realized that there was another difference between the two URLs. The buggy one (from the podcast) is missing the "Itemid=58" part. And if I take the functional link and delete the Itemid part, I get another broken link.

So maybe it's not happening because of the encoding.

But I just tried adding the Itemid to the broken URL from the podcast, and that didn't work either! The encoded URL is still broken, even with the missing parameter restored.

Can you fix the podcast generator, so that the link isn't written with encoded characters? And add the Itemid?

Update: I just saw another difference between the two links. In the functional link, the title of the page is "Sermons". But if you delete the Itemid or use the encoding, the title changes to "Hope Chapel Messages".
Last Edit: 05 Jun 2009 15:28 by Tim Margheim.

Re:Broken pop-up, related to podcast 07 Jun 2009 15:22 #926

w00t! I fixed the problem by hacking at the PHP. I've attached the fixed version.

The encoding of the URL wasn't the problem. (It's being done with rawurlencode(). Though it was only necessary to encode the ampersands in the url, not the whole URL. The XML is malformed with raw ampersands, but it handles the other characters fine.)

It was the missing Itemid. It looks like the Itemid is related to the Menu item through which you're viewing the study. If the Itemid is missing, it breaks the AVReloaded plugin. So in my copy of the bsms_podcastpublish.php, I added "&Itemid=58" onto the end of the URL. That cleared up the problem.

But I doubt you can just add that for general release. Wouldn't the Itemid be different for everyone? You would have to link the podcast to a particular menu item. That seems fairly difficult. (Or could you add a Menu Item parameter, "Use this menu item for viewing podcasts"? Then it could write its Itemid to the podcast database.)

But this might be useful, if you're going to include the Study URL in the podcast. It will let people control how it displays. And if you don't figure out a way to include the Itemid, there's not much point in including the URL at all!


P.S. I also added this line:
$title = str_replace(' - 0',"",$title);

Because I didn't like the " - 0" that showed up in the title when a Study had no scripture reference listed.

Is this a change you'd like to include for general release?

Attachment bsms_podcast-8b75392abc2c2b54a02856a2c5fd0b17.txt not found

Attachments:
Last Edit: 07 Jun 2009 15:25 by Tim Margheim.

Re:Broken pop-up, related to podcast 08 Jun 2009 07:35 #930

  • Tom
  • OFFLINE
  • Administrator
  • Posts: 860
In our next verson, 6.1.00, we are going to try giving the admin the ability to choose an ItemID for all links to the different views. We should also include that in encoding urls for the podcast xml files.
"You shall know the truth and the truth shall set you free." JC

Re:Broken pop-up, related to podcast 08 Jun 2009 09:06 #931

Ah, good. Will that involve manually entering a number? Or would we be able to select from a list of Items by name?
  • Page:
  • 1
  • 2
Moderators: Darren Vandermyde, Kyle
Time to create page: 2.25 seconds