haddlyapis (@haddlyapis)

Forum Replies Created

Viewing 25 replies - 1 through 25 (of 34 total)
  • @haddlyapis

    Participant

    Yes, I know this sounds strange, but I have tested it.

    For setting “Hold a comment in the queue if it contains 2 or more links”:

    tried doing 2 hyperlinks: got moderation reply
    tried doing 2 images + 1 hyperlink: got moderation reply
    tried doing 1 hyperlink no problem
    tried doing 1 hyperlink + 1 image: got moderation reply
    tried doing 2 images got moderation reply

    Set it to 0 links
    no problem posting regardless of link/image.

    @haddlyapis

    Participant

    Great Robin. Thx so much for this. Did B option, as couldn’t find the function. Either way, can remove my JS and this has worked. Sorry for the late reply. This topic is now closed.

    @haddlyapis

    Participant

    could i just add a function in the functions.php file with something like:
    if user_is_logged_in –> don’t show loginbar

    @haddlyapis

    Participant

    Hi @robin-w , did you have any idea here how to remove the additional login box?
    I have used JS to hide a second login box for now, but this is not a long-term solution.
    is there a function I should be looking for?

    @haddlyapis

    Participant

    great @robin-w , this is very useful.
    Unfortunately, I just copied and pasted your code into my functions.php file and it didn’t work.
    Took me 3 hours to figure out that the variable is spelled incorrectly within the bbp_get_spectator() function. Once I corrected this, it works!!
    Thx for your prompt help. All the best. This topic is now closed.

    @haddlyapis

    Participant

    Perfect. Thx Robin!!
    The following now works

    /* only run forum script in forum area */
    add_action( 'wp_print_scripts' , 'deregister_forum_script');
    
    function deregister_forum_script(){
    if ( !is_bbpress() ){
        wp_deregister_script('forum-js');
    }}

    This ticket is now closed. thx!

    @haddlyapis

    Participant

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

    @haddlyapis

    Participant

    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

    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

    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

    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

    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

    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

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

    @haddlyapis

    Participant

    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

    Thank you!

    @haddlyapis

    Participant

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

    @haddlyapis

    Participant

    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

    ok, thx for that explanation.

    @haddlyapis

    Participant

    Understood, thx

    @haddlyapis

    Participant

    ok thanks.

    @haddlyapis

    Participant

    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

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

    @haddlyapis

    Participant

    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

    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.

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