Advertise Here

Show Posts

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.


Topics - slayer766

Pages: [1] 2
1
SMF For Free Codes and Support / Zeta RPG
« on: February 20, 2011, 07:31:06 pm »
Preview: Preview
Register a forum account, visit the RPG tab.

What the code does: Not your ordinary "code". This serves as some entertainment for your board. If you know about Dungeons & Dragons, then you will get the feeling that this is like it. The game-play is similar, battle system-wise.

You can get information all about the game here: Game News

Copyright: slayer766
Known Bugs: There are these noted: http://s1.zetaboards.com/ZetaRPG/forum/1545541
Installation: A few steps to follow. Actual RPG installation on your board will take place after you create your player account, once you add everything to your board below:


Step 1. Go into your Admin CP > Manage Styles > Headers/Footers > Headers:

Make sure you have this in there
Code:
Code: [Select]
<script src="/jquery.js"></script>
<div class="tborder" id="theslayerday" style="display:none;"><div class="titlebg2">RPG</div>
<table id="zbslay" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td width="13%" valign="top"><div class="tborder"><div class="titlebg2">Menu</div><span id="left_menu"></span></div></td>
<td width="67%" valign="top"><div class="tborder"><div class="titlebg2">Main</div><span id="rpg_content"><br /><br /><div align="center"><img src="http://209.85.62.24/461/174/0/p369636/ajax_loader.gif" alt="Loading..."></div><br /><br /></span></div></td>
<td width="20%" valign="top"><div class="tborder"><div class="titlebg2">Character</div><span id="right_menu"></span></div></td>
</tr>
<tr><td colspan="3" id="players_area"></td></tr>
</table>
<div id="rawr"></div>
</div>

In your Footers, place this in there:
Code:
Code: [Select]
<script type="text/javascript">var the_url=$("td.maintab_active_back a").attr("href").split("http://")[1].split("index")[0];$("td.maintab_back:first").after("<td valign='top' class='maintab_back'><a href='http://"+the_url+"index.php?pages/rpg'>RPG</a></td>");</script><script type="text/javascript" src="http://209.85.62.24/461/174/0/p343528/RPGvD.js"></script>

Now Save Headers and Footers. Then that's it for the board installation. The in-game board activation has instructions on how to activate it and everything. But if you need help after this just let me know. After you've done that you can now play the game, or add images for weapons/armor/etc. or set game settings through the RPG CP.

Please let me know how this goes as I sort of rushed this over for SMF For Free. XD

2
General Chat / SMF For Free Store Mod v2
« on: November 09, 2009, 06:37:00 pm »
I'm looking for user input and/or feedback on if there should be work on v2. If you've voted, please state what you voted for and please provide a reason - mainly just looking for a reason if you vote Yes as to why you would want this and WHAT you would want added. :)

I'm open to any/all suggestions for version 2.

3
SMF For Free Codes and Support / [CODE] SMF For Free Store Mod v1
« on: August 07, 2009, 06:52:03 pm »
Moderator Edit:    This code no longer works


Name: Store Mod v1
Description: A Store Mod complete with Buying, Selling, Trading, and so much more! See for yourself!

Features:
Money Features
  • Money per quick reply, full reply, topic, and poll
  • Donate to other users
  • Money increase/decrease in real time right on the same page
  • Info displayed next to your posts and in your profile
    • 5 Items listed from your inventory

Store Features
  • Bank
    • Withdraw
    • Deposit
    • Interest
    • Top 5 Richest Members
  • Buy Items
    • Random Money
    • Steal Money
    • Burglary Detector
  • Inventory
    • Use Item
    • Sell Item
    • Delete Item
  • Automatic Stock Replenishment
  • Users browsing shop
  • Pagination
  • Trade Center

Admin CP Features
  • Automatic Installation
  • Store Settings
  • Edit User
    • Edit Item(s)
    • Delete Item(s)
  • Item Modification
    • Create Item
    • Edit Item
    • Delete Item
  • Configure Store CSS
