Navigation

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

    asma_90

    @asma_90

    2
    Reputation
    412
    Profile views
    17
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    asma_90 Unfollow Follow

    Best posts made by asma_90

    • RE: is it possible to do simple calculation (addition and subtraction) inside templates.

      I solved my problem, but without using a helper function. here is how I solved it:
      $(window).on('action:topic.loaded', function (event, data) {
      var replynum = data.postcount - 1;
      console.log(replynum)
      });

      I have tested it and it works, every time a topic is loaded I can get the postcount.
      However, I am still unable to know why my helper function is not being executed 😕

      posted in General Discussion
      A
      asma_90
    • RE: 404.tpl

      ok, I found out how. you simply create a template with the error name inside your theme. example 404.tpl
      hopefully, this might help someone.

      posted in NodeBB Development
      A
      asma_90

    Latest posts made by asma_90

    • RE: W3C validator error : Attribute component not allowed on element ....

      thanks for the reply. I will wait for the major release then 🙂

      posted in NodeBB Development
      A
      asma_90
    • W3C validator error : Attribute component not allowed on element ....

      I keep getting this error (more than 25 errors ) when I validate my theme (which is build on the persona theme), will it be an issue if I delete the attribute "component" from my ul, li, h2.....
      examples of the errors I get:
      Attribute component not allowed on element li at this point.
      Attribute component not allowed on element h2 at this point.
      Attribute component not allowed on element i at this point.

      posted in NodeBB Development
      A
      asma_90
    • RE: how to remove header and footer from 404 error templates.

      the answer is in this topic :
      https://community.nodebb.org/topic/11906/add-a-class-to-the-body-if-the-template-is-404/3

      posted in NodeBB Development
      A
      asma_90
    • RE: add a class to the body if the template is 404

      I tested that and it works great ! thanks again for your help 🙂

      posted in NodeBB Development
      A
      asma_90
    • add a class to the body if the template is 404

      is there a way to add an if statement to header.tpl where it adds the class "error_page" to the page if the 404 template is rendered (page not found)? this will help me hide the sidebar, for example, using CSS.

      posted in NodeBB Development
      A
      asma_90
    • RE: help with using helpers inside my theme

      @PitaJ thank you so much!

      posted in NodeBB Development
      A
      asma_90
    • help with using helpers inside my theme

      I managed to make some changes on my template from the client side, but am trying to do the same thing on the server side. I am trying to create a helper. but somehow It doesn't work. here what I have done :
      first I added the hook on plugin. json :
      { "hook": "filter:topics.get", "method": "clAppendTitle" }
      then in library.js I added this code :
      var Benchpress = require.main.require('benchpressjs');
      .....
      .....

      library.clAppendTitle = function (params, callback) {
      Benchpress.registerHelper('clAppendTitle', function () {
      console.log("inside my filter");
      });
      callback();
      };

      I am trying to solve this issue for some time now. please someone help ! I am unable to figure out how to create and use helpers. I am using the last version of nodebb.

      posted in NodeBB Development
      A
      asma_90
    • how to remove header and footer from 404 error templates.

      I have created 404.tpl , and added my custom message. however, I dont want anything else to appear. I tried to use Jquery to do this and it works but after the page is load, so it shows the header and footer for a second then hide them. is it possible to do so before page load ??

      thank you !!

      posted in NodeBB Development
      A
      asma_90
    • RE: 404.tpl

      ok, I found out how. you simply create a template with the error name inside your theme. example 404.tpl
      hopefully, this might help someone.

      posted in NodeBB Development
      A
      asma_90
    • is it possible to alter the pattern of the URL pattern for topics

      I am trying to change create a different pattern for the URL. for example :
      from this URL : ...../topic/125/topic-title
      to this URL : ...../fragen/topic-title

      which means I want to replace topic with fragen and remove the topic number. is it possible?

      posted in NodeBB Development
      A
      asma_90