1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 More Assorted Things

Discussion in 'Have You Seen...?' started by Mike, May 10, 2013.

  1. Mike

    Mike XenForo Developer Staff Member

    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.png
    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... :)
    KC2T, Wulfspider, RoldanLT and 89 others like this.
  2. tenants

    tenants Well-Known Member

    This I have wanted to do so many times, and have created so many "hacky" ways around it

    Code:
    <xen:set var="$var" value="{xen:array 'a=b', 'c=d'}" />
    
    A big thumbs up for making templates more flexible

    - Great, there is no longer any need for Login User Locks and I did consider this a security issue

    Will this also work on the registration area (lets say after 10 attempts of registration), and how do you block the account, is it based on IP or user session, or do you lock the account that the user attempted to login in to (like Login User Locks)? If so, is the lock time customisable to be very small (seconds)
  3. Shelley

    Shelley Well-Known Member

    I think these assorted have you seens will fast become a fav of mine and something i'll look forward to. I hope we see more of these type of have you seens in the future. Nice work Mike. (y)

    Have you seen? My new mouse? It's great.
    Bob B, MattW and AlexT like this.
  4. Azhria Lilu

    Azhria Lilu Well-Known Member

    1.2 just keeps getting better and better.
    SchmitzIT, Bob B and Garamond like this.
  5. Biker

    Biker Well-Known Member

    Question. I had installed XF in /forum as I had high hopes for a WordPress bridge that I was going to install in root. As my hopes for this bridge have dwindled to nothing, there are a couple of addons that could possibly meet my needs now. The ability to show a portal page as residing in root now becomes a huge issue for me. Will custom routes allow me to do this? Or will it always show the forum software location as the "default" location?
  6. AlexT

    AlexT Well-Known Member

    Ahhh, the perfect remedy for a rainy day. ;)
    tenants likes this.
  7. Mike

    Mike XenForo Developer Staff Member

    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.
  8. Biker

    Biker Well-Known Member

    That's what I was afraid of. **sigh** I see some work in my immediate future. >.<
    Clickfinity likes this.
  9. duderuud

    duderuud Active Member



    Awesome! Just what we needed :)
  10. Brogan

    Brogan XenForo Moderator Staff Member

    I moved mine to the root a few weeks ago for the same reasons - the dedicated home page I had planned never fully materialised.
  11. RobParker

    RobParker Well-Known Member

    Can we get a screenshot of the new members list?
    Veer, akia, gldtn and 3 others like this.
  12. Shelley

    Shelley Well-Known Member

    Yeah that would be nice. And Brogan no blurry or 1px by 1px screenies. :D
    SchmitzIT and Miner like this.
  13. AlexT

    AlexT Well-Known Member

    I read: no blurry 1px by 1px screenie. Huh!? :)
  14. Shelley

    Shelley Well-Known Member

    Gaussian enabled. ;)
  15. Karelke

    Karelke Active Member

    The VIM experience, nice job!
  16. Jeremy

    Jeremy XenForo Moderator Staff Member

    This is awesome! Great work Mike & Kier!
    Bob B likes this.
  17. M@rc

    M@rc Well-Known Member

  18. Hornstar

    Hornstar Well-Known Member

    Keeps getting better!
  19. btfstone

    btfstone Member

    Wantne it too
  20. LP-John

    LP-John Well-Known Member

Share This Page