News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Auto Tweet Embed

Started by vbgamer45, January 11, 2015, 03:21:09 PM

Previous topic - Next topic

Arantor

@vbgamer45: if someone ever does a UTF-8 conversion in SMF, it'll force convert it to non-mb4, in spite of what the database says. Things are better in 2.1.

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

natcip

Quote from: vbgamer45 on August 03, 2020, 07:07:26 AM
I had it setup on the field level on the install

ALTER TABLE {db_prefix}tweet_cache CHANGE html html text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci



Quote from: natcip on August 03, 2020, 06:21:07 AM
Incorrect string value: '\xF0\x9F\x92\x80 <...' for column `brandyso_sql1`.`brandy4f_sql1_smf_tweet_cache`.`html` at row 1
File: /home/www/brandyso/tweet-cache.php
Line: 93

Try the attached file and see if it helps
Copy to root of your SMF install and make sure right permissions are set.
Thank you for this. Unfortunately no change. :( File is set to 644.

vbgamer45

Can you rerun this query on your database

ALTER TABLE smf_tweet_cache CHANGE html html text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

natcip

Just did it
tweet-cache.php now shows this
{"html":"

Tweet error (blank ID)
"}

But the tweets still don't embed

chrishicks

Is there a way to have the embeds use a dark theme instead of the white? Like this:

https://i.imgur.com/DnigklQ.png

It's not a huge deal I was just curious since my theme is entirely dark colored.

vbgamer45

Maybe might have to tweak the embed code.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

natcip

Hi there,
I just tried posting a tweet link and instead of showing an embedded tweet, the post literally looks like this:
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">I digress .</p>&mdash; SZA (@sza) <a href="https://twitter.com/sza/status/1398527644115738624?ref_src=twsrc%5Etfw">May 29, 2021</a></blockquote><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>https://twitter.com/sza/status/1398527644115738624

vbgamer45

What mods to have insalled?

that is the right code except it is showing the html instead of running it.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

natcip

Quote from: vbgamer45 on May 29, 2021, 08:11:31 PM
What mods to have insalled?
Simple Audio Video Embedder
Yet Another YouTube BBCode Tag
Yet Another Spoiler Mod
Soundcloud BBcode
NiceTooltips

Also, I just checked my test post from yesterday. Now it simply shows the tweet link, not the html code. ???

vbgamer45

Update
2.1
!Updated jquery version to fix issues in SMF 2.1.x now uses save version as 2.1
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Gryzor

So I had installed an older version (2.0) (it had a different name? Auto Twitter Embed instead of Auto Tweet Embed?). 

I installed 2.1, thinking it'd overwrite the older one. Now I'm having embedded tweets appearing twice, and in my Package Manager I have only Auto Twitter Embed 2.0 without an uninstall option (only list files/delete)... weird? Any ideas?

vbgamer45

Uninstall then run the parser at https://www.smfhacks.com/smf-package-parser.html on the mod to find the edits to remove the old code as well.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Gryzor

Yeah, thought so myself, however as I said there's no Uninstall option even if I tried emulating older versions... Really weird.

vbgamer45

Strange. Luckly there is not many edits the mod makes. Main one is the edits to load.php
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Gryzor

Ok then I'll take it out by hand... Cheers.

Btw, since the "unknown status" one shown in the Package Manager is 2.0, what version should I emultate to try to remove it? Instead of trying blind...

vbgamer45

Any SMF 2.0 or 2.1 version should be ok.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Gryzor

This is weird, maybe I've come across some SMF bug:

Tried emulating - still no uninstalling option. I went in through FTP and deleted the files under Packages manually, and THEN it showed as "installed" in the package manager, and I was able to uninstall.

Verified that Tweets don't get embedded.

Installed the package again, it went fine, and now I'm getting double embeds again :D Looks like I'll have to remove the code manually indeed...

mightygiants

I had to collate my database to convert all tables (not sure if that is an issue).

Lately all the auto embedded tweets look like this when I post a link




When I checked the row in the database

 MySQL returned an empty result set (i.e. zero rows). (Query took 0.0002 seconds.)

vbgamer45

Can you copy that tweet url and post it here will test on my site.

What colation did you change it to in the database and smf version
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: