XenForo 2.0 Discussion

Status
Not open for further replies.
Let's keep it simple:

View attachment 142016

The XF2 preview installation will go live on one day between the above two dates.
I *think* I can predict a little more accurately than you have @Chris D. I would say its a safe bet that XF2 preview will NOT in fact come out on 22 september , or even the 23rd.

I will update the readers and say on or after 10 OCT 16 but before 20 DEC 2016.
 
If it doesn't happen by 11:59:59 PM (UK time) on December 20, then you guys can complain; otherwise, there's still time. ;)
 
That's a pity, that means we still won't be able to use avatars anywhere we want until we pass the data to the template. I wonder if that's possible to allow us to set date to -1 and get the latest avatar. Many templates have user data, but have no avatar data and we still can try to get their avatars just by setting date to 1, but for users with unset avatar it will produce incorrect image, which is kind of strange. Maybe it's worth reconsidering?
 
Many templates? I can't think of many templates that won't contain the user data if that template explicitly deals with user content.

There's a few things to note here; queries which only select a subset of the data from a table are going to be few and far between now, as the new Finder system will usually return an Entity object which represents the entire data from that table, and any Relations (joins) as well will be available automatically if specified while constructing the query, or even available on demand.

For example:

PHP:
$finder = $this->em()->finder('XF:Post')
    ->where('thread_id', 123)
    ->with('Thread')
    ->onPage(2)
    ->orderByDate();
$post = $finder->fetchOne();
$thread = $post->Thread; // this was fetched with the query
$forum = $thread->Forum; // this is silently fetched as needed
if ($forum->canView()) { /* ... */ }
if ($forum->isUnread()) { /* ... */ }

In this example we are fetching posts "with" their related Thread data (this means the resulting query will do a left join) but we can actually call "Forum" as well, which is silently fetched (at the cost of another query).

This means, in this scenario, even though we haven't explicitly called the User relation (to fetch the user records of the post authors) we can still use "->User" on demand to fetch that. Of course not ideal if you're dealing with a massive amount of posts, but there is some caching involved there.

Even so, I'm not sure you realise how avatars and the avatar_date work.

The avatar_date field is used for two things; a) an indicator that the user has a custom avatar and b) a cache buster. We do not store multiple versions of a user's avatar. We only store the latest.

This means you can always rely on the fact that if they have an avatar_date field, the latest version of their avatar will be in data/avatars/(size)/(x / 1000)/x.jpg where X is merely their user ID. If someone uploads a new avatar, the avatar is stored in the same location as the previous one. The avatar_date is useful there because if we know when the avatar changed, we can append that to the URL of the avatar and that will invalidate any browser caches and ensure that everyone sees the updated avatar instead of the old one.
 
No, but, again, having user data passed into this that doesn't contain the avatar_date will be extremely unlikely.
 
How difficult is it going to be migrating from V1 to V2? Will there be an upgrade option or do we have to migrate data over?>
 
Yep, that's the intention. Granted it will likely take longer than some upgrades, and there may be some additional rebuilds that take place, but certainly the intention is the process will be as "traditional" as possible and not a case of having to do any sort of clean install followed by a migration.
 
How difficult is it going to be migrating from V1 to V2? Will there be an upgrade option or do we have to migrate data over?>
I think I read a while back you might lose your addon data, as Xenforo LTD migration won't know what addon tables you use.
I am likely wrong.
 
Status
Not open for further replies.
Top Bottom