XF 1.2 More Assorted Things

We missed last week, but lets make it up with a look at a bunch of new things coming in 1.2. We do still have various "big" things to show, but we'll save them for another day.

Template editing improvements: tabs, ctrl-s, auto tabbing
The template editor in the admin CP is now easier to code directly within with a few changes:
  • Pressing tab will now insert an actual tab.
  • You can save the template using ctrl+s (or cmd+s).
  • When you press enter on a line that starts with whitespace, the next line will automatically start with that amount of whitespace. (Basically, this keeps your tab depth.)
  • If you highlight multiple lines, you can use tab or shift-tab to indent or outdent all of the selected lines automatically.
<xen:set> improvements
In certain situations, you may want to use the <xen:set> tag to set non-scalar values, generally arrays. You can now do that with this structure:
Code:
<xen:set var="$var" value="{xen:array 'a=b', 'c=d'}" />

New <xen:callback> tag
While generally we don't recommend running PHP via templates, some times it's significantly simpler than writing a full add-on. Here's an example call:

Code:
<xen:callback class="Class_Name_Here" method="getHtml"><b>HTML that will be passed to the callback.</b></xen:callback>

For advanced usage, you can also pass params to the callback via the params attribute (like in template hooks).

To try to limit any untoward usage of this, we place a couple constraints:
  • Like all of our other callbacks, it must happen to a method within a class. You can't just read out /etc/passwd directly.
  • The method that you're calling must start with a limited set of prefixes: get, is, has, render, view, return, print, show, display
I should note that while we've deprecated template hooks, you can actually use this with the new template modification system to effectively create new hooks. That is, if you'd rather work on the final rendered output rather than the template itself.

Option to block logins entirely after a few failures
By default, we only CAPTCHA block accounts after several failed login attempts. This may be more user friendly but some people may consider it to be a security issue. You now have the option to disable logins instead of showing a CAPTCHA.

New password storage: Bcrypt
1.2 introduces a more secure password storage method known as bcrypt. Most hashing schemes are designed to be fast, which makes them unsuitable for password storage. Bcrypt is intentionally slow and is also tunable so it can do more work over time as computers become faster.

Whenever a user logs in, their password will automatically be upgraded to the bcrypt format.

Weekly and monthly stat groupings
Currently, statistics can only be generated on a daily basis. You can now choose to view the totals on a weekly or monthly basis. This allows you to see longer-term trends more easily.

Notable members, member list disabled
By default, the full members list page is now disabled. On larger boards, not only is it useless (and a spam magnet), it's actually a huge performance issue.

The notable members page looks a bit like the standard members list page, but it shows people of note:
  • Most messages
  • Most likes received
  • Most trophy points
  • Today's birthdays
  • (Non-hidden) Staff members
notable-members.webp
Notification emails: easy unsubscribe
Thread notification emails now have 2 unsubscribe links that do not require users to login to use them; one link stops email notifications from the thread the email was from, while the other stops them from all content.

