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.
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
@yworld
Just do an else if instead. 🙂
Thank you! I will leave on then right now can not understand 🙂
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
http://image.prntscr.com/image/326cd0202edc4b85af4c51cc1dc52ce4.png
Thanks for your work!
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 🙂