QUB1
June 19, 2021, 06:26:51 am
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Gallery Staff List Login Register  

Pages: [1] 2
 1 
 on: March 28, 2009, 03:37:46 am 
Started by Qub1 - Last post by mojobojo82
umm none of them work

 2 
 on: March 23, 2009, 09:54:00 am 
Started by Qub1 - Last post by Qub1
This will display a random message on a webpage, here is a preview (refresh for new message):


Put this code where you want the random message, it is easy editable:
Code:
<script language="JavaScript">
<!-- Random Message -->
<!-- This script is made by Qub1. Find more scripts like this at http://qub1.smfforfree.com/ -->
<!--
var r_text = new Array ();
r_text[0] = "I like potatoes!";
r_text[1] = "Cabbage is yummy!";
r_text[2] = "Mmm, refresh again for a new random message.";
r_text[3] = "Err, hi...?";
r_text[4] = "How are you today?";
r_text[5] = "Some bold, red text";
r_text[6] = "Random message";
var i = Math.floor(7*Math.random())

document.write(r_text[i]);

//-->
</script>

 3 
 on: March 22, 2009, 03:39:45 pm 
Started by Qub1 - Last post by Qub1
Welcome. This code is a VERY good working one. I saw some other password protect codes, wich redirected you FROM a page TO another page. This is very insecure, because you could just type in the url of the destination page and you're in. So, I made one that protects the page using Pop-Ups, and script boxes! These can't be clicked away, and if the user DOES click the close button, he or she will be redirected to a page you want. A live preview is on this very page! Currently this will only work in FireFox, since Internet Explorer redirects you to the wrong page before you even get the change to put in a password, but I am working on that.

So now, put the following code in a post (yes, that's correct, IN a POST):
Code:
[html]<html>

<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>rer</title>
<script>
<!-- Password Protect -->
<!-- This script is made by Qub1. Find more scripts like this at http://qub1.smfforfree.com/ -->
//we will frirst ask the user if he wold like to countinue into this restricted area
var p=confirm("@@@This site is pass word protected,do you still want to enter? --CURRENTLY THIS CODE ONLY WORKS IN FIREFOX, SO PLEASE SWITCH TO THAT TO OPEN THE FOLLOWING PAGE--@@@")
if(p){
var ans="%%%open%%%"
var pass=prompt("@@@Please enter the password:@@@")
if(pass!==ans)
{
alert("@@@Either the password is wrong, or you cancelled.@@@")
window.location="###http://qub1.smfforfree.com/pages/qub1/wrongpassword.php###"
}else{alert("@@@You typed the correct password. You will now be redirected to the Password-Protected page.@@@");}
}else{window.location="&&&http://qub1.smfforfree.com/index.php/topic,15.0.html&&&"}
</script>
</head>

<body bgcolor="#FFFFFF">
</body>
</html>

<!-- The end...? -->[/html]
Replace the text surrounded by three @'s with what you want to display in the Pop-Up Boxes, the text surrounded by %%% with the password, the text surrounded by &&& with the correct password page (the page of your post), and the text surrounded by ### with the wrong password page. (don't forget to remove the symbols from the code, or else it might not work!)
rer

 4 
 on: March 18, 2009, 11:48:16 am 
Started by Qub1 - Last post by Qub1
Welcome. This code will simply put a button of your forum, and when clicked, displays a random message.

Put this in your Footers:
Quote
<center><form action="#" onsubmit="return get_quote();">
<input type="submit" value="BUTTON TEXT" />
</form></center>
<script type="text/javascript">
<!-- Random Message -->
<!-- This script is made by Qub1. Find more scripts like this at http://qub1.smfforfree.com/ -->
function get_quote()
{
  var quote=new Array()
     quote[0]="MESSAGE1";
     quote[1]="MESSAGE2";
     quote[2]="MESSAGE3";
  var ran_num= Math.floor(Math.random()*(quote.length));
  window.alert(quote[ran_num]);
  return false;
}</script>

Replace BUTTON TEXT with the text you want to be on the button, and replace MESSAGE1,2 or 3 with a random message. To add more messages, add more lines like this:
Quote
     quote[X]="MESSAGE";
Replace the X with the message number, like if the above one was 0, this one would be 1 and so on...

Thanks for reading!
~ Qub1

 5 
 on: March 16, 2009, 09:47:30 am 
