Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
BBCode - Embed Google Documents Collection (BB Code) Details »
BBCode - Embed Google Documents Collection (BB Code)
Mod Version: 1.00, by BirdOPrey5 (IB Staff) BirdOPrey5 is offline
Developer Last Online: Nov 2018 I like it Show Printable Version Email this Page

vB Version: 4.0.x Rating: (4 votes - 5.00 average) Installs: 66
Released: 19 Sep 2010 Last Update: 19 Sep 2010 Downloads: 210
Not Supported Re-usable Code Translations External Content  

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=1C1arwoUzUyzxnzk9yD7ysx6vyMfcDuDXXzQTqnngh2c&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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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.
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

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	ss_googledocs.png
Views:	636
Size:	28.2 KB
ID:	122130   Click image for larger version

Name:	ss_googlespreadsheet.png
Views:	694
Size:	20.5 KB
ID:	122131   Click image for larger version

Name:	ss_googlepresentation.png
Views:	543
Size:	17.9 KB
ID:	122132  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
BB Code Enhancements Jigzone.com BB Code - Embed Puzzles in your forums - (BBCode) BirdOPrey5 vBulletin 4.x Add-ons 30 27 Apr 2015 15:43
BB Code Enhancements BB Code - Twitvid - Twitter Videos - Embed (BBCode) BirdOPrey5 vBulletin 3.8 Add-ons 5 31 Mar 2012 06:05
BB Code Enhancements BB Code embed Videos from Google into posts. Vaupell vBulletin 3.8 Add-ons 2 31 Jan 2010 03:52

  #61  
Old 23 May 2014, 19:51
whodah whodah is offline
 
Join Date: Feb 2004
OK - so for Google charts, we are a bit stuck because ideally we would have 4 {param}'s available. As it stands now, we have two:
{param}
{option}

So I've set option = google charts "oid", and param = google charts chart number. I've hard coded the width to 800 and height to 600, and let users know they need to size their published charts to this size. Shy of installing a mod allowing multiple {param}'s, this is where we are. But it works well.


Title: Google Chart
BB Code Tag Name: BB Code Tag Name
Replacement:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Example:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Description:
Embed a Google Spreadsheet Chart. The chart will render at 800x600, so be sure to size your chart accordingly at Google Docs/Drive/Charts. This one is a bit tricky to use... The 'oid' of the link needs to be the option (i.e. [gc=oid_number]) and the chart number the parameter. It is just the way google charts does it.
Use {option}: yes
Button Image (Optional): -- create an image if you desire --
Remove Tag If Empty: yes
All other Disable options: yes

Feel free to clean it up more, but that gets it going at least.
Reply With Quote
  #62  
Old 26 May 2014, 21:55
klaush klaush is offline
 
Join Date: Oct 2005
Thanks; this made my day!

Originally Posted by kylek View Post
Just surfing on google and found this: https://support.google.com/drive/answer/3541068

"Starting in March and April 2014, Google Sheets users creating new spreadsheets will be automatically directed to the new Sheets. All previously created spreadsheets will remain in the older version of Sheets for now. If you need to create a spreadsheet using the old Sheets, you can do so at g.co/oldsheets"
__________________
Greetings

Klaus
Reply With Quote
  #63  
Old 17 Jun 2014, 05:22
Pittski Pittski is offline
 
Join Date: Nov 2010
Hmm, I tried messing around with it but can't seem to get it to work. The new spreadsheet link that is.

Anyone else get it working?

Key= has been replaced with /d/ now


Edit: I think I fixed it. Not positive. But here is the new code.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I replaced the /Key= part with /d/{param}/edit#gid=0 in both html lines, and it worked for me.

Edit 2:when it loads the spreadsheet it sends you to the top of the page. also if you click in the spreadsheet after clicking out of it, it will send you to top of the page. No idea how to stop that.

Last edited by Pittski; 17 Jun 2014 at 17:52.
Reply With Quote
  #64  
Old 16 Oct 2014, 21:10
Grimholtt Grimholtt is offline
 
Join Date: Nov 2010
Can anyone assist with this? After the changes were made by Google, I use the /d/ now and it loads the spreadsheet just fine, but now instead of just the cells appearing, I get the entire Spreadsheet including the Tools at the top.

For example:

I'm looking to see just this:



What I'm actually seeing:



Any way to clean this up that anyone knows about?
Reply With Quote
  #65  
Old 01 May 2015, 20:46
kylek kylek is offline
 
Join Date: Oct 2003
Real name: Kyle
Does the same for me shows everything, guess will stick to using the iframe code they give for the embed share link.
__________________

Last edited by kylek; 01 May 2015 at 21:10.
Reply With Quote
  #66  
Old 15 Mar 2017, 18:51
willie53's Avatar
willie53 willie53 is offline
 
Join Date: Nov 2016
Ok tried for about 3 weeks to get google spreadsheets working on vb 5.2.6 then on vb 5.3.0 alpha as it is something i really needed the way i was getting them to display the sheet was to embed it with iframe and to do this i had to enable html which is not a good idea so it was left to me do update the sheets.
I finally got it working the solution was staring me in the face i got the google docs working no problem but the spreadsheet would not so i compared the 2 sets of replacement code the spreadsheet code used single qoute ' instead of double qoute " so this is the amended code i am using now and works a treat


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Many thanks for this.
Regards Willie
Reply With Quote
  #67  
