• I am using this VERY cool plugin on a wordpress mu install. When I link to an mp3 in a normal post I have absolutely no Issues. However I am using another plugin called Surveys. https://www.ads-software.com/extend/plugins/surveys/.

    When I add the audio player to a survey question It doesn’t do anything. I still see a link to the file instead of the player. I looked at the database to see how the link was being inserted and it was adding slashes to the link. So I looked at the source of the plugin and added stripslashes where it echos the content. Still nothing. Is there something that I’m missing?

    The source code for his plugin is.

    foreach ($question as $ques) {
    	echo "<div class='survey-question' id='question-$question_count'>";
    	echo "<div>" . stripslashes("{$ques->question}</div>");
    	echo "<input type='hidden' name='question_id[]' value='{$ques->ID}' />";
    	$all_answers = $wpdb->get_results("SELECT ID,answer FROM {$wpdb->prefix}surveys_answer WHERE question_id={$ques->ID} ORDER BY sort_order");

    I’m lost. Please help.

Viewing 1 replies (of 1 total)
  • doryphores

    (@doryphores)

    OK. I had a quick look at the Surveys plugin and I think I have found a solution:

    Edit the show_survey.php file and replace line 118:

    echo "{$ques->question}\n";

    with:

    echo apply_filters("the_content", $ques->question);

    This will apply the normal WP content filters to the question. But, for some unknown reason, the Surveys plugin adds backslashes to single and double quotes so you will need to use the [audio] syntax in the question box.

    So in the question box, use [audio:https://yourdomain.com/path/to/mp3file.mp3] instead of inserting a link.

    This should work.

    Martin

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Audio Player] Only Replaces some .mp3 files’ is closed to new replies.