Page 1 of 2

[CDB] Activity Buttons - Quick Links into Header

Posted: Tue Jan 12, 2016 12:45 am
by Volksdevil
Please let me know if you install it, and it works as it should. :)

Extension Name:
Activity Buttons.

Extension Description:
Adds a responsive button set in the header for your users to view:
New posts, active topics, their posts & unread topics.
Guests will see buttons to Register & Login. The links above are also removed from the 'Quick links' menu.

Features:
  • The buttons are responsive, and will center upon viewing via mobile devices.
  • 2.x.x has a counter added to the Unread posts button.
  • 1.x.x (Will not be submitted to CDB) Does not include the counter, available Here.
  • Logged in users will see the following buttons in the header:
    New | Active | Unread | Mine
  • Guests will see the following buttons instead:
    Register | Login | Active Topics
  • Some small scripting to remove the core links from the 'Quick links' menu.
Demo URL:
http://www.testphpbb.co.uk

Extension Download:
http://www.testphpbb.co.uk

Install instructions:
Download and extract the zip folder.
Upload the 'volksdevil' folder to your boards 'ext' folder so that you have:
YOUR_BOARD_ROOT/ext/volksdevil/activitybuttons
Navigate to the 'customise' tab and enable the 'Activity Buttons' extension.

Screenshots:
Desktop Logged In:
Image

Desktop Logged Out:
Image

Mobile Logged In:
Image

Mobile Logged Out:
Image

Author:
Volksdevil with big thanks to posey

Extension Version:
2.0.0 - A counter is now added to the unread posts button. Version 1.0.3 without counter still Here
1.0.3 - Added Portuguese-Brazil & Spanish languages.
1.0.2 - Removed Search button, tweaked CSS.
1.0.1 - Changed language to be more specific.
1.0.0

Requirements:
Only developed with prosilver style in mind, though may look OK on others.
Currently only 'en' language, will take translations.

My first ever extension so please advise if I've done something wrong...I don't even know if [RC] is the correct tag for this? :oops: I'm only a basic self taught HTML/CSS coder so I probably won't be able to make 'big' changes, but I will help if I can.

Re: [RC] Activity Buttons

Posted: Tue Jan 12, 2016 1:07 pm
by pierredu
I tested on a heavily modified prosilver style and the buttons don't appear. The upper banner is completely rewitten in my style.

On the other hand, several items of the Quick links dropdown menu are gone. I'll have a look at how you did it, because I'm interested by this aspect.

Just an addition:
I looked at your language file. You should not use blocks like 'Active' to mix it with 'topics' to produce 'Active topics. In French, for instance, one should write 'Sujets actifs', that is in the opposite order. You're trying to spare on this, but it is the wrong place.

Re: [RC] Activity Buttons - Quick Links to Header

Posted: Tue Jan 12, 2016 1:25 pm
by Volksdevil
Ah, that's a shame mate. Sorry about that. This uses the following event to place the buttons:
overall_header_searchbox_before

I removed the quick links items using .remove(), and then removed the leftover separators using .next()

Code: Select all

$( ".icon-search-self, .icon-search-new, .icon-search-unread, .icon-search-unanswered, .icon-search-active, .icon-search" ).remove();
$( ".icon-search-active, .icon-search" ).next().remove();
RE: The language file, I had to get some help on that (In the process of learning how to use them) but now I think I have a rough idea, so I can create a new language var specific to the 'Active topics' > 'Sujets actifs'? That would do it right? :)

EDIT: Yep, that should work. Updated/uploaded V1.0.1. :)

Re: [RC] Activity Buttons - Quick Links to Header

Posted: Tue Jan 12, 2016 2:26 pm
by pierredu
That is fine.
Are you sure you're not doing "lego strings" elsewhere? For instance with 'Unread'?

Re: [RC] Activity Buttons - Quick Links to Header

Posted: Tue Jan 12, 2016 2:28 pm
by mrgoldy
No, I set up the language file.
My bad, I should of pointed that out. Just didn't think outside the English language..
@volksdevil, make sure to adjust your if statement with it then ;)
(haven't looked at if you did or not, just a heads up)

Rest is all really basic and kept to one word, pretty much what the intension of this extension is I suppose. A quick and easy overview of some links.

Re: [RC] Activity Buttons - Quick Links to Header

Posted: Tue Jan 12, 2016 2:36 pm
by pierredu
You'll say that I'm picky...
But what should Mine mean? My what? Topics? Posts? And Active, is this active forums, active topics?

Re: [RC] Activity Buttons - Quick Links to Header

Posted: Tue Jan 12, 2016 2:45 pm
by Mauron
Volksdevil wrote:I don't even know if [RC] is the correct tag for this? :oops:
I'd definitely go for [DEV].

Re: [RC] Activity Buttons - Quick Links to Header

Posted: Tue Jan 12, 2016 2:47 pm
by Volksdevil
OK cheers.
posey wrote:@volksdevil, make sure to adjust your if statement with it then ;)
(haven't looked at if you did or not, just a heads up)
Yep, adjusted that 'IF' statement, and I've also now edited the code so that if the board search is disabled, then the options don't show. But guests will still see buttons to register and login. :)
pierredu wrote:You'll say that I'm picky...
But what should Mine mean? My what? Topics? Posts? And Active, is this active forums, active topics?
I understand, I'm picky too, but the other way :lol: I like things minimalist, and to keep the div holding the buttons as small as possible, the language needed to be as short as possible. Just that it causes issues with the overly large <div id="site-description"> also in the header, why it has a width of 65% instead of 'auto' I don't know.

Mine = My Posts
Active = Active topics

:)

Re: [DEV] Activity Buttons - Quick Links into Header

Posted: Tue Jan 12, 2016 3:29 pm
by david63
Volksdevil wrote:I like things minimalist, and to keep the div holding the buttons as small as possible, the language needed to be as short as possible
The problem with that approach is that you probably will not know how it will translate - something that is only a few characters in EN may well be many more characters in some other language and the opposite is also a possibility. You should try and make descriptions as clear as possible which may mean that you have to use some css trickery.

Re: [DEV] Activity Buttons - Quick Links into Header

Posted: Tue Jan 12, 2016 5:03 pm
by pierredu
Or at least add some comments in the basic language file.

Re: [RC] Activity Buttons - Quick Links to Header

Posted: Tue Jan 12, 2016 5:27 pm
by 3Di
Mauron wrote:
Volksdevil wrote:I don't even know if [RC] is the correct tag for this? :oops:
I'd definitely go for [DEV].
IMHO [alpha] it's ok, seems to be working, just coding guidelines issues and the like. Not checked though.

Re: [DEV] Activity Buttons - Quick Links into Header

Posted: Tue Jan 12, 2016 5:49 pm
by Volksdevil
Can you point out any specific coding guideline issues? Being my first extension, and not being entirely confident in what I'm doing, any help is appreciated.
david63 wrote:You should try and make descriptions as clear as possible which may mean that you have to use some css trickery.
Which descriptions David?
I've now added some css to make the core <div id="site-description"> auto width rather than 65% which will give much more room. I just need to check how the <h1> and <p> within the site-description div are affected.

Must get a test board up and running.

Re: [DEV] Activity Buttons - Quick Links into Header

Posted: Tue Jan 12, 2016 8:38 pm
by Volksdevil
Currently on the cusp of uploading an update, but I'd like some feedback if possible?

I've been trying to get around the CSS issue of having the wide site-description div meaning that the H1 and <P> were being shifted over. But I've tried to do it in ways with minimal coding.

So I've actually removed the 'Search' button which frees up some space and done some testing with a new domain/test board :D A large site name and description are used to see how it copes and seems OK?

Test board: http://www.TestPhpbb.co.uk
User: test
Pass: testing

So...Omit the 'Search' button? Seems pointless having it I think, especially as it's next to the search bar anyway.

Re: [Alpha] Activity Buttons - Quick Links into Header

Posted: Thu Jan 14, 2016 11:44 pm
by Volksdevil
Please grab the latest upload.

Updated to convert all coding to correct [EOL] End of line etc.
Same version number of extension. :)

Disable extension in ACP.
Delete the extensions files.
Upload new ones.
Enable extension.

Re: [Alpha] Activity Buttons - Quick Links into Header

Posted: Tue Jan 19, 2016 9:08 pm
by Volksdevil
Can anybody suggest if this would be suitable for submitting to the CDB? I've done so much reading (Especially after a DDOS attack on my own board!) that my eyes/head are killing me.