[ABD] Hello

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
Post Reply
User avatar
imkingdavid
Former Team Member
Posts: 2667
Joined: Sun Jul 26, 2009 7:59 pm
Location: EST
Name: David King

[ABD] Hello

Post by imkingdavid » Mon May 12, 2014 2:44 am

https://github.com/imkingdavid/hello

phpBB 3.1 adds the currently logged in user's username and avatar to the header directly across from the breadcrumbs (and the username is removed from the Logout link). This is a very simple phpBB 3.1 extension that lets you add a greeting to the to give your users a bit more of a personalized experience.

Turn this:
Image

Into this:
Image

Important Notes:
  • This extension requires the template events added in https://github.com/phpbb/phpbb/pull/2448. Until that is merged, you will need to apply the patch manually in order for the extension to work.
  • Note that this only works for Prosilver. subSilver2 does not have the username in the navigation bar and therefore does not have the events.
Right now, the greeting is hardcoded into the template as more of a proof of concept than anything else. IF enough people express interest in something like this, I may add some or all of the following features:
  • Customizable via the ACP
  • Different greeting based on user's board language (Hello, Hola, Anyeong, etc.)
  • Different greeting based on current time (good morning, good afternoon, good evening, etc.)
  • Different greeting based on day of the week (Happy Monday!, TGIF!, etc.)
  • Different greeting based on specific date (e.g. Happy New Years!, Merry Christmas!, Happy Hanukkah!, etc.)
  • Rotating messages (i.e. have it randomly pick between a set of messages, like Hello, Hi, 'Sup, etc.)
  • More?
Don't forget to smile today. :)
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
Louis7777
Registered User
Posts: 247
Joined: Sat Apr 21, 2012 9:22 pm

Re: [DEV] Hello

Post by Louis7777 » Mon May 12, 2014 1:03 pm

"Hello, david! Shall we play a game? How about a nice game of global thermonuclear war?" :geek:

User avatar
imkingdavid
Former Team Member
Posts: 2667
Joined: Sun Jul 26, 2009 7:59 pm
Location: EST
Name: David King

Re: [DEV] Hello

Post by imkingdavid » Mon May 12, 2014 4:55 pm

As an update, I have also added an event in that PR so that a separate message can be shown to guests/unauthenticated users. The PR is in discussion about implementation but should be in 3.1 so this extension should be available for the full release.
Don't forget to smile today. :)
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
imkingdavid
Former Team Member
Posts: 2667
Joined: Sun Jul 26, 2009 7:59 pm
Location: EST
Name: David King

Re: [DEV] Hello

Post by imkingdavid » Mon May 12, 2014 4:56 pm

Louis7777 wrote:"Hello, david! Shall we play a game? How about a nice game of global thermonuclear war?" :geek:
Nice. :)
Don't forget to smile today. :)
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
M.Gaetan89
Registered User
Posts: 39
Joined: Sun Apr 21, 2013 12:36 pm
Location: Divonne-les-Bains
Name: Gaëtan
Contact:

Re: [DEV] Hello

Post by M.Gaetan89 » Mon May 12, 2014 5:18 pm

Hi,

I like the idea. Much nicer than just having the username :-)

I didn't look at the code of the extension, but what happen if the user has an avatar? is it hidden?

User avatar
imkingdavid
Former Team Member
Posts: 2667
Joined: Sun Jul 26, 2009 7:59 pm
Location: EST
Name: David King

Re: [DEV] Hello

Post by imkingdavid » Mon May 12, 2014 5:49 pm

M.Gaetan89 wrote:Hi,

I like the idea. Much nicer than just having the username :-)

I didn't look at the code of the extension, but what happen if the user has an avatar? is it hidden?
Thank you.

The username and avatar are displayed together and the avatar is not hidden. Any text added by this extension will go before the avatar and after the username. I just didn't have an avatar on the account used for testing this.

Everyone keep in mind that this is an extremely simple proof of concept extension and should not necessarily be used as an example of how to make a new extension. Using hardcoded text, especially user-facing language text, directly in a template file is not a good idea because it makes it difficult to translate or modify the text. Of course, I plan to add an ACP module to manage it as described in the first post, but I just wanted to get a basic example up.
Don't forget to smile today. :)
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

Post Reply

Return to “Abandoned Extensions”