Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2019-09-05 21:14:45

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 305
Website GitHub Twitter

wcz_telegram - simply posting articles to a Telegram channel

A really simple and raw plugin for automatic posting new articles to your channel in the Telegram messenger. All the parameters are yet inside the code. In article window you can choose to send this article to Telegram. Actually it is posted a bold title with the excerpt, followed by the keywords and the link. The link can be modified to use your own template for rendering this article inside Telegram.

  • wcz_telegram_token: the token of your Telegram bot. Talk to the BotFather.
  • wcz_telegram_chatid: the chatid of your Telegram channel. You’ll find some hints here.
  • wcz_telegram_iv and wcz_telegram_rhash: If you have already a Telegram Instant View template, but this is not really public, you should consider to use this option. Set it to ‘1’ and copy the rhash, so Telegram users will see your article on their mobiles inside Telegram rendered with your template.
  • wcz_telegram_utm: add parameters to your link, so your web analytics software – eg. Google Analytic, Matomo/Piwik – has some stuff to identify Telegram as the source of your traffic.
  • wcz_telegram_debug: If something doesn’t work, switch it to ‘1’ and you’ll get the complete request inside of textpattern/tmp/telegram_request.txt

The repository on Github is here.

Version 0.12

Last edited by whocarez (2020-05-05 08:34:24)

Offline

#2 2019-09-11 12:47:00

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

Re: wcz_telegram - simply posting articles to a Telegram channel

Nice to welcome a new plugin, they are rare these days.

Offline

#3 2019-09-11 12:57:54

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 305
Website GitHub Twitter

Re: wcz_telegram - simply posting articles to a Telegram channel

There is a small bug sending the unpublished article to telegram triggered by article preview. But this happens only under the rare circumstance if one has already set the option to send it, right before previewing the article.

Offline

#4 2019-09-11 15:58:30

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

Re: wcz_telegram - simply posting articles to a Telegram channel

whocarez wrote #319262:

There is a small bug sending the unpublished article to telegram triggered by article preview. But this happens only under the rare circumstance if one has already set the option to send it, right before previewing the article.

Yes, edit step is not optimal to use here, though this could work in txp 4.8, where previewing does not trigger edit event any more.

Please consider sanitizing gps() values: doSlash() them before using in db queries.

Offline

#5 2020-05-05 08:37:22

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 305
Website GitHub Twitter

Re: wcz_telegram - simply posting articles to a Telegram channel

Made a small update. Added the possibility to track traffic via utm-parameter in links. Some minor changes like sorting the keywords and convert textile ?? to _ in markdown.
Had no time to test it on Textpattern 4.8.0.

Offline

Board footer

Powered by FluxBB