Giter VIP home page Giter VIP logo

phpbb-ext-telegramnotifications's Introduction

phpBB 3.2 Extension - Telegram notifications

Things are moving so fast in my head that I'm starting to edit... like a telegram.

What is this?

This is a phpBB extension that sends a message to any Telegram chat (group chat or private chat) via a Telegram bot whenever someone makes a new topic or replies to an existing topic on the phpBB forum.

History

The code is based off of phpbb/phpbb-ext-acme-demo and haivala/phpBB-Entropy-Extension (a similar extension for Slack notifications).

Installation

Make your own Telegram bot.

Clone this Git repository into phpBB/ext/lassik/telegramnotifications:

$ cd path/to/your/phpBB
$ git clone https://github.com/lassik/phpbb-ext-telegramnotifications.git ext/lassik/telegramnotifications

In phpBB, go to "ACP" > "Customise" > "Extensions" and enable the "Telegram Notifications" extension.

Then to "ACP" > "Extensions" > "Telegram settings" and fill in the settings. You get the auth token when you make the bot. To get the chat ID, try the "Find chat ID" page or from the sidebar or see https://stackoverflow.com/questions/32423837/telegram-bot-how-to-get-a-group-chat-id.

Now try to make new posts and see if you get notified on Telegram!

License

GPLv2

phpbb-ext-telegramnotifications's People

Contributors

imattpro avatar lassik avatar marc1706 avatar michaelcullum avatar nickvergessen avatar nicofuma avatar paul999 avatar robertheim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phpbb-ext-telegramnotifications's Issues

Notification when deleted

If a post or topic is deleted with justification, this should also be reported in the telegram messanger.bye Jan

Use with Feed post bot

whocarez reported at the phpBB development forum:

Using this extension together with Feed post bot is possible, but Telegram messages to these new posts by this Feed bot are lacking links.

I'll look into it for 0.7.0 but may not be able to fix it.

Adjustable notification in UCP

In a large forum, it can happen that the number of notification floods the users. I want an adjustable option for each user in the UCP to select the desired forums for notification separately.That would be a real appreciation of the extension.

Sending out a notification the telegram if postmerging installed

Hello. i installed postmerging in my forum.If a user write a new post invown topic then i will merge to first post. In issue #10 i wrote the notification if a new Topic was written. But here there is no notification if the new (first) post was approved and the user wrote a new (second) post. In forum i see the new post but not in telegram. Bye Jan

Undefined variable: u_action

Version 0.6.0 causes the following php error when I trying to open the ext settings:

[phpBB Debug] PHP Notice: in file [ROOT]/ext/lassik/telegramnotifications/acp/main_module.php on line 50: Undefined variable: u_action

As a result I can't open settings pages with enabled gzip.

Issues in forum post preview for Telegram

BBCode and [quote]s should be removed from Telegram previews of forum posts:

@jan-2017:

But there are no notification lines displayed in the Messanger if, for example, a quote is too long. The message after the quote will probably not be shown. The user wants to read the message and not the quote content. My suggestion would be to shorten the citation length and to show only a certain number of the beginning and end of the quote.Then there is more space for the actual message.

@lassik:

I agree. I tried to remove the bbcode (the [quote] and other such stuff) to leave only the plain text. I used https://wiki.phpbb.com/Function.strip_bbcode but could not get it to work easily - it removed all of the message text, leaving an empty message :) If you know how to do it (without writing our own bbcode parser or using regexps) please let me know.

The notifications about quoted messages definitely look weird right now and it would be great to have them fixed.

Some other problems:

  • Put usernames in bold so they are more prominent.
  • Maybe should use post title instead of topic title in notification messages. Usually doesn't matter, but can be confusing to use the topic title if it's very different from the post title.
  • Partial HTML tags may mess up the preview (missing closing tag? preview cut off in the middle of an opening tag?). Investigate.
  • Why do HTML tags end up in the preview in the first place? They shouldn't. Investigate.
  • Partial links (URLs) should never be displayed at the end of a preview (since links are clickable in telegram). Either the full link or no link at all.

Switch in Navbar

I still have an idea. It would be good if we had a switch in the Navbar. This could be used to turn on and off the sending of the notification without switching to the ACP.

Adjustable numbers of characters

I would be glad if the number of characters were adjustable, which should be displayed by the notification in telegram.bye Jan

Notification when new PM

It would also be nice if a notification would come when the user has received a new PM.Bye Jan

Missing permission

If I write in a post intended only for admins, the content and information will be sent to the messanger. Everyone can read the telegram message. But since not everyone should see it, it needs an please fix Bye Jan

Reason for the post change

I have seen the reason for the change of post without the addition "Reason for change" in the messenger notification after the the topic title is displayed. I think it should be added a hint. For example: Post has been changed - "Reason"

No outgoing message if new topic need approval

Hello. In the meantime, I noticed a new bug. If a post approval is set in the forum, then nevertheless an outgoing message is sent out to the telegram group. If now the link is clicked everyone sees only the topic list but no new post. The setting should be revised.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.