[DEV] SimpleCount

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!
Get Involved
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)
Post Reply
svennson
Registered User
Posts: 60
Joined: Wed Jun 01, 2005 4:54 pm
Location: Belguim
Contact:

[DEV] SimpleCount

Post by svennson » Mon Aug 17, 2015 6:51 pm

Extension Name: SimpleCount
Author: SvennD

Extension Description: This replaces the default exact number of the forum with an approximate number; The idea is based on the counting system in Wolfram Alpha. The code was copy'd from by MuhClaren so any references are not coincident.

This replaces the default exact value of posts/users/topics of the forum with an easy referenced number (such as 4K instead of 4032); The idea is based on the counting system in Wolfram Alpha. I used the code from TimeAgo extension by MuhClaren to get this extension working, thanks MuhClaren!

Extension Version: 1.0.1

Language Support: en, nl

Features:
  • On/Off switches in acp/extensions
  • visible on index.php & viewforum.php
  • works in all styles
  • No JS
Screenshots:
Image
Image
Extension Download: download
Extension Repo: https://github.com/svennd/simplecount

ps. First extension, friendly suggestions are welcome.

* update version 1.0.1 *
- Does no longer require, the ugly code hack.
Last edited by svennson on Fri Nov 04, 2016 3:54 pm, edited 3 times in total.

User avatar
david63
Registered User
Posts: 16528
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [DEV] SimpleCount

Post by david63 » Mon Aug 17, 2015 10:54 pm

svennson wrote:First extension, friendly suggestions are welcome.
Replacing core code is not the way that extensions work. An extension must be self containing with all modifications made within the extension.
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
Dragosvr92
Registered User
Posts: 1450
Joined: Sat Sep 12, 2009 7:27 am
Location: Romania
Name: Dragos Valentin Rădulescu
Contact:

Re: [DEV] SimpleCount

Post by Dragosvr92 » Mon Aug 17, 2015 11:59 pm

I suspect there may not be all the needed events for his extension and he rushed to do it.
You should just open a ticket requesting these events, Svenn.
Formerly known as TheKiller
3.0| Avatar on Memberlist 1.0.3

svennson
Registered User
Posts: 60
Joined: Wed Jun 01, 2005 4:54 pm
Location: Belguim
Contact:

Re: [DEV] SimpleCount

Post by svennson » Tue Aug 18, 2015 4:59 am

david63 wrote:Replacing core code is not the way that extensions work. An extension must be self containing with all modifications made within the extension.
I agree, its rather dirty, the problem is however that there is no event taking these variables, except for the bottom statics on index.php the extension uses the events. (and is self-containing)
Dragosvr92 wrote:I suspect there may not be all the needed events for his extension and he rushed to do it.
You should just open a ticket requesting these events, Svenn.
I doubt that "for my tiny extension" is a valid reason to add an event in the core, but I can try.

Thanks both for the feedback!

svennson
Registered User
Posts: 60
Joined: Wed Jun 01, 2005 4:54 pm
Location: Belguim
Contact:

Re: [DEV] SimpleCount

Post by svennson » Fri Nov 04, 2016 3:56 pm

As it turns out, I did not need to ask for a new event, one can just overwrite variables that have been set in code before an event. I updated the code to work as a 'good extension'.

Any advice is welcome.

Post Reply

Return to “Extensions in Development”