Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
BBCode - Embed Google Documents Collection (BB Code) Details »»
BBCode - Embed Google Documents Collection (BB Code)
Version: 1.00, by BirdOPrey5 (Senior Member) BirdOPrey5 is offline
Developer Last Online: Aug 2023 Show Printable Version Email this Page

Category: BB Code Enhancements - Version: 4.0.x Rating:
Released: 09-18-2010 Last Update: 09-18-2010 Installs: 69
Re-useable Code Translations  
No support by the author.

Embed Various Google Docs

Live Demo: Here

Google Docs is a free service by Google. Google Docs are a professional collection of "Office" applications like a Word Processor, Spreadsheet, Presentation Designer, and Drawing tool. Google Docs is a serious alternative to the very expensive Microsoft Office. Documents are stored online, can be shared among users, and in the case of this BB Code they can be embedded in other web pages.

There are several BB Codes in this collection, Google Doc (Document), Google Spreadsheet and Google Presentation. Google Drawings can be embedded using the standard [img] tags but I will give an example here anyway.

You may get a warning message saying the {param}s aren't enclosed in quotes. You can hit "continue" to ignore this error. As you can see in the code there are eventually double-quotes.

When working on any Google Document in the top right of the window will be a "Share" button with drop-down arrow. Click on this arrow and choose "Publish to Web" or "Publish / Embed" and you will be given code to link to and/or embed the document. You will be given a URL such as:
https://docs.google.com/document/pub?id=1bhtK-AhiXqfWK5bGJcULvEO3zMahcFgnJEsT1YvYsuc

What you need is the document ID which is the long string of characters after "id=" or "key=" and before the ampersand (&) if present, in this case your id is:
1bhtK-AhiXqfWK5bGJcULvEO3zMahcFgnJEsT1YvYsuc

In all cases you put the ID between the appropriate tag for the type of document.

Google Document (Word Processor Document)
[gd]1bhtK-AhiXqfWK5bGJcULvEO3zMahcFgnJEsT1YvYsuc[/gd]

Google Spreadsheet
[gs]0AmOHO6Cm8vvAdFR2b0dMMnVwMUE0MlpXYnowWnowWWc[/gs]

Google Presentation
[gp]dcjktv94_1fcpptwqc[/gp]

Google Drawing
No special BB Code is needed to embed a drawing because it's rendered as any other image. Just put the URL given between IMG tags...
[IMG]https://docs.google.com/drawings/pub?id=1C1arwoUzUyzxnzk9yD7ysx6vyMfcDuDXXzQTqnngh2 c&w=640&h=480[/IMG]

To add one or more of these BB Codes follow any of the below instructions:

Add a New BB Code

Title: Google Document
BB Code Tag Name: gd
Replacement:
Code:
<div align="center"><iframe src="https://docs.google.com/document/pub?id={param}&amp;embedded=true&gid=0&output=html&widget=true" width="95%" height="500">IFRAME Not Available. <a href="https://{option}.google.com/document/pub?id={param}">Direct Link to Google Document</a>.</iframe></div>
Example:[gd]1bhtK-AhiXqfWK5bGJcULvEO3zMahcFgnJEsT1YvYsuc[/gd]
Description: Embed a Google Document.
Use Option: No
Button Image: (optional)
Remove Tag If Empty: Yes
All Disable Options: Yes

------

Add a New BB Code

Title: Google Spreadsheet
BB Code Tag Name: gs
Replacement:
Code:
<div align="center"><iframe width='95%' height='500' frameborder='0' src='https://spreadsheets.google.com/pub?key={param}&hl=en&single=true&gid=0&output=html&widget=true'>IFRAME Not Available. <a href="https://spreadsheets.google.com/pub?key={param}&hl=en&single=true&gid=0&output=html">Direct Link to Spreadsheet.</a></iframe></div>
Example: [gs]0AmOHO6Cm8vvAdFR2b0dMMnVwMUE0MlpXYnowWnowWWc[/gs]
Description: Embed a Google Spreadsheet.
Use Option: No
Button Image: (optional)
Remove Tag If Empty: Yes
All Disable Options: Yes

------

Add a New BB Code

Title: Google Presentation
BB Code Tag Name: gp
Replacement:
Code:
<div align="center"><iframe src="https://docs.google.com/present/embed?id={param}" frameborder="0" width="700" height="559">IFRAME Not Available. <a href="https://docs.google.com/present/view?id={param}">Direct Link to Presentation.</a></iframe></div>
Example:[gp]dcjktv94_1fcpptwqc[/gp]
Description: Embed a Google Presentation.
Use Option: No
Button Image: (optional)
Remove Tag If Empty: Yes
All Disable Options: Yes

------

In any of the above codes you can edit the height and width attributes to suit your needs.

------

------------------------------------------------------

Please "Mark as Installed" if you use this.
Donations always appreciated. :up:
Nominate MOTM if you LOVE it!

