|
Post by bfr on Jun 21, 2005 10:03:14 GMT -5
Share a code! In any language! Here are some that I made: Calcman 5 Sometimes the link doesn't work though...if not, then go to users.cjb.net/thecalcleague/ and download the file called calcman5.zip In <head> section: <script language="JavaScript" fptype="dynamicanimation"> <!-- function dynAnimation() {} function clickSwapImg() {} //--> </script> <script language="JavaScript1.2" fptype="dynamicanimation" src="animate.js"> </script>
In <body> section: <p dynamicanimation="fpAnimspiralFP1" id="fpAnimspiralFP1" style="position: relative !important; visibility: hidden" language="Javascript1.2">Swooping Text</p>
Another one: <script language="JavaScript"> for(a=0;a<document.links.length;a++){ if(document.links[a].href.indexOf("?action=modifyprofile&user=bfr")){ function accessdenied(){ alert("You can't modify this user's profile"); window.location="/index.cgi"; } document.links[a].href="javascript:accessdenied()"} } </script>
Here is a easy fun code (global headers ;D ) <script> <!-- var ask=prompt('Do you like this website','yes'); var bad='no'; if (ask==bad){ var askb=prompt('Now do you like this website?','yes'); var badb='no' if (askb==badb){ alert('WHY ARE YOU SO MEAN?!?!? I...give up....'); }} //--> </script>
;D ;D ;D ;D ;D ;D
|
|
|
Post by bfr on Jun 21, 2005 10:08:51 GMT -5
Oh, and I didn't make this one, but....well, here it is:
<script language="JavaScript"> <!-- var qiksearch_js_text = new Array ("For amazing FREE web tools,", "visit hmsbfr.proboards44.com", "or for graphics and codes,", "and a whole bunch more!!"); var qiksearch_space_width = "290"; // The width of the content space var qiksearch_space_height = "50"; // The height of the content space var qiksearch_space_borderw="3"; // Border width var qiksearch_space_borderc="#004891"; // Border Color var timeOutVal="150"; // Delay in milliseconds
document.write('<table width="' + qiksearch_space_width + '" height="' + qiksearch_space_height + '" style="background:#FFFFFF; border:' + qiksearch_space_borderw + ' solid ' + qiksearch_space_borderc + '"><tr><td align="middle">'); document.write('<div id="qiksearch_js_space">'); document.write('</div>'); document.write('</td></tr></table>');
var def_10='A',def_11='B',def_12='C',def_13='D',def_14='E',def_15='F'; var colorVal=15; var div_count=0;
function qiksearch_fade_desat(getColorIntVal) { var returnVal; if(getColorIntVal>=10) { for(var i=0; i<=15; i++) { if((getColorIntVal==i)) { returnVal = eval('def_' + i); } } } else { returnVal=getColorIntVal; } return(returnVal); } function writeDiv() { document.all.qiksearch_js_space.innerHTML= '<font face="verdana,arial,helvetica" size="-1" color="' + joinColor(qiksearch_fade_desat(colorVal)) + '"><b>' + qiksearch_js_text[div_count] + '</span></b></font>' ;
if((colorVal>0) && (colorVal!=0)) { colorVal--; } else { colorVal=15; if(div_count<qiksearch_js_text.length) { div_count++; } if(div_count==qiksearch_js_text.length) { document.all.qiksearch_js_space.innerHTML = '<a href="javascript:resetAll();writeDiv();" style="text-decoration:none" accesskey="l"><font color="#808080" face="verdana,arial,helvetica" size="-1"><b>P<u>l</u>ay Again <font color="#CC0000">ยป</font></b></font></a>'; } } if(div_count<qiksearch_js_text.length) { setTimeout("writeDiv()",timeOutVal); } } function joinColor(getColor) { return (getColor + '0' + getColor + '0' + getColor + '0'); } function resetAll() { div_count=0; colorVal=15; } writeDiv(); //--> </script>
|
|
|
Post by Vladik on Jun 27, 2005 16:22:46 GMT -5
Ah, advertising codes. Glad to see you're back!
|
|
|
Post by bfr on Jul 4, 2005 16:31:14 GMT -5
I'm making an RPGish code for Pure's Star Wars forums, mastersith.proboards38.com but I'm having trouble with identifying the user's name in the mini-profile. Displaying info in the mini-profile is no problem. Does anybody have any suggestions or anything? Here is the code: <script> <!-- for(a=0;a<document.links.length;a++){ if(document.links[a].href.indexOf("?action=login") != -1){ function select(){ var pt=prompt("Which group would you like to be in? (Jedi, Sith, or Nuetral)","Nuetral"); var opta="Jedi" var optb="Sith" if(opta==pt){ var grp="Jedi" alert("You have been put in the Jedi group"); } else if(optb==pt){ var grp="Sith" alert("You have been put in the Sith group"); } else{ var grp="Nuetral" alert("You have been put into the Nuetral group"); } window.location="/index.cgi?action=login"; } document.links[a].href="javascript:select()" }} var TD=document.getElementsByTagName('td'); if (TD[2].innerHTML.match(/Hey, (.+?),/)) { username = RegExp.$1} for(x=0;x<TD.length;x++){ if(TD[x].width=="20%" && TD[x].innerHTML.match(username)){ TD[x].innner.HTML+="Group: "+grp+"" }} //--> </script>
|
|
|
Post by bfr on Jul 4, 2005 16:34:12 GMT -5
btw the part where I'm having trouble is where it says:
if (TD[2].innerHTML.match(/Hey, (.+?),/)) { username = RegExp.$1} for(x=0;x<TD.length;x++){ if(TD[x].width=="20%" && TD[x].innerHTML.match(username)){
So far I've had to modify the code lots of times because of careless mistakes such as spelling "function" as "funtion". Please let me know if I have made any errors like that! (I'm not a very good proofreader....)
|
|
|
Post by bfr on Jul 10, 2005 12:12:50 GMT -5
Nobody knows how to solve the problem?
|
|
|
Post by Vladik on Jul 10, 2005 12:40:58 GMT -5
What's the problem? You've spelled "Neutral" as "Nuetral", which is incorrect.
Otherwise, I don't see any problems yet...
|
|
|
Post by bfr on Jul 11, 2005 9:57:42 GMT -5
I need to match the username where it says "Hey, (username), you have ___ new messages and ___ are new" with the username in the mini-profile. Maybe it's not working because of some dumb error....
New version (without spelling error):
<script> <!-- for(a=0;a<document.links.length;a++){ if(document.links[a].href.indexOf("?action=login") != -1){ function select(){ var pt=prompt("Which group would you like to be in? (Jedi, Sith, or Neutral)","Neutral"); var opta="Jedi" var optb="Sith" if(opta==pt){ var grp="Jedi" alert("You have been put in the Jedi group"); } else if(optb==pt){ var grp="Sith" alert("You have been put in the Sith group"); } else{ var grp="Neutral" alert("You have been put into the Neutral group"); } window.location="/index.cgi?action=login"; } document.links[a].href="javascript:select()" }} var TD=document.getElementsByTagName('td'); if (TD[2].innerHTML.match(/Hey, (.+?),/)) { username = RegExp.$1} for(x=0;x<TD.length;x++){ if(TD[x].width=="20%" && TD[x].innerHTML.match(username)){ TD[x].innner.HTML+="Group: "+grp+"" }} //--> </script>
|
|
|
Post by Vladik on Jul 11, 2005 16:59:33 GMT -5
|
|
|
Post by bfr on Jul 12, 2005 11:05:05 GMT -5
Do you notice any coding errors (not spelling errors)?
|
|
|
Post by bfr on Jul 19, 2005 12:39:12 GMT -5
// // http://hmsbfr.proboards44.com // http://ticalcs.proboards41.com // http://vutonboard.proboards40.com // #include <cstdio> #include <cstdlib> #include <iostream> using namespace std;
int main(int nNumberofArgs, char* pszArgs[]) { int loopcount; cout << "For how many fast minutes should we count: "; cin >> loopcount; int i; i = 0; int o; o = 0; while (i < loopcount) { cout << "Fast Minutes: " << i ; i = i++; while (o < 60) { cout << "Fast Seconds: " << o ; o = o++; } } system("PAUSE"); return 0; }
That creates something that kind of looks like when you type a whole bunch of increasing numbers on your calculator and then scroll up and down. A kind of useless program, but I think it looks cool.
|
|
|
Post by Vladik on Jul 23, 2005 20:20:31 GMT -5
Yeah, it does.
|
|
|
Post by Pure on Jul 23, 2005 20:22:38 GMT -5
It looks like it does when you do it on the calculator!
|
|
|
Post by Vladik on Jul 23, 2005 20:39:47 GMT -5
Well, that's the point! Too bad that it doesn't work on the 68k calcs... but it works on the rest.
|
|
|
Post by bfr on Jul 27, 2005 17:01:47 GMT -5
But it looks cooler on the computer because it goes WAY faster and you can slow it down if you want.
|
|
|
Post by bfr on Aug 8, 2005 16:21:47 GMT -5
I'm working on another cide besides the star-wars RPG and it lets you select the forum's width.
|
|
|
Post by Vladik on Aug 8, 2005 17:59:55 GMT -5
Using cookies?
|
|
|
Post by bfr on Aug 9, 2005 16:12:42 GMT -5
Good idea! ;D
|
|