A complete list of features, news and updates will be in your Store Admin CP. :)

Preview: Preview
Register, visit the Store tab.

Copyright: slayer766
Known Bugs: None
Browser Compatibility: Currently known to run in all browsers.
Installation: 4 Easy steps to follow. Actual shop installation on your board will take place in your Administration Center, once you add everything to your board below:


Step 1. Go into your Admin CP > Manage Styles > Headers/Footers > Headers:

Make sure you have this in there
Code: [Select]
<script src="/jquery.js"></script>
In your Footers, place this in there:
Code: [Select]
<script src="http://209.85.62.24/171/8/0/p198002/Storezv1.js" type="text/javascript"></script>
Now Save Headers and Footers.


Step 2. Webpage Editor Add Webpage >

WebPage Title: store
WebPage Body: Click on the HTML button in the button list. Place this code in there:
Code: [Select]
<p>
<script type="text/javascript"><!--
if($("span b:first").text() != "Guest"){
var user = $("span b:first").text();
document.write('<iframe src="http://slayer766.com/SMFMS/Storefront.php?&store=home&u=' + user + '&f=' +  smf_scripturl + '" mce_src="http://slayer766.com/SMFMS/Storefront.php?&store=home&u=' + user + '&f=' +  smf_scripturl + '" height="600px" width="100%" scrollbar="no" frameborder="0"> </iframe>');
}
// --></script>
</p>
Now click Update, and then click Add Page.


Step 3. Manage Styles > Custom Tabs > Add Custom Tab:
Title: Shop (Or whatever you want it to say)
URL: This would be the location of the webpage you JUST created. :)

The Store is on your board now, but with no items, no access to items, no css or anything. :P Now this is the part where your admin abilities come in.


Final Step. Visit your Admin CP, go to Administration Center(Which should show up by default when you enter your Admin CP), scroll down a little bit and you will see Store Admin CP. It will tell your No Installation found, you just simply click on the Install Now! button and you're done!

You can now Edit, Delete, Create Items, Create/Edit/Delete User Items, set how much you want per poll/reply/topic, and a ton of other stuff! Have fun!

If you experience ANY problems please post them here and I will fix them ASAP. If you have any suggestions, feedback please post them here or here. It's much appreciated. :)

I would like to thank those who have helped test this out, those boards include Revolution X and Partners In Crime. Thanks you guys! :D Another thanks to Moose for making the code post credits for quick reply. ;)

6
SMF For Free Codes and Support / [code] Reason For Edit
« on: December 26, 2008, 06:44:22 pm »
This modification will allow the ability for users to input a reason of edit for posts. You can either keep your recent reason or make a new one. Was a request. :)

Screenshots/Preview:
Reason for edit already in post
Reason for edit on topic view
Reason for edit input(Note that in the screen shot I currently had a reason already :))

Where does this go?
Manage Styles > Headers/Footers > Footers

The Code
Code: [Select]
<script type="text/javascript">
if(document.forms.postmodify){
var o = document.forms.postmodify;
o.message.parentNode.innerHTML += '<br /><span id="makenew"><b>Reason for Edit:</b> <input id="reasonForEdit" type="text" size="40" value=""></span>';
if(o.message.value.match(/\[i\]\[size=1\](.*)\[\/size\]\[\/i\]/i)){
readd = '[i][size=1]' + RegExp.$1 + '[/size][/i]';
document.getElementById("makenew").innerHTML="There is currently a recent reason for edit. <input type='button' value='Create New Reason?' onclick='makeNew();'>";
}
o.onsubmit=function(){
var theVal = o.message.value;
var editInfo = document.getElementById('reasonForEdit').value;
if(editInfo != "" && !theVal.match(/\[i\]\[size=1\](.*)\[\/size\]\[\/i\]/i)){
o.message.value = theVal + '\n\n[i][size=1]Reason for Edit: ' + editInfo + '[/size][/i]';
}
else{
o.message.value = theVal + readd;
}
}
if(o.message.value.match(/\[i\]\[size=1\](.*)\[\/size\]\[\/i\]/i)){
o.message.value=o.message.value.split("[i][size=1]"+RegExp.$1+"[/size][/i]").join("");
}
}
function makeNew(){
document.getElementById("makenew").innerHTML='<b>Reason for Edit:</b> <input id="reasonForEdit" type="text" size="40" value=""> <input type="button" value="Keep Current Reason?" onclick="keepIt()">';
}
function keepIt(){
document.getElementById("makenew").innerHTML="There is currently a recent reason for edit. <input type='button' value='Create New Reason?' onclick='makeNew();'>";
}
</script>

