[Plugin: Audiobar] Disable Download Button
-
So I went searching for a way to disable the download button from the way Audiobar displays MP3 files. I figured it out.
find this file to edit:
audiobar/templates/audiobar-buttons.phpIt should look like this:
<?php // The HTML for the clickable buttons ?> <span class="audiobar_container"> <?php // audiobar_title must directly follow audiobar_play with no whitespace ?> <?php if ($show_play_button): ?><a>'); top.play.location.replace(this.href + (top.audiobar.should_force_flash(<?php echo str_replace('"', "'", json_encode($extensions)) ?>) ? '&forceflash' : '')); return false;" href="<?php echo $wpurl ?>?audiobar=bar&play=<?php echo $base ?>&title=<?php echo urlencode($title) ?>&autoplay=1<?php if (in_array('oga', $extensions)) echo '&altogg' ?>" target="play" class="play">play</a><?php endif; ?><span class="audiobar_title"><?php echo $title ?></span> <?php for ($i = count($extensions) - 1; $i >= 0; $i-- ): ?> <a>" class="download"><?php echo $extensions[$i] == 'oga' ? 'ogg' : $extensions[$i] ?></a> <?php endfor; ?> <a>" class="text"><?php _e("Download") ?></a> </span>
There are two lines of code that must be removed.
The first is:
<a>" class="download"><?php echo $extensions[$i] == 'oga' ? 'ogg' : $extensions[$i] ?></a>
The second is:
<a>" class="text"><?php _e("Download") ?></a>
Once these two lines of code are deleted your file should look like this:
<?php // The HTML for the clickable buttons ?> <span class="audiobar_container"> <?php // audiobar_title must directly follow audiobar_play with no whitespace ?> <?php if ($show_play_button): ?><a>'); top.play.location.replace(this.href + (top.audiobar.should_force_flash(<?php echo str_replace('"', "'", json_encode($extensions)) ?>) ? '&forceflash' : '')); return false;" href="<?php echo $wpurl ?>?audiobar=bar&play=<?php echo $base ?>&title=<?php echo urlencode($title) ?>&autoplay=1<?php if (in_array('oga', $extensions)) echo '&altogg' ?>" target="play" class="play">play</a><?php endif; ?><span class="audiobar_title"><?php echo $title ?></span> <?php for ($i = count($extensions) - 1; $i >= 0; $i-- ): ?> <?php endfor; ?> </span>
Hope this helps people that have the same problem.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Plugin: Audiobar] Disable Download Button’ is closed to new replies.