Jump to content
[MUST READ] Forum Rules ×

xpde

Senior Members
  • Posts

    71
  • Joined

  • Last visited

  • Days Won

    11

Posts posted by xpde

  1. 5 hours ago, PCTipsGR said:

    Thanks for this code! I assume it works with HTML also, I will definitely give it a try!

    That code is specifically for removing PHP. To remove the .html extension, just rewrite the code a little bit

    RewriteEngine on 
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME}\.html -f
    RewriteRule ^(.*)$ $1.html [NC,L]

     

  2. 1 hour ago, Mauwiks said:

    The result of the customization, but please disregard this. It was an innocent question. And I already figured it out from the VPT Community. Thanks!

    Do you have Discord or some IM?

  3. 9 hours ago, PCTipsGR said:

    Keep in mind that Normal Themes (not Lightspace and Lite) will not work due to @xpde's script not searching for an icon_spritemap.css.

    If you could do that, keeping in mind that console errors will be generated for lite and lightspace themes due to not having an icon_spritemap.css file (but the themes will load without problem), it would be nice.

    Added (8c291b4) - Thanks for telling me that. I don't ever use VPThemes because I have a passion for designing. However, I don't release my panel designs.

  4. Howdy Everyone,

    Here's a free little tool for your cPanel/VistaPanel. It's written in JS and currently maintained under the MIT License. This didn't waste much of my time, so no need for any compliments. This script was inspired by VistaPanel Customizations.

    Features

    • Change the Title
    • Change the Protocol
    • Change the Logo
    • Change the Theme (Kudos to VPThemes for the CDN and Themes, obviously)
    • Add your own Credits (#93dbba9)
    • Organized Code
    • Clean Setup usage

    Usage

    Apply this code anywhere

    const AlterVP = {
        title: "AlterVP - cPanel",
        logo: "logo.png",
        ssl: 1,
        theme: "dark",
        credits: {
        	desc: "AlterCP",
        	logo: "small-logo.png"
        }
    };

    Apply this code to bottom

    <script src="//rawgit.com/xpde/AlterVP/master/altervp.js"></script>

    Source

    Suggestions? Reply below.

    Thanks,

    @xpde

  5. On 7/20/2018 at 3:25 PM, einet said:

    I remove it with javascript by applying this code on the page in the header or at the bottom of the page

    <script type="text/javascript">
    var searchWinHref = window.location.href;
       if(searchWinHref.indexOf("?i") > -1) { 
       window.location.href = window.location.href.split('?')[0];
       }
    </script>

     

    I came back on the forums just to reply to this. Thanks for your answer, and I appreciate everything you do for the forums.

  6. 14 minutes ago, PCTipsGR said:

    What do you mean? I have contacted personally Support and they said that if you use securesignup.net as register domain instead of order.yourdomain.com it will work properly, and so it does!

    Tell that to the people who said otherwise

  7. 2 hours ago, PCTipsGR said:

    Hello, there is a much simpler way to do that, without PHP or .htaccess code, as I posted it in another similar topic here.

    Follow my steps and you should be OK:

    • Enable CloudFlare through vPanel or by changing Nameservers
    • Select Full SSL/Flexible (NOT RECOMMENDED)/Full SSL Strict (IF YOU HAVE INSTALLED YOUR OWN CERTIFICATE)
    • Wait for 1-24 hours

    It should be gone!

    Please tell me if this worked for you or if you found it helpful.

    If you enable cloudflare on your webhost, it will mess with the registration and make it unavailable for users to sign up.

  8. 52 minutes ago, PlanetCloud said:

    Alright,

    but on HTML5 there's input attribute that allows you to limit the form characther which can be founded here : https://www.w3schools.com/tags/att_input_maxlength.asp
    And I noticed you had implemented it too, why does the JS included there if the limit is applied?

    I don't you understood my previous statement..
    You can still type beyond the maxlength before submit. The JavaScript snippet prevents this.

  9. 10 hours ago, PlanetCloud said:

    Nice!
    But what does this actually do?
     

    
     <script>
             function ismaxlength(obj) {
                 var mlength = obj.getAttribute ? parseInt(obj.getAttribute("maxlength")) : ""
                 if (obj.getAttribute && obj.value.length > mlength)
                     obj.value = obj.value.substring(0, mlength)
             }
          </script>

    I sawed this a lot but since Im not a JS developer, I dont get this...

    Also there should be $title.. instead of using using test.com // Signup, it's better to use  Your Hosting Name // Signup or Your Hosting Name - Signup (In my opinion)..

     

    Btw, Nice design :D

     

    For the JS question(used in default mofh signup.php) thats so users cant type anymore than default max input.

    For the variable statement *$title* - No, I once again disagree and find that to be useless due to the fact that you can modify the title to whatever you want it to be, takes under 30 seconds. No need for useless variables. This is just a design.

    And thanks for the compliment.

  10. Basic Form Design

    ~ This is just a general design by yours truly. I hope you guys enjoy it ~

    Screen_Shot_2018_03_05_at_8_13_52_PM.png

    ~ Instructions ~

    1. Copy the code stated below
    2. Create a PHP document (Preferably signup.php)
    3. Paste the code to the document
    4. Upload to your MOFH Website via FTP
    5. ta-da, nice looking signup page

    ~ Here's the code for the page ~

    Spoiler
    
    <?php
    // Should Edit
    $domain = "example.com";
    // Shouldn't Edit
    $randInt = md5(rand(6000,PHP_INT_MAX));
    ?>
    <!DOCTYPE html>
    <html>
       <head>
          <title><?php echo $domain; ?> // Signup</title>
          <style>
             @import url('https://fonts.googleapis.com/css?family=Roboto:300,400');
             *{font-family:'Roboto';color:#343434}body{margin:0}h1{margin-top:0;margin-bottom:20px;font-weight:300;text-align:center}.btn{padding:10px 15px;font-family:'Roboto';font-size:10pt;background:#6DBED6;color:white;width:100%;box-sizing:border-box;text-transform:uppercase;transition:background 1s ease-out;border:none}.btn:hover{background:#569DB3;color:white}.form-input{padding:10px;width:100%;box-sizing:border-box;font-size:10pt;border:1px solid #e4e4e4;outline:none;margin-top:3px;margin-bottom:3px}.form-input:hover,.form-input:focus{border:1px solid #000;border-image:linear-gradient(to right,#6DBED6 0%,#6DAD72 100%);border-image-slice:1}select{padding:5px 8px;width:130%;border:1px solid #e4e4e4;border-radius:0;box-shadow:none;cursor:pointer;background:transparent;background-image:none;-webkit-appearance:none}.container{display:flex;align-items:center;justify-content:center;background:linear-gradient(to right,#8C7699 0%,#718FB0 100%);width:100%;height:100vh}.security-container{background:#eee;display:flex;justify-content:space-evenly;width:100%;box-sizing:border-box;padding:10px;margin-top:3px;margin-bottom:3px}.signupForm{border-top:10px solid #000;border-image:linear-gradient(to right,#6DBED6 0%,#6DAD72 100%);border-image-slice:1;width:500px;background:white;height:auto;padding:15px;-webkit-box-shadow:0 0 40px 2px rgba(80,80,80,.3);-moz-box-shadow:0 0 40px 2px rgba(80,80,80,.3);box-shadow:0 0 40px 2px rgba(80,80,80,.3)}.securityImage{background:linear-gradient(rgba(0,0,0,.45),rgba(0,0,0,.45)),url(https://order.<?php echo $domain;?>/image.php?id=<?PHP echo $randInt;?>);background-position:center center;background-repeat:no-repeat;background-size:cover;width:183px;height:40px;margin:0 auto}.securityImage:hover{background:linear-gradient(rgba(255,255,255,0),rgba(255,255,255,0)),url(https://order.<?php echo $domain;?>/image.php?id=<?PHP echo $randInt;?>);background-position:center center;background-repeat:no-repeat;background-size:cover;width:183px;height:40px;margin:0 auto}
          </style>
          <script>
             function ismaxlength(obj) {
                 var mlength = obj.getAttribute ? parseInt(obj.getAttribute("maxlength")) : ""
                 if (obj.getAttribute && obj.value.length > mlength)
                     obj.value = obj.value.substring(0, mlength)
             }
          </script>
       </head>
       <body>
          <div class="container">
             <div class="signupForm">
                <form id="updatedetails" name="updatedetails" class="signup" method="post" action="https://order.<?php echo $domain; ?>/register2.php">
                   <h1>Form Name</h1>
                   <input class="form-input" type="text" name="username" placeholder="Sub-domain"  maxlength="16" onkeyup="return ismaxlength(this)">
                   <input class="form-input" type="password" name="password" placeholder="Password" maxlength="20" onkeyup="return ismaxlength(this)">
                   <input class="form-input" type="email" name="email" size="30" placeholder="E-mail">
                   <select class="form-input" name="website_category">
                      <option disabled selected>What's the site's category?</option>
                      <option>Personal</option>
                      <option>Business</option>
                      <option>Hobby</option>
                      <option>Forum</option>
                      <option>Adult</option>
                      <option>Dating</option>
                      <option>Software / Download</option>
                   </select>
                   <select class="form-input" name="website_language">
                      <option disabled selected>What's the site's language?</option>
                      <option>English</option>
                      <option>Non-English</option>
                   </select>
                   <div class="security-container">
                      <input type="hidden" name="id" value="<?PHP echo $randInt; ?>">
                      <div class="securityImage" style="margin-top: 3px"></div>
                      <input class="form-input" type="text" name="number" placeholder="Enter the security code!">
                   </div>
                   <button type="submit" class="btn">Submit</button>
                </form>
             </div>
          </div>
       </body>
    </html>

     

    you're welcome

  11. On 2/26/2018 at 8:43 PM, PlanetCloud said:

    Also GET parameter WILL BE REQUIRED for the new Project Logged 2.0 (Demo here : https://mofh.tariktunaikartukredit.cf/login.php)

    • advertise your project elsewhere
    17 hours ago, Aqib said:

    Yep, i am not going to use it.

    • Cool. That's a useless reply.
    On 2/26/2018 at 8:42 PM, PlanetCloud said:

    This might work but I do not recommend this as this is going to remove all GET parameter's too (which is important to me)

  12. Since people wanted to complain about this stuff, why not just remake it in a language they might understand more fluently. This code snippet will destroy of your pesky GET parameter (?i=[1-100]). Here's how to do so - 

    Create the Document

    1. Go into your FTP and create a file (preferably ~ deleteGET.php)
    2. Copy and paste this code into the document
    <?php
    // Just simply add your own GET parameters to remove.
    $toRemove = array( 'i' => '', 'anotherGetParam' => '' );
    $removeParam = array_intersect_key( $toRemove, $_GET );
    
    // Stabilize website / avoid loop
    if(sizeof( $removeParam ) > 0 ) {
    	$redirectUrl = $_SERVER[ 'REQUEST_URI' ]; // Server Request
    	foreach( $removeParam as $key => $val ) $redirectUrl = preg_replace( '/([?&])' . $key . '=[^&]+(&|$)/', '$1', $redirectUrl ); // Removes every parameter set in $toRemove
    	header( 'Location: ' . $redirectUrl ); // Redirects you to final size
    }
    ?>

    Include the document

    1. go into your whatever document you want (typically your index.php)
    2. Copy and paste this code to the top of the page
    <?php
    	include 'deleteGET.php'; // Change to the directory and filename of your code.
    ?>

    Vwolla!

    Now you can use Ads, WordPress, and ETC. without having to deal with all the GET Parameters getting deleted/hidden.

×
×
  • Create New...