Anyone using Read Speaker?

Creating and modifying plugins.
Post Reply
Neut
Regular
Posts: 91
Joined: Sat Jun 17, 2006 7:51 pm
Location: NL, Earth
Contact:

Anyone using Read Speaker?

Post by Neut »

Is someone out there using Read Speaker (http://webreader.readspeaker.com/)? With RS it is possible to have the text of your post read out.

Unfortunately S9y is not supported. Code for manual implementation is available, bust somehow I get lost.
This code goes somewhere between <head> and </head>

Code: Select all

<script language="javascript" type="text/javascript" src="http://wr.readspeaker.com/webreader/webreader.js.php?cid=my_account_id"></script>
I added this to 'index.tpl', no problem.

With this code I can make the webReader button appear (I put it in entryFooter):

Code: Select all

<a href="http://wr.readspeaker.com/webreader/webreader.php?cid=my_account_id&t=blog_free&title=readspeaker&url=" onclick="readpage(this.href+escape(document.location.href),1); return false;">
<img src="http://media.readspeaker.com/images/webreader/listen_nl_nl.gif" style="border-style: none;"  title="Lees voor met webReader" alt="Lees voor met webReader" /></a>
<div id="WR_1"></div>
Change the 1, to the unique identifier (it can be for example the posted of the posts unique ID (string or integer).
The same unique identifier you need to set instead of the 1 in the code looking like this:
<div id="WR_1"></div>
My guess was '1' should be replaced by {$entry_id} after '(document.location.href),' and in the WR_1-but. Somehow this does not work.

Who can help?
Who is General Failure, and why is he reading my disk?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Anyone using Read Speaker?

Post by garvinhicking »

Hi!

This should do:

Code: Select all

<a href="http://wr.readspeaker.com/webreader/webreader.php?cid=my_account_id&t=blog_free&title=readspeaker&url=" onclick="readpage(this.href+escape(document.location.href),{$entry.id}); return false;">
<img src="http://media.readspeaker.com/images/webreader/listen_nl_nl.gif" style="border-style: none;"  title="Lees voor met webReader" alt="Lees voor met webReader" /></a>
<div id="WR_{$entry.id}"></div>
At least that's what I read from their instructions

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Neut
Regular
Posts: 91
Joined: Sat Jun 17, 2006 7:51 pm
Location: NL, Earth
Contact:

Re: Anyone using Read Speaker?

Post by Neut »

Hi Garv,
i followed the same logic, and tried that (my coding was 100% the same).
Read Speaker then reads all the blog entries on the page, not just the one entry from which the button clicked, so it seems that {$entry.id} is somehow not recognized.
Who is General Failure, and why is he reading my disk?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Anyone using Read Speaker?

Post by garvinhicking »

Hi!

Ah, then try to make the <div> that holds your serendipity blog entry (inside the foreach loop) get the <div id="WR_{$entry.id}"> loop. I think this must div contain what gets read?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Neut
Regular
Posts: 91
Joined: Sat Jun 17, 2006 7:51 pm
Location: NL, Earth
Contact:

Re: Anyone using Read Speaker?

Post by Neut »

Like this?

Code: Select all

<div class="serendipity_entry_body">
<a href="http://wr.readspeaker.com/webreader/webreader.php?cid=e3791bb2317489e9d757bd547301a95c&t=blog_free&title=readspeaker&url=" onclick="readpage(this.href+escape(document.location.href),{$entry.id}); return false;">
<img src="http://media.readspeaker.com/images/webreader/listen_nl_nl.gif" style="border-style: none;"  title="Lees voor met webReader" alt="Lees voor met webReader" /></a>
<div id="WR_{$entry.id}"></div>
			<!-- RSPEAK_START -->
                {$entry.multilingual_footer}{$entry.body}{if $entry.has_extended and not $is_single_entry and not $entry.is_extended}
            <a href="{$entry.link}#extended">Meer ...</a> 
            {/if}
            </div>
			{if $entry.is_extended}
            <div class="serendipity_entry_extended"><a id="extended"></a>{$entry.extended}</div>
            {/if}
			<!-- RSPEAK_STOP -->
			<div class='serendipity_entryFooter'>
			<span class="postedby"><a href="{$entry.link_author}" title="{$CONST.AUTHOR}">{$entry.author}</a></span> 
            {if $entry.categories}
			{foreach from=$entry.categories item="category" name="categories"}<span class="category"><a href="{$category.category_link}" title="{$CONST.CATEGORY}">{$category.category_name|@escape}</a>{if not $smarty.foreach.categories.last}, {/if}</span>{/foreach}
			{/if}
			<a href="{$entry.link}" class="date">{$entry.timestamp|@formatTime:DATE_FORMAT_ENTRY_ANDREAS}</a>
			{if $entry.has_comments}
			{if $use_popups}
			<span class="comments"><a href="{$entry.link_popup_comments}" onclick="window.open(this.href, 'comments', 'width=480,height=480,scrollbars=yes'); return false;">{$entry.label_comments} ({$entry.comments})</a></span>
			{else}
			<span class="comments"><a href="{$entry.link}#comments">{$entry.label_comments} ({$entry.comments})</a></span>
			{/if}
			{/if}


                {if $entry.is_entry_owner and not $is_preview}
                       - <a href="{$entry.link_edit}">{$CONST.EDIT_ENTRY}</a>
                {/if}


                {$entry.add_footer}
            </div>
        </div>
I guess not, because this doen not read the seperate entries.
Who is General Failure, and why is he reading my disk?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Anyone using Read Speaker?

Post by garvinhicking »

Hi!

No, replace:

Code: Select all

<div class="serendipity_entry_body">
with

Code: Select all

<div id="WR_{$entry.id}" class="serendipity_entry_body">
and then remove the existing WR_Div, because its not required anymore then.

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Neut
Regular
Posts: 91
Joined: Sat Jun 17, 2006 7:51 pm
Location: NL, Earth
Contact:

Re: Anyone using Read Speaker?

Post by Neut »

Mih, it still does not work.
It's OK with me if we leave it like that, unless you have the time and energy to think of something else. But I quess there may be more urgent matters.
Who is General Failure, and why is he reading my disk?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Anyone using Read Speaker?

Post by garvinhicking »

Hi!

Hm, but that should do the trick. Do you have an URL where this latest version is online for me to see?

It just needs to be made sure that this WR-Div thingie contains the part that should be read by that reader app.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Neut
Regular
Posts: 91
Joined: Sat Jun 17, 2006 7:51 pm
Location: NL, Earth
Contact:

Re: Anyone using Read Speaker?

Post by Neut »

Hi,

yeah I did not roll back the modifications, it's still out there.
(see WWW-link blow my forum name).
Who is General Failure, and why is he reading my disk?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Anyone using Read Speaker?

Post by garvinhicking »

Hi!

Ah, okay. Checking the code, the "WR_XXX" div only instructs where the player goes, not what it reads.

I have not found any API documentation, so I didn't find how they allow you to mark the portion of the page that is going to be read. Did you find such a documentation somewhere?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Neut
Regular
Posts: 91
Joined: Sat Jun 17, 2006 7:51 pm
Location: NL, Earth
Contact:

Re: Anyone using Read Speaker?

Post by Neut »

Hi Garvin,

Here are the instructions for manual installation:
http://cid-95cb5d0c808b1d6c.skydrive.li ... 0blogs.pdf
(uploading to board.s9y.org does not seem to work).

Also, here is de PHP-file of the Wordpress plugin, maybe it contains some clues how it is done:
http://cid-95cb5d0c808b1d6c.skydrive.li ... plugin.zip
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Anyone using Read Speaker?

Post by garvinhicking »

Hi!

Hm, the RESPEAK_START and RSPEAK_STOP things seem to do that. This looks fine on your page.

Please ask rspeaker for support, I don't think it's something wrong with your impelemntation...

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Neut
Regular
Posts: 91
Joined: Sat Jun 17, 2006 7:51 pm
Location: NL, Earth
Contact:

Re: Anyone using Read Speaker?

Post by Neut »

I did put in on hold for the time being. The speech-quality of the free versions is dissapointing. The commercial version is rather good. But I'm not willing to pay for this at the moment. Thanks for all your help.
Who is General Failure, and why is he reading my disk?
Post Reply