Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Pandos
121
Features / Re: Cookieless domains and other things...
« on April 9th, 2014, 12:32 PM »
Quote
Okay, let's go back to the basics...
I'm requesting a CSS file. Apache finds it, and sends it to me.
At no point, in this request, did Apache call PHP to do anything. Thus, php.ini is not used.
Sure?
Take a look at http://wedge.org/gz/css/Wilde/chrome34-member-955283.css.gz
122
Features / Re: Cookieless domains and other things...
« on April 9th, 2014, 11:20 AM »
To disregard cookies there are several steps to perform.
1. configure your server to send no cookies:
php.ini: session.use_cookies = 0

2. Use your webserver (dunno if Apache support this) to disregard cookies on some filetypes, domains, etc.
So even when clients request a cookie, it will be ignored.

Moving CSS to the bottom?
Never heard of someone who actually does it :)
JS is a must, but CSS?

What about combine CSS?

What's next?
Force the use of CDN's to get a higher ranking?
Fully support for HTTP2.0?


123
Features / Re: Cookieless domains and other things...
« on April 9th, 2014, 10:45 AM »
I see an overall of 90% for Wedge (Desktop)

Since the compalin is about CSS....
If the CSS is smaller than 2048 bytes, we could try to inline them.

Also nice to read:
https://developers.google.com/speed/pagespeed/service/FlattenCssImports

Cookieless:
Therefor you must have access to the virtual host file to disregard cookies for that domain. This should only work if you put your files on a different server IMHO.
124
Archived fixes / Entities converted inside code tags
« on April 9th, 2014, 10:11 AM »
eheheh... :eheh:

If you post it here in Wedge & gt ; will be transformed to > also & lt ; to < :)
Yeah, it's a bug, it's a bug :)
So your code seems to recognize the flags :)

:edit: Split from http://wedge.org/pub/bugs/8565/installer-sub-language-folders-are-not-recognized/
125
Archived fixes / [Installer] Re: Sub language folders are not recognized
« on April 9th, 2014, 10:08 AM »
OK, here's the working code for recognizing language flags :)
Code: [Select]
while ($entry = $dir->read())
{
if (substr($entry, 0, 8) == 'Install.' && substr($entry, -4) == '.php')
{
$txt = array();
require_once($folder . '/index.' . substr($entry, 8));
if (!empty($txt['lang_name']))
$incontext['detected_languages'][$entry] = '<img src="core/languages/Flag.' . substr($entry, 8, strlen($entry) - 12) . '.png"> ' . $txt['lang_name'];
}
elseif (is_dir($folder . '/' . $entry) && file_exists($folder . '/' . $entry . '/Install.' . $entry . '.php'))
{
$txt = array();
require_once($folder . '/' . $entry . '/index.' . $entry . '.php');
if (!empty($txt['lang_name']))
$incontext['detected_languages'][$entry] = '<img src="core/languages/' . $entry . '/Flag.' . $entry . '.png"> ' . $txt['lang_name'];
}
}
$dir->close();
126
Archived fixes / [Installer] Re: Sub language folders are not recognized
« on April 9th, 2014, 09:43 AM »
If you switch to EN:
index.php?lang_file=Install.english.php

Switch back to another language:
index.php?lang_file=german

Yeah, Wedge misses the part with Install & .php :)
Only if the other language is in a sub language folder
127
Archived fixes / [Installer] Re: Sub language folders are not recognized
« on April 9th, 2014, 09:09 AM »
It's working with some exceptions:
1. Flags aren't displayed
2. Error 500 if you switch between languages.

So not bad for some lines out of the dark ;)
128
Plugins / [Plugin] Re: Facebook for Wedge
« on April 8th, 2014, 10:06 PM »
Did you enable this plugin in admin?
129
Archived fixes / [Installer] Re: Sub language folders are not recognized
« on April 8th, 2014, 08:57 PM »
Yes, that's the worst :lol:
130
Archived fixes / [Installer] Sub language folders are not recognized
« on April 8th, 2014, 02:32 PM »
If you run the installer with all language files in the language folder it works like expected.
If language files are in subfolders, they are not recognized.
131
Features / [Poll] Re: Board status icons: what's the point?
« on April 7th, 2014, 10:02 PM »
Not only more readable.
Sub-select was more efficient for this query in my tests.
More efficient means also it takes less CPU to perform. And (at this time) we use it for a limited dataset.
So it should be OK. If you misbehave, feel free to leave it by left join.
Forgot to mention: to get this query using the index, you must post something to start the magic :)

ORDER BY / GROUP BY:
I've changed it because we don't aggregating that much data ( sum(), max(), avg() ).

So here's the point:
If we're using this query with "ORDER BY", we get the full benefit from index.
If we're using GROUP BY, the query will start a partial filesort.

You can give it a shot and look how it's performing here on Wedge. The changes can easily be reverted:)
132
Features / [Poll] Re: Board status icons: what's the point?
« on April 7th, 2014, 07:21 PM »
Another way is to write it all in a Cookie. But the disatvantage is that if someone is logged with another Computer, all topics are unread again  :yahoo:
133
Features / [Poll] Re: Board status icons: what's the point?
« on April 7th, 2014, 07:08 PM »
I already have the (your) new query running without using filesorts :)
Subselects are really better than joins.

So in my upcoming commit there will be some changes to the database. Adding a view indexes to harmonize this query and to get rid of filesorts (yeah, if data is indexed, MySQL is smart enough to use them. Even subselect ones).
Code: [Select]
$where = $is_boards ? 'id_board' : 'id_topic';
$request = wesql::query('
  SELECT COUNT(DISTINCT m.id_msg) AS co, m.id_board
  FROM {db_prefix}messages AS m
  WHERE m.poster_time >= (UNIX_TIMESTAMP(NOW()) - 30 * 24 * 3600)
      AND (
        m.id_msg >
        IFNULL(
        (SELECT lt.id_msg FROM {db_prefix}log_topics AS lt WHERE (lt.id_topic = m.id_topic AND lt.id_member = 1)),
        IFNULL(
        (SELECT lmr.id_msg FROM {db_prefix}log_mark_read AS lmr WHERE (lmr.id_board = m.id_board AND lmr.id_member = 1)),
                0
            )
          )
        )
        ORDER BY ' . $where . ' DESC',
array(
'id_member' => MID,
'has_unread' => $has_unread
)
);

134
Bug reports / [Notification] @Mentions sent with prefered language of mentioning user
« on April 7th, 2014, 05:48 PM »
Received a mention notificaton in French instead of German :)
Quote
Vous avez été mentionné dans un message !
Nao vous a mentionné dans le message "Re: [Poll] Board status icons: what's the point?". Vous pouvez le consulter ici :
http://wedge.org/pub/feats/8550/poll-board-status-icons-what-s-the-point/msg295355/#msg295355
Thought this was already fixed a time ago?
135
Features / [Poll] Re: Board status icons: what's the point?
« on April 7th, 2014, 05:37 PM »
I'm currently at 0,00042s with the new query :eheh:
But I want more :)