Archive for the ‘Scripts’ Category

  • Using JavaScript To Auto Scroll Text

    Date: 2011.02.24 | Category: Scripts | Response: 0

    Using JavaScript To Auto Scroll Text.

    There may come a time when you would like to have some text on a page that is simply just to big to fit on a single page. Of course, you could always create a new document for this text but, what if you could make the text actually scroll through the surfers browser?

    The following JavaScript will do just that.

    Place the following section of JavaScript coding between your <head> and </head> tags:

    <SCRIPT LANGUAGE=”JavaScript”>
    <!–

    function scrollit() {
    for (I=1; I<=1200; I++) window.scroll(1,I);
    }

    // –>
    </SCRIPT>

    Along with the following JavaScript coding someone in the Body of your page:

    <FORM>
    <INPUT type=button value=”scroll” onClick=”scrollit()”>
    </FORM>

    Have a play around with the numbers in the first section of the JavaScript to speed up and slow down the rate of scrolling until you find a speed that is easy on the eye.

    Article written by Lee

  • Redirecting To A Different Page Using JavaScrip

    Date: 2011.02.24 | Category: Scripts | Response: 0

    There are times when a simple JavaScript redirection from one page to another can come in handy and, the following JavaScripting will enable you to do this.

    When a page contains this javascript, it will be redirected to another page that you specify in the “window.location=”. You can change the number of refresh seconds by changing the “move()’,1000 to the number of seconds you’d like.

    Example:

    1000 = 1 second
    2000 = 2 seconds
    3000 = 3 seconds

    Place this JavaScript code between the <head> and </head> tags

    <script language=”JavaScript”>
    <!–hide from old browsers
    var time = null
    function move() {
    window.location = ‘http://www.yourdomain.com’
    }
    //–>
    </script>

    Place this JavaScript code in your <body> tag

    <body onload=”timer=setTimeout(‘move()’,1000)”>

    You should now have a page that will redirect to a new url when it loads in the surfers browser window.

    Article written by Lee

  • Redirecting Questionable Adult Traffic

    Date: 2011.02.24 | Category: 2257, Scripts | Response: 0

    The one thing almost all reputable adult webmasters agree on is that one way or the other, we want to rid the net of those webmasters that profit from traffic primarily gained from either the direct promotion of or, targeting of, keywords relating to child pornography however, how can you tell what traffic you are being sent and, more importantly, how can you do something about the type of traffic that you receive to your site in order to filter out this unwanted traffic? The answer is simple, use a script to redirect the traffic elsewhere before it even hits your site.

    Child Porn Redirection Php Script.

    The following php script when used on your server will enable you to send unwanted traffic gained by the promotion of using ‘illegal’ keywords in the search engines and sites which link to your own.

    <!– Start Copy Here –>

    <?

    // Redirect “Lolita” traffic

    $refer_full_path = “$HTTP_REFERER”.”$PATH_INFO”;

    if(( preg_match(“/lolita/i”, $refer_full_path)) ||
    ( preg_match(“/child/i”, $refer_full_path)) ||
    ( preg_match(“/preteen/i”, $refer_full_path)) ||
    ( preg_match(“/pre-teen/i”, $refer_full_path)) ||
    ( preg_match(“/pedo/i”, $refer_full_path)) ||
    ( preg_match(“/underage/i”, $refer_full_path)) ||
    ( preg_match(“/beast/i”, $refer_full_path)) ||
    ( preg_match(“/rape/i”, $refer_full_path)) ||
    ( preg_match(“/kinder/i”, $refer_full_path)) ||
    ( preg_match(“/incest/i”, $refer_full_path)) ||
    ( preg_match(“/kiddie/i”, $refer_full_path))) {

    header(“Location: $refer_full_path”);
    exit;
    }

    ?>

    <?
    $words=array(“childporn”,”underage”,”beast”,”interracial”,”lolita”,”preteen”);
    for($i=0;$i<count($words);$i++){
    if(eregi($words[$i],$HTTP_REFERER)){
    header(“Location: http://www.fbi.gov/?CHILD_PORN_ON_DISK_LOGGED_AND_REPORTED”);
    }
    }
    ?>

    <!– End Copy Here –>

    In order to use this script, simply add additional keywords or partial word matches to the top part of the script and, include the bottom half of the script at the top of your HTML coding.

    Any traffic being sent to your site via keywords which you have specifically told the script not to allow access to your web site will be forwarded to the url in the bottom part of the php script which again, can be changed to wherever you like.

    Article written by Lee

  • JavaScript – Redirecting Foreign Surfers

    Date: 2011.02.24 | Category: Scripts, WebDesign | Response: 0

    At some point or another we are no doubt going to have the need to redirect some or all of our surfers based on the language they speak, this snippet of JavaScript when placed on your page will enable you to do just that without the need for .php or other more complex scripting.

    Here is the coding that you need to place between your <head> and </head> tags:

    <SCRIPT LANGUAGE=”JavaScript1.2″>
    <!– Begin
    if (navigator.appName == ‘Netscape’)
    var language = navigator.language;
    else
    var language = navigator.browserLanguage;

    if (language.indexOf(‘en’) > -1) document.location.href = ‘english.shtml';
    else if (language.indexOf(‘nl’) > -1) document.location.href = ‘dutch.shtml';
    else if (language.indexOf(‘fr’) > -1) document.location.href = ‘french.shtml';
    else if (language.indexOf(‘de’) > -1) document.location.href = ‘german.shtml';
    else if (language.indexOf(‘ja’) > -1) document.location.href = ‘japanese.shtml';
    else if (language.indexOf(‘it’) > -1) document.location.href = ‘italian.shtml';
    else if (language.indexOf(‘pt’) > -1) document.location.href = ‘portuguese.shtml';
    else if (language.indexOf(‘es’) > -1) document.location.href = ‘Spanish.shtml';
    else if (language.indexOf(‘sv’) > -1) document.location.href = ‘swedish.shtml';
    else if (language.indexOf(‘zh’) > -1) document.location.href = ‘chinese.shtml';
    else
    document.location.href = ‘english.shtml';
    // End –>
    </script>

    To add additional language redirects to this JavaScript all you need to do is duplicate the:

    else if (language.indexOf(‘zh’) > -1) document.location.href = ‘chinese.shtml';

    Section of the coding changing the (‘zh’) language code to that of the language you wish to redirect.

    Article written by Lee

  • Protecting Your HTML Code With JavaScript

    Date: 2011.02.24 | Category: Scripts, WebDesign | Response: 0

    We all know that source code theft is wrong and covered by copyright never the less some webmasters will inevitably try to steal the work that the honest ones amongst us create.

    Unfortunately, there is no sure fire way to stop people from stealing our HTML code but, we can make it hard for them.

    The following JavaScript coding, when placed in your <body> tag can make it harder for the opportunistic webmaster to steal your coding.

    Simply copy and paste everything below into your body tag and change the text in the var message=”” field.

    <!–Start Copy–>
    <SCRIPT language=”JavaScript”>
    <!–
    var message=”Copyright 2000 by Your Site. WARNING ! All content contained within this site is protected by copyright laws. Unauthorized use of our material is strictly prohibited.”;
    function click(e) {
    if (document.all) {
    if (event.button==2||event.button==3) {
    alert(message);
    return false;
    }
    }
    if (document.layers) {
    if (e.which == 3) {
    alert(message);
    return false;
    }
    }
    }
    if (document.layers) {
    document.captureEvents(Event.MOUSEDOWN);
    }
    document.onmousedown=click;
    // –>
    </SCRIPT>
    <!–End Copy–>

    Whilst this is not a sure fire way to stop the occurrence of HTML theft as mentioned already it will deter those webmasters who perhaps were there for the simplistic reason of viewing your source code.

    Article written by Lee

  • JavaScript Know How

    Date: 2011.02.22 | Category: Scripts | Response: 0

    JavaScript can be one of the most useful additions to any web page. It comes packaged as standard in Microsoft’s Internet Explorer and, Netscape Navigator and allows webmasters to perform field validations, mouse-over’s, pop ups and a whole entourage of other nifty little features on our sites.

    In this article we will show you how to:

    – Display the browser name and version number
    – Change the text in the status bar of the browser
    – Use an input box to get text from the user
    – Use a message box to display text to the user
    – Change the title of the browser window

    Before that, however, we need to know how to setup our web page so that it can run the JavaScript. JavaScript code is inserted between opening and closing script tags: <script> and </script>, like this:

    <script language=”JavaScript”>

    –> JavaScript code goes here <–

    </script>

    These script tags can be placed anywhere on the page, however, it’s common practice to place them between the <head>and </head> tags. A basic HTML page that contains some JavaScript looks like this:

    <html>
    <head>
    <title> My Test Page </title>
    <script language=”JavaScript”>

    function testfunc()
    {
    var x = 1;
    }

    </script>
    </head>
    <body>
    <h1>Hello</h1>
    </body>
    </html>

    For the examples in this article, you should use the basic document format I have just shown you, inserting the JavaScript code between the <script> and </script>tags. When you load the page in your browser, the JavaScript code will be executed automatically.

    Displaying the browsers name and version number.

    The “navigator” object in JavaScript contains the details of the user’s browser, including its name and version number. They can be displayed in a browser using the document.write function:

    document.write(“Your browser is: ” + navigator.appName);
    document.write(“<br>Its version is: ” + navigator.appVersion);

    I run Windows 2000 and Internet Explorer version 6, so the output from the code above looks like this in my browser window:

    Your browser is: Microsoft Internet Explorer
    Its version is: 4.0 (compatible; MSIE 6.0b; Windows NT 5.0)

    Changing the text in the status bar of the browser.

    To change the text in the status bar of a browser window, just change the “status” member of the “window” object, which represents the entire browser window:

    window.status = “This is some text”;

    Using an input box to get text from the user.

    Just like in traditional windows applications, you can use an input box to get some text input from the user. The “prompt” function is all you need:

    var name = prompt(“What is your name?”);
    document.write(“Hello ” + name);

    The prompt function accepts just one argument (the title of the input box), and returns the value entered into the text box. In the example above, you get the users name and store it in the “name” variable. You then use the “document.write” function to output their name into the browser window.

    Using a message box to display text to the user.

    You can display a message box containing an OK button. These are great when you want to let the user know what is happening during their time on a particular page. You can use a message box to display the “name” variable from our previous example:

    var name = prompt(“What is your name?”);
    alert(“Your name is: ” + name);

    The “alert” function takes one argument, which is the text to display inside of the message box.

    Changing the title of the browser window.

    To change the title of a web browser’s window, simply modify the “document.title” variable, like this:

    document.title = “My new title”;

    One bad thing about the “document.title” variable is that it can only be manipulated in Microsoft Internet Explorer. Netscape’s implementation of JavaScript doesn’t allow for modification.

    In Closing.

    As you can see from the examples in this article, JavaScript is a powerful scripting language that can be used to enhance a visitor’s experience with our site. However, you shouldn’t use JavaScript too much because in some cases it can annoy visitors and send them packing before your site even loads!

    Article Written By Lee

  • Community Forum Scripts

    Date: 2011.02.21 | Category: Scripts | Response: 0

    Whether you have little or much traffic one thing that will enable you to benefit greater form this traffic is giving your surfers the sense that they are part of a ‘community’ much like the message boards built around adult webmasters have the feel of a community to them your surfers will end up staying around a lot longer if you can give them a reason to come back to your site over anyone else’s.

    That said, one of the main factors in starting your own little porn community is the need to have a place where all the ‘action’ take place. What better way than you own message forum.

    However, we hit our first problem, having never thought about starting a forum up before you wouldn’t know where to go to look for scripts or, what the best one is. That’s the reason behind this little guide.

    Below you will find a short breakdown of the more commonly used message forum scripts along with a short list of features each one has to offer you when choosing to build your own online community.

    VBulletin http://www.vbulletin.com

    This is actually quite a good forum script, most of the main forums on the web use either VBulletin or PhpBB when it comes to threaded forums. VBulletin uses MySQL and .php to run the actual forum and, set-up of it can become a little tricky if you want to customize it to your exact needs and color scheme. That said, once you overcome the initial complications in setting the forum script up it is easy to handle and, with a price tag of only $160.00 its an affordable option for many.

    Ultimate Bulletin Board http://www.infopop.com

    Unlike VBulletin UBB uses Perl programming for the forum script which, means you can install it on any cgi enabled host. However, the one main drawback with this script is that it uses flat text files to store all the data which, can sometimes bog down your server with unnecessary file calls. The cost of $199.00 however can be a bit to expensive for most webmasters.

    Ikon Board http://www.ikonboard.com

    Ikon board is a nice little threaded forum script and, the fact that it is free to download makes it even more so however, even though it uses MySQL for the backend or, choose to store your data in flat text files this script just seems a little to ‘basic’ looking for my personal taste. That said, there are many types of site using IkonBoard so the script must be good enough for them to be using it. Then again, maybe its the price tag of $0.00 that has made this a popular choice.

    PhpBB http://www.phpbb.com

    PhpBB is probably the most well known free forum script on the web today, its easy to customize (within reason) supports php and MySQL functions yet seems to offer nothing in return. The basics of a forum are there however, every webmaster and their closest friend seems to be using this script. The whole idea of building up a community is so that your site can stand out from the crowd, in my humble opinion, the script does what it is supposed to but, it doesn’t offer any redeeming qualities to your site.

    Site Net BBS http://www.focalmedia.net

    Sitenet BBS, formally known as Netboard, is probably one of the better Perl based forum scripts on the market, it price tag of $69.00 makes it an affordable choice for almost everyone and, the installation process itself is VERY simple to understand. The one drawback that i have found with this forum script however is that it stores the data in flat text file which actually slow the server down quite a lot making connections to the forum time-out on numerous occasions. However customization of the script is very easy using only HTML based templates you do not need any additional programming skills and, it has a nice interface with a few good features. For the price it is well worth a look. They also offer a freeware version however the links on the bottom of the forum become annoying after a while.

    In summary there are a lot of popular forum scripts available for webmasters to start using some are free other require payment ALL have a range of different functions available in them.

    Before looking at installing any of the scripts you should always try a demo first to see which one has the features and benefits you would like to offer your community members.

    If you can get your base community built up on a forum they enjoy using then all the rest of your marketing should pay off in dividends long term.

    Article written by Lee.

Premium Sponsors















Categories

Site Links