• Resolved dragonlord88

    (@dragonlord88)


    Hallo! Habe zwei Fragen.

    1. Ich mag dieses Plugin sehr, aber was mir doch irgendwie ein bisschen fehlt sind R?nge. Ist dies für die Zukunft geplant, oder es irgendwie m?glich die R?nge von WordPress selbst zumindest in einem Thema anzuzeigen?

    2. Kann ich bei der Mobilen Ansicht den Avatar wieder aktivieren? Bzw. wo werden die Elemente bestimmt die dort ausgeblendet werden?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hello, edit:
    2. mobile.css – /asgaros-forum/skin/

    More convenient do so:

    How can I add my own theme?
    You can add own themes for your forum in the /wp-content/themes-asgarosforum directory (for example: /wp-content/themes-asgarosforum/my-theme). All themes in the /wp-content/themes-asgarosforum can be activated in the forum options. Each theme must have at least those files: style.css, mobile.css and widgets.css.

    Plugin Author Asgaros

    (@asgaros)

    Hallo @dragonlord88,

    erst einmal sorry für die sp?te Antwort.

    1. R?nge sind momentan nicht geplant, k?nnen aber mit eigenem Code relativ einfach implementiert werden. über den Hook asgarosforum_after_post_author k?nnen weitere Informationen unter dem Namen eines Post-Authors angezeigt werden. Mit dem kommenden Release wird diesem Hook die Benutzer-ID des Post-Authors sowie die Anzahl seiner Posts übergeben. Siehe dazu der folgende Commit, falls du diese ?nderung jetzt schon haben m?chtest:

    https://github.com/Asgaros/asgaros-forum/commit/a70b2e4083ea204dbdf87faaa41b7c2b29c528e7

    über die Datei functions.php deines Themes lassen sich darüber dann R?nge definieren. Zum Beispiel so:

    function my_asgarosforum_after_post_author($author_id, $author_posts) {
    	if ($author_posts > 10) {
    		echo '<br />Advanced User';
    	} else {
    		echo '<br />Newbie';
    	}
    }
    add_action('asgarosforum_after_post_author', 'my_asgarosforum_after_post_author', 10, 2);

    2. Wie zuvor beschrieben legst du dafür am besten ein eigenes Theme an (durch kopieren des vorhandenen) und überschreibst dementsprechend die mobile.css-Datei.

    Hallo @asgaros
    Thank you for the new ??
    How can I make a few Rank?

    function my_asgarosforum_after_post_author($author_id, $author_posts) {
    	if ($author_posts > 10) {
    		echo '<br />Advanced User';
    	} 
    	if ($author_posts > 15) {
    		echo '<br />Advanced User2';
    	} else {
    		echo '<br />Newbie';
    	}
    }
    add_action('asgarosforum_after_post_author', 'my_asgarosforum_after_post_author', 10, 2);

    Displays the two at once (

    Thank you

    Plugin Author Asgaros

    (@asgaros)

    @yworld

    Just do an else if instead. ??

    Thank you! I will leave on then right now can not understand ??

    Plugin Author Asgaros

    (@asgaros)

    This is what I meant:

    function my_asgarosforum_after_post_author($author_id, $author_posts) {
    	if ($author_posts > 10) {
    		echo '<br />Advanced User';
    	} else if ($author_posts > 15) {
    		echo '<br />Advanced User2';
    	} else {
    		echo '<br />Newbie';
    	}
    }
    add_action('asgarosforum_after_post_author', 'my_asgarosforum_after_post_author', 10, 2);

    Just:
    } else if ($author_posts > 15) {
    Instead of:
    if ($author_posts > 15) {

    function my_asgarosforum_after_post_author($author_id, $author_posts) {
    	if ($author_posts > 10) {
    		echo '<br />Advanced User';
    	} else if ($author_posts > 15) {
    		echo '<br />Advanced User2';
    	} else {
    		echo '<br />Newbie';
    	}
    }
    add_action('asgarosforum_after_post_author', 'my_asgarosforum_after_post_author', 10, 2);

    Only the first condition is triggered
    https://image.prntscr.com/image/326cd0202edc4b85af4c51cc1dc52ce4.png

    Thanks for your work!

    Plugin Author Asgaros

    (@asgaros)

    You have to check for the highest value first, because when a user has more than 15 posts he has more than 10 posts as well.

    So check for >15 —> >10 —> <10.

    ??

    Thank you very much!
    How the time will I will do ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘R?nge & Mobile Ansicht’ is closed to new replies.