Showing posts with label Notepad. Show all posts
Showing posts with label Notepad. Show all posts

Monday, August 31, 2015

How to Detect Mobile Browsers (11 Steps)


Download the 'Detect Mobile User Agents & Browsers' PHP script by clicking on the link located in the 'Resources' section below. The downloaded file is compressed. Double-click on it to open your default extraction program and extract the files to your desktop.
Open an FTP (File Transfer Protocol) program and log in to your website's hosting account by typing in your FTP address, username, and password. Once you have connected to your hosting server, use the FTP program to upload the 'mobile_device_detect.php' file that you extracted in step 1. Upload it to the root directory of your website where your 'index.html' or 'index.php' file resides.
Use the FTP program to download the 'index.html' or 'index.php' file from your website and save it on your desktop. Open the file in a text editor such as Notepad or Wordpad.
Open a web browser and type 'http://detectmobilebrowsers.mobi/" into the address bar, then press the ENTER key. Alternately, you can click the 'Detect Mobile Browsers Website' link in the 'Resources' section below.
Scroll down to the 'Function Generator' heading. Here we will generate a PHP function code that will define how the PHP code file we uploaded in step 2 will behave. Choose an option from the respective drop-down menus for 'Detect iPhones,' 'Detect iPads,' 'Detect Android Devices,' 'Detect Opera Browsers,' 'Detect Blackberry Devices,' 'Detect Palm Mobiles' and 'Detect Windows Mobile Devices'. Each drop-down menu will allow you to specify whether to treat the device browser like a mobile browser or a standard desktop browser. You may also choose to redirect a device type to a custom URL, which must be typed into the text field that appears below the drop-down menu when you choose the 'Redirect (device) to a specific URL' option.
Choose an option from the 'Redirect Mobile Browsers' drop-down menu. Any devices that were set in the above options to be treated like a mobile browser will be affected by this option. You can redirect mobile users to a custom URL where there is a mobile browser-optimized version of your website or choose not to redirect them, which will allow them to access the standard website. Type the mobile-optimized website URL into the provided text box.
Set the 'Redirect Desktop Browsers' drop-down menu to 'No - Do not redirect desktop visitors - function will return false' to allow desktop browser users to access the standard website. Any devices that were set in the above options to be treated like desktop browsers will be affected by this option.
Click the 'Generate Code' button. Highlight the text that appears in the 'PHP Code' box and press CTRL+C on your keyboard to copy the text to your clipboard. Minimize your web browser so you can see the 'index.html' or 'index.php' file you opened in the text editor in step 3.
Create a blank line at the beginning of the text document by clicking your mouse at the top of the document and pressing the ENTER key. Place your cursor on the blank line and type '
' and press ENTER again.
Click on the 'File' menu at the top of the text editor and choose 'Save'. In the FTP program window, copy the edited 'index.html' or 'index.php' file back to the root directory of your website, overwriting the original file.
Access your website from a mobile device browser. You should be redirected to you mobile-optimized website. Access your website from a standard browser to make sure that you are directed to the standard website.
VPS Hosting

Thursday, August 27, 2015

How to Upload an HTML Theme From ThemeForest


Download your theme or template from your ThemeForest downloads page. Click on your account name in the upper-right of their Web page. Unzip the file to an easy-to-find location on your hard drive.
Open the theme folder. In most cases, the files you need to edit and upload to your Web space are located in a sub-folder under the theme's name. Locate the 'index.html' file and open it in Notepad or an HTML editor. HTML editors are preferable, as they allow you to view the design of the theme and make changes without knowing HTML. The main value you want to find and change is the page title, and possibly the copyright text. The title is located near the top of the document, between '
' tags. The copyright text is likely located at the very bottom.
Access your Web space using your host's Web control panel, or an FTP program. If your Web space does not put you in the root of your domain by default, you may need to open the 'htdocs' or 'www' folder to access your site root. Refer to your host's documentation for how to find your website folder if needed.
Upload the edited contents of your theme's Web files folder to your website folder by dragging the files from one window to the other, or selecting them in your control panel and clicking 'Upload.' The HTML files must be in the main website folder and not in a sub-folder. For example, your website structure may have an index.html and contact.html in the root folder, and an 'images' sub-folder.
Type your URL into your Web browser to test your webpage. If the files were uploaded to the correct place, you should see your main page, or index.html file. Continue to make changes to the files using your text editor, then upload them to view the updated pages.
VPS Hosting