haddlyapis (@haddlyapis)

Forum Replies Created

Viewing 25 replies - 1 through 25 (of 28 total)

  • haddlyapis
    Participant

    @haddlyapis

    Great! thx for the explanation and the quick response. That clears everything up.


    haddlyapis
    Participant

    @haddlyapis

    Hey Robin,
    hope this message finds you, due to the spam above. How ironic that this forum message is about spam blocking:
    You were right with the “stop words”. Strangely, though, i have not been adding them via bbpress but instead using a plugin called “BanHammer”. It has helped greatly in stopping spam signups, but i didn’t realise that it added the strings to the “Settings –> Discussion –> “Disallowed Comment Keys” part.
    I had added the string “gmail.com” as I was getting some spam signups, and realised that the account i used to test post a comment was in fact my gmail.com account. So there you go. BanHammer and stop words.
    Thx again for your help, this is invaluable due to the amount of traffic we will shortly have.
    thx.
    This topic is now closed.


    haddlyapis
    Participant

    @haddlyapis

    Hi there and thx for your reply on this matter,
    I have checked the Discussion settings and I cannot find the error. I have not added any stop-words and just to test a post, all I wrote was the word “test” as comment (which was rejected).
    Interestingly, I tried using a different user with only “participant” status and this worked. But there is no obvious reason why.
    I also set up a new, dummy account with “participant” status and this didn’t work.
    So I am at a loss.


    haddlyapis
    Participant

    @haddlyapis

    Hi there,

    any ideas anyone? We have a major event coming up and will be using our forum quite a lot. Any suggestions appreciated.


    haddlyapis
    Participant

    @haddlyapis

    Hey there, I tried using the translation part of the bbp style pack plugin, while assuming, that once I was able to fix the translations I would then fix the CSS styling issues I have mentioned above (this would just take a little work on my behalf). Anyway, even though it says you have to play around with it to get it right (e.g. add the full stop if there is one etc.), I was not able to implement the translations. I am sure it has something to do with the way my site is set up and not the plugin itself, but alas, I had to find a different option.
    So, here is my frontend Javascript solution. I noticed that I have to put e.g. “weeks” before “week” in the object for it to work (i.e. plural before singular). For anyone who wants to know, the word “aktualisiert” refers to the English word “updated”, (as the verb goes to the end of the sentence in German it is slightly tricky to just translate “this was last updated…..”).
    I am not sure if anyone needs this, but as I require help with my website from time to time from people like those at bbpress (thx btw), if I can be of any help, I would like to. This is an IIFE btw:

    
    /* WB- translate some dodgy sentences (part English/ part German) */
    var translate = function () {
        //check if the page is a forum page. If not, return function
        var isForum = document.querySelector("#bbpress-forums");
        if (!isForum) return;
    
        // find if either forum or topic description (topic is one level lower in the forum where people can answer individual posts. forum is where all the sub-topics are listed
        var forum = document.querySelector(".bbp-forum-description");
        var description = document.querySelector(".bbp-topic-description");
    
        //If not on either the forum description page or the forum topic page, return
        if (!forum && !description) return;
    
        //set a variable to add the innerHTML to 
        var d_text;
    
        if (forum) {
            // if forum has no topics make no tranlation changes and hide the "Oh bother.... div"
            if (forum.innerText === "Dieses Forum ist leer."){ 
            var oh_both_text = document.querySelectorAll(".bbp-template-notice");
            oh_both_text[1].style.display = "none";
            return;
        }
            d_text = forum.innerHTML;
        }
        if (description) {
            d_text = description.innerHTML;
        }
    
        // create object with list to translate (name: = English, value = Deutsch)
        var d_obj = {
            "This forum has": "Dieses Forum hat",
            "This topic has": "Dieses Thema hat",
            "This category has":"Diese Kategorie hat",
            "This topic is empty":"Dieses Thema ist leer",
            "hidden":"verdeckt",
            "and was last updated": "und wurde zuletzt",
            "seconds": "Sekunden",
            "minutes": "Minuten",
            "hours": "Stunden",
            "days":"Tagen",
            "day": "Tag",
            "weeks":"Wochen",
            "week": "Woche",
            "months": "Monaten",
            "month": "Monat",
            "years":"Jahren",
            "year":"Jahr",
            "by": "von"
        }
    
        // use Replace method to run through innerHTML and replace English text with German
        d_text = d_text.replace(/This forum has|This topic has|This category has|This topic is empty|hidden|and was last updated|seconds|minutes|hours|days|day|weeks|week|months|month|years|year|by/gi, function (matched) { return d_obj[matched]; });
    
        //add "aktualisiert" to end of sentence
        if (d_text.indexOf("und wurde zuletzt") > -1) {
        d_text = d_text.slice(0,-1).concat(" aktualisiert.");    }
    
        //update the innerHTML of either the forum or the topic page 
        if (forum) { forum.innerHTML = d_text; }
        if (description) { description.innerHTML = d_text; }
    }();
    

    haddlyapis
    Participant

    @haddlyapis

    When i activate the plugin, the css styling changes how the forum looks. For example the Topics Index Styling overrides the css of my current layout, which is styled from my own styles.css file.


    haddlyapis
    Participant

    @haddlyapis

    Hey,
    Unfortunately, upon activating it, it changes the layout of the forum. This would be ok, I could simply take some time to change it, but as there are so many features, I am not sure what else changes.
    Is there any way to take out the functionality of the translation part and make it its own plugin?
    Would this be too much work on your behalf?
    thx for all your help.
    Dan


    haddlyapis
    Participant

    @haddlyapis

    content-archive-forum.php
    form-search.php
    loop-single-topic.php
    content-single-forum.php
    loop-forums.php
    loop-topics.php


    haddlyapis
    Participant

    @haddlyapis

    Hi,

    My theme does have a folder for BBpress, but this has not changed for over 4 years and now this issue has come up.


    haddlyapis
    Participant

    @haddlyapis

    Thank you!


    haddlyapis
    Participant

    @haddlyapis

    lovely, great to know. thx for the quick responses.


    haddlyapis
    Participant

    @haddlyapis

    Hey,
    thx. I will try it out.
    One issue is that it hasn’t been updated for 2 years. This could break anytime. (not complaining though, as this is better than no option).


    haddlyapis
    Participant

    @haddlyapis

    ok, thx for that explanation.


    haddlyapis
    Participant

    @haddlyapis

    Understood, thx


    haddlyapis
    Participant

    @haddlyapis

    ok thanks.


    haddlyapis
    Participant

    @haddlyapis

    Hi,
    you were right about having to deactivate all other add-on bbpress plugins. thx. I can’t seem to set this issue as resolved though.


    haddlyapis
    Participant

    @haddlyapis

    Actually, “Spectator” does appear.
    But not: “no role”.


    haddlyapis
    Participant

    @haddlyapis

    Oh, ok.
    Any chance you want to have a go at creating that function?
    I know there is a plugin that automatically subscribes you to all forum topics upon signing up to the forum, but this is a little extreme and potentially illegal.


    haddlyapis
    Participant

    @haddlyapis

    Thx. sorry for being so slow,
    but which function could i use to add the “Subscribe to all topics” button to the main forum page.


    haddlyapis
    Participant

    @haddlyapis

    Hey,
    Where would i find the necessary code in your plugin?


    haddlyapis
    Participant

    @haddlyapis

    Just to let you know, I pasted the shortcode for Prisna in the BBPress file ‘content-archive-forum.php’ in order to display the language options on the main forum page http://www.apis.de/forum


    haddlyapis
    Participant

    @haddlyapis

    Hi,
    Sorry to keep on this topic. But i have now changed the login link so that it redirects to the main login page: http://www.apis.de/forum where users can login normally.
    Can you help with one last thing 🙂 :
    I only want the “login/logout links to appear in all sub areas of http://www.apis.de/forum and not on http://www.apis.de/forum itself. Can you help?


    haddlyapis
    Participant

    @haddlyapis

    Hi,
    If i login normally from the forum page, i am redirected to the forum page (www.apis.de/forum) after entering my login details. When i use this method, i am redirected to the main website page (www.apis.de). Can you help here?
    Also, do you know why sometimes after loggin in this way, it says i still need to login? I know i can fix this by pressing ctrl + F5, but i don’t know how to fix it. Any help appreciated.


    haddlyapis
    Participant

    @haddlyapis

    Just to let you know that this issue was fixed by uninstalling the plugin “bbPress Login Register Links On Forum Topic Pages” and instead adding a login/logout link using the code provided here:

    Layout and functionality – Examples you can use

    and then adding code provided to make sure the links only appear in the forum and not the whole site:
    change line 3 to
    if ( is_user_logged_in() && is_bbpress() ) {

    and line 6 to

    elseif ( !is_user_logged_in() && is_bbpress() ) {


    haddlyapis
    Participant

    @haddlyapis

    Awesome. That did the trick. Thx.

Viewing 25 replies - 1 through 25 (of 28 total)