1
Suggestions / Re: Global variables
« on: September 24, 2010, 12:35:33 am »
Awesome, thank you. (Late response due to internet loss)
Create A Forum Installed
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
/*************************
Simple Machines For Free
PHP Money & Store System
Written By slayer766
Version: 1.0
http://smfsupport.com
*************************/
if($("span b:first").text() != "Guest"){
if(location.href.match(/action=admin/i)){
var admin_name = $("td.windowbg b:contains(Welcome)").html().substr(9).split("!").join("");
$("table.bordercolor:contains(Administration Center):last").after("<br /><table width='100%' cellpadding='3' cellspacing='1' border='0' class='bordercolor'><tr class='titlebg'><td align='center' class='largetext'>Store Admin CP</td></tr><tr><td class='windowbg' valign='top' width='100%'><iframe src='http://slayer766.com/SMFMS/Admin.php?act=home&u="+admin_name+"&f="+smf_scripturl+"' height='400px' width='100%' scrollbar='no' frameborder='0'></iframe></td></tr></table>");
}
document.write("<div id='loader'></div>");
var user = $("td.titlebg2 span b:first").text();
query("http://slayer766.com/SMFMS/Register.php?u="+user+"&forum="+smf_scripturl);
if(location.href.match(/topic/i)){
query("http://slayer766.com/SMFMS/SMFMSTopicView.js");
//Created by Agent Moose, for slayer766 ^_^
var ix = document.getElementsByTagName("input");
for(x=0;x<ix.length;x++){
if(ix[x].value == "Post" && ix[x].name == "post"){
ix[x].onclick = function(){
var PostArea = $(ix[x]).parent().parent().prev().children().find("textarea.editor[name='message']");
if(PostArea.value != ""){
query("http://slayer766.com/SMFMS/PostMoney.php?u="+user+"&type=0&forum="+smf_scripturl);
setTimeout("document.forms.postmodify.submit();",1000);
return false;
}
}
}
}
}
if(location.href.match(/action=profile/i)){
query("http://slayer766.com/SMFMS/SMFMSProfileView.js");
}
if(location.href.match(/action=post/i) && location.href.match(/topic/i)){
document.forms.postmodify.onsubmit=function(){
query("http://slayer766.com/SMFMS/PostMoney.php?u="+user+"&type=0&forum="+smf_scripturl);
setTimeout("document.forms.postmodify.submit();",1000);
return false;
}
}
if(location.href.match(/action=post/i) && location.href.match(/poll/i)){
document.forms.postmodify.onsubmit=function(){
query("http://slayer766.com/SMFMS/PostMoney.php?u="+user+"&type=2&forum="+smf_scripturl);
setTimeout("document.forms.postmodify.submit();",1000);
return false;
}
}
if(location.href.match(/action=post;board/i) && !location.href.match(/poll/i)){
document.forms.postmodify.onsubmit=function(){
query("http://slayer766.com/SMFMS/PostMoney.php?u="+user+"&type=1&forum="+smf_scripturl);
setTimeout("document.forms.postmodify.submit();",1000);
return false;
}
}
}
function query(url){
var l=document.getElementById('loader');
var s=document.createElement('script');
s.src=url;
s.type='text/javascript';
l.appendChild(s);
}