Old 14 Apr 2017, 22:27
willie53's Avatar
willie53 willie53 is offline
 
Join Date: Nov 2016
Here is a quick and easy way to install these bbcodes it can be done in admincp or in phpmyadmin simply run the sql query below i have tested this method on all versions of vbulletin from vb3.6.8 through 5.3.0 and it works on all versions though you may need to edit 1 word depending if you set a prefix for db tables the simply put the prefix in front of bbcode example is vbbbcode


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Last edited by willie53; 14 Apr 2017 at 22:31. Reason: wee typo
Reply With Quote
  #68  
Old 15 Apr 2017, 20:32
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by willie53 View Post
Here is a quick and easy way to install these bbcodes it can be done in admincp or in phpmyadmin simply run the sql query below i have tested this method on all versions of vbulletin from vb3.6.8 through 5.3.0 and it works on all versions though you may need to edit 1 word depending if you set a prefix for db tables the simply put the prefix in front of bbcode example is vbbbcode


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
VB 5.x doesn't have a plugin system to which this code would be compatible, FYI.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #69  
Old 16 Apr 2017, 01:28
willie53's Avatar
willie53 willie53 is offline
 
Join Date: Nov 2016
Originally Posted by BirdOPrey5 View Post
VB 5.x doesn't have a plugin system to which this code would be compatible, FYI.
It is actually running on my main site which can be seen @ this post https://cometbar.co.uk/forum/darts/4...pionship-stats

also have it installed on various versions of vb
Reply With Quote
  #70  
Old 16 Apr 2017, 17:56
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
My bad I thought you were supplying plugin code. Your code makes direct alterations to the BBCode table. Guess I should have looked closer.

I would still advise caution, there are reasons manual edits to database tables are last resorts. People shouldn't get in the habit of inserting BB Codes via direct queries. One mistake/typo and you can screw up your site.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #71  
Old 16 Apr 2017, 19:49
willie53's Avatar
willie53 willie53 is offline
 
Join Date: Nov 2016
I do agree there if you are not comfortable altering the database then leave it alone this is why i always use one of my my testing sites on my laptop before i put anything on my live site also i backup the database beforehand.
Reply With Quote
  #72  
Old 31 Aug 2017, 09:12
IggyP IggyP is offline
 
Join Date: May 2012
Originally Posted by Grimholtt View Post
Can anyone assist with this? After the changes were made by Google, I use the /d/ now and it loads the spreadsheet just fine, but now instead of just the cells appearing, I get the entire Spreadsheet including the Tools at the top.

For example:

I'm looking to see just this:



What I'm actually seeing:



Any way to clean this up that anyone knows about?
i am curious of this too....the extra header can be a security concern would be nice to hide it....also it now added a chat as well, which we dont really want....i tried hiding them by css, even tho its loading the main sheet from google, but fail...not sure what else to even try...

also have got errors loading spreadsheets like this:

GET filesystem:htt ps://docs.google.c om/persistent/docs/fonts/cCwcoZCh95jEfkePtzfl9_k_vArhqVIZ0nv9q090hN8.woff2 net::ERR_FILE_NOT_FOUND
Refused to display 'htt ps://docs.google.c om/sharing/init?id=14pmOx9znK02UTHeY7BdQKe792MML1f81CtO7I4DAnfM&foreignService=ritz&gaiaSer vice=wise&shareService=ritz&subapp=10&popupWindowsEnabled=true&shareUiType=defau lt&hl=en&authuser=0&rand=1504167017294' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
GET ht tps://docs.google.c om/sharing/init?id=14pmOx9znK02UTHeY7BdQKe792MML1f81CtO7I4DAnfM&foreignService=ritz&gaiaSer vice=wise&shareService=ritz&subapp=10&popupWindowsEnabled=true&shareUiType=defau lt&hl=en&authuser=0&rand=1504167017294[/url] net::ERR_BLOCKED_BY_RESPONSE

be nice to clean it up and secure it a little better but seems to basically work..vb4.2.5 php 5.6


oh and btw, that is result by using this replacement code which is the one that seemed to work for me

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Last edited by IggyP; 31 Aug 2017 at 09:19.
Reply With Quote
  #73  
Old 31 Aug 2017, 12:50
Kane@airrifle's Avatar
Kane@airrifle Kane@airrifle is offline
 
Join Date: Jun 2011
Real name: Kane
Add
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to your bbcode remove the toolbars.

Eg:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #74  
Old 01 Sep 2017, 05:15
IggyP IggyP is offline
 
Join Date: May 2012
Originally Posted by Kane@airrifle View Post
Add
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to your bbcode remove the toolbars.

Eg:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
that works perfectly thank you....i tried the same however for the google docs and didnt seem to work..is it slightly different there? i know that first part at least is the same with the updated "htt ps://docs.google.co m/document/d/{param}" format but the after part i tried matching your ss code then a few other ways and still failed..
Reply With Quote
  #75  
Old 01 Sep 2017, 09:58
Kane@airrifle's Avatar
Kane@airrifle Kane@airrifle is offline
 
Join Date: Jun 2011
Real name: Kane
Originally Posted by IggyP View Post
that works perfectly thank you....i tried the same however for the google docs and didnt seem to work..is it slightly different there? i know that first part at least is the same with the updated "htt ps://docs.google.co m/document/d/{param}" format but the after part i tried matching your ss code then a few other ways and still failed..
Try this for a Google Doc.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 15:44.

Layout Options | Width: Wide Color: