vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   New Posting Features - Twitter BBCode (https://vborg.vbsupport.ru/showthread.php?t=287342)

kirby14 08-31-2012 10:00 PM

Twitter BBCode
 
1 Attachment(s)
Information:
  • Allows you to embed a Tweet in a post using only the ID.
  • You can reply, retweet, follow, etc. directly from inside the post.
  • Uses Twitter's oEmbed endpoint.

Usage:
[tweet]<id>[/tweet]

Known Bugs:
On vB4 there is currently an issue with the AJAX quick edit form while in Standard Editor mode. If you want to use the Standard Editor, you will need to do the fix listed below.

Fix For The Bug Listed Above: (vB4 only) in /clientscripts/ckeditor/ckeditor.js line 134 change:
Code:

for(command in y)q.getCommand(y[command]).setState(2);
to
Code:

for(command in y){if(!typeof y[command] === "undefined"){q.getCommand(y[command]).setState(2);}}
Install:
Read the install.txt file in the .zip. It is very simple.

Note: I changed the tag from twitter to tweet because I noticed someone already is using twitter.

github: https://github.com/kirby14/mach_bbcode_twitter

kirby14 09-01-2012 02:51 PM

Future Plans:
  • Fix the quick edit bug
  • Add twitter to the editor toolbar
  • Clean up code

dawges 09-01-2012 08:00 PM

Quote:

Originally Posted by kirby14 (Post 2361751)
Future Plans:
  • Fix the quick edit bug
  • Add twitter to the editor toolbar
  • Clean up code

Cant wait to try this after bug fixes. Thanks for this.

kirby14 09-01-2012 08:27 PM

Quote:

Originally Posted by dawges (Post 2361808)
Cant wait to try this after bug fixes. Thanks for this.

Yeah, the Twitter toolbar part should be simple but I haven't done a lot of javascript work and I don't know any YUI so I am counting on someone else from the community helping out.

I'll keep working on it, though.

kirby14 09-02-2012 06:10 PM

Ok, I posted a temporary fix. I'll try to pinpoint why there is an undefined object being added to teh array, but for now this should fix it.

Cybnext 09-04-2012 01:20 PM

Works on 3.8 as well. Not sure if the strip_bbcode hook does anything, but everything else is functional.

SpikeSaunders 09-04-2012 08:53 PM

Lovely, but for some reason on 4.2 it won't give your fancy look like in the screenshot. Works nicely, just no formatting, acts like indented text in the post
==

Just testing a new feature!
— E (@REDACTED) September 4, 2012

kirby14 09-04-2012 09:01 PM

Did you include the javascript line that is in the install.txt file? Just need to put it at the bottom of your headinclude file.

SpikeSaunders 09-04-2012 09:14 PM

Indeed! However, mine had a slight edit from a previous mod long removed. Replaced that with the new one, fixed. Heh. Thanks man!

kirby14 09-04-2012 09:26 PM

Quote:

Originally Posted by SpikeSaunders (Post 2362696)
Indeed! However, mine had a slight edit from a previous mod long removed. Replaced that with the new one, fixed. Heh. Thanks man!

No problem. I was honestly surprised someone hadn't already written it. It seems like something that could work out pretty well on a lot of installs.


All times are GMT. The time now is 06:05 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01164 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete