MyBB Community Forums

Full Version: MyCode Scribd
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
For those who want to embed documents from Scribd.com

Title: Scribd
Regular Expression: \[scribd\](.*?);(.*?)\[/scribd\]
Replacement:
<object height="600" width="100%" type="application/x-shockwave-flash" data="http://d1.scribdassets.com/ScribdViewer.swf" style="outline:none;" >        <param name="movie" value="http://d1.scribdassets.com/ScribdViewer.swf">        <param name="wmode" value="opaque">         <param name="bgcolor" value="#ffffff">         <param name="allowFullScreen" value="true">         <param name="allowScriptAccess" value="always">         <param name="FlashVars" value="document_id=$1&access_key=$2&page=1&viewMode=list">         <embed src="http://d1.scribdassets.com/ScribdViewer.swf?document_id=$1&access_key=$2&page=1&viewMode=list" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="600" width="100%" wmode="opaque" bgcolor="#ffffff"></embed>     </object>

In order for this code to work you will have to enter both - document and access key like this:

[scribd]doc_code;access_code[/scribd]

Document code is included in the scribd url after this part http://www.scribd.com/doc/ An example (the document code is in bold): www.scribd.com/doc/12345678/Some-Random-Document-Title

The access key can be found by pressing on Embed/Share button while viewing the document on scribd. Then choose embed option. In the box that appears you'll see link under "Share Fullscreen URL". For example www.scribd.com/full/12345678?access_key=r19e19d9g5g4 The access key (bolded) is the part after "access_key="

So in the code for such link would be the following:

[scribd]12345678;r19e19d9g5g4[/scribd]

This might not be the best mycode for scribd but it works.
really good job. it works.
not works show error when add [scribd]12345678;r19e19d9g5g4[/scribd] or anything else
this code not works anyone to provide support for this one??
Working fine here. Are you sure you have the correct access key?

Also, I've been trying to make the same mycode which allows you to embed the document automatically without any hassles of looking for access key and doc id(which means, the document will be automatically by just entering the "Share Fullscreen URL". But it doesn't work properly.

Regular Expression:
http://www.scribd.com/fullscreen/(.*?)?access_key=(.......................?)

Replacement:
<object height="600" width="100%" type="application/x-shockwave-flash" data="http://d1.scribdassets.com/ScribdViewer.swf" style="outline:none;" ><param name="movie" value="http://d1.scribdassets.com/ScribdViewer.swf"><param name="wmode" value="opaque"><param name="bgcolor" value="#ffffff"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><param name="FlashVars" value="document_id=$1&page=1&viewMode=list"><embed src="http://d1.scribdassets.com/ScribdViewer.swf?document_id=$1&page=1&viewMode=list" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="600" width="100%" wmode="opaque" bgcolor="#ffffff"></embed></object>

Somehow, I can't find a way to end the first (.*?)[or $1], as $2 keep getting ignored.

EDIT : Regular expression updated, now it works. But the post won't look clean. At the bottom of the flash player, there will be things like "target bla bla bla". I wonder how to fix this?
like i said so above code in first post not works for me even when i copy paste
[scribd]12345678;r19e19d9g5g4[/scribd]
error shows
Put key- before the access key scrobd has changed their format and this coode is old.
If you are having problems using this. I have made a new mybb code for this.

Regular Expression

\[scribd id=(.*?) key=key-(.*?) mode=list\]

To use this just grab the embed code for Wordpress.com

Example:
[scribd id=63283025 key=key-248q5nja98yoc2djq1k8 mode=list]

Replacement
Flash.
<object height="600" width="100%" type="application/x-shockwave-flash" data="http://d1.scribdassets.com/ScribdViewer.swf" style="outline:none;" >        <param name="movie" value="http://d1.scribdassets.com/ScribdViewer.swf">        <param name="wmode" value="opaque">         <param name="bgcolor" value="#ffffff">         <param name="allowFullScreen" value="true">         <param name="allowScriptAccess" value="always">         <param name="FlashVars" value="document_id=$1&access_key=key-$2&page=1&viewMode=list">         <embed src="http://d1.scribdassets.com/ScribdViewer.swf?document_id=$1&access_keykey=key-$2&page=1&viewMode=list" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="600" width="100%" wmode="opaque" bgcolor="#ffffff"></embed>     </object>

For HTML5
Replacement
<iframe class="scribd_iframe_embed" src="http://www.scribd.com/embeds/$1/content?start_page=1&view_mode=list&access_key=key-$2" scrolling="no" id="doc_$1" width="100%" height="600" target="_top" frameborder="0"></iframe<script type="text/javascript">(function() { var scribd = document.createElement("script"); scribd.type = "text/javascript"; scribd.async = true; scribd.src = "http://www.scribd.com/javascripts/embed_code/inject.js"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(scribd, s); })();</script>

See a demo using HTML5 here: http://forum.pinguyos.com/Thread-Getting...-the-forum