trigger_error() acting strange

Discussion forum for Extension Writers regarding Extension Development.
User avatar
3Di
Former Team Member
Posts: 14202
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: trigger_error() acting strange

Post by 3Di » Tue May 21, 2019 7:19 pm

I personally prefer to use the event mentioned by kasimi also to load languages, since there you can use the language object.

Code: Select all

	/**
	 * Load extension common language file during user set up.
	 *
	 * @event  core.user_setup_after
	 * @return void
	 * @access public
	 */
	public function setup_lang()
	{
		$this->language->add_lang('my_ext_common', 'phpbbstudio/my_ext');
	}
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
david63
Registered User
Posts: 16527
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: trigger_error() acting strange

Post by david63 » Tue May 21, 2019 8:30 pm

MarkDHamill wrote:
Tue May 21, 2019 4:34 pm
Thanks. I'll have to figure out a different place to do this then.
I think what you need to look at is using phpbb\exception\http_exception
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
3Di
Former Team Member
Posts: 14202
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: trigger_error() acting strange

Post by 3Di » Tue May 21, 2019 8:33 pm

Find an event which has an errors[] array and use it.
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
MarkDHamill
Registered User
Posts: 3910
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: trigger_error() acting strange

Post by MarkDHamill » Tue May 21, 2019 9:30 pm

david63 wrote:
Tue May 21, 2019 8:30 pm
MarkDHamill wrote:
Tue May 21, 2019 4:34 pm
Thanks. I'll have to figure out a different place to do this then.
I think what you need to look at is using phpbb\exception\http_exception
I don't seen an event there that I can use. Basically I am looking for a place to quickly reject access to the board shortly after the IP is analyzed. trigger_error() is fine because it will allow the board's headers and footers to appear.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

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

Re: trigger_error() acting strange

Post by 3Di » Tue May 21, 2019 9:33 pm

After the IP is analyzed put it into the bans table if you so wish, the logic should take care of it for you.
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 “Extension Writers Discussion”