Jump to content

Mudsaf

Members
  • Posts

    462
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Mudsaf

  1. Hello, i've been developing my own shoutbox. Please rate the shoutbox. If you have any improvement ideas please reply here :). Currently smileys: [sMILEN][sMILEC][sMILEA][sMILES][sMILEH][GOODNIGHT][ALPHABETS]. I know the alphabets smiley requires bit editing.

     

    Link to shoutbox: http://beta.mudsaf.info/shoutbox.php

     

    Also forgot to tell that below filters are not done.

    • Norwegian (Couple of words)
    • Danish (Small amount)
    • Swedish (Some)
    • English (Medium amount)
    • Finnish (Alot)

    If you want to help me add cursewords join channel "Cursewords" & curse all you like. (Not those who doesn't want to see cursing). Also keep filters enabled so you can spot new words. Feel free to use fake-email like asd@asd.com.

     

    The styling & functionally is made for Google Chrome browser atm, will edit after for all other browsers. (Other browsers might have some styling issues). Also there seems to be some issue with text-styles that is working on local server (checking it out).

    • Fixed text-styles (Uploaded less database information as possible and it required one which i didn't upload. Table uploaded & script should work.
    • Fixed message area including text if user doesn't have JavaScript enabled.
    • Fixed displaying website structure.

  2. Well if user enters tags example

    $MyString = '<span style="display:block;" title="WADAP">MyText</span>';strip_tags ($MyString,"<span title>"); //So this would remove the style attribute.

    Result should look like

    <span title="WADAP">MyText</span>
  3. @OldMan

     

    Yes you should be able to use. Code below (Make sure your path is correct)

    <html><head><script type="text/javascript" src="phases.js"></script></head><body><div class="example"><script>document.write(mensage[rand]);</script></div></body></html>

    JavaScript (Notice that you wont add script tags here)

       var mensage = new Array(   'example',   'example2');   var rand = Math.floor(Math.random() * 2);
  4.  

    Hello
    I want do appear text in div with class name "example"..i try two methods but.. with this method don't work i don't know why, but with the method below works. (I'm going get the file .js correctly.)
    Anyone knows the problem?
    <html><head><script type="text/javascript" src="/js/phases.js"></script></head><body><div class="example"><script>document.write(mensage[rand]);</script></div></body></html>
    <html><head><script type="text/javascript">   var mensage = new Array(   'example',   'example2',   var rand = Math.floor(Math.random() * 2);</script></head><body><div class="example"><script>document.write(mensage[rand]);</script></div></body></html>
    Thanks!

     

     

    At second one you forgot to close the JavaScript array

       var mensage = new Array(   'example',   'example2');
  5. I have this script, and it is supposed to move an image down by 200 pixels. And right now, it does nothing.

    I'm using a jQuery script to move it down.

     

    _________________________________________________________________

     

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script><script> $(document).ready(function(){$('button').click(function(){$('img').animate({bottom:'200px'},'slow');</script><button id="moveim"> Move creeper down.</button><div width=500px height=500px><img src='http://www.technicpack.net/img/tekkit/spacecreep.png'> </img></div>

     

     

    Well i made code similar you had few problems there on your code. Example there is no img closing tags like </img> & div width & height entered on style attribute.

    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script><script> $(function() {$("#moveim").on('click', function() {$("img").animate({"margin-top":"200px"});});});</script><button id="moveim"> Move creeper down.</button><div style="width:500px;height:500px;"><img src='http://w3schools.invisionzone.com/public/style_images/1_logo.png'></div>

    Or if you want it to move certain amount down on each click do this.

    $("img").animate({"margin-top":"+=200px"});

    Also i would recommend you to give and ID to image that you're moving because currently it moves all images. Lets say our image id="MyIMG" and make the function working.

    $("img#MyIMG").animate({"margin-top":"+=200px"});<img id="MyIMG" src='http://w3schools.invisionzone.com/public/style_images/1_logo.png'>
  6. People might find it more usable, you'll need to work out a way for people to link to specific games though. If you're already requiring Flash then requiring Javascript isn't a major issue.

     

    Alright then i suppost jQuery would be better.

  7. Actually the meaning was that i provide flash games that users can play on my website.

     

    Below example of dynamic pages

    0 | 1 | 2 | 3 | 4

    So basically those dynamic pages load by default with <a> links, but i'm wondering would jQuery method be better since there would be no page refreshing.

  8. I have code like below and i'm wondering how to replace the array if its same even if its the word is written like tHiS.

    $censorword =  str_replace(<PHP_ARRAY>[<CENSORWORD ARRAY>], "*****" , <CONTENT>);

    I tried

    $censorword =  str_replace(strtolower(<PHP_ARRAY>[<CENSORWORD ARRAY>]), "*****" , strtolower(<CONTENT>)); 

    But the $censorword whole string is lowercase after that.

  9. Hello, i'm wondering should i change my game loading from HTML dynamic pages to jQuery non-refreshing load.

     

    HTML +

    • Easily working
    • No JavaScript required to play games.
    • Doesn't make the page slower? <Not sure about this bc jQuery would load all to one page everytime>

    jQuery +

    • Medium working (Needs JavaScript tho, but who doesn't have JavaScript these days)
    • Cooler loading system + functions also might be more user-friendly.
    • Can do anything!

  10. Have you tried to check if your web-hosting server is preventing large files. Forexample all basic free hosts have PHP upload maxfile size few mb.

     

    do phpinfo(); at some of your webpage and check if the web-host isn't preventing that.

     

    My php upload file code looks like this

    $_FILES['<myfile>']['size']/1024/1024) <= 30  //30MB
    • Check PHP.ini
    • .htaccess
    • phpinfo();

  11. Below there are two blocks of code that allow user to login to a secure site. NOTE: both blocks are striped down for simplicity.Block 1 is a stripped down form where the username and the password are explicitly assigned in "value=" assignment. When exexecuted  every thing works fine and the user is taken to the appropriate page. However if block 2 is executed the user is presented with a another login page.Can anyone point me in the right direction??Thanks   //Block 1<body><form action="https://www.mystuff.org/login" method="get" name="login">	<input type="text" id="inputEmailHandle" name="inputEmailHandle" value="mememe@gmail.com">			<input id="inputPassword" type="password" name="inputPassword" autocomplete="off" value="123">	<label> </label> 	<button type="submit">Log In</button></form></body>//BLOCK 2<body><?phpinclude('simple_html_dom.php')$url="https://www.mystuff.org/login?inputEmailHandle=mememe%40gmail.com&inputPassword=123";    $html= file_get_html($url);?></body>

     

    https://www.mystuff.org/login?inputEmailHandle=mememe%40gmail.com&inputPassword=123

     

    I don't recommend to use any account information on URL, because all the links will be saved on history and its high security risk. Do logins with POST method instead.

  12. Hi my name is Jen aka GirlPowerDesigns I am owner of Girl Power Designs web site I am 40 years old I have 5 kids 2 older ones and 3 younger ones. I am also own two fuzzies named Gizmo and Aurora they are Ferrets and a kitten named Astro

     

    I have started designing graphics since 2001 I use a lot of programs for my designs to enhance my ability of verity of things to be more creative I have always wanted to learn html and PHP and flash, fire works and so forth I am also novice photographer I have my own Canon EOS Rebel T3. I went to school for web design and computer graphics I be going into. I really want to learn to make Templates for my wordpress business site. I just sit at my laptop and stare at the site. I have so may creative things to do but when I go to Dreamweaver I try to code things and it gets all messed up. I been using Dreamweaver since 2002. I am soon getting Kanvus Life H85 tablet I am going to start to draw again. I have for programs, Adobe Photoshop CS6, Corel Paint Shop Pro X5 Corel ULead PhotoImpact X3, I have all the Adobe programs well most of them I just want to have a beautiful website so people can admire my art and my tutorials. Thank you for reading!

     

    Jen Aka GirlPowerDesigns

     

    Try to get rid of Dreamweaver, nobody likes it! I suggest notepad++.

  13. Hello, does anyone know website where i can get curse word list with languages below. I'm developing curse filter for my website so that's why i need em ^^.

     

    • English
    • Norwegian
    • Danish
    • Swedish
    • Finnish

    (Others are optional)

  14. Alright i totally messed the page, now basically everything = smileys (70%)

     

    My JSON

    {"smileyList": [{ "smileyCode":"[SMILEN]" , "smileyURL":"SM0-001.png"}, { "smileyCode":"[SMILEC]" , "smileyURL":"SM0-002.png"} ]}

    My JavaScript (JSON stored to global variable named smiley_list

     

    Javascript

    	i = 0;	$.each(smiley_list.smileyList, function() {	smiley = new RegExp(smiley_list.smileyList[i].smileyCode, "g");	data = data.replace(smiley,"<img class='sbSmiley' style='vertical-align:middle;' src='script/shoutbox/smileys/" + smiley_list.smileyList[i].smileyURL + "'>");	i++;	});	$("#shoutbox_content").html(data);		}

    Seems like its replacing every s with the image? dafuq

  15. Just create a RegExp object:

     

    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp

     

    Note the table of special characters, if those characters are in the string you might have to escape them. This is why the value is necessary though, when you write <myjson> I can't tell if you're using a regular expression or a string or what.

    	var smiley = new RegExp(smiley_list.smileyList[i].smileyCode, "g");	var data = data.replace(smiley,"<img class='" + smiley_list.smileyList[i].smileyCode + "' class='sbSmiley' style='vertical-align:middle;' src='script/shoutbox/smileys/" + smiley_list.smileyList[i].smileyURL + "'>");Uncaught TypeError: Cannot call method 'replace' of undefined 
×
×
  • Create New...