[FM Discuss] getting iframe suitable pages from FLOSS Manuals

Tomi Toivio tomi at flossmanuals.net
Thu Dec 6 05:28:07 PST 2012


Seems like Bookipublisher data/remix/embed.js is pointing at a wrong address.

Line 80 is like "elems += '<li style="'+topicStyle+'"><a
style="'+linkStyle+'" target="flossframe"
href="http://localhost/bookipublisher/booki/'+page[0]+'/'+page[1]+'?skin='+_config["skin"]+'">'+page[2]+'</a>';"
so that "localhost" should be something like "en.flossmanuals.net".

And the embed code that Remix offers has addresses for scripts that
are not going to work outside of FM domain:

<script type="text/javascript" src="_templates/jquery/js/jquery-1.6.1.min.js">
<script type="text/javascript" src="data/remix/embed.js">

Probably doesn't make much sense to debug it on a mailing list? Maybe
I should try to fix this on the Finnish site.

If you can use PHP you could use curl to scrape the div like this, but
I don't know if this would be possible on the platform they are using:

<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,
"http://en.flossmanuals.net/thunderbird-workbook/");
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$fmcurl = curl_exec($ch);
curl_close($ch);
$start=strpos($fmcurl, "<div id=\"main-content\">");
$end=strpos($fmcurl, "</div>",$start);
$fmdivcontents = substr($fmcurl,$start,$end-$start);
echo $fmdivcontents;
echo "</div>";
?>


2012/12/6 adam <adam at flossmanuals.net>:
> you can already do this with the remix function...see the last option
> 'embed'
>
> adam
>
> On 12/06/2012 03:50 AM, Mick - Floss Manuals wrote:
>> Hi there,
>>
>> A bit of a tech question. I should know more about this sort of thing
>> but I don't.
>>
>> There are discussions going on with p2pu about putting more of FLOSS
>> Manuals content on to the P2PU.org website as courses. There's many
>> reasons why this is a good idea, more exposure for content, increasing
>> feedback on content, getting badged recognition for learning and because
>> they P2PU are supportive of what we are doing.
>>
>> Anyway - the question is - can we get FM.net content easily embeddable
>> in <iframes> on other sites?
>>
>> Say we take the first page of the Thunderbird Workbook
>> http://en.flossmanuals.net/thunderbird-workbook/
>> The goal would be to publish a page which only includes the contents of
>> <div id="main-content"> in that page, which could then be included in
>> the iframe?
>>
>> Is this something that is easily hackable as there is a course sprint
>> coming up on the 15th of Dec that FLOSS Manuals is involved with to
>> create a course and supporting documents for the School of Open in P2PU.
>>
>> nice one
>> Mick
>>
>>
>>
>> _______________________________________________
>> Discuss mailing list
>> Discuss at lists.flossmanuals.net
>> http://lists.flossmanuals.net/listinfo.cgi/discuss-flossmanuals.net
>>
>
> --
>
> --
> Adam Hyde
> Founder, FLOSS Manuals
> Project Manager, Booki
> Book Sprint Facilitator
> mobile :+ 49 177 4935122
> identi.ca : @eset
> booki.flossmanuals.net : @adam
>
> http://www.flossmanuals.net
> http://www.booki.cc
> http://www.booksprints.net
>
> _______________________________________________
> Discuss mailing list
> Discuss at lists.flossmanuals.net
> http://lists.flossmanuals.net/listinfo.cgi/discuss-flossmanuals.net



-- 
Best Regards
Tomi Toivio
Open Source Coordinator
http://fi.flossmanuals.net/
tomi at flossmanuals.net
+358453536625



More information about the Discuss mailing list