The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
4 posters

    Reputation bar/Thanks button doesn't show up.

    kaptainsteve
    kaptainsteve
    Forumember


    Posts : 28
    Reputation : 0
    Language : english

    In progress Reputation bar/Thanks button doesn't show up.

    Post by kaptainsteve February 16th 2019, 3:30 am

    Hello,

    I can't seem t get the reputation bar, or the thanks, like or don't like buttons to show up?
    Is there something I am missing?

    Thanks.

    http://racearena.forumotion.com/t88-not-danbury-but-danbury-related-kewel-bobby-vee-chassis-dynamics#107


    Here's the Javascript I use;

    Me wrote:/*
    * Application: Reputation Levels
    * Date: 14/06/2018
    * Version: 2.014062018
    * Copyright (c) 2018 Daemon <help.forumotion.com>
    * This work is free. You can redistribute it and/or modify it
    */
    function bs_reputation_ipb() {

    /*
    * Configure below the levels for the reputation profile,
    * with the respective number needed to win it.
    * You can also add a class to customize the element.
    */

    var reputation = [
    {
    reputation: 0,
    level: "Neutral",
    class: "zero"
    },
    {
    reputation: 1,
    level: "Beginner"
    },
    {
    reputation: 10,
    level: "Regular"
    },
    {
    reputation: 20,
    level: "Good"
    },
    {
    reputation: 35,
    level: "Great"
    },
    {
    reputation: 50,
    level: "Excellent",
    class: "awesome"
    }
    ];

    /*
    * No need to change anything from here down
    */

    var post = $(".post"),
    level = "",
    repClass = "",
    BreakException = {};

    $.ajax({
    url: post.first().find("a[href^='/u']").attr("href"),
    type: "GET",
    success: function(data) {
    var fieldName = $("#field_id-14", data).find("dt").text().split(" ")[0],
    regExp = RegExp("<span[^>]*>(?:<span[^>]*>)?(" + fieldName + ")(?:<\\/span>)?\\s:\\s<\\/span>\\s*(\\d+)", "g");
    $.each($(".post"), function(idx) {
    $(this).html(
    $(this).html()
    .replace(regExp, "<div class='reputation-bs'>$1 : $2<br><span class='title' style='font-weight:normal'></span></div>")
    );
    var repDiv = $(".reputation-bs", this),
    fieldValue = repDiv.text().match(/\d+/);
    try {
    $.each(reputation, function(i, item) {
    if (item.reputation <= fieldValue) {
    level = (item.level) ? item.level : "",
    repClass = (item.class) ? item.class : "";
    } else {
    throw BreakException;
    }
    });
    } catch (e) {
    if (e !== BreakException) throw e;
    }
    repDiv.addClass(repClass).find(".title").text(level);
    });
    },
    error: function(jqXHR, textStatus, errorThrown) {
    console.log(textStatus, errorThrown);
    }
    });

    };
    $(function() {
    bs_reputation_ipb();
    });

    Here's the CSS:
    /*
    * Application: Reputation Levels
    * Date: 14/06/2018
    * Version: 2.014062018
    * Copyright (c) 2018 Daemon <help.forumotion.com>
    * This work is free. You can redistribute it and/or modify it
    */
    function bs_reputation_ipb() {

    /*
    * Configure below the levels for the reputation profile,
    * with the respective number needed to win it.
    * You can also add a class to customize the element.
    */

    var reputation = [
    {
    reputation: 0,
    level: "Neutral",
    class: "zero"
    },
    {
    reputation: 1,
    level: "Beginner"
    },
    {
    reputation: 10,
    level: "Regular"
    },
    {
    reputation: 20,
    level: "Good"
    },
    {
    reputation: 35,
    level: "Great"
    },
    {
    reputation: 50,
    level: "Excellent",
    class: "awesome"
    }
    ];

    /*
    * No need to change anything from here down
    */

    var post = $(".post"),
    level = "",
    repClass = "",
    BreakException = {};

    $.ajax({
    url: post.first().find("a[href^='/u']").attr("href"),
    type: "GET",
    success: function(data) {
    var fieldName = $("#field_id-14", data).find("dt").text().split(" ")[0],
    regExp = RegExp("<span[^>]*>(?:<span[^>]*>)?(" + fieldName + ")(?:<\\/span>)?\\s:\\s<\\/span>\\s*(\\d+)", "g");
    $.each($(".post"), function(idx) {
    $(this).html(
    $(this).html()
    .replace(regExp, "<div class='reputation-bs'>$1 : $2<br><span class='title' style='font-weight:normal'></span></div>")
    );
    var repDiv = $(".reputation-bs", this),
    fieldValue = repDiv.text().match(/\d+/);
    try {
    $.each(reputation, function(i, item) {
    if (item.reputation <= fieldValue) {
    level = (item.level) ? item.level : "",
    repClass = (item.class) ? item.class : "";
    } else {
    throw BreakException;
    }
    });
    } catch (e) {
    if (e !== BreakException) throw e;
    }
    repDiv.addClass(repClass).find(".title").text(level);
    });
    },
    error: function(jqXHR, textStatus, errorThrown) {
    console.log(textStatus, errorThrown);
    }
    });

    };
    $(function() {
    bs_reputation_ipb();
    });

    Thanks again!
    brandon_g
    brandon_g
    Manager
    Manager


    Male Posts : 10113
    Reputation : 923
    Language : English
    Location : USA

    In progress Re: Reputation bar/Thanks button doesn't show up.

    Post by brandon_g February 16th 2019, 4:04 am

    Hello,

    Did the problem start occuring after you installed the code? Also have you checked to make sure the thanks and reputation system are enabled?



    Reputation bar/Thanks button doesn't show up. Brando10
    Remember to mark your topic Reputation bar/Thanks button doesn't show up. Solved15 when a solution is found.
    General Rules | Tips & Tricks | FAQ | Forgot Founder Password?

    Reputation bar/Thanks button doesn't show up. Scre1476
    Team Leader
    Review Section Rules | Request A Review | Sticker Points
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51554
    Reputation : 3523
    Language : English
    Location : United States

    In progress Re: Reputation bar/Thanks button doesn't show up.

    Post by SLGray February 16th 2019, 4:47 am

    You do not have the correct CSS.

    Code:
            .reputation-bs {
              background-color: #DFF0D8;
              font-weight: bold;
              padding: 3px 8px;
              display: block !important;
              -moz-border-radius: 3px;
              -webkit-border-radius: 3px;
              border-radius: 3px;
              color: #3C763D;
              margin: 5px auto;
              font-family: Lato,Arial,Helvetica,sans-serif;
              font-size: 13px;
              margin-bottom: 5px;
              max-width: 123px;
              text-align: center;
            }
            .reputation-bs.zero {
              background: none repeat scroll 0% 0% rgba(222, 222, 222, 0.34);
              color: #6e6e6e;
            }



    Reputation bar/Thanks button doesn't show up. Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    kaptainsteve
    kaptainsteve
    Forumember


    Posts : 28
    Reputation : 0
    Language : english

    In progress Re: Reputation bar/Thanks button doesn't show up.

    Post by kaptainsteve February 16th 2019, 1:06 pm

    Thanks,
    I put the new CSS code in and still nothing.
    And yes, I've enabled thanks and reputation.
    The problem occurred from the git-go, ie. reputation never worked for me?

    I've followed the tutorial here https://help.forumotion.com/t132299-add-a-bar-for-reputation and inserted this code. Since mine is a phpbb3 forum I changed the version to that, phpbb3.

    I've since changed the CSS to SLGray's suggestion above, thanks, but still doesn't show?

    Thanks again.
    Any suggestions appreciated.

    Kaptainsteve
    brandon_g
    brandon_g
    Manager
    Manager


    Male Posts : 10113
    Reputation : 923
    Language : English
    Location : USA

    In progress Re: Reputation bar/Thanks button doesn't show up.

    Post by brandon_g February 16th 2019, 2:56 pm

    Try also using the scripts in this tutorial: https://help.forumotion.com/t142870-improve-the-reputation-system-so-it-counts-votes#972462 . If you don't have a reputation button for people to add reptuation it won't work.

    For thanks, can you check that you have a button/image added for Thanks. You can check this by going to ACP (Admin panel)-->Display-->Pics management (Advanced)-->Buttons-->Look for thanks and then check to see if there is an image across from it.

    Also bear in mind thanks only shows to the topic starter and you can only thank one post per topic.



    Reputation bar/Thanks button doesn't show up. Brando10
    Remember to mark your topic Reputation bar/Thanks button doesn't show up. Solved15 when a solution is found.
    General Rules | Tips & Tricks | FAQ | Forgot Founder Password?

    Reputation bar/Thanks button doesn't show up. Scre1476
    Team Leader
    Review Section Rules | Request A Review | Sticker Points
    Ape
    Ape
    Administrator
    Administrator


    Male Posts : 19432
    Reputation : 2010
    Language : fluent in dork / mumbojumbo & English haha

    In progress Re: Reputation bar/Thanks button doesn't show up.

    Post by Ape March 5th 2019, 1:14 pm

    Hello @kaptainsteve is this now solved ?

    If yes please reply to this topic and then mark the topic solved by pressing the mark solved button that can be found at the top of this topic.

    Thank you.



    Reputation bar/Thanks button doesn't show up. Left1212Reputation bar/Thanks button doesn't show up. Center11Reputation bar/Thanks button doesn't show up. Right112
    Reputation bar/Thanks button doesn't show up. Ape_b110
    Reputation bar/Thanks button doesn't show up. Ape1010

      Current date/time is November 11th 2024, 10:15 pm