Check My Profile for other BB Code enhancements. They work on all versions.

Download the .txt file for a copy of the Install instructions.

Screenshots Attached:

Download Now

File Type: txt GoogleDocsBBCodev4.txt (4.0 KB, 238 views)

Screenshots

File Type: png ss_googledocs.png (28.2 KB, 0 views)
File Type: png ss_googlespreadsheet.png (20.5 KB, 0 views)
File Type: png ss_googlepresentation.png (17.9 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
blind-eddie

Comments
  #22  
Old 04-10-2011, 08:38 PM
VanHuek VanHuek is offline
 
Join Date: Jan 2011
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

http://docs.google.com/support/bin/a...n&answer=87809

https://spreadsheets.google.com/view...J0Q0E6MQ#gid=0
Reply With Quote
  #23  
Old 04-17-2011, 10:11 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, to do a Google Form:

Demo: http://www.juot.net/forums/showthread.php?t=47896

Example:
[gf]dDNJRFdVaXRxM2FTVXpnQlVlMHBZVnc6MQ[/gf]


Add a New BB Code

Title: Google Form
BB Code Tag Name: gf
Replacement:
Code:
<iframe src="https://spreadsheets.google.com/embeddedform?formkey={param}" width="760" height="1021" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe>
Example: [gf]dDNJRFdVaXRxM2FTVXpnQlVlMHBZVnc6MQ[/gf]
Description: Embed a Google Form.
Use Option: No
Button Image: (optional)
Remove Tag If Empty: Yes
All Disable Options: Yes
Reply With Quote
  #24  
Old 04-21-2011, 12:06 AM
Gamelobby's Avatar
Gamelobby Gamelobby is offline
 
Join Date: Jul 2007
Location: Long Beach, CA
Posts: 997
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

BirdOPrey, I got this..?
Quote:
The following BB Code replacement may not be properly formed. All HTML attributes should be enclosed within double quotes.

•<iframe src="https://spreadsheets.google.com/embeddedform?formkey={param}" width="760" height="1021" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe>
{param} is in bold

I hit continue, & it seems fine except it works for Google spreadsheets, but not Google docs.

*edit*
nevermind, i just realized this mod was originally for docs, so i need to try it first.



*edit2*
Whats the difference between a Doc, a Presentation, & a Form.?

Here is what im trying to make work.
Reply With Quote
  #25  
Old 04-21-2011, 05:34 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Google has various types of "documents."

Docs - which are like word documents, usually text mostly
Spreadsheets
Presentations
Drawings
and now Forms

It looks like yours is a "docs" document, you should try the instructions for the very first bbcode in this thread "Google Document."
Reply With Quote
  #26  
Old 10-23-2011, 07:38 PM
FReeSTER FReeSTER is offline
 
Join Date: Jun 2006
Location: Rome
Posts: 730
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Man this sucks, Im trying out the spread sheet and is showing just a blank iframe

Any ideas Bird?

thanks mate I really need this
Reply With Quote
  #27  
Old 10-23-2011, 11:20 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does the example spreadsheet show on your forum?

[gs]0AmOHO6Cm8vvAdFR2b0dMMnVwMUE0MlpXYnowWnowWWc[/gs]

You can see how the example should look here.
Reply With Quote
  #28  
Old 10-24-2011, 04:20 AM
FReeSTER FReeSTER is offline
 
Join Date: Jun 2006
Location: Rome
Posts: 730
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BirdOPrey5 View Post
Does the example spreadsheet show on your forum?

[gs]0AmOHO6Cm8vvAdFR2b0dMMnVwMUE0MlpXYnowWnowWWc[/gs]

You can see how the example should look here.
yes the sample works mate. Im trying this one in bold https://docs.google.com/spreadsheet/...cXBRTXZNZ0E&hl but all I get is a white iframe on the post.
Reply With Quote
  #29  
Old 10-24-2011, 08:46 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I get the message: We're sorry. This document is not published.

Here is how to Publish your document: https://docs.google.com/support/bin/...&topic=1360911

Note: It is NOT the same as setting your document's visibility.
Reply With Quote
  #30  
Old 10-24-2011, 10:54 AM
FReeSTER FReeSTER is offline
 
Join Date: Jun 2006
Location: Rome
Posts: 730
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you Joe, I fix the link sorry. I have try so many ways to add the link or the
{param} 0AuZfwFwa96-AdEpiTzFCX1Z6YWRpOEFZcXBRTXZNZ0E and it doesnt
work at all I was wondering if this is cause because that document have a - on the param?
Reply With Quote
  #31  
Old 10-24-2011, 11:40 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If the sample works on your forum th BBCode is entered correctly.

Your problem is you need to "Publish" your document in Google Docs- instructions were in the link in my previous post.

The dash (-) in the param doesn't matter.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:15 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04804 seconds
  • Memory Usage 2,355KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (4)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete