Page 4 of 21

Re: [DEV] @Mention System

Posted: Wed Feb 04, 2015 3:21 pm
by SüKûT
Wolfsblvt wrote:
SüKûT wrote:Yes, I see. Are you, but can not reduce version?
I could, with a bit of work. Maybe it is better for all the users here.
I like the features of php 5.4 and I am very sad that phpBB still requires 5.3.3, and not 5.4, but yeah.

I have created an issue for that. You can follow here: https://github.com/Wolfsblvt/mentions/issues/3
Ok. I solved the problem.
Giancarlo.Massironi wrote:I have tried installing this extension which I would like to use, but I am getting this error when trying to enable it in the Customize section of ACP

Information

The selected extension cannot be enabled, please verify the extension’s requirements.

« Back to previous page
Solution: open composer.json
find:

Code: Select all

"require": {
		"php": ">=5.4.0"
	},
and change with their PHP version.

Re: [DEV] @Mention System

Posted: Wed Feb 04, 2015 3:32 pm
by frax
Wolfsblvt wrote:
frax wrote:I have 6813 users.
Ok...I try...

edit

T: 3.425s | Q: 31 | M: 75.04 MiB
Is this the output of the page wich is slow?

The numbers seem to be very good. Not even a deci-second for parsing a post. That's like it should be.
With this call the page will be slow of course, cause it measures the time 100 times for each post, so it took 4 seconds, wich is also correct.

I am not sure if the slowdown of your site is cause by my extension. Can you verify by deactivating the extension again and see if it is faster?
Without ext:
T: 0.131s | Q: 16 | M: 2.49 MiB

Re: [DEV] @Mention System

Posted: Wed Feb 04, 2015 3:52 pm
by Wolfsblvt
SüKûT wrote:and change with their PHP version.
I don't know if there is some code wich uses PHP 5.4 features, so if you do that, you may get unexpected errors.
frax wrote:Without ext:
T: 0.131s | Q: 16 | M: 2.49 MiB
Yeah, cause the runtime test will do a loop and cost additional time.
What's with extension enabled, but not with measure_time=1 in url, so the normal mode how the extension should work?

Re: [DEV] @Mention System

Posted: Wed Feb 04, 2015 4:00 pm
by frax
Wolfsblvt wrote:
frax wrote:Without ext:
T: 0.131s | Q: 16 | M: 2.49 MiB
Yeah, cause the runtime test will do a loop and cost additional time.
What's with extension enabled, but not with measure_time=1 in url, so the normal mode how the extension should work?
This: T: 5.017s | Q: 31 | M: 103.19 MiB

Re: [DEV] @Mention System

Posted: Wed Feb 04, 2015 4:28 pm
by Walther
Can't test it, provider is still on 5.3.9 :?

Re: [DEV] @Mention System

Posted: Wed Feb 04, 2015 4:34 pm
by Wolfsblvt
frax wrote:This: T: 5.017s | Q: 31 | M: 103.19 MiB
o.O That's very strange. would it be possible to send me a link to your forum, with maybe a test account?

Otherwise, can you look in the "SQL Explain" in the footer, if the time is spend in PHP or in a query? If most of the time is a query, can you tell me wich?


Is here anyone other with >5.000 users?
I need confirm of this problem.
Walther wrote:Can't test it, provider is still on 5.3.9 :?
You can test. SüKûT posted a workaround here, until I will officially support php 5.3.3

Re: [DEV] @Mention System

Posted: Wed Feb 04, 2015 4:37 pm
by leschek
Wolfsblvt wrote:
leschek wrote:I can see it in browser - green badge with no avatar text.
Can you try something for testing purposes?

Open file ext\wolfsblvt\mentions\core\mentions.php
Find:

Code: Select all

                // Check if file exists, otherwise take from "/all" folder. The administrator hasn't chosen a specific no_avatar avatar for this style then
                if (!file_exists($default_avatar_url))
                {
                    $default_avatar_url = $this->path_helper->get_web_root_path() . $this->ext_root_path . '/styles/all/theme' . '/images/no_avatar.gif';
                }

                $user_data['avatar'] = '<img src="' . $default_avatar_url . '" width="100" height="100" alt="' . $this->user->lang['USER_AVATAR'] . '">';
and replace with:

Code: Select all

            if ($user_data['avatar'] == '')
            {
                $default_avatar_url = $this->path_helper->get_web_root_path() . $this->ext_root_path . '/styles/' . $this->user->style['style_path'] . '/theme' . '/images/no_avatar.gif';

                // Check if file exists, otherwise take from "/all" folder. The administrator hasn't chosen a specific no_avatar avatar for this style then
                $file_exists = file_exists($default_avatar_url);
                if (!$file_exists)
                {
                    $default_avatar_url = $this->path_helper->get_web_root_path() . $this->ext_root_path . '/styles/all/theme' . '/images/no_avatar.gif';
                }

                echo "style file exists? " . (($file_exists) ? "yes" : "no" ) . "  real file exists? " . (( file_exists($default_avatar_url)) ? "yes" : "no" ) . "   Path is: " . $default_avatar_url;
                exit;
                $user_data['avatar'] = '<img src="' . $default_avatar_url . '" width="100" height="100" alt="' . $this->user->lang['USER_AVATAR'] . '">';
            }
