HTML5 MP3 Player Support Product Page

Answered

Modify list display & behavior.

Asked 14 Dec 2012 23:14:36
1
has this question
14 Dec 2012 23:14:36 Sally Carr posted:
I'm using the Apple skin and want to add a line to the playlist that shows the date a mp3 was added.

I edited the code so it calls & repeats the date field as well as the title but my problem is that since it shows as two lines - one for the date, one for the title - and if the user clicks on the date it acts like an active link and gives them a 404 error.

Is there a way to fix that so that if they click on either line it plays the mp3 or if they click on the date it does nothing?

EDIT: I edited it so it's all in one <li></li> now and there are three fields shown (date, speaker, title). I modified the css so the 535 px wide and added some spacer dots between the fields so it really looks quite nice. But the problem is still that only clicking on the Title starts the message. Anything else in the row (date or speaker) goes to a 404 error.

The code looks like this:

<ol>
<?php do { ?>
<li><a href="messages/<?php echo $row_sermons['sermonsDate']; ?>"><?php echo $row_sermons['sermonsDate']; ?></a><img src="images/dot.gif" width="4" height="1" /> <img src="images/dot.gif" width="4" height="1" /><img src="images/dot.gif" width="4" height="1" /><a href="messages/<?php echo $row_sermons['sermonsSpeaker']; ?>"><?php echo $row_sermons['sermonsSpeaker']; ?></a><img src="images/dot.gif" width="4" height="1" /> <img src="images/dot.gif" width="4" height="1" /><img src="images/dot.gif" width="4" height="1" /> <a href="messages/<?php echo row_sermons['sermonsFileName']; ?>"><?php echo $row_sermons['sermonsTitle']; ?></a></li>
<?php } while ($row_sermons = mysql_fetch_assoc($sermons)); ?>
</ol>

Any help on how to fix this would be appreciated. Thanks.

Replies

Replied 17 Dec 2012 14:18:50
17 Dec 2012 14:18:50 Sally Carr replied:
Okay, I have it now so all three fields (date, speaker, title) show in the playlist and no matter which one I click on it will play the message. Here's the code:

<?php do { ?>
<li><a href="messages/<?php echo $row_sermons['sermonsFileName']; ?>"><?php echo $row_sermons['sermonsDate']; ?></a><img src="images/dot.gif" width="4" height="1" /> <img src="images/dot.gif" width="4" height="1" /><img src="images/dot.gif" width="4" height="1" /><a href="messages/<?php echo $row_sermons['sermonsFileName']; ?>"><?php echo $row_sermons['sermonsSpeaker']; ?></a><img src="images/dot.gif" width="4" height="1" /> <img src="images/dot.gif" width="4" height="1" /><img src="images/dot.gif" width="4" height="1" />
<a href="messages/<?php echo $row_sermons['sermonsFileName']; ?>"><?php echo $row_sermons['sermonsTitle']; ?></a></li>
<?php } while ($row_sermons = mysql_fetch_assoc($sermons)); ?>

The dot.gif keeps the fields nicely separated in the playlist. The only problem now is that whatever you click on to select the title (date, speaker or title) that is the field that shows in the playbar and I would like it to show all three fields in the playbar so they know exactly what's playing. If I try putting all three fields in the <php echo> code I can't insert the dot.gif to separate them so they all run together.

I hope you are able to help. Thanks.
Replied 17 Dec 2012 21:38:22
17 Dec 2012 21:38:22 Sally Carr replied:
In case anyone else has this problem,I got it to work by adding

echo $variable1 ." - ". $variable2;

in between places where I called for the date, speaker and title.

Reply to this topic