Home | NodeBB Community Skip to content
  • A place to talk about whatever you want

    4k 25k
    4k Topics
    25k Posts
    julianJ
    @[email protected] what's a framework. All you need is jQuery and some elbow grease.
  • Stay tuned here to hear more about new releases and features of NodeBB!

    3k 20k
    3k Topics
    20k Posts
    <baris>B
    Organized by change type so upgrades can be done in passes and reviewed more easily. 1. Helper syntax changes ({helper()} → {{helper()}}) header.tpl {buildMetaTag} → {{buildMetaTag}} {buildLinkTag} → {{buildLinkTag}} Avatar helper (all templates showing user avatars) {buildAvatar} → {{buildAvatar}} Category icon helpers partials/account/category-item.tpl partials/categories/item.tpl partials/quick-category-search-results.tpl partials/buttons/newTopic.tpl category.tpl world.tpl {buildCategoryIcon} → {{buildCategoryIcon}} Category label helpers partials/posts_list_item.tpl partials/quick-search-results.tpl partials/topics_list.tpl topic.tpl {buildCategoryLabel} → {{buildCategoryLabel}} Other helper conversions partials/account/session-list.tpl {userAgentIcons(@value)} → {{userAgentIcons(@value)}} partials/topic/post.tpl {generateWrote(@value, config.timeagoCutoff)} → {{generateWrote(@value, config.timeagoCutoff)}} 2. Translation (tx()) changes Account templates account/categories.tpl account/uploads.tpl account/tags.tpl {title} → {{tx(title)}} account/info.tpl {./reason} → {{tx(./reason)}} account/topics.tpl {./name} → {{tx(./name)}} account/posts.tpl account/shares.tpl account/topics.tpl {noItemsFoundKey} → {{tx(noItemsFoundKey)}} account/profile.tpl account/settings.tpl partials/account/sidebar-left.tpl partials/categories/link.tpl partials/skin-switcher.tpl category.tpl {./name} → {{tx(./name)}} account/settings.tpl {./bootswatchSkinOptions.name} → {{tx(./bootswatchSkinOptions.name)}} {./name} → {{tx(./name)}} {./label} → {{tx(./label)}} Topic templates partials/topic/necro-post.tpl {text} → {{tx(text)}} partials/topic/post.tpl {posts.replies.text} → {{tx(posts.replies.text)}} partials/topic/sort.tpl {sortOptionLabel} → {{tx(sortOptionLabel)}} Navigation templates partials/topic/breadcrumbs.tpl partials/mobile-nav.tpl partials/sidebar-left.tpl {./text} → {{tx(./text)}} partials/mobile-nav.tpl partials/sidebar-left.tpl {./title} → {{tx(./title)}} Other translations partials/cookie-consent.tpl {message} → {{tx(message)}} {link} → {{tx(link)}} {dismiss} → {{tx(dismiss)}} notifications.tpl {filters.name} → {{tx(filters.name)}} partials/breadcrumbs-json-ld.tpl {stripTags(./text)} → {{tx(./text)}} 3. HTML/raw output, txEscape() changes Raw HTML rendering account/profile.tpl {./html} → {{./html}} account/settings.tpl {./content} → {{./content}} partials/topic/post.tpl {posts.user.custom_profile_info.content} → {{posts.user.custom_profile_info.content}} partials/topic/event.tpl {./text} → {{./text}} partials/mobile-nav.tpl partials/sidebar-left.tpl {./dropdownContent} → {{./dropdownContent}} partials/notifications_list.tpl {./bodyShort} → {{./bodyShort}} {./bodyLong} → {{./bodyLong}} txEscape() conversions account/profile.tpl {aboutmeParsed} → {{txEscape(aboutmeParsed)}} {posts.user.signature} → {{txEscape(posts.user.signature)}} partials/topics_list.tpl {./title} → {{{ if ./txTitle }}}{{tx(./title)}}{{{ else }}}{./title}{{{ end }}} {./teaser.content} → {./teaser.content} => {{txEscape(./teaser.content)}} partials/topic/post.tpl {posts.content} → {{{ if posts.txContent }}}{{tx(posts.content)}}{{{ else }}}{{txEscape(posts.content)}}{{{ end }}} partials/topic/navigation-post.tpl {post.content} → {{{ if post.txContent }}}{{tx(posts.content)}}{{{ else }}}{{txEscape(post.content))}}{{{ end }}} partials/categories/lastpost.tpl {./content} → {{txEscape(./content)}} partials/posts_list_item.tpl {./content} → {{{ if ./txContent }}}{{tx(./content)}}{{{ else }}}{{./content}}{{{ end }}} 4. Remove obsolete escaping URL escaping partials/account/header.tpl {escape(cover:url)} → {cover:url} partials/categories/children.tpl partials/categories/link.tpl {txEscape(./link)} → {./link} partials/topic-list-bar.tpl {escape(url)} → {url} category.tpl {escape(./url)} → {./url} Value escaping partials/category/tags.tpl partials/topic/tag.tpl partials/posts_list_item.tpl partials/search-filters.tpl partials/tags_list.tpl partials/topics_list.tpl {./valueEscaped} → {./value} Strip tags removal partials/topics_list.tpl {stripTags(./title)} → {./title} category.tpl [[category:handle.description, {txEscape(handleFull)}]] → [[category:handle.description, {handleFull}]] 5. Translation string syntax updates partials/sidebar/drafts.tpl [[topic:composer.replying-to, "{txEscape(./title)}"]] → {{tx("topic:composer.replying-to", txEscape(quote(./title)))}} [[topic:composer.editing-in, "{txEscape(./title)}"]] → {{tx("topic:composer.editing-in", txEscape(quote(./title)))}} partials/search-results.tpl [[search:results-matching, {matchCount}, {txEscape(search_query)}, {time}]] → {{tx("search:results-matching", matchCount, txEscape(search_query), time)}} 6. Topic icon refactor partials/topics_list.tpl Replace: {{{each ./icons}}}<span class="lh-1">{@value}</span>{{{end}}} With: {{{ each ./icons }}} <!-- IMPORT partials/topic/icon.tpl --> {{{ end }}} topic.tpl Replace: {{{each icons}}}<span class="lh-1">{@value}</span>{{{end}}} With: {{{ each ./icons }}} <!-- IMPORT partials/topic/icon.tpl --> {{{ end }}} Add new file partials/topic/icon.tpl <span class="badge border {./classes}"> {{{ if ./icon }}}<i class="fa {./icon}"></i>{{{ end }}} {{{ if ./label }}}<span> {tx(./label)}</span>{{{ end }}} </span> 7. Structural template updates topic.tpl Replace topic meta tags with: <!-- IMPORT partials/topic/meta-tags.tpl -->
  • You have a cool idea about NodeBB? Post it here.

    888 5k
    888 Topics
    5k Posts
    DownPWD
    @baris said: There is no chat message purge(hard delete) function, that's probably why reactions plugin doesn't have a function to remove reactions for chat messages. That why I asked for this and test with create a plugin Anyway. Thanks for the pointers, they were spot on. I dug into messaging/create.js as you suggested and traced every write addMessage does, then built a plugin that undoes exactly those. Sharing the full key list in case it's useful for a potential core implementation, since you mentioned there's no hard-delete for chat right now. For a given room, the purge removes: Per message mid: message:{mid} (the object) mid:{mid}:replies (reply zset) removes the mid from the global messages:mid index reactions plugin leftovers: mid:{mid}:reactions + each mid:{mid}:reaction:{emoji} (the reactions plugin has no chat-side cleanup hook, so these orphan otherwise) Per room roomId: chat:room:{roomId}:mids (zset) chat-read-receipts:room:{roomId} resets chat:room:{roomId}.messageCount removes roomId from chat:rooms:public:lastpost (public rooms) Per member uid: sortedSetRemove uid:{uid}:chat:rooms:unread (it's a sorted set) deleteObjectField uid:{uid}:chat:rooms:read (it's a hash, so the field is deleted, not a zset member) Global: decrements global.messageCount by the number of messages purged Deliberately kept: the room object, owners, members, settings, and uid:{uid}:chat:rooms, the room stays in everyone's chat list, since this empties the room rather than deleting it. Two things worth flagging: The read vs unread asymmetry tripped me up at first, unread is a sorted set but read is a hash keyed by roomId, so they need different removal calls. Easy to get wrong if you assume both are zsets. Cleaning up the per-user read pointers across all room members is exactly the part that's painful via the mongo CLI (as you said), but trivial inside a plugin where I can iterate getUidsInRoom. Does this look like it covers everything addMessage writes, or is there a key I'm still missing? And would a chat hard-delete like this be something core would consider, or is soft-delete-only intentional for chat? Thanks again.
  • Discussion regarding NodeBB Plugin development.

    2k 16k
    2k Topics
    16k Posts
    M
    @brutalbirdie I mean that the platform you created will be synchronized with user reports. Is it like that? In addition, I'm mainly talking about the @palmoni plugin where the user creates contact through the site, and I want to make sure who handled each request and what they did...
  • 50 Topics
    1k Posts
    <baris>B
    filter:users.get fires after try that one.
  • Need help with installing or configuring NodeBB? Look here.

    5k 28k
    5k Topics
    28k Posts
    <baris>B
    The version of cron looks good. To check the value passed to cron open up the file cron.js in /path/to/nodebb/src/cron.js and add a console.log(cronTime) on here. Then restart nodebb and see what the message shows in the logs. For each cronjob that was started it should show it's pattern.
  • 1k Topics
    4k Posts
    zangxiaohuiZ
    嵌套回复 test
NodeBB 4.12.0 Released!

  • Hello everyone,

    Today we are releasing NodeBB 4.12.0 and 3.12.9...

Popular Tags

Online Users