Started by Qub1 - Last post by Qub1
This code will simply block all links in your posts to guests, and replaces them with some text. I know Agent Moose made this code too (on my request =D), but somehow its not working, so I made my own. This one is much simpler btw =D.

Here, I made a preview (this one is fake, it's just to get the look of it):
[Only registered users can see links. Please Login or Register]
There is also a preview if you log-out  Grin
Thats with this link:
www.alink.com

There are two versions, one where the whole sentance is a link, and another where there are two words (login and Register.

Text Version:
Put this in your footers:
Quote
<script>
<!-- Guest Links Blocker -->
<!-- This script is made by Qub1. Find more scripts like this at http://qub1.smfforfree.com/ -->
if ($("td.windowbg2 span.middletext b").html() != null) {
$("div.post a").replaceWith('<font color="red">[Only registered users can see links. Please <a href="/?action=login">Login</a> or <a href="/?action=join">Register</a>]</font>');
}</script>
You can edit the red text as you wish, that will be displayed instead of the link.

Link Version:
Put this in your footers:
Quote
<script>
<!-- Guest Links Blocker links mod -->
<!-- This script is made by Qub1. Find more scripts like this at http://qub1.smfforfree.com/ -->
if ($("td.windowbg2 span.middletext b").html() != null) {
$("div.post a").attr("href", "?action=join").html("<font color='red'>[Only registered users can see links. Please <a href='/?action=login'>Login</a> or <a href='/?action=join'>Register</a>]</font>");
}</script>
You can edit the red text as you wish, this is what will be displayed instead of the link.

Thanks for reading!
~ Qub1

 6 
 on: March 16, 2009, 09:28:42 am 
Started by Qub1 - Last post by Qub1
Oh, yeah i got a prob with my footers, fixing it now...  Undecided

 7 
 on: March 14, 2009, 04:34:57 am 
Started by Qub1 - Last post by Didds
Great idea! But I'm typing it and nothing happens  Undecided

 8 
 on: March 09, 2009, 09:20:53 pm 
Started by Qub1 - Last post by Hacker
alakazaam

 9 
 on: March 01, 2009, 09:28:31 am 
Started by Qub1 - Last post by Qub1
First of all I would like to say that this code was made by the idea of a member on smfsupport (this is the topic). He brought me on the idea to make the code. First I wanted to modify the Secret Menu code for him, but it didn't work, so I totally re-writed the code and so the new code was created.

The code I present today has actually the same function as the secret menu code, exept that this version supports multiple words, so that the secret menu will popup on multiple inputs.

This is the code, it must be put in the Headers:
Code:
<script type="text/javascript">
<!-- The Secret Menu (multiple words mod) Warning -->
<!-- This script is made by Qub1. Find more scripts like this at http://qub1.smfforfree.com/ -->
 
// Variables and handler configuration
var word = new Array(), Letter = new Array(), Code;
document.onkeypress = check_key;
 
// Forebidden Words
word[0] = "FOREBIDDEN WORD";
word[1] = "FOREBIDDEN WORD";
word[2] = "FOREBIDDEN WORD";
word[3] = "FOREBIDDEN WORD";
 
// Reset Counters
for (i = 0; i < word.length; i++) {
Letter[i] = 0;
}
 
// Event handler
function check_key(key) {
 
try {
Code = event.keyCode;
} catch(e) {
Code = key.which;
}
 
for (i = 0; i < word.length; i++) {
 
if (String.fromCharCode(Code).toLowerCase() == word[i].charAt(Letter[i])) {
Letter[i]++;
} else {
Letter[i] = 0;
}
 
if (Letter[i] == word[i].length) {
Letter[i] = 0;
trigger(word[i]);
}
 
}
}
 
// IF the word has been typed
function trigger(word) {
alert("YOUR POPUP MESSAGE HERE. You typed: " + word);
}
 
</script>

Just replace FORBIDDEN WORD with the words you don't allow, and if you want more words just enter more of this:
Code:
Code:
word[X] = "FOREBIDDEN WORD";
Replace the X with the correct number in the forbidden words list.

And edit the YOUR POPUP MESSAGE HERE text with the text you want to popup, and edit the You typed: text with whatever you want.

Thanks,
Qub1 out~

 10 
 on: February 26, 2009, 03:04:39 am 
Started by Qub1 - Last post by Banned
Hi, i am Banned. I have posted here so you all can have a live preview of the above code on this topic.

Thanks,
Banned out~

Pages: [1] 2