Search found 653 matches

by martti
Sat Nov 17, 2018 7:07 am
Forum: Extension Writers Discussion
Topic: Reading/Writing cookies in phpbb
Replies: 5
Views: 665

Re: Reading/Writing cookies in phpbb

Setting a cookie: /** * $this->user is of type \phpbb\user (@user is the short name in the service configuration) * * You could also use \phpbb\session (@session) */ $this->user->set_cookie('my_cookie_name', 'my_cookie_value', 0); /** * The 3rd parameter is the unix time for the cookie life. * When ...
by martti
Thu Nov 15, 2018 9:52 pm
Forum: Extensions in Development
Topic: [3.2][BETA] Trust X-Forwarded-For
Replies: 23
Views: 717

Re: [3.2][BETA] Trust X-Forwarded-For

canonknipser wrote:
Thu Nov 15, 2018 9:46 pm
How do you handle IPV6-Adresses? They have : in standard notation -> https://en.wikipedia.org/wiki/IPv6_addr ... esentation
Ah yes, you're right. Indeed, I should limit this extension to X-Forwarded-For headers without port numbers, I think.
by martti
Thu Nov 15, 2018 9:43 pm
Forum: Extensions in Development
Topic: [3.2][BETA] Trust X-Forwarded-For
Replies: 23
Views: 717

Re: [3.2][BETA] Trust X-Forwarded-For

Bingo! :D Had a look in my reverseproxy and i could disable "Include TCP port from client" so i did. https://preview.ibb.co/gzE0x0/bingo.png Then i reverted back to this code: $forwarded_for = trim($this->request->header('X-Forwarded-For')); $forwarded_for = str_replace(' ', '', $forwarded_for); $f...
by martti
Thu Nov 15, 2018 9:42 pm
Forum: Extensions in Development
Topic: [3.2][BETA] Trust X-Forwarded-For
Replies: 23
Views: 717

Re: [3.2][BETA] Trust X-Forwarded-For

Gave it a go and it looks like its getting closer. Pasted the code as you wrote it with the [] around $forwarded_for, this gave me the following error: [Thu Nov 15 21:25:52.735467 2018] [:error] [pid 3890] [client 192.168.0.18:57302] PHP Parse error: syntax error, unexpected '=' in /var/www/forum/e...
by martti
Thu Nov 15, 2018 9:19 pm
Forum: Extensions in Development
Topic: [3.2][BETA] Trust X-Forwarded-For
Replies: 23
Views: 717

Re: [3.2][BETA] Trust X-Forwarded-For

It is the port number. The extension is expecting a list of comma separated ip's, without port numbers. The X-Forwarded-For header isn't standardized and some reverse proxies add ports as it seems. I will change the extension to strip of the port. In event/listener.php $forwarded_for = trim($this->...
by martti
Thu Nov 15, 2018 9:15 pm
Forum: Extensions in Development
Topic: [3.2][BETA] Trust X-Forwarded-For
Replies: 23
Views: 717

Re: [3.2][BETA] Trust X-Forwarded-For

It is the port number. The extension is expecting a list of comma separated ip's, without port numbers. The X-Forwarded-For header isn't standardized and some reverse proxies add ports as it seems. I will change the extension to strip of the port.
by martti
Thu Nov 15, 2018 8:56 pm
Forum: Extensions in Development
Topic: [3.2][BETA] Trust X-Forwarded-For
Replies: 23
Views: 717

Re: [3.2][BETA] Trust X-Forwarded-For

Okey so that seemed to take care of the variable issue but im still getting a 500 error :/ [Thu Nov 15 20:38:44.532330 2018] [:error] [pid 3890] [client 192.168.0.18:56837] PHP Fatal error: Uncaught Exception: Trust X-Forwarded-For Extension: invalid X-Forwarded-For IP: 192.168.0.18 in /var/www/for...
by martti
Thu Nov 15, 2018 8:13 pm
Forum: Extensions in Development
Topic: [3.2][BETA] Trust X-Forwarded-For
Replies: 23
Views: 717

Re: [3.2][BETA] Trust X-Forwarded-For

I masked my real IP when i posted it here. The variable is set to the same adress as i get in the error message. To be more accurate. "echo $MARTTIPHPBB_TRUSTXFORWARDEDFOR_IPS" results in "192.168.0.18" And the error message would look exactly like this: [Thu Nov 15 17:36:29.005708 2018] [:error] [...
by martti
Thu Nov 15, 2018 4:19 pm
Forum: Extensions in Development
Topic: [3.2][BETA] Trust X-Forwarded-For
Replies: 23
Views: 717

Re: [3.2][BETA] Trust X-Forwarded-For

Thanks, found how to add the variable but still getting the 500 error. My apache error log tells me this: [Thu Nov 15 13:40:28.664370 2018] [:error] [pid 17832] [client xxx.xxx.xxx:52204] PHP Fatal error: Uncaught Exception: Trust X-Forwarded-For Extension: Untrusted IP: xxx.xxx.xxx in /var/www/for...
by martti
Thu Nov 15, 2018 1:15 pm
Forum: Extensions in Development
Topic: [3.2][BETA] Trust X-Forwarded-For
Replies: 23
Views: 717

Re: [3.2][BETA] Trust X-Forwarded-For

Hi! Im trying to get this to work but im not making much of a progress. As soon as i enable this plugin, my forum throws a Error 500 and i cannot access anything what so ever. I am guessing this is due to i have not defined the MARTTIPHPBB_TRUSTXFORWARDEDFOR_IPS - variable. How do i do this? Where ...
by martti
Tue Nov 13, 2018 5:58 pm
Forum: Extensions in Development
Topic: [3.2][BETA] Reply Template
Replies: 8
Views: 595

Re: [3.2][BETA] Reply Template

Adelin13 wrote:
Mon Nov 12, 2018 11:21 am
You can do this for quick reply too?
Indeed, that's a good idea.
by martti
Tue Nov 13, 2018 5:56 pm
Forum: Extensions in Development
Topic: [3.2][RC] Show phpBB Events (for extension developers)
Replies: 24
Views: 1434

Re: [3.2][RC] Show phpBB Events (for extension developers)

i tried to translate the language file but i didn't understand this lines: 'MARTTIPHPBB_SHOWPHPBBEVENTS_SELECT_EXPLAIN' => 'inside html select', and i didn't understand that, there is explain of "head" and "select" but there is no line about them. :? That key is not used anymore. So you can leave i...
by martti
Sun Nov 11, 2018 3:04 am
Forum: Extensions in Development
Topic: [3.2][RC] Show phpBB Events (for extension developers)
Replies: 24
Views: 1434

Re: [3.2][RC] Show phpBB Events (for extension developers)

tofino wrote:
Sun Nov 11, 2018 2:59 am
How can I stop all members from seeing the Show/Hide

THX
Deactivate the extension. This is a development tool. It is not meant to be installed on a live forum.
by martti
Mon Nov 05, 2018 7:53 am
Forum: Extension Requests
Topic: Sort smileys by usage
Replies: 17
Views: 457

Re: Sort smileys by usage

I agree with the previous reactions to OP: There are not many emoticons on phpBB. Adding a "most used" section seems to me useless clutter that won't be of help to the users and will contribute make the site look amateurish. Unlike the emoticons of phpBB, there are many emoji's on smartphones. You c...
by martti
Mon Nov 05, 2018 7:51 am
Forum: Extensions in Development
Topic: [3.2][BETA] Custom Code
Replies: 758
Views: 70873

Re: [3.2][BETA] Custom Code

The plan for this "Custom Code" extension from version 3+ is to support ALL template events present in Prosilver. A new (not required) dependency will be (a future version of) the Show phpBB Events extension (only to be enabled during editing of template code inserts).

Go to advanced search