[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: 789
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

[DEV] Animated PM Notification

Post by Sniper_E » Sun Oct 18, 2015 5:15 am

Extension Name: Animated PM Notification

Author: Sniper_E

Extension Description:
Shows new animated PMs and new Post Notifications above the header navbar.
Exported from 2008 MOD Animated PM PopUp at STG

For phpBB 3.1.x/3.2.x
Image

Extension Version: 1.0.4
Image

Extension download: anipmnotify_1.0.4zip

Installation:
  1. Download the latest release and unzip content.
  2. Copy the contents to ` ext/sniper/anipmnotify/ `
  3. Enable Extension in the ACP
Last edited by Sniper_E on Tue Feb 14, 2017 3:10 am, edited 27 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: 16676
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [DEV] Animated PM Notification

Post by david63 » Sun Oct 18, 2015 7:54 am

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!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
Sniper_E
Registered User
Posts: 789
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: [DEV] Animated PM Notification

Post by Sniper_E » Sun Oct 18, 2015 8:47 am

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: 16676
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [DEV] Animated PM Notification

Post by david63 » Sun Oct 18, 2015 9:31 am

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!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
Sniper_E
Registered User
Posts: 789
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: [DEV] Animated PM Notification

Post by Sniper_E » Sun Oct 18, 2015 10:17 am

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
Former Team Member
Posts: 14352
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [DEV] Animated PM Notification

Post by 3Di » Sun Oct 18, 2015 10:33 am

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.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

User avatar
Sniper_E
Registered User
Posts: 789
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: [DEV] Animated PM Notification

Post by Sniper_E » Sun Oct 18, 2015 10:42 am

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: 789
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: [DEV] Animated PM Notification

Post by Sniper_E » Sun Oct 18, 2015 6:52 pm

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
Former Team Member
Posts: 14352
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [DEV] Animated PM Notification

Post by 3Di » Sun Oct 18, 2015 7:08 pm

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! ;)
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

User avatar
Sniper_E
Registered User
Posts: 789
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: [DEV] Animated PM Notification

Post by Sniper_E » Sun Oct 18, 2015 7:13 pm

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 » Tue Oct 20, 2015 5:53 pm

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
Contact:

Re: [DEV] Animated PM Notification

Post by Nully » Tue Oct 20, 2015 6:31 pm

On my board, PM notification animated works ok :D

User avatar
3Di
Former Team Member
Posts: 14352
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [DEV] Animated PM Notification

Post by 3Di » Tue Oct 20, 2015 6:40 pm

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.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

Nully
Registered User
Posts: 453
Joined: Thu Jan 29, 2009 10:11 pm
Location: France
Contact:

Re: [DEV] Animated PM Notification

Post by Nully » Tue Oct 20, 2015 6:42 pm

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
Former Team Member
Posts: 14352
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [DEV] Animated PM Notification

Post by 3Di » Tue Oct 20, 2015 7:49 pm

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. :)
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

Post Reply

Return to “Extensions in Development”