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... :)
 
You can do whatever you want in the callback, so more or less. This is what's called:
Code:
    /**
    * Calls the specified template callback.
    *
    * @param string|object $class
    * @param string $method
    * @param string $contents Contents (children) of the callback; may be empty
    * @param array $params List of params to pass specifically; these will respect mappings.
    *
    * @return string New version of the contents (could be modified)
    */
    public function callTemplateCallback($class, $method, $contents, $params)

Your callback gets $contents, $params and the calling template object.
 
I hope the members list makes the final cut of 1.2 because even though some boards don't have a need for it, some of us do. It would be great if in 1.2 we could have the new look (notable members) but also the option to have the traditional members list, but with improvements. Spice up the list a bit and make it more appealing and give admins the option to configure how we want the list to look like (most posts, most activity, only with avatars, etc).
 
Notable members, member list disabled

The notable members page looks a bit like the standard members list page, but it shows people of note:

I am not a native english-language speaker... so I am not entirely sure, but the word "notable" for "Notable Members" sounds a bit funny to me, aka "not able" :unsure:

Would it be better to change the wording from "Notable Members" to something like "Well-known Members" or "Noteworthy Members" ?
Or some other word instead of "notable" (not able ;) )


:coffee:
 
I am not a native english-language speaker... so I am not entirely sure, but the word "notable" for "Notable Members" sounds a bit funny to me, aka "not able" :unsure:

Would it be better to change the wording from "Notable Members" to something like "Well-known Members" or "Noteworthy Members" ?
Or some other word instead of "notable" (not able ;) )


:coffee:

Same could be said for "noteworthy" if you take it that way.. "Not E-Worthy!" Meaning its not anything worthwhile on the internet. ;)

...but I see where you're coming from. I'm sure it's a simple phrase change.
 
Same could be said for "noteworthy" if you take it that way.. "Not E-Worthy!" Meaning its not anything worthwhile on the internet. ;)

...but I see where you're coming from. I'm sure it's a simple phrase change.

I mean:
if you verbally say the word "notable", it might sound fine to your ears.
But if you look at the written word (visually looking at the text).... it might look like "not able".

anyway.... :notworthy: <<<< Not Worthy


:whistle:
 
I mean:
if you verbally say the word "notable", it might sound fine to your ears.
But if you look at the written word (visually looking at the text).... it might look like "not able".

anyway.... :notworthy: <<<< Not Worthy

No worries, you should have seen my face when my wife wanted me to purchase a "Notable Dinette Set"!

What the hell was I going to do without a table? ;)
 
I am not a native english-language speaker... so I am not entirely sure, but the word "notable" for "Notable Members" sounds a bit funny to me, aka "not able" :unsure:

Would it be better to change the wording from "Notable Members" to something like "Well-known Members" or "Noteworthy Members" ?
Or some other word instead of "notable" (not able ;) )


:coffee:

The correct pronunciation is no-ta-ble, but I can see where you are coming from. Since its a phrase, you'll easily be able to change it. (y) On that note, notable means basically the same thing as 'noteworthy', so its interchangeable for you. :)
 
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.
Where/how is this choice made? I can't seem to find it anywhere, nothing in the forums or manual that I could turn up. o_O
 
Top Bottom