The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
BBCode - Embed Google Documents Collection (BB Code) Details »» | |||||||||||||||||||||||||||||||||||
BBCode - Embed Google Documents Collection (BB Code)
Developer Last Online: Aug 2023
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}&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> 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> 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> 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
Screenshots
Show Your Support
|
Благодарность от: | ||
blind-eddie |
Comments |
#62
|
|||
|
|||
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: Code:
<iframe height=600 width=800 src="http://docs.google.com/spreadsheets/d/{param}/gviz/chartiframe?oid={option}" seamless frameborder=0 scrolling=no></iframe> Code:
[gc=408452327]1enPIPGRIyIHTYF2-IJokCPVUXWsRw7v_ZZUljfGAyTo[/gc] Quote:
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. |
#63
|
|||
|
|||
Thanks; this made my day!
Quote:
|
#64
|
|||
|
|||
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. Code:
<div align="center"><iframe width='95%' height='500' frameborder='0' src='https://docs.google.com/spreadsheets/d/{param}/edit#gid=0&hl=en&single=true&output=html&widget=true'>IFRAME Not Available. <a href="https://docs.google.com/spreadsheets/d/{param}/edit#gid=0&hl=en&single=true&output=html">Direct Link to Spreadsheet.</a></iframe></div> 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. |
#65
|
|||
|
|||
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? |
#66
|
|||
|
|||
Does the same for me shows everything, guess will stick to using the iframe code they give for the embed share link.
|
#67
|
||||
|
||||
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 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> Regards Willie |
Благодарность от: | ||
BirdOPrey5 |
#68
|
||||
|
||||
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
Code:
INSERT INTO `bbcode` (`bbcodeid`, `bbcodetag`, `bbcodereplacement`, `bbcodeexample`, `bbcodeexplanation`, `twoparams`, `title`, `buttonimage`, `options`) VALUES (3, 'gd', '<div align="center"><iframe src="https://docs.google.com/document/pub?id=%1$s&embedded=true&single=true&gid=0&output=html&widget=true" width="95%%" height="500">IFRAME Not Available. <a href="https://{option}.google.com/document/pub?id=%1$s">Direct Link to Google Document</a>.</iframe></div>', '[gd]1bhtK-AhiXqfWK5bGJcULvEO3zMahcFgnJEsT1YvYsuc[/gd]', '[gd]1bhtK-AhiXqfWK5bGJcULvEO3zMahcFgnJEsT1YvYsuc[/gd]', 0, 'Google Docs', '', 31), (5, 'gs', '<div align="center"><iframe width="95%%" height="900" frameborder="0" src="https://spreadsheets.google.com/pub?key=%1$s"&hl=en&single=true&gid=0&output=html&widget=true\'>IFRAME Not Available. <a href="https://spreadsheets.google.com/pub?key=%1$s"&hl=en&single=true&gid=0&output=html">Direct Link to Spreadsheet.</a></iframe></div>', '[gs]14pmOx9znK02UTHeY7BdQKe792MML1f81CtO7I4DAnfM[/gs]', '', 0, 'Google Spreadsheet', '', 31), (6, 'gp', '<div align="center"><iframe src="https://docs.google.com/present/embed?id=%1$s" frameborder="0" width="700" height="559">IFRAME Not Available. <a href="https://docs.google.com/present/view?id=%1$s">Direct Link to Presentation.</a></iframe></div>', '[gp]dcjktv94_1fcpptwqc[/gp]', '', 0, 'Google Presentation', '', 31); |
#69
|
||||
|
||||
Quote:
|
Благодарность от: | ||
seb5594 |
#70
|
||||
|
||||
Quote:
also have it installed on various versions of vb |
#71
|
||||
|
||||
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. |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|