Readspeaker
-
Is it possible to install a Webreader like Readspeaker in my blog?
The blog I need help with is: (visible only to logged in users)
-
I’m sorry but there are resticted codes here at WordPress.com and without examining the code I cannot provide an accurate answer. Will you please post the code you have between backticks so we can do that? The backtick is found on the key to the immediate left of the number 1 key. It’s in lower case ` on the same key as the tilde ~ which is in upper case.
backtick
code
backtick -
This is the code:
|
<?php
/*
Plugin Name: WebReader for Word Press
Plugin URI: http://www.voice-corp.com
Description: Plugin that will allow users to listen to Word Press Blogs
Author: VoiceCorp International B.v.
Version: 1.2
Author URI: http://www.readspeaker.com
*/$alt[‘de_de’]=’Vorlesen mit webReader’;
$alt[‘sv_se’]=’Läs med webReader’;
$alt[‘en_us’]=’Listen with webreader’;
$alt[‘en_uk’]=’Listen with webReader’;
$alt[‘fr_fr’]=’Lis moi avec webReader’;
$alt[‘it_it’]=’Ascolta con webReader’;
$alt[‘es_es’]=’Escuchar con webReader’;
$alt[‘pt_pt’]=’Ouvir com webReader’;
$alt[‘nl_nl’]=’Lees voor met webReader’;function rspeak_script() {
$thecid = get_option(“customer_id”);
echo “<script language=’javascript’ type=’text/javascript’ src=’http://wr.readspeaker.com/webreader/webreader.js.php?cid=$thecid’></script>”;
}//Requiers that the function wp_head() is in the theme
add_action(‘wp_head’, ‘rspeak_script’);function rspeak_html($content) {
global $alt;
global $post;
global $wp;
if(is_feed()) {
return $content;
}
else {
$id = $post -> ID;
$permalink = get_permalink($post->ID);
$title = get_the_title($post->ID);
$thetime=get_the_time(“M d”, $post->ID );
$author = get_the_author($post->ID);
$cid = get_option(“customer_id”);
$lang = get_option(“lang”);
$rspeak_url = “ <img src=’http://graphics.readspeaker.com/images/wr/listen_REPLACE_LANG.gif’ style=’border-style: none;’ alt='”.$alt[$lang].”‘><div id=’WR_REPLACE_POST_ID’></div>”;
$keywords = array(“REPLACE_URL”,”REPLACE_TITLE”, “REPLACE_POST_ID”, “REPLACE_CUSTOMER_ID”, “REPLACE_VOICE”, “REPLACE_LANG”);
$replacements = array($permalink, $title, $id, $cid, $voice, $lang);
$this_rspeak_url = str_replace($keywords, $replacements, $rspeak_url);
$thereturn= “<!– RSPEAK_STOP –> $this_rspeak_url <!– RSPEAK_START –> $content <!– RSPEAK_STOP –>”;
return $thereturn;
}
}//If the_content() is called from the theme this one is used
add_filter(‘the_content’, ‘rspeak_html’);//If the_excerpt() is called from the theme this one is used
add_filter(‘the_excerpt’, ‘rspeak_html’);// Hook for adding admin menus
add_action(‘admin_menu’, ‘webreader_add_pages’);// action function for above hook
function webreader_add_pages() {
// Add a new submenu under Options:
add_options_page(‘WebReader Options’, ‘WebReader Options’, 8, ‘WebReaderOptions’, ‘webreader_options_page’);
}// webreader_options_page displays the page content for the WebReaderOptions submenu
function webreader_options_page() {
// variables for the field and option names
global $alt;
$opt_name1 = ‘customer_id’;
$opt_name2 = ‘lang’;
$hidden_field_name = ‘webreader_submit_hidden’;
$data_field_name1 = ‘customer_id’;
$data_field_name2 = ‘lang’;
// Read in existing option value from database
$opt_val1 = get_option( $opt_name1 );
$opt_val2 = get_option( $opt_name2 );
// See if the user has posted us some information
// If they did, this hidden field will be set to ‘Y’
if( $_POST[ $hidden_field_name ] == ‘Y’ ) {
// Read their posted value
$opt_val1 = $_POST[ $data_field_name1 ];
$opt_val2 = $_POST[ $data_field_name2 ];
// Save the posted value in the database
update_option( $opt_name1, $opt_val1 );
update_option( $opt_name2, $opt_val2 );
// Put an options updated message on the screen
?>
<div class=”updated”><p><?php _e(‘Options saved.’, ‘webreader_trans_domain’ ); ?></p></div>
<?php
}
// Now display the options editing screen
?>
<div class=”wrap”>
<h2><?php __( ‘WebReader Options’, ‘webreader_trans_domain’ );?></h2>
<form name=”form1″ method=”post” action=”<?=str_replace( ‘%7E’, ‘~’, $_SERVER[‘REQUEST_URI’])?>”>
<input type=”hidden” name=”<?=$hidden_field_name?>” value=”Y”>
<table class=”form-table”>
<tr valign=”top”>
<th scope=”row”><label for=”<?=$data_field_name1?>”><?php _e(“Customer Id:”, ‘webreader_trans_domain’ );?></label></th>
<td><input type=”text” name=”<?=$data_field_name1?>” value=”<?=$opt_val1?>” size=”20″></td></tr>
<tr valign=”top”>
<th scope=”row”><label for=”<?=$data_field_name2?>”><?php _e(“Language:”, ‘webreader_trans_domain’ );?></label></th>
<td>
<select name=”<?=$data_field_name2?>”>
<?php
foreach ($alt as $key=>$val) {
if ($key==$opt_val2) {
echo “<option value=’$key’ selected=’selected’>$key</option>”;
}
else {
echo “<option value=’$key’>$key</option>”;
}
}
?>
</select>
</td></tr>
</table>
</p>
<hr />
<p class=”submit”>
<input type=”submit” name=”Submit” value=”<?php _e(‘Update Options’, ‘webreader_trans_domain’ ) ?>” />
</p>
</form>
</div>
<?php
}
?>
| -
I’m sorry but we have no FTP access to free hosted WordPress.com blogs and we cannot upload plugins into our blogs here.
http://en.support.wordpress.com/ftp-access/
http://en.support.wordpress.com/plugins/That plugin can only be run on a WordPress.org install and your option is to hire a web host and get a free software install from WordPress.ORG and self host it.
- The topic ‘Readspeaker’ is closed to new replies.