Jump to content

  • Disable Right Click For Guests

    A small yet useful tutorial
    This tutorial will disable right click on your site for guests only!
     
    Just add that code @ the very top of your ACP > look & Feel > Skin name > Edit Template HTML > All Global HTML > global_board_header
     
    <if="$this->ipsclass->member['id'] == '0'"> <script language=JavaScript> var message="You Must Log-in before you can use Right Click!"; function clickIE4(){ if (event.button==2){ alert(message); return false; } } function clickNS4(e){ if (document.layers||document.getElementById&&!document.all){ if (e.which==2||e.which==3){ alert(message); return false; } } } if (document.layers){ document.captureEvents(Event.MOUSEDOWN); document.onmousedown=clickNS4; } else if (document.all&&!document.getElementById){ document.onmousedown=clickIE4; } document.oncontextmenu=new Function("alert(message);return false") </script> </if> Change what the message says all you need to do is Edit this part of the codes "You Must Log-in before you can use Right Click!"
     

    Redirect [.htaccess]

    Alright, say you have (www.yourdomain.com) and you want to to go to (www.yourdomain.com/Home/)
    And Home is a subfolder in your wwwroot.
     
    Just add this to your .htaccess
     
    RewriteEngine On RewriteCond %{HTTP_HOST} ^(www.)?YourDomain.com$ RewriteRule ^(/)?$ home [L]  
    Just change "YourDoamin.com" to your domain and "Home" to the subfolder. Reload yourdomain.com and boom, redirects.

    How to make a fixed navigation bar

    This simple tutorial for the default theme on making the top navigation bar fixed. This tutorial is only for Invision Power Board 4.x!  
     
    Or easiest way, download https://invisionpower.com/files/file/7676-fixed-navbar/ 
     
    Go to:
    Customization > Theme > Edit HTML & CSS > Templates > GlobalTemplate
     
    Here you have to find: </footer>
    {template="includeJS" if="theme.js_include == 'footer'" app="core" group="global" location="global" params=""} Add below:
     
    <script> $('#elSearchNavContainer').addClass('original').clone().insertAfter('#elSearchNavContainer').addClass('cloned').css('position','fixed').css('top','0').css('margin-top','0').css('z-index','2000').removeClass('original').hide(); $('.cloned #elSearch').remove(); $(document).ready(function() { var stickyNavTop = $('#elSearchNavContainer').offset().top; window.addEventListener("resize", clone); function clone() { var test = document.getElementById('elSearchNavContainer').offsetWidth; $('.cloned').css('width',test); } var stickyNav = function(){ var scrollTop = $(window).scrollTop(); if (scrollTop > stickyNavTop) { $('.cloned').css('display', 'inline'); $('.original').css('visibility', 'hidden'); $('.original #elSearch').appendTo('.cloned'); } else { $('.cloned').css('display', 'none'); $('.original').css('visibility', 'visible'); $('.cloned #elSearch').appendTo('.original'); } }; stickyNav(); clone(); $(window).scroll(function() { stickyNav(); }); }); </script>  
    Navigation should now scroll down.
     
    Here is a preview:
     

     

    HTML Formatting

    Hello everyone,
     
    Today we will talk about formatting in HTML.
    Let's give it a go..
     
     If you use a word processor, you must be familiar with the ability to make text:
    Bold Italic Underlined There are just three of the ten options available to indicate how text can appear in HTML and XHTML.
     
    Bold Text
    Anything that appears within <b>...</b> element, is displayed in bold as shown below:
    <!DOCTYPE html> <html> <head> <title>Bold Text Example</title> </head> <body> <p>The following word uses a <b>bold</b> typeface.</p> </body> </html> This will produce the following line:
     
     
    Underlined Text
    Anything that appears within <u>...</u> element, is displayed with underline as shown below:
    <!DOCTYPE html> <html> <head> <title>Underlined Text Example</title> </head> <body> <p>The following word uses a <u>underlined</u> typeface.</p> </body> </html> his will produce the following result:
     
     
    Strike Text
    Anything that appears within <strike>...</strike> element is displayed with strikethrough, which is a thin line through the text as shown below:
    <!DOCTYPE html> <html> <head> <title>Strike Text Example</title> </head> <body> <p>The following word uses a <strike>strikethrough</strike> typeface.</p> </body> </html> This will produce the following result:
     
     
    Source: http://www.tutorialspoint.com/html/html_formatting.htm

    Adding guidelines to the footer

    Hello everyone,
     
    This tutorial is only for Invision Power Board 4.x!  
    This tutorial will allow you to add a guidelines link to the footer of your site and have it opened in a new lightbox window and also make the privacy policy do the same.
     
    Go to your Admin Control Panel -> Customization -> Themes Click the </> code button on the theme you want to edit, this case been the default. Go to the Templates -> Core -> Front -> Global -> Footer Find the code... {{if \IPS\Settings::i()->privacy_type != "none"}} .. {{endif}} Change it with...
    {{if \IPS\Settings::i()->privacy_type != "none"}} <li><a href='{{if \IPS\Settings::i()->privacy_type == "internal"}}{url="app=core&module=system&controller=privacy" seoTemplate="privacy"}{{else}}{setting="privacy_link"}{{endif}}' data-ipsdialog data-ipsdialog-title="{lang="privacy"}">{lang="privacy"}</a></li> {{endif}} {{if \IPS\Settings::i()->gl_type != "none"}} <li><a href='{{if \IPS\Settings::i()->gl_type == "internal"}}{url="app=core&module=system&controller=guidelines" seoTemplate="guidelines"}{{else}}{setting="gl_link"}{{endif}}' data-ipsdialog data-ipsdialog-title="{lang="guidelines"}">{lang="guidelines"}</a></li> {{endif}}  
    Your privacy policy should now open in a lightbox window and also have a new guidelines link that opens the guidelines in a new lightbox window.
     
     
    Kind regards,

    PHP 7 - Enviroment Setup

    In order to develop and run PHP Web pages, three vital components need to be installed on your computer system.
    Web Server − PHP works with virtually all Web Server software, including Microsoft's Internet Information Server (IIS) but most often used is Apache Server.
     
    Download Apache for free here − http://httpd.apache.org/download.cgi
     
    Database − PHP PHP works with virtually all database software, including Oracle and Sybase but most commonly used is MySQL database.
     
    Download MySQL for free here − http://www.mysql.com/downloads/
     
    PHP Parser − In order to process PHP script instructions, a parser must be installed to generate HTML output that can be sent to the Web Browser. This tutorial will guide you how to install PHP parser on your computer.
     
    PHP Parser Installation
     
    Before you proceed, it is important to make sure that you have proper environment setup on your machine to develop your web programs using PHP. Store the following php file in Apache's htdocs folder.
     
    phpinfo.php
     
    <?php phpinfo(); ?>  
    Type the following address into your browser's address box.
     
    http://127.0.0.1/phpinfo.php
     
    If this displays a page showing your PHP installation related information, then it means you have PHP and Webserver installed properly. Otherwise, you have to follow the given procedure to install PHP on your computer.
    This section will guide you to install and configure PHP over the following four platforms −
     
    What Do I Need?
     
    To start using PHP, you can:
    Find a web host with PHP and MySQL support Install a web server on your own PC, and then install PHP and MySQL  
    Use a Web Host With PHP Support
    If your server has activated support for PHP you do not need to do anything. Just create some .php files, place them in your web directory, and the server will automatically parse them for you. You do not need to compile anything or install any extra tools.
     
    Because PHP is free, most web hosts offer PHP support.
     
    Set Up PHP on Your Own PC
    However, if your server does not support PHP, you must:
    install a web server install PHP install a database, such as MySQL  
    The official PHP website (PHP.net) has installation instructions for PHP: http://php.net/manual/en/install.php
     

    How To Make A HTML Editor

     
    Trying to build a website using HTML but its too hard to constantly open up your project through your browser every few minutes? Well here's how to make an app to let you preview your project whilst building it!! 
     
    Step 1. Make a form and add a tab viewer, in tab 1 add a web-browser, In tab 2 add a richtextbox. It should look something like below 
     

     
    Step 2. Double click the RichTextBox and add the following code 
    WebBrowser1.DocumentText = RichTextBox1.Text It should look something like the below 
     

     
    Step 3. Debug your application and test it out!! It should look something like this 
     


     
     
     
     

    PHP 5 Introduction

    PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.
    PHP is a widely-used, free, and efficient alternative to competitors such as Microsoft's ASP.
    Easy Learning with "Show PHP"
    Example
    <!DOCTYPE html> <html> <body> <?php echo "My first PHP script!"; ?> </body> </html> PHP scripts are executed on the server.
    What You Should Already Know
    Before you continue you should have a basic understanding of the following:
    HTML CSS JavaScript If you want to study these subjects first, find the tutorials on our Home page.
    What is PHP?
    PHP is an acronym for "PHP: Hypertext Preprocessor" PHP is a widely-used, open source scripting language PHP scripts are executed on the server PHP is free to download and use PHP is an amazing and popular language!
    It is powerful enough to be at the core of the biggest blogging system on the web (WordPress)!
    It is deep enough to run the largest social network (Facebook)!
    It is also easy enough to be a beginner's first server side language!
    What is a PHP File?
    PHP files can contain text, HTML, CSS, JavaScript, and PHP code PHP code are executed on the server, and the result is returned to the browser as plain HTML PHP files have extension ".php" What Can PHP Do?
    PHP can generate dynamic page content PHP can create, open, read, write, delete, and close files on the server PHP can collect form data PHP can send and receive cookies PHP can add, delete, modify data in your database PHP can be used to control user-access PHP can encrypt data With PHP you are not limited to output HTML. You can output images, PDF files, and even Flash movies. You can also output any text, such as XHTML and XML.
    Why PHP?
    PHP runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.) PHP is compatible with almost all servers used today (Apache, IIS, etc.) PHP supports a wide range of databases PHP is free. Download it from the official PHP resource: www.php.net PHP is easy to learn and runs efficiently on the server side What Do I Need?
    To start using PHP, you can:
    Find a web host with PHP and MySQL support Install a web server on your own PC, and then install PHP and MySQL Use a Web Host With PHP Support
    If your server has activated support for PHP you do not need to do anything.
    Just create some .php files, place them in your web directory, and the server will automatically parse them for you.
    You do not need to compile anything or install any extra tools.
    Because PHP is free, most web hosts offer PHP support.
    Set Up PHP on Your Own PC
    However, if your server does not support PHP, you must:
    install a web server install PHP install a database, such as MySQL The official PHP website (PHP.net) has installation instructions for PHP: http://php.net/manual/en/install.php
×