Then visit a topic with a mention inside and look for a debug message right on top of the forum. Copy it and paste it here (or send me a PM if you don't want to post your forum url). And verify yourself if this is your correct forum URL and that the image in path exists.


Other thing you could try is going to ext\wolfsblvt\mentions\styles\prosilver\theme\images (create the style so that it exists) and put the no_avatar.gif there.
Well, only I can see, when I open my board (index), is this message (rest of page is blank):

Code: Select all

style file exists? no real file exists? yes Path is: ./ext/wolfsblvt/mentions/styles/all/theme/images/no_avatar.gif

Re: [DEV] @Mention System

Posted: Wed Feb 04, 2015 4:45 pm
by Walther
Wolfsblvt wrote:
Walther wrote:Can't test it, provider is still on 5.3.9 :?
You can test. SüKûT posted a workaround here, until I will officially support php 5.3.3
Yes, changed that too, but that does not work.
Got it enabled, but it is just not working. Some functions used must be 5.4.0 exclusive.

Re: [DEV] @Mention System

Posted: Wed Feb 04, 2015 4:54 pm
by Wolfsblvt
leschek wrote:Well, only I can see, when I open my board (index), is this message (rest of page is blank):

Code: Select all

style file exists? no real file exists? yes Path is: ./ext/wolfsblvt/mentions/styles/all/theme/images/no_avatar.gif
Okay. This should be correct :?
Are you testing this extension on a local testing environment maybe? This could be a path issue. I mean it is an relative path, and the path shoudl be correct.
I cannot think of any reason why this is happening...
Walther wrote:Yes, changed that too, but that does not work.
Got it enabled, but it is just not working. Some functions used must be 5.4.0 exclusive.
Okay. In this case you have to wait for version 1.1.0 here, sorry.

Re: [DEV] @Mention System

Posted: Wed Feb 04, 2015 5:01 pm
by frax
Wolfsblvt wrote:
frax wrote:This: T: 5.017s | Q: 31 | M: 103.19 MiB
o.O That's very strange. would it be possible to send me a link to your forum, with maybe a test account?

Otherwise, can you look in the "SQL Explain" in the footer, if the time is spend in PHP or in a query? If most of the time is a query, can you tell me wich?


Is here anyone other with >5.000 users?
I need confirm of this problem.
Link
Username: test
Password: testtest

When I see test user online active the extension.

Thanks.

Re: [DEV] @Mention System

Posted: Wed Feb 04, 2015 5:02 pm
by leschek
Wolfsblvt wrote:Are you testing this extension on a local testing environment maybe?
No. It's on web. You can test it yourself here (it's testing forum - as guest you can create post. You can't post it, but you don't need it to see what it does).

Re: [DEV] @Mention System

Posted: Wed Feb 04, 2015 5:24 pm
by Wolfsblvt
frax wrote:Thanks.
Ah. You mean the post editor, not a while viewing a topic, right? I can see the load time, it comes from the script, but I really don't know why, what takes such a long time.
PHP is loading total of 4 seconds.
Can you disable the extension again?

I am not sure if I will find the issue though ._.
leschek wrote:No. It's on web. You can test it yourself here (it's testing forum - as guest you can create post. You can't post it, but you don't need it to see what it does).
Great, can confirm now.
Seems to be an issue with a subpath. your forum is not on website root, but in a subfolder. Something is not working there. I have created an issue for that: https://github.com/Wolfsblvt/mentions/issues/7

Re: [DEV] @Mention System

Posted: Wed Feb 04, 2015 5:26 pm
by frax
Wolfsblvt wrote:
frax wrote:Thanks.
Ah. You mean the post editor, not a while viewing a topic, right? I can see the load time, it comes from the script, but I really don't know why, what takes such a long time.
PHP is loading total of 4 seconds.
Can you disable the extension again?
Disabled...

Re: [DEV] @Mention System

Posted: Wed Feb 04, 2015 5:43 pm
by Wolfsblvt
frax wrote:Disabled...
There is something really strange going on there.

I would suggest that wait for the next version of this extension. I am planning on some improvements on php side wich may speed up the process a bit. Maybe it is even connected with the Advanced BBCode Box (if you won't mind, you could try and disable it and see if the time goes down).
So, can I mention you (hihi, title drop) again when I release the next version that you test it again?

I have created an issue for that, so we'll see: https://github.com/Wolfsblvt/mentions/issues/9

Re: [DEV] @Mention System

Posted: Wed Feb 04, 2015 5:49 pm
by frax
Wolfsblvt wrote:
frax wrote:Disabled...
There is something really strange going on there.

I would suggest that wait for the next version of this extension. I am planning on some improvements on php side wich may speed up the process a bit. Maybe it is even connected with the Advanced BBCode Box (if you won't mind, you could try and disable it and see if the time goes down).
So, can I mention you (hihi, title drop) again when I release the next version that you test it again?

I have created an issue for that, so we'll see: https://github.com/Wolfsblvt/mentions/issues/9
I tried disabling bbcode and is the same thing.
I look forward to the new version and I hope to help you. ;)