Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags
    • Users
    • Groups
    1. Home
    2. glassdimly
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 9
    • Best 1
    • Groups 0

    glassdimly

    @glassdimly

    2
    Reputation
    4
    Profile views
    9
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    glassdimly Unfollow Follow

    Best posts made by glassdimly

    • RE: Quickstart your NodeBB theme development

      I created a tutorial for forking themes, versioning them, and getting them up on Heroku: http://glassdimly.com/blog/tech/nodebb-yarn-nodejs-javascript-yalc/how-fork-and-deploy-nodebb-custom-theme-heroku

      posted in NodeBB Themes
      glassdimly
      glassdimly

    Latest posts made by glassdimly

    • RE: Redirect after login?

      Here's what I ended up doing. Feels reeealy hacky.

      in footer.tpl

      window.addEventListener('DOMContentLoaded', function () {
      			$(window).on('action:ajaxify.contentLoaded', function(data) {
      				// attach to all login/reg buttons except for the login and register buttons on the login page.
      				$("a[href$='/login'], a[href$='/register']").not('#login').not('#login__no-acct').each(function(i, el){
      					$(el).off('click').on('click', function(){
      						window.setCookie('login:referrer', window.location.href, 10);
      					});
      				});
      			});
      		});
      	</script>
      

      in profile.tpl

      <script>
      	var referrer = window.getCookie('login:referrer');
      
      	if (referrer && window.getCookie('login:shouldRedirect')) {
      		window.setCookie('login:shouldRedirect', '', 0)
      		window.setCookie('login:referrer', '', 0)
      		window.location.href = referrer;
      	}
      </script>
      

      in registerComplete.tpl

      <script>
      	window.setCookie('login:shouldRedirect', 'true', 10);
      </script>
      

      ...and attaching setCookie/getCookie on window in header.

      Probably could do this all with client-side hooks now that I understand them though.

      posted in Technical Support
      glassdimly
      glassdimly
    • RE: Redirect after login?

      Yeah, thinking about that problem now. I don't care if people post w/o verification (we'll see if that's a problem), but what I DON'T want is notifications sent to unverified email addresses. That would ruin our smtp status.

      posted in Technical Support
      glassdimly
      glassdimly
    • RE: Redirect after login?

      Hi @gotwf,

      Thank you for your input, and I hear you. Currently, client wants to let users log in and post immediately--and to be clear that's already configured and done, an option in NodeBB. If we get spam, easy to change. We also have good mods.

      The only thing I need here is that I want them to be redirected to the page from which they started. I could write a cookie or something, or maybe make a query string deal. I could even track down the login button and try to ajaxify it. But I'm sure others have done this, so I thought I'd ask.

      The question is the same whether someone registers or logs in: I want them to be redirected back to the page from which they clicked "Log in to post".

      In other systems, namely Drupal, this is what happens, which is why as a dev I think it's important.

      Users also expect this. They don't want to hit the back button to get to where they were before. Some low-tech users like grandmas just get confused at that point.

      posted in Technical Support
      glassdimly
      glassdimly
    • RE: Redirect after login?

      @gotwf The problem is this is for non-technical people. So it's a balance.

      posted in Technical Support
      glassdimly
      glassdimly
    • RE: Error: Login Unsuccessful We were unable to log you in, likely due to an expired session. Please try again

      I got this error when logged into the https version of my site while trying to log in at the http version.

      posted in Technical Support
      glassdimly
      glassdimly
    • RE: NodeBB content translation?

      The more I think about this, the more I see the problem with content translation. One would have to translate every single reply and worry about untranslated fallback content.

      I'm going to look into the google site translate widget. Any folks done that?

      posted in Technical Support
      glassdimly
      glassdimly
    • Redirect after login?

      Here's the workflow I want:

      1. I am a new user, I wish to post a reply.
      2. I click "Log in to reply"
      3. I create a new account
      4. I am redirected back to the post from which I clicked "Log in to reply"

      It would seem to me that this is a common use case and that I wouldn't need to hack on NodeBB to accomplish this, yet I haven't found a plugin, setting, or detail in a forum post to accomplish this.

      Since this is so common and since I'm new to NodeBB, surely someone has done this--could that person share their code or even their basic technical approach?

      Thanks!

      posted in Technical Support
      glassdimly
      glassdimly
    • NodeBB content translation?

      I've got a new forum on COVID and I'd like to add translations for some of our Categories, Topics, and Replies.

      I see that there's support for translation of the interface, and that's great.

      What about content?

      If there isn't a plugin for doing this already, what might be a good architecture for such a plugin, in general terms, from a NodeBB dev familiar with the structure?

      I saw it mentioned in another (older) forum post that content is language-unspecific right now. True story?

      posted in Technical Support
      glassdimly
      glassdimly
    • RE: Quickstart your NodeBB theme development

      I created a tutorial for forking themes, versioning them, and getting them up on Heroku: http://glassdimly.com/blog/tech/nodebb-yarn-nodejs-javascript-yalc/how-fork-and-deploy-nodebb-custom-theme-heroku

      posted in NodeBB Themes
      glassdimly
      glassdimly