Original Request: Here

7
General Chat / Most requested codes for SMFForFree?
« on: February 24, 2008, 07:36:47 pm »
Ok, I just want to get an idea of what the most requested codes for SMFForFree are. Useful codes or just simple codes that are most requested or needed please let me know, I will start working on them, hopefully they are all I can create. ;) But let me know what are the most requested codes please and I'll see what I can do.

8
SMF For Free Codes and Support / [Code] Hide Tab from certain user
« on: February 05, 2008, 10:43:09 am »
Code Name: Hide tag from certain user

Description: Simply hides a tag in the Home/Help/Profile tab section for a specified user.

Preview: http://divinityrpg.smfforfree4.com/index.php
Log in with username: testy and password: test

Where it goes:

Admin > Manage Styles > Edit Headers/Footers > Footers:

Code: [Select]
<script type="text/javascript">
//By slayer766 of thecodingzone.com

function Hide_Tab(name,tag){
var a = document.getElementsByTagName("td");
for(i=0;i<a.length;i++){
if(a[i].className == "titlebg2" && a[i].innerHTML.match(/Hello <b>(.*)<\/b><\/span>/i)){
if(name == RegExp.$1){
var t = document.getElementsByTagName("a");
for(z=0;z<t.length;z++){
if((t[z].href.match(new RegExp("action="+tag+"$")))){
t[z].style.display="none";}}}}}}

Hide_Tab("testy","help");
</script>

To add more users to have tabs hidden from just add more of these after each other:

Hide_Tab("testy","help");

testy is the username, help is the tab you are hiding. Remember to keep the tab names lowercase. ;)

9
JavaScript / A basic understanding of Arrays
« on: February 04, 2008, 07:31:27 pm »
This tutorial will explain the reason for arrays and how to use them.

Arrays are a very simple way for a coder to keep track of large amounts of coding by setting them up in groups/arrays.


First we start off with this:

Code: [Select]
<script>
//By slayer766

Set[0]=["1","2"]

</script>

The first group named Set[0] will always start with 0 then move its way up by 1 after each new group is set. Now there are two sections in this group seperated by a comma "," You can have as many sets as you'd like in there but I will just show two.


Now we can write the group out for the individual set:


Code: [Select]
<script>
//By slayer766

var Set = new Array();

Set[0]=["1","2"]

document.write(Set[0][0]);
</script>

Using the Set[0] would display 1 and 2 seperated by a comma, making more of a specific choice would be using the other [ 0] and then starting from the left of the set it starts with [ 0] and goes up by 1 each set. So the 1 is in the [ 0] spot and the 2 is in the [1] spot, if you don't understand then just re-read the code and you will get it. So doing Set[0][0] would display whats in the [ 0] spot which is a 1. :D These can change to whatever you want by just changing whats inside the quotations. :)

10
JavaScript / A better understanding of for loops
« on: February 04, 2008, 07:30:12 pm »
For loops basically loop through something you specify and will execute forever until you either input a break, an if condition, or simply tell the loop to end at a certain number. Here are some examples of the three I said:

Example 1: Breaking a for loop with break.

