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.

SpikeSaunders 09-04-2012 09:31 PM

Yep. Only problem is when twitter dev team updates the API again which will break existing twitter mods everywhere just like last time :)

thedukeboard 09-07-2012 08:45 AM

Perfect. Thank you.

panosha 09-21-2012 10:07 AM

Excellent! Thank you. :)

The_____KinG 09-22-2012 07:17 PM

Installed it on VB 4.1.12 and nothing happens. I made the changes that were instructed in the install file. Any reason?.

kirby14 09-23-2012 12:39 AM

Did you try using a [tweet] tag? Nothing shows up in the ckeditor toolbar yet, you just have to manually type it.

The_____KinG 09-23-2012 02:03 AM

Yes, I have used the tags and I have manually edited the ckeditor.js file and replace the code you provided as suggested. But nothing changes.

kirby14 09-23-2012 02:12 AM

By 'nothing changes' do you mean you just see [tweet]<tweet id>[/tweet] in the post or something else?

The_____KinG 09-23-2012 09:15 AM

Quote:

Originally Posted by kirby14 (Post 2367796)
By 'nothing changes' do you mean you just see [tweet]<tweet id>[/tweet] in the post or something else?

Yes. [tweet]<tweet id>[/tweet] remains as is in the post.

burak61 09-23-2012 02:43 PM

It works on Chrome but doesn't work on Mozilla.

burak61 09-23-2012 04:18 PM

@kirby14 ;

How can I add a button for this ?

BTArep 09-23-2012 09:18 PM

I get this

Code:

Warning: require_once([path]/mach/bbcode_twitter/plugins/bbcode_fetch_tags.php) [function.require-once]: failed to open stream: No such file or directory in [path]/includes/class_bbcode.php(3719) : eval()'d code on line 2

Fatal error: require_once() [function.require]: Failed opening required '/home/sdfgsdfgg/public_html/mach/bbcode_twitter/plugins/bbcode_fetch_tags.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/sdasdfasdf/public_html/includes/class_bbcode.php(3719) : eval()'d code on line 2

Running VB 4.2.

Wseries 09-24-2012 08:47 AM

Installed on vB 4.2.0 and it appears to work however it's nothing like the example in the screenshot. Instead I just get a text version of the tweet. Any idea why?

Hamma 09-27-2012 01:51 PM

Sounds like you did not add the headinclude for the Twitter Widgets, check the install.txt

By the way this works great even in vB3 looking forward to new updates or features! :)

TheSupportForum 10-15-2012 11:49 PM

Quote:

Originally Posted by BTArep (Post 2368030)
I get this

Code:

Warning: require_once([path]/mach/bbcode_twitter/plugins/bbcode_fetch_tags.php) [function.require-once]: failed to open stream: No such file or directory in [path]/includes/class_bbcode.php(3719) : eval()'d code on line 2

Fatal error: require_once() [function.require]: Failed opening required '/home/sdfgsdfgg/public_html/mach/bbcode_twitter/plugins/bbcode_fetch_tags.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/sdasdfasdf/public_html/includes/class_bbcode.php(3719) : eval()'d code on line 2

Running VB 4.2.

move everything from your upload folder into the forum root
:)

Crotan 11-25-2012 05:13 PM

Very nice mod, not keen on mods that require file edits because it's one more thing to keep track of between versions, but overall very nice.

kirby14 11-27-2012 01:17 PM

Wow, sorry for not replying. Somehow I wasn't getting emails about replies to this mod (or maybe it was getting in my spam folder or something)

I'll look in to what is required to get the button added to CKEditor and let you know. I'm not sure there is a good way around the hack I had to do in the javascript file, though.

Chase 01-15-2013 12:00 AM

I know it's a vB4 mod but will it work on 3.8.7?

kirby14 01-15-2013 12:12 AM

I've heard from others that it runs in 3.8 just fine and doesn't require the javascript changes.

brz299 02-25-2013 05:30 PM

Works perfect on 3.8

Adeel786 03-25-2013 04:02 AM

Quote:

Originally Posted by burak61 (Post 2367946)
@kirby14 ;

How can I add a button for this ?

I second this question. I want to add a button for this in editor

EWGF 06-22-2013 07:44 PM

Quote:

Originally Posted by brz299 (Post 2406272)
Works perfect on 3.8

QFT :o

DTSpawn 07-21-2013 03:05 PM

Quote:

Originally Posted by Adeel786 (Post 2412110)
I second this question. I want to add a button for this in editor

Same here. Please provide some sort of instruction or smth...

obglobal.net 07-27-2013 03:49 AM

I would love to do this, but don't have the required technological awesomeness. Anyone willing to foster a noob for a day?

DF031 08-14-2013 04:02 PM

Hi all,

I tried to replace the code
(command in y)q.getCommand(y[command]).setState(2); --> (command in y){if(!typeof y[command] === "undefined"){q.getCommand(y[command]).setState(2);}}

But I can not find the first line in ckeditor.js

Any suggestions ?

ringnews24 08-19-2013 01:52 PM

I followed the instructions inside the zipped package.

Now my whole admin inteface is a white page.

Can you tell me what to do next, thanks?

ringnews24 08-19-2013 02:47 PM

Sorted and uninstalled with help from the support forum.

AshleyTwo 12-17-2013 01:40 PM

I've installed and it works fine in 3.8, but when you post it it's just plain text, but when you refresh/go back into the thread it works. Presume its something to do with the ckeditor script that needs editing (but isn't in 3.8). Is there something else I need to edit?

Dr. HaZaRd 12-26-2013 01:14 PM

Quote:

Originally Posted by DTSpawn (Post 2434703)
Same here. Please provide some sort of instruction or smth...

I join to this :D

john7911 12-26-2013 04:19 PM

Thank you ;)
I'll try it :)

MattGarner 06-23-2014 05:46 PM

Has anyone managed to get a button added to the editor for this?


All times are GMT. The time now is 02:23 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.01303 seconds
  • Memory Usage 1,808KB
  • 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
  • (4)bbcode_code_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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