[DEV] Animated PM Notification

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
Sniper_E
Registered User
Posts: 1199
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey

[DEV] Animated PM Notification

Post by Sniper_E »

Extension Name: Animated PM Notification
Extension Version: 1.0.5


Author: Sniper_E

Extension Description:
Shows new animated PMs and new Post Notifications below the header navbar. With display option in ucp.

phpBB 3.2.x/3.3.x
Image

Extension download: anipmnotify_1.0.5.zip

Installation:
  1. Download the latest release and unzip content.
  2. Copy the contents to ` ext/sniper/anipmnotify/ `
  3. Enable Extension in the ACP
Updating:
  1. Download the latest release and unzip content.
  2. Disable extension, delete data and delete old files from your server.`
  3. Copy the new unzipped contents to ` ext/sniper/anipmnotify/ `
  4. Enable Extension in the ACP
Last edited by Sniper_E on Mon Jan 27, 2020 10:36 pm, edited 33 times in total.
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: [DEV] Animated PM Notification

Post by david63 »

Can I just point out that you should be using Plural rules in your language file
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
Sniper_E
Registered User
Posts: 1199
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey

Re: [DEV] Animated PM Notification

Post by Sniper_E »

Sure you can David. Thanks, I was not aware of the Plural rules thing.

Something like this?

Code: Select all

	'PM_MESSAGES'			=> array(
		1	=> 'Message',
		2	=> 'Messages',
	),
I know there's more to it than just that.
I looked at that link you posted and others it lead to. I don't understand all of that.

I didn't look before but the ./language/en/common.php has these in it.

Code: Select all

	'MESSAGE' 			=> 'Message',
	'MESSAGES'			=> 'Messages',
I didn't even have to make a language entry for those. I could have simply use the existing ones.

Would I have to use Plural rules in my language file for this extension for it to pass your validation?
Do I need to dig into the Plural rules setup and figure out how to incorporate it into this? If I have to I will.
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: [DEV] Animated PM Notification

Post by david63 »

Sniper_E wrote:Would I have to use Plural rules in my language file for this extension for it to pass your validation?
Cannot say definitely (depends on whether Paul is in a good mood or not ;) ) but some extensions have been denied for not using it.
Sniper_E wrote:I didn't even have to make a language entry for those. I could have simply use the existing ones.
But you would still need to handle them in your listener files (which you are currently not doing - you are doing it in the template event)
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
Sniper_E
Registered User
Posts: 1199
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey

Re: [DEV] Animated PM Notification

Post by Sniper_E »

Aight... I'll check into my man. Thanks for the info! I'll go "edjucate" myself on that Plural rules stuff.
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco

Re: [DEV] Animated PM Notification

Post by 3Di »

Sniper_E wrote:Aight... I'll check into my man. Thanks for the info! I'll go "edjucate" myself on that Plural rules stuff.
you language file should look like this

Code: Select all

$lang = array_merge(
    $lang, array(
        'PM_READ'            => 'Read Your',
        'PM_YOU_HAVE'        => 'You Have',
        'PM_NEW'            => 'New',
        'PM_UNREAD'            => 'Unread',
        'PM_MESSAGE'    => array(
            1    => '%d Message',
            2    => '%d Messages',
    )
));
 
now you should subscribe the event into your listener within static public function getSubscribedEvents(), create a function that reads the values like public function display_anipmnotify($event) and assign them to the template, like

Code: Select all

        $this->template->assign_vars(array(
        'L_PM_MESSAGE'                => $pm_msg_value, // this contains the (int)
        ));
.

not tested, wrote in the fly.

edit: typos
Last edited by 3Di on Sun Oct 18, 2015 10:45 am, edited 1 time in total.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
Sniper_E
Registered User
Posts: 1199
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey

Re: [DEV] Animated PM Notification

Post by Sniper_E »

Thanks, I'll look into it... :D
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
User avatar
Sniper_E
Registered User
Posts: 1199
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey

Re: [DEV] Animated PM Notification

Post by Sniper_E »

Actually all that Plural rule stuff looked like more trouble than it's worth. I'm side stepping that.

I just followed phpBB's lead, "Private messages [1]" in the header and just made mine "Messages [1]"

Animated PM Notification version 1.0.1
Fist post and GitHub is updated.
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco

Re: [DEV] Animated PM Notification

Post by 3Di »

Sniper_E wrote:Actually all that Plural rule stuff looked like more trouble than it's worth. I'm side stepping that.

I just followed phpBB's lead, "Private messages [1]" in the header and just made mine "Messages [1]"

Animated PM Notification version 1.0.1
Fist post and GitHub is updated.
NEVER is the only Option when it comes to Giving Up! ;)
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
Sniper_E
Registered User
Posts: 1199
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey

Re: [DEV] Animated PM Notification

Post by Sniper_E »

3Di wrote:NEVER is the only Option when it comes to Giving Up! ;)
:lol: But I only looked at what it would take. I NEVER started anything so I actually didn't Give Up! :lol:
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
John45
Registered User
Posts: 199
Joined: Sat Jun 08, 2013 2:54 am

Re: [DEV] Animated PM Notification

Post by John45 »

Sniper_E wrote:
3Di wrote:NEVER is the only Option when it comes to Giving Up! ;)
:lol: But I only looked at what it would take. I NEVER started anything so I actually didn't Give Up! :lol:
Would love to see an RC release, so keep trying. You'll get there. :D

I saw it too and it confused the poop out of me. :lol:
Nully
Registered User
Posts: 453
Joined: Thu Jan 29, 2009 10:11 pm
Location: France

Re: [DEV] Animated PM Notification

Post by Nully »

On my board, PM notification animated works ok :D
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco

Re: [DEV] Animated PM Notification

Post by 3Di »

Nully wrote:On my board, PM notification animated works ok :D
Yes, we are not discussing that. ;) We are discussing about the use of some code instead of another.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
Nully
Registered User
Posts: 453
Joined: Thu Jan 29, 2009 10:11 pm
Location: France

Re: [DEV] Animated PM Notification

Post by Nully »

3Di wrote: Yes, we are not discussing that. ;) We are discussing about the use of some code instead of another.
Because of my very bad english, I misunderstood the discussion.
Sorry :oops:
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco

Re: [DEV] Animated PM Notification

Post by 3Di »

Nully wrote:
3Di wrote: Yes, we are not discussing that. ;) We are discussing about the use of some code instead of another.
Because of my very bad english, I misunderstood the discussion.
Sorry :oops:
No need to apologise. ;) In fact we should discuss about coding elsewhere. :)
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades

Return to “Extensions in Development”