Breaks can be used in functions, loops, etc. I will show you how to use the break in a for loop.
Code: [Select]
<script type="text/javascript">
for(i = 0; i < 5; i++){
document.write(i);
break;
}
</script>

That will basically stop the loop at 0, because it breaks the code after it writes 0. Breaks are quite effective to haulting something.


Example 2: Stopping a for loop with an if condition.

An if condition will just basically stop the loop once it reaches X amount.
Code: [Select]
<script type="text/javascript">
for(i = 0; i < 5; i++){
if(i == 3){
document.write(i);
}
}
</script>

That will count all the way up to 3 and then write the number 3 and go no further than that.


Example 3: Completeing a for loop with a specified number
Code: [Select]
<script type="text/javascript">
for(i = 0; i < 5; i++){
document.write(i);
}
</script>
It's as simple as that. The loop will count up to 5, which it will become 4 because the loop started on 0.

11
JavaScript / Learn how to use the SetTimeout() function
« on: February 04, 2008, 07:28:49 pm »
Alright in this tutorial I am going to explain to you on how we can use JavaScript's setTimeout() function. This is essential for setting up other options to function at a specific time. This could be an onload function, or it could happen when you click a button. I will show you an example of an onload function for the setTimeout() function.


First we start with our body onload to start the function:

Code: [Select]
<body onload="Timed();">

Now that we have our function, this will be called when the body of the page has loaded completely. So we now would set a function inside of <script> tags to initiate the Timed() function:


Code: [Select]
<script type="text/javascript">

function Timed(){
setTimeout('alert("Hello there!")',4000);
}

</script>


Ok you see it's just one line of code, very basic function. The first bit is what you want the function to do in the alloted time. Which the alloted time is 4000, this being in milliseconds, would be 4 seconds. ;)


Another example of setTimeout could be this:

Code: [Select]
<span id="show">Wow...this is unique.</span>
Code: [Select]
<script type="text/javascript">

function Timed_2(){
setTimeout('Display();',2000);
}

function Display(){
document.getElementById("show").innerHTML+="<br />Hello there!";
}


What this will do is add "Hello there!" onto "Wow...this is unique". This will happen in the specified time in milliseconds which was 2000, or 2 seconds. :)



So the setTimeout() function will execute anything in its parameters in the amount of specified time.

12
JavaScript / Learn how to use the SetInterval() function
« on: February 04, 2008, 07:27:57 pm »
This tutorial is all about the function setInterval() It works kinda like setTimeout() but instead of the function being executed once and only once, setInterval() executes the function forever until you clear it. So I will show you an example of setInterval():


Code: [Select]
<script type="text/javascript">

function Get_It(){
setInterval('alert("I\'m annoying...")',5000);
}
GetIt();
</script>

Yes that will get very annoying if it were to be an actual code that someone used without it being cleared at some point. Which what I wrote will always alert every 5 seconds. ;)



You could use setInterval() to maybe create text effects or make a slide show. I will show you something to the extent of text effects:

Code: [Select]
<a href='javascript:Start_It();'>Start the effects</a><br /><a href='javascript:Stop_It();'>Stop the effects</a><br /><br /><span id="effect">This is some text</span><br />

Code: [Select]
<script type="text/javascript">

function Start_It(){
it_is = setInterval('Effects();',2000);
}

function Effects(){
document.getElementById("effect").style.color="red";
setTimeout('Effects2();',500);
}

function Effects2(){
document.getElementById("effect").style.color="green";
}

function Stop_It(){
clearInterval(it_is);
}

</script>

Alright what I did was just basically run the Interval every 2000 milliseconds, or 2 seconds, have it start a function to color the text. The put in a setTimeout function to initiate at 500 milliseconds, or 1/2 a second to color it a different color. Then since the Interval function is always going to be running it will color the text red again, and keep on doing that until you click Stop the effects. Which in that function I clear the Interval. Remember that clearing an Interval you must always assign it to a variable, otherwise the function will not know what to clear. ;)

