Hello there AvacWeb!
This is my first tutorial for AvacWeb, and I hope you'll like it.
Forumotion API
Forumotion API was a simple API that helps you simplifies things inside Forumotion. It's on version [ic]v.1.3[/ic] now, and right now it's still empty, so I hope you can give me a suggestions/opinions nor contributions to this API, and I'll deeply thank you for that. You may also post any errors you've encountered when using this script. Don't worry, I'll check this topic everyday so you don't have to wait that long.
Navigate through Administration Panel -> Modules -> JavaScript Management. Create a new JavaScript, fill the title with anything (really, because it doesn't affect the script), tick the Placement in All Pages. And then, paste this script inside the JavaScript Code section (the code's compressed):
And if you want the uncompressed version, you can have this:
Future Features
This is the list of features that I want to add in the future. If you want to request a future feature, feel free to reply into this topic.
On-Progress Features
This is the list of features I'm currently progressing on, and will be added after I've finished:
This is my first tutorial for AvacWeb, and I hope you'll like it.
Forumotion API
Forumotion API was a simple API that helps you simplifies things inside Forumotion. It's on version [ic]v.1.3[/ic] now, and right now it's still empty, so I hope you can give me a suggestions/opinions nor contributions to this API, and I'll deeply thank you for that. You may also post any errors you've encountered when using this script. Don't worry, I'll check this topic everyday so you don't have to wait that long.
Navigate through Administration Panel -> Modules -> JavaScript Management. Create a new JavaScript, fill the title with anything (really, because it doesn't affect the script), tick the Placement in All Pages. And then, paste this script inside the JavaScript Code section (the code's compressed):
- Code:
[panda=js]!function(){$fm={version:"1.4.6",author:"Hitsu",cookie:{cook:function(o,n){my_setcookie(o,n)},take:function(o){return my_getcookie(o)},eat:function(o){document.cookie=o+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT;",console.log("Yummy cookies!")}},forumData:{memberData:[_userdata.avatar,_userdata.user_id,_userdata.user_posts,_userdata.user_nb_privmsg,_userdata.point_reputation,_userdata.user_lang],member:-1!=_userdata.session_logged_in?!0:!1,isTopic:window.location.pathname.indexOf("/t")>-1?!0:!1,isTopicID:function(o){return window.location.pathname.indexOf("/t")&&window.location.pathname.indexOf(o)?!0:!1},isPM:function(){window.location.pathname.indexOf("/privmsg")>-1?!0:!1},isAdmin:0!==_userdata.user_level?!0:!1,isViewUser:-1!=document.title.indexOf("Viewing profile")?!0:!1,isViewUserID:function(o){return-1!==window.location.pathname.indexOf("/u")&&-1!==window.location.pathname.indexOf(o)?!0:!1},utilities:{log:function(o){console.log(o)},warning:function(o){console.warn(o)},error:function(o){console.error(o)},boardInformation:[window.location.hostname]}}},"1.4.6"!=$fm.version&&($fm=!1,console.log("Please update to 1.4.6 first.")),"Hitsu"!=$fm.author&&(document.innerHTML="The original author of fmAPI was Hitsu. Don't steal from her.")}();
And if you want the uncompressed version, you can have this:
- Code:
[panda=js](function() {
$fm = {
version:"1.4.6",
author:"Hitsu",
cookie: {
cook: function(name,value) { my_setcookie(name,value); },
take: function(name) { return my_getcookie(name); },
eat: function(name) { document.cookie = name + "=; expires=Thu, 01 Jan 1970 00:00:01 GMT;"; console.log("Yummy cookies!"); }
},
forumData: {
memberData: [_userdata.avatar, _userdata.user_id, _userdata.user_posts, _userdata.user_nb_privmsg, _userdata.point_reputation, _userdata.user_lang],
member: _userdata.session_logged_in != -1 ? true : false,
isTopic: window.location.pathname.indexOf("/t") > -1 ? true : false,
isTopicID: function(topicid) { if(window.location.pathname.indexOf("/t") && window.location.pathname.indexOf(topicid)) { return true; }else{ return false; } },
isPM: function() { window.location.pathname.indexOf("/privmsg") > -1 ? true : false; },
isAdmin: _userdata.user_level !== 0 ? true : false,
isViewUser: document.title.indexOf("Viewing profile") != -1 ? true : false,
isViewUserID: function(userid) { if(window.location.pathname.indexOf("/u") !== -1 && window.location.pathname.indexOf(userid) !== -1) { return true; }else{ return false; }
},
utilities: {
log: function(text) { console.log(text); },
warning: function(text) { console.warn(text); },
error: function(text) { console.error(text); },
boardInformation: [window.location.hostname]
}
}
};
if($fm.version != "1.4.6") { $fm = false; console.log("Please update to 1.4.6 first."); }
if($fm.author != "Hitsu") { document.innerHTML = "The original author of fmAPI was Hitsu. Don't steal from her."; }
}());
Documentation
- unavailable on the moment! -Future Features
This is the list of features that I want to add in the future. If you want to request a future feature, feel free to reply into this topic.
- [ic]$fm.forumData.forumVersion();[/ic] -- returns your forum version. (this is [ic]v 1.5[/ic] feature. I'm not really sure I want to add it inside 1.4)
- [ic]$fm.utilities.styling();[/ic] -- style any element.
On-Progress Features
This is the list of features I'm currently progressing on, and will be added after I've finished:
- [ic]$fm.utilities.getElement(selector,name);[/ic] -- get any element.
- [ic]$fm.forumData.reputation;[/ic] -- returns reputation of the user.