Setting custom routes as the index
The index page (that is, what is currently at http://xenforo.com/community/) can now be set to any route URL. By default, this will be the forum list, but you could set this to resources, a portal page, or something else entirely. If you do change it, the forum list will automatically be located at http://xenforo.com/community/forums/.


Right, let's leave it there today... :)
 
Some very big things included in this post! I really cannot wait for 1.2 and hopefully the update isn't too far in the future :p
 
Very nice!
I'm not sure I follow what you're trying to do. This allows you to set any XF "route" to be the index page of XF. It can't be outside of the XF install or anything.

If you're just ditching WP or want to use a XF-based CMS/portal, I'd probably recommend just moving XF to the root of the domain.
Do I understand it correctly that if XF is installed in domain.com/forum/ that we will still have urls like domain.com/forum/forums/ ?
I cant install in domain.com/ as there are conflicting files there and my sites have always been in /forum/
 
Notification emails: easy unsubscribe
Thread notification emails now have 2 unsubscribe links that do not require users to login to use them; one link stops email notifications from the thread the email was from, while the other stops them from all content.

could we please also get an easy way to change the colors of the Email being send out ?
http://xenforo.com/community/threads/email-styling-thread-update-messages.23326/


Setting custom routes as the index
The index page (that is, what is currently at http://xenforo.com/community/) can now be set to any route URL. By default, this will be the forum list, but you could set this to resources, a portal page, or something else entirely. If you do change it, the forum list will automatically be located at http://xenforo.com/community/forums/.

perfect (y)

So if I understand correctly, I could set the RM as my Homepage ?


:coffee:
 
Template editing improvements: tabs, ctrl-s, auto tabbing
I've had this all along through my browser extensions. :p I wonder if I will end up having conflicts or weird issues such as when I enter a tab I will end up with two tabs, and indenting will end up indenting twice, etc. Well, maybe I could attempt to edit the extension so that it doesn't run on my forum...

Does this also work for other textareas, or only for templates? I imagine it being useful in other areas, especially the template comparison coming in 1.2. Similarly, does the ctrl+s work for other forms with the s access key or only templates?

Thread notification emails now have 2 unsubscribe links that do not require users to login to use them; one link stops email notifications from the thread the email was from, while the other stops them from all content.

For the 2nd unsubscribe link when it says "all content" does that refer to all threads or any content types? For example, let's say in addition to the thread content type I have article and blog. Is the 2nd unsubscribe link meant to unsubscribe from all content types, or only all content of that specific type. I will have to write some code either way, just asking in advance.
 
Does this also work for other textareas, or only for templates? I imagine it being useful in other areas, especially the template comparison coming in 1.2. Similarly, does the ctrl+s work for other forms with the s access key or only templates?
The tab management stuff could be spun out, but it's only in template editing right now.

For the 2nd unsubscribe link when it says "all content" does that refer to all threads or any content types? For example, let's say in addition to the thread content type I have article and blog. Is the 2nd unsubscribe link meant to unsubscribe from all content types, or only all content of that specific type. I will have to write some code either way, just asking in advance.
The code actually allows all 3 options (content X, content of type Y, all content), but yes you will need to write some code to support the latter 2 options. ("All content" really just meaning each content type that supports this should remove itself. You can follow the lead of the general watched thread management stuff.)
 
I should note that while we've deprecated template hooks, you can actually use this with the new template modification system to effectively create new hooks. That is, if you'd rather work on the final rendered output rather than the template itself.
I am wondering if that will kill a bunch of add-ons. Many of the early add-ons were dependent on the template hooks. Will the hooks still be in the templates, and not adding more? Or removing them altogether?
 
I added a screenshot to the first post of the notable members page. It's fairly simple and is subject to change (have a few thoughts in mind):

http://xenforo.com/community/attachments/notable-members-png.45984/
For those of us using addons like Post Ratings (http://xenforo.com/community/resources/post-ratings-taking-likes-to-the-next-level.410/) would there be a way of changing the criteria from "Most Likes" to something like "Most Postive Ratings"?



(I know, I know, but I figured somebody had to be the one to ask it. :X3:)
 
Mike said:
New <xen:callback> tag

Oh man. I feel like a kid at xmas eve. Can you make a short video on how to use this?

Don't get me wrong. I appreciate the improvements (though I'd really like to see the tabbing done as a per-edit feature (reasoning being that sometimes I deliberately do *not* indent my edits when my customers do not use TMS or a similar system). This makes it real easy for me to spot a change I made for a specific add-on, without having to add comments), but the callback tag has me more excited than anything else.

It sounds like this will allow me to very easily replace over a dozen or so add-ons that don't have to be add-ons. A number of what-ought-to-be-easy changes are currently implemented as add-ons because there's no alternative. I'd love to see this explained more. This is easily something that will allow XF to distinguish itself from its competitors, and would open up a whole new market for developers.
 
The route to landing page YES
The template stuff not so much as I hate all that tab stuff anyway and get rid of it for clarity wherever I edit.

Can see that the Notable Members , or disabling memberlistwill be good for big boards

BUT very disappointed
that the Memberlist is not to be improved. It is so often dismissed as not useful but this is because in its current form it offers so little. This is circular. It's no good because it's neglected so cut it.

1. It should have MINIMUM all the info on the Membercard,
(and ideally option to add custom fields from profile)
2. Its searches should be global as now, and per usergroup.
3. It should have admin option to Hide selected usergroups.

Please dont comment that you dont find the MB useful. If that's the case then this is simply irrelevant to you and does not need your comment. On other threads it is clear that there is a contingent of us who value the memberlist and would like it developed in ways which are not complicated.
 
Top Bottom