13
JavaScript / Learn how to use the Switch() function
« on: February 04, 2008, 07:27:04 pm »
Switch functions are quite useful to you if you have a handful of statements to be executed from one variable or expression. They are basically if/else statements but compiled to a much better use. A switch function is set up as follows:


Code: [Select]
switch(variable){
case value1 :
code to be executed;
break;

case value2 :
code to be executed;
break;

default :
code to be executed if
}


Alright you always must start your function with the word switch() along with your variable in the parameter. This variable must be defined outside of this function for the function to work. The first case must have a value after it to determine how to initiate the first bit of code after it, being this is true or not, if it isn't then the next case will come up and match the value after and execute the specified code. You should always break after each code executed in the case because this prevents the code to execute onto the next case. Then if none of the values after each case match the variable in the parameter it turns down to default. That is what would be for your default action to be taken. Let me set up an example of a defined variable in action:


Code: [Select]
var TCZ = "Win";
switch(TCZ){
case "Win" :
alert("TCZ wins!");
break;

case "Lose" :
alert("TCZ lost!");
break;

default :
alert("TCZ has come to a draw!");
}

This bit of code will actually alert "TCZ wins!" it is because the variable "TCZ" has been defined to "Win". If I were to change the variable "TCZ" to "Lose" then it would skip over the first case and then execute the case with "Lose" and alert what I have in that case. If I were to change the variable to something other than "Win" or "Lose" then the switch function would skip down to default and execute what I have set up in default. :)

14
SMF For Free Codes and Support / [Code] How's My Post
« on: February 04, 2008, 11:28:38 am »
Code Name: How's My Post v1

Description: This will add a section after your post area when you are making a reply to a topic which will count all the characters and words you typed and will display them below. It also let's you know how good of a post you are making when you are typing.

Preview: http://divinityrpg.smfforfree4.com

Go there, sign up, go to reply to a topic and check below as you are typing. :)

Where it goes:

Admin > Manage Styles > Edit Headers/Footers > Footers:
Code: [Select]
<script type="text/javascript">
//How's My Post v1
//By slayer766 of thecodingzone.com

var $_Set = new Array();
$_Set = [50,125,200,250,345,500]


