Hi,
Add the following javascript code with placement on topics:
- Code:
window.atp = {};
atp.copyright = "Coded by Wolfuryo. Use at your own risk :D. Usage of this code without this notice will result in the destruction of your forum";
atp.config = {
mess: "AUTOPOST",
name: "BOT",
avatar: "https://2img.net/u/3412/19/22/63/avatars/102172-85.jpg",
fields: 1
};
atp.mo = function() {
if (atp.config.name) {
var nm = $("[href*='u']>span>strong").eq(0).text();
atp.html = atp.html.replace(new RegExp(nm, "g"), atp.config.name);
};
if (atp.config.mess) {
var ms = $("div.content>div").eq(0).html();
atp.html = atp.html.replace(ms, atp.config.mess);
};
if (atp.config.avatar) {
var sr = $(".user-avatar>a>img").eq(0).attr("src");
atp.html = atp.html.replace(sr, atp.config.avatar);
};
if (atp.config.fields) {
var fd = $(".field-info").first().html();
var df = $(".contact-info").first().html();
atp.html = atp.html.split(fd).join("").split(df).join("");
};
var ed = $("ul.profile-icons").eq(0).html();
atp.html = atp.html.split(ed).join("");
};
atp.app = function() {
$(".content-block.post").first().after(atp.html);
};
atp.init = function() {
if (!/t\d+/.test(location.pathname)) return;
atp.html = "<div class='content-block post row2 online'>" + $(".content-block.post").first().html() + "</div>";
atp.mo();
atp.app();
};
$(function() {
atp.init();
})
What you can edit:
->You can replace AUTOPOST with the message you want to posted. If you want the original message(the one posted by the creator of the topic), replace AUTOPOST with 0.
The name that appears as the poster. Replace "BOT" with 0 to show to topic author's username.
- Code:
avatar: "https://2img.net/u/3412/19/22/63/avatars/102172-85.jpg", |
->The avatar. Again, replace with 0 to show the author's avatar.
1 means that the fileds(by fields I mean reputation, number of messages etc.) are removed. 0->The fields from the topic's author are shown.