Search found 19 matches

by StevieWonderer
Tue Dec 11, 2018 5:45 pm
Forum: phpBB Custom Coding
Topic: New posted string in custom table loses foreign character
Replies: 6
Views: 642

Re: New posted string in custom table loses foreign character

rewrote the custom page to fit the phpbb3 requirement. Did you use the correct functions for storing and reading data from inside phpBB? generate_text_for_display() generate_text_for_storage() generate_text_for_edit() Thank everyone for the reply.. Reading on those functions... I didn't use them. L...
by StevieWonderer
Tue Dec 11, 2018 1:34 pm
Forum: phpBB Custom Coding
Topic: New posted string in custom table loses foreign character
Replies: 6
Views: 642

Re: New posted string in custom table loses foreign character

No problem with foreign characters in the converted phpbb3. Old messages, new messages, all is fine. But I have a phpbb2 external page with a form that writes to a custom table. I imported the table, and rewrote the custom page to fit the phpbb3 requirement. <?php define('IN_PHPBB', true); $phpbb_r...
by StevieWonderer
Tue Dec 11, 2018 1:21 pm
Forum: phpBB Custom Coding
Topic: get ip of client. $_SERVER variable
Replies: 4
Views: 6317

Re: get ip of client. $_SERVER variable

I guess phpBB way would be

Code: Select all

$user->ip
or if you really need REMOTE_ADDR then

Code: Select all

$request->server('REMOTE_ADDR')
session.php:293 has lots of code after $request->server('REMOTE_ADDR') so maybe it would be better to check why it's so.
by StevieWonderer
Sun Dec 09, 2018 1:27 pm
Forum: phpBB Custom Coding
Topic: Force registered users to use cookies
Replies: 7
Views: 551

Re: Force registered users to use cookies

_sid cookie does not exists until user has submitted the login form That's not true. Every user has a session ID, even guests, and if cookies are enabled, the session ID is in the _sid cookie. Thanks for the clarification. You are right in that normally a visitor gets a _sid cookie. But if the visi...
by StevieWonderer
Sun Dec 09, 2018 12:50 pm
Forum: phpBB Custom Coding
Topic: Force registered users to use cookies
Replies: 7
Views: 551

Re: Force registered users to use cookies

Why don't you check for the phpBB's session ID cookie? if (!$this->request->variable($this->config['cookie_name'] . '_sid', '', false, \phpbb\request\request_interface::COOKIE)) If I used _sid cookie It would mean the user could not login because _sid cookie does not exists until user has submitted...
by StevieWonderer
Sun Dec 09, 2018 12:46 pm
Forum: phpBB Custom Coding
Topic: Force registered users to use cookies
Replies: 7
Views: 551

Re: Force registered users to use cookies

Now, the attacker knows the victim's session ID Only when the link address start matches the one of the board (or the cookie domain is set up too sloppy to begin with). Thanks for the reply. But I don't understand. I just tested this and if you click https://example.com and you have cookies disable...
by StevieWonderer
Sat Dec 08, 2018 1:03 pm
Forum: phpBB Custom Coding
Topic: Force registered users to use cookies
Replies: 7
Views: 551

Force registered users to use cookies

I don't like that the session ID is one of the URL parameters when cookies are disabled. For example, an attacker posts a link to the site pointing to his own site and a victim with cookies disabled clicks the link. Now, the attacker knows the victim's session ID, browser version and IP. If the atta...
by StevieWonderer
Thu Nov 15, 2018 4:52 pm
Forum: Extensions in Development
Topic: [3.3][RC] Autolinks 1.3.3
Replies: 273
Views: 29029

Re: [3.1][3.2][RC] Autolinks 1.2.3

Thanks for this extension. It has worked well except for one minor issue. If query does not contain forum id (f-parameter), autolinks does not work. The solution: Replace ext\lmdi\autolinks\event\listener.php:110 $forum_id = $this->request->variable ('f', 0); by $forum_id = $this->user->page['forum'...
by StevieWonderer
Mon Nov 06, 2017 6:19 pm
Forum: Extension Writers Discussion
Topic: How to redirect trailing slash URLs?
Replies: 4
Views: 522

Re: How to redirect trailing slash URLs?

The thing I posted above will make both links with and without the slash work. 304 redirect (or canonical link or anything like that to avoid duplicating content) is another thing you have to do yourself. I just answered the question you asked :) Thank you for your answer. My question may have been...
by StevieWonderer
Mon Nov 06, 2017 3:26 pm
Forum: Extension Writers Discussion
Topic: How to redirect trailing slash URLs?
Replies: 4
Views: 522

Re: How to redirect trailing slash URLs?

Then googlebot can find duplicate content in /a and /a/ and give me a penalty :( That's why I'd like to do a redirect.
by StevieWonderer
Sun Nov 05, 2017 6:13 pm
Forum: Extension Writers Discussion
Topic: How to redirect trailing slash URLs?
Replies: 4
Views: 522

How to redirect trailing slash URLs?

My routing.yml is this:

Code: Select all

vendorname_extensionname_a:
    path: /a
    defaults: { _controller: vendorname.extensionname.a:default }
Now, if a user requests /a/, he gets "No route found for "GET /a/"".

This is unacceptable so how should I do a redirect to "/a"?
by StevieWonderer
Wed Sep 13, 2017 4:01 pm
Forum: phpBB Discussion
Topic: Area51 forum 504 gateway timeouts?
Replies: 2
Views: 320

Re: Area51 forum 504 gateway timeouts?

Thanks, I guess they have some kind of an alert system that caused timeouts during submit.
by StevieWonderer
Wed Sep 13, 2017 3:02 pm
Forum: phpBB Discussion
Topic: Area51 forum 504 gateway timeouts?
Replies: 2
Views: 320

Area51 forum 504 gateway timeouts?

Impossible to submit any posts even though the site is working fast otherwise.
by StevieWonderer
Mon Sep 04, 2017 7:57 pm
Forum: Extension Writers Discussion
Topic: Local and global permissions
Replies: 0
Views: 251

Local and global permissions

There's an example on this page that says: return array( array('permission.add', array('a_new')), // New global admin permission a_new array('permission.add', array('m_new')), // New global moderator permission m_new array('permission.add', array('m_new', false)), // New local moderator permission m...
by StevieWonderer
Wed Aug 30, 2017 7:10 am
Forum: Extension Writers Discussion
Topic: Plain SQL queries in update_schema()
Replies: 10
Views: 756

Re: Plain SQL queries in update_schema()

Thanks, good points! I already realized that config names in update_data()'s return array can't be longer than 25 characters so better to have as compact vendorname and extension name as possible so that they can always be concatenated to unique table and config prefixes. Longest phpbb table name is...

Go to advanced search