New User Profiles and other changes

Posted by GodlyPerfection GodlyPerfection
Another update to the forums is here folks. Cobb has been hard at work on some pretty epic changes including quick editing, new profiles, and a couple of other nifty modifications. Everyone thank Cobb for his awesome hard work.

Quick Edit

Alright so this first mod is very similar to the last two updates, Quick Reply and Quick Quote. Basically instead of bringing you to a new screen to edit your post it pulls up a box similar to the quick reply one and allows you to edit from the same page without having to load another page... quite simple eh? If you already have stuff typed out in the Quick Reply it will attach the content to the bottom of the post you are editing. We've created these features to help streamline your experience here at RP.

User Profile

The next big change is a new profile page for users. You can access this by clicking on the particular user's name pretty much anywhere on the forum. To edit your own profile info click your name in the top right and select Account Settings. In that list you will see an option to edit your profile. Right now the current fields are Gamertag, About Me, BNet link, and Waypoint link. The profile page also displays your signature.

Minor edits

Many more adjustments were made... like the amount of topics shown when you go to Latest Topics. Also the post count has been removed from users... or did that happen last update? Anyways, in the place where you could see post count, if you have your gamertag set in your profile it will show your gamertag below your avatar. No more having to put it in your sig. I'm going to assume that you guys don't mind, but us admins will take the time to go through users and add their gamertag for them if we know it to make it simple for you guys. ;) Here is the full list of changes that cobb documented:
  • Dashes in NAML filenames cause Error 500s with the NAML Macro Viewer's breadcrumb menu. "reply-enhancements" and "naml-editor" have been renamed (dash -> underscore).
  • [naml_editor.naml] Nabble changed part of the NAML Viewer again. Swapped out a pre-made macro of mine to account for this.
    Macros: "macro_utility_links" (override)
  • [reply_enhancements.naml] Removed the "In reply to this post by X" notice from posts.
    Macros: "reply_notice" (override)
  • [core.naml] Nabble updated one of their JavaScript files, changing its name. Updated an override to account for this. (It'd be so much simpler if <n.overriden/> weren't mysteriously broken...)
    Macros: "nabble_javascript_libraries" (override)
  • [core.naml] Found out how to fix the cookie-desync bug, and modified numerous JS AJAX calls to fix it.
    Macros: "global_custom_javascript" (override)
  • [ajax.naml] Created a macro for retrieving the visitor's permissions with respect to one or more posts. Currently retrieves whether they can edit or view the specified post(s).
    Macros: "ajax_get_post_permissions"
  • [ajax.naml, core.naml] Moved the "ajax_get_user_info" and "ajax_get_visitor_info" macros from core.naml to ajax.naml.
    Macros: "ajax_get_user_info", "ajax_get_visitor_info"
  • [ajax.naml] Modified the AJAX macros to make use of some new convenience macros ("js_string_or_null" and "js_bool").
    Macros: "js_string_or_null", "js_bool", "ajax_get_user_info", "ajax_get_visitor_info", "ajax_get_post_info"
  • [reply_enhancements.naml] Moved "Edit" link from post drop-down to visible post links. It starts out hidden, and is unhidden (for posts you're allowed to edit) with JavaScript that fires an AJAX call off to ajax_get_post_permissions.
    Macros: "post_dropdown" (override), "quick_edit_link", "quick_reply_append_link_js", "classic_row_with_big_avatar" (override), "classic_row_with_small_avatar" (override)
  • [ajax.naml] Created new macro "ajax_get_users_in_group" out of boredom.
    Macros: "ajax_get_users_in_group"
  • [ajax.naml] Extended "ajax_get_post_info" to return new information useful for editing posts. ("is_html", "raw_subject", "visitor_is_subscribed", etc.) Created new macro "ajax_get_post_edit_text" to retrieve post text for quick editing.
    Macros: "ajax_get_post_info", "ajax_get_post_edit_text"
  • [reply_enhancements.naml] Created and edited several macros as part of the process of creating a Quick Edit form. Wrote quite a bit of JS for it as well. This includes modifying the "Edit" link to load the QE form.
    Macros: "topic_footer" (override), "quick_edit_message_textarea", "quick_edit_subject_control", "quick_edit_message_control", "quick_edit_form_inner", "quick_reply_append_link_js"
  • [forum skin] Added CSS for the Quick Edit form.
  • [reply_enhancements.naml] JS and NAML fixes so that "Save Changes" shouldn't produce an error.
    Macros: "topic_footer" (override), "quick_edit_form_inner", "quick_reply_append_link_js"
  • [core.naml] Modified my JS override to use <n.overridden/>. Turns out it works; I'd just been misspelling it (omitting a "d") the whole time! I feel dumb.
    Macros: "nabble_javascript_libraries" (override)
  • [reply_enhancements.naml] Added a basic loading indicator to the Quick Edit form. I can pretty it up if desired.
    Macros: "quick_edit_message_control", "quick_reply_append_link_js"
  • [forum skin] Added CSS for the Quick Edit loading indicator.
  • [reply_enhancements.naml] Bugfixes to the Quick Edit JS. Moving the form now warns of unsaved changes only when there actually are unsaved changes. Nabble.resizeFrames() is called when the QE form is hidden, so that there is no extra space left at the bottom of the embedded page.
    Macros: "quick_reply_append_link_js"
  • [reply_enhancements.naml] Made huge changes to the Quick Reply and Quick Edit JS to create the behavior described later in this thread.
    Macros: "topic_footer" (override), "quick_reply_append_link_js"
  • [ajax.naml] Extended "ajax_get_post_permissions". It now also returns whether the visitor can lock or reply to the specified post, and it uses "js_bool" for brevity.
    Macros: "topic_footer" (override), "ajax_get_post_permissions"
  • [user_profiles.naml] Created new NAML file. I did a lot of experimenting and learned that we can create custom properties on any node, including user nodes. Right now, I have a very basic implementation of an "About Me" section on profiles. I still need to run it through the same macros that normal posts go through so that it's safe from malicious HTML (and until that's done, I won't be making the settings editable), but this proves that we can add custom stuff per-user.
    Macros: "user_profile_customizations_path", "user_profile_customizations", "user_nodes" (override), "user_profile_get_bio", "user_profile_about_me_test_form", "ajax_page_node_get_or_set"
  • [user_profiles.naml] Done more editing. It is now possible to set a gamertag field, and user bios are sanitized on output (HTML is disabled -- I couldn't get post HTML checking to run for ordinary properties). There is also an omnipresent "About [User]" tab on profile pages, which shows the customizations. CSS was added to the forum skin to make it look acceptable. (Note: The "Links" section is, presently, nonfunctional, and there's no well-done GUI for setting any of this data yet.)
    Macros: "user_profile_tabs", "user_profile_customizations", "starred_nodes" (override), "user_nodes" (override), "user_profile_get_bio", "user_custom_bio_html" (unused/nonfunctional), "user_custom_bio" (unused), "user_profile_get_gamertag", "user_profile_set_gamertag", "user_profile_about_me_test_form", "ajax_page_node_get_or_set" (disabled/unsafe)
  • [user_profiles.naml] A link to a user's Halo: Reach File Share is created if the user has a gamertag set.
    Macros: "user_profile_customizations", "reach_files_link"
  • [user_profiles.naml] Created a new form for editing the "About Me" and "Gamertag" fields on one's profile. It can be accessed from the Account settings page.
    Macros: "user_bio_field", "gamertag_field", "edit_profile_customizations", "edit_profile_customizations_path", "profile_options" (override)
  • [user_profiles.naml] Maximum length for an "About Me" value is now 1024 characters. Anything longer will be truncated (last word removed, ellipses added) when stored and when loaded. (Thanks for reporting this, Der Flatulator6!) I need to also clip the gamertag value, though, in case someone JavaScripts the "maxlength" away...
    Macros: "user_profile_get_bio", "user_custom_bio" (unused), "edit_profile_customizations"
  • [forum css] Moved inline CSS for "About Me" to the forum skin, and added additional rules to force wrapping (or clip and allow scrolling) of ridiculously-long space-less values. (Thanks for reporting this, Der Flatulator6!)
  • [user_profiles.naml] Administrators now have a way to disable profile customizations for a user via links on all users' profiles. This does not delete the customizations, but it prevents them from being displayed or edited.
    Macros: "user_profile_customizations", "can_customize", "edit_profile_customizations", "set_can_customize", "ajax_set_can_customize", "set_can_customize_form_path", "profile_header", "set_can_customize_form"
  • [user_profiles.naml] Fixed a bug that caused Halo: Reach File Share links to be shown on profiles even when the user had associated no gamertag (or, technically, an empty string).
    Macros: "reach_files_link"
  • [user_profiles.naml] Fixed a bug that made it impossible to remove one's gamertag (or, technically, set it to an empty string).
    Macros: "user_profile_set_gamertag", "edit_profile_customizations"
  • [user_profiles.naml] The link to Waypoint profiles is now a functional setting.
    Macros: "user_profile_customizations", "waypoint_profile_url", "waypoint_profile_link", "user_profile_set_waypoint_id", "waypoint_url_field", "edit_profile_customizations"
  • [user_profiles.naml] The link to profiles is now a functional setting.
    Macros: "user_profile_customizations", "bungie_profile_url", "bungie_profile_link", "user_profile_set_bungie_id", "bungie_url_field", "edit_profile_customizations"
  • [user_profiles.naml] Fixed a bug where empty-string bios were displayed as such instead of showing a default message.
    Macros: "user_profile_get_bio"
  • [core.naml] Added utility macro.
    Macros: "is_null_or_empty"
  • [user_profiles.naml] "Gamertag" box is hidden from profiles when none is set. The "Links" box would've taken too many checks for my liking, so I just added a permalink to the profile so that the box is never empty. Redundant, but eh.
    Macros: "user_profile_customizations"
  • [core.naml] Wrote JS to patch a Nabble function. The function appears to be intended to allow Chrome/Safari to maintain state without cookies, and did so by writing the client ID to all external links. The original function never checked for HTTPS, though. (Thanks for reporting this, Der Flatulator6!)
    Macros: "global_custom_javascript" (override)
  • [user_profiles.naml] "About Me" text maximum length increased to 2048 (truncate: 2052).
    Macros: "user_profile_get_bio", "user_custom_bio", "edit_profile_customizations"
  • [core.naml] Added utility macro.
    Macros: "is_truthy"
  • [user_profiles.naml] Restructured several macros (many got some shortcut notation; less significant changes not listed for this entry). Made it so that attempts to submit the customization form with an invalid value entered result in the submission being canceled and appropriate error messages being displayed. (Currently, though, only the BNet URL is checked for that.)
    Macros: "bungie_id_regex", "user_profile_process_bungie_url", "user_profile_set_bungie_id", "waypoint_id_regex", "user_profile_set_waypoint_id", "edit_profile_customizations"
  • [core.naml] Added utility macro.
    Macros: "null_or_empty_to_false"
  • [user_profiles.naml] Waypoint URL is now validated when submitting the customization form. Modified it and the macros for BNet URLs to reuse shared code.
    Macros: "extract_data_from_url", "user_profile_process_bungie_url", "user_profile_set_bungie_id", "user_profile_process_waypoint_url, "user_profile_set_waypoint_id", "edit_profile_customizations"
  • [user_profiles.naml] Profile link on profiles, generated from gamertag.
    Macros: "user_profile_customizations", "xbox_profile_link"
  • [user_profiles.naml] User signatures are shown at the bottoms of profiles, if the user has set one.
    Macros: "user_profile_customizations"
  • [user_profiles.naml] "About Me" sections now use HTML, and are fully secure when doing it. Thanks, Nabble!
    Macros: "user_profile_customizations", "user_profile_get_bio"
  • [user_profiles.naml] Checkbox added allowing one to use or not use HTML for "About Me".
    Macros: "user_profile_get_bio", "user_bio_is_html_field", "edit_profile_customizations"
  • [user_profiles.naml] Non-HTML "About Me" text now has its whitespace preserved. Signatures in profiles get a scrollbar if they're too big for the profile page to show. Rearranged some of the macros used to retrieve "About Me" text, as well. ("user_profile_get_bio" may be unused and safe to remove; I'll have to check.)
    Macros: "user_profile_customizations", "custom_bio_is_html", "custom_bio", "user_profile_get_bio", "user_bio_is_html_field", "edit_profile_customizations"
  • [forum-css] Non-HTML "About Me" text now has its whitespace preserved. Signatures in profiles get a scrollbar if they're too big for the profile page to show.
  • [core.naml] Added utility macro.
    Macros: "clip_string"
  • [user_profiles.naml] Gamertags are now clipped to 15 characters when displayed and when saved.
    Macros: "user_profile_get_gamertag", "user_profile_set_gamertag"
  • [ajax.naml, core.naml, reply_enhancements.naml, tweaks.naml] Made a multitude of small tweaks to several macros. Shorthand syntax (then.if), previously-unknown binary macros (not.is_null.var -> global_is_var_set), used new convenience macros, etc.
  • [user_profiles.naml] Revamped the customization form. URLs and gamertags are validated both on submit and at run-time. Semantic markup with some great CSS (if I do say so myself) is used for the form.
    Macros: "gamertag_regex", "user_profile_process_gamertag", "bungie_id_regex" (made JS-compatible), "waypoint_id_regex" (made JS-compatible), "edit_profile_customizations"
  • [forum-css] CSS for the revamped customization form. Designed to be reusable on any other custom forms I may add to the forum.
  • [core.naml] Added utility macro "fix_newlines". JS uses \n and the server uses \r\n; this regexes the latter to the former, so that length limits don't break server-side.
    Macros: "fix_newlines"
  • [user_profiles.naml] Added JS to the customization form to show the current and max lengths of "About Me" as the user types. Also fixed some previously-error-prone length checks for "About Me", and we now use custom macro clip_string instead of binary macro truncate.
    Macros: "custom_bio", "edit_profile_customizations"
  • [user_profiles.naml] Regexes for the BNet and Waypoint profile URLs are now case-insensitive.
    Macros: "bungie_id_regex", "waypoint_id_regex", "edit_profile_customizations"
  • [user_profiles.naml] A considerable number of tags that are permissible in posts are now sanitized and removed from "About Me" sections on profiles.
    Macros: "process_bio_html", "custom_bio_as_html"
  • [user_profiles.naml] Removed unused/debug/test macro "ajax_page_node_get_or_set".
    Macros: "ajax_page_node_get_or_set"
  • [user_profiles.naml] People who attempt to enter "" as their profile URL receive an appropriate error message, courtesy of new JS.
    Macros: "bungie_id_regex_special_case", "edit_profile_customizations"
  • [user_profiles.naml] Admins can now edit all users' profile customizations without limitation. Currently, the user is not notified or emailed their old customizations, and no evidence of admin tampering is present; these things will be changed. In the meantime, admins, please don't screw around with this -- use it for moderation only...
    Macros: "user_profile_validate_gamertag", "user_profile_set_gamertag", "user_profile_set_other_gamertag", "user_profile_set_other_bungie_id", "user_profile_set_other_waypoint_id", "edit_profile_customizations", "edit_profile_customizations_form_html", "profile_header", "edit_others_customizations_form_path", "edit_others_customizations_form"
  • [user_profiles.naml] The vast majority of user links should now go to the profile-customizations section of a user's page.
    Macros: "path" (override)
  • [user_profiles.naml] Fixes so that the customization system doesn't cause Error 500s when viewing the profile of an anonymous/unregistered user. (Specifically: user.can_customize returns false for null users.)
    Macros: "user_profile_customizations", "can_customize"
  • [user_profiles.naml] UI fixes to remove links to edit/disable the customizations for anonymous users (since they can't have them anyway).
    Macros: "profile_header", "edit_others_customizations_form"
  • [user_profiles.naml] Bugfix for "posts" tab on profiles.
    Macros: "user_nodes_path", "user_profile_tabs"
  • [core.naml, blog template (nabble-external-customizations-0-1-0.js)] In modern browsers, the address bar will update after each page load. Users of those browsers can refresh the page without being sent back several clicks. Use of Permalinks is still advised, and indeed is necessary for more primitive browsers (i.e. IE).
    Macros: "global_custom_javascript"

  • End of third batch of changes.
  • [tweaks.naml] Gamertag shows below avatars for registered users, if they've set one.
    Macros: "classic_big_avatar_cell"
  • [user_profiles.naml] In forum posts, gamertag shows below avatars for registered users, if they've set one.
    Macros: "custom_gamertag", "user_profile_get_gamertag"


classic Classic list List threaded Threaded
MythicFritz MythicFritz
Reply | Threaded
Open this post in threaded view

Re: New Profile and other changes

Holy crap that's a long list. We love you very long time indeed Cobb.

I do enjoy the new reply system and I'm off to check out my profile page right now.
Der Flatulator Der Flatulator
Reply | Threaded
Open this post in threaded view

Re: New User Profiles and other changes

In reply to this post by GodlyPerfection
Profiles, woot!
Awesome work Cobb :)
derflatulator@reachingperfection ~ $ $do || !$do ; try
try: command not found
derflatulator@reachingperfection ~ $ sudo rm -rf /
Zombified Panda Zombified Panda
Reply | Threaded
Open this post in threaded view

Re: New User Profiles and other changes

In reply to this post by GodlyPerfection
I felt like i was in the matrix scrolling down cobb's update list

you are the one... david!

great job!