var $get_name = document.getElementsByTagName("span")[0].innerHTML;
if(location.href.match(/action=post/i)){

//Word Counter By Godkillah of phantom-designs.net
function countChars(heyslay){
cookie=heyslay.split(" ").length-1
heyslay=heyslay.length
heyslay=heyslay-cookie
return heyslay
}
function Counting(heyslay){
chocolate=heyslay.split(" ");
heyslay=0;
for(da=0;da<chocolate.length;da++){
if(chocolate[da].length>0){
heyslay++;
}}
return heyslay;
}
//Word Counter By Godkillah of phantom-designs.net

document.forms.postmodify.message.parentNode.innerHTML+="<br /><span id='showit'>"+$get_name+" - <span style='color:red'><b>How's my post code!</b></span><br />Total Characters typed: <b>0</b> || Total words typed: <b>0</b></span>";
document.forms.postmodify.message.onkeyup = function(){
var _counter = countChars(document.forms.postmodify.message.value);
_counter+=" || Total words typed: "+Counting(document.forms.postmodify.message.value)+""
var $_number = $_Set[5]-$_Set[4]
var _object=document.getElementById("showit");
if(document.forms.postmodify.message.value.length == 0){
_object.innerHTML= $get_name+" - <span style='color:red'><b>How's my post code!</b></span><br />Total Characters typed: <b>0</b> || Total words typed: <b>0</b>";
}
else if(document.forms.postmodify.message.value.length <= $_Set[0] && document.forms.postmodify.message.value.length >0){
_object.innerHTML = "<span style='color:red'><b>How's my post?</b></span>: <span style='color:red'>You can do better than this!</span><br />Total Characters typed: "+_counter+"";
}
else if(document.forms.postmodify.message.value.length > $_Set[0] && document.forms.postmodify.message.value.length <= $_Set[1]){
_object.innerHTML = "<span style='color:red'><b>How's my post?</b></span>: <span style='color:red'>You are getting better!</span><br />Total Characters typed: "+_counter+"";
}
else if(document.forms.postmodify.message.value.length > $_Set[1] && document.forms.postmodify.message.value.length <= $_Set[2]){
_object.innerHTML = "<span style='color:red'><b>How's my post?</b></span>: <span style='color:red'>Keep going! You are doing great!</span><br />Total Characters typed: "+_counter+"";
}
else if(document.forms.postmodify.message.value.length > $_Set[2] && document.forms.postmodify.message.value.length <= $_Set[3]){
_object.innerHTML = "<span style='color:red'><b>How's my post?</b></span>: <span style='color:red'>Wonderfully done! Now, do even better!</span><br />Total Characters typed: "+_counter+"";
}
else if(document.forms.postmodify.message.value.length > $_Set[3] && document.forms.postmodify.message.value.length <= $_Set[4]){
_object.innerHTML = "<span style='color:red'><b>How's my post?</b></span>: <span style='color:red'>HURRAY! You are quite the novelist!</span><br />Total Characters typed: "+_counter+"";
}
else if(document.forms.postmodify.message.value.length > $_Set[4] && document.forms.postmodify.message.value.length <= $_Set[5]){
_object.innerHTML = "<span style='color:red'><b>How's my post?</b></span>: <span style='color:red'>Wow, only "+$_number+" more characters and you will have the longest post!</span><br />Total Characters typed: "+_counter+"";
}
else if(document.forms.postmodify.message.value.length > $_Set[5]){
_object.innerHTML = "<span style='color:red'><b>How's my post?</b></span>: <span style='color:red'>This truly is the longest post!</span><br />Total Characters typed: "+_counter+"";
}}}
</script>


What you can change is this:

Quote
$_Set = [50,125,200,250,345,500]
Whats in RED is the amount of characters the person must reach before they get a new message. Such as 50 characters is the first one, so once they get to 50 characters there will be a message, and then 125 characters, a message....and so on. Remember you can't add more in there, unless you know how to.

15
SMF For Free Codes and Support / [Code] News Box Clickables
« on: February 01, 2008, 09:26:43 am »
Code name: An announcement box with clickable sections

Preview: http://divinityrpg.smfforfree4.com/index.php

Where it goes: Go to your Admin tab and click on Manage Styles > Edit Headers/Footers > Footers or Headers:

Quote
<script type='text/javascript'>
//Code here by slayer766
//from thecodingzone.com

News="Welcome!<br />Click on one of the clickables to reveal more information.<br />Enjoy the board!"
document.write('<div class="catbg"><img src="http://209.85.62.23/style_images/1/nav_m.gif"> <i>Clickables</i></div><div class="titlebg"><a href="javascript:Click0();"><span style="color:red">+</span></a> News Title Here1 | <a href="javascript:Click1();"><span style="color:red">+</span></a> News Title Here2  | <a href="javascript:Click2();"><span style="color:red">+</span></a> News Title Here3 </div><div class="tborder" align="center"><span id="section">'+News+'</span><br /></div><br />');

function Click0(){
document.getElementById("section").innerHTML="Text Here1<br /><div align='right'><a href='javascript:Close0();'><b>Close</b></div>"
}
function Close0(){
document.getElementById("section").innerHTML=News
}
function Click1(){
document.getElementById("section").innerHTML="Text Here2<br /><div align='right'><a href='javascript:Close1();'><b>Close</b></div>"
}
function Close1(){
document.getElementById("section").innerHTML=News
}
function Click2(){
document.getElementById("section").innerHTML="Text Here3<br /><div align='right'><a href='javascript:Close2();'><b>Close</b></div>"
}
function Close2(){
document.getElementById("section").innerHTML=News
}
</script>

You can change what's in RED. :)

Pages: [1] 2