Library Tool (doc)

Tipitaka Khmer

 Please feel welcome to join the transcription project of the Tipitaka translation in khmer, and share one of your favorite Sutta or more. Simply click here or visit the Forum: 

Search ATI on ZzE

Zugang zur Einsicht - Schriften aus der Theravada Tradition



Access to Insight / Zugang zur Einsicht: Dhamma-Suche auf mehr als 4000 Webseiten (deutsch / english) - ohne zu googeln, andere Ressourcen zu nehmen, weltliche Verpflichtungen einzugehen. Sie sind für den Zugang zur Einsicht herzlich eingeladen diese Möglichkeit zu nutzen. (Info)

Random Sutta
Random Article
Random Jataka

Zufälliges Sutta
Zufälliger Artikel
Zufälliges Jataka


Arbeits/Work Forum ZzE

"Dhammatalks.org":
[logo dhammatalks.org]
Random Talk
[pic 30]

Chaṭṭha Saṅgāyana Tipitaka

A message and email solution for Venerable's Sangha, your Parisa or Upasaka's community in Dhamma: May one make use of the given "Sangha-messager": Download app here . More infos see here . មិនទាន់មានកម្មវិធីផ្ញើសារទេ? ទាញយកសារហារីសង្ឃ

12 Mar 2014 - WebMaster FAQ

WebMaster FAQ




WebMaster FAQ





How Do I Ban/Deny Users Via .htaccess?

This is a draft of a how to on banning. Let me know what you guys think. I pretty copied alot of the info from another guide at my host.



Ban User's Via SMF

If you wish to ban a user by IP, domain, email, or just username this can be done in the SMF settings. You can also ban users temporally

Just go to "Admin > Ban List" in your SMF installation.



Deny/Allow Certain IP Addresses From Your Domain Via ".htaccess".
If you have problems with certain visitors to your website, you can easily ban them through your .htaccess file. Most likely your site already has a .htaccess file in a web root, folder, or subfolder.

However this file is hidden and be made visible through your FTP client, depending on which FTP you use. You will need to check with your FTP program and guides for it to figure it out if you don't already know.

If you do not have a .htaccess file, you can create one.

Now, there are two different ways to ban visitors. This can be done using their IP address or with the domain name which they came from.

Example 1: to deny a user by their IP address.

Quote
order allow,deny
deny from 201.68.101.5
allow from all

The above code will deny the 201.68.101.5 IP address and allow everyone else to enter. If you want to deny a block of IP addresses, use this code:

Example 2: to deny a user by block IP address.

Quote
order allow,deny
deny from 201.68.101.
allow from all

The above code will deny the 201.68.101.0 IP address, the 201.68.101.5 IP address and all the way up to 201.68.101.255 or 255 IP addresses. Here's an example showing you how to deny a user by the domain name from which they came from:

Example 3: to deny a user by their domain address.

Quote
order allow,deny
deny from www.theirdomain.com
allow from all

The above code will deny anyone coming from www.theirdomain.com and allow everyone else to enter. Here's an example showing you how to deny a user from a domain name and all subdomains within the domain name:

Example 4: to deny a user by their domain address & subdomain.

Quote
order allow,deny
deny from .theirdomain.com
allow from all

The above code will deny anyone coming from www.theirdomain.com, all sub-domains within the domain and allow everyone else to enter.

Example 5: to deny all, except yourself.

Quote
Order deny,allow
Deny from all
Allow from youripaddress

The above code will block all visitors from accessing your site except for yourself if you replace youripaddress with the IP address that was assigned to you by your ISP.

Doc Written By: Xarcell


How Do I Create A TP/SMF Site?


:: THINGS YOU SHOULD KNOW FIRST ::

A TP/SMF site is actually a combination of two softwares, Simple Machine Forums: which is the core, and Tiny Portal: a modification which enhances SMF by adding many more functionalities to it. You can not run TP without SMF.

Most portal and forum websites are a lot different than TP/SMF. They tend to have the portal software as the "core", and the forum software as the "extension". With a TP/SMF site, it is backwards. The "forum software is the core", and the "portal software is the extension". Reason for this is because most sites evolve around the forums anyway...


:: SET UP ::


It is strongly recommend that you learn how to operate a SMF site before jumping into using TP. A new user can get confused about the difference between the two when trying to troubleshoot or get support. SMF questions & troubleshooting should take place at www.simplemachines.org , where you will get a better response. All TP questions & troubleshooting should take place at www.tinyportal.net.

Please learn your way around SMF first, we cannot express that enough...

Follow the steps provided below. If you have already completed a step and have it "working", then proceed to the next step. Remember, SMF is your "forum software" and TP is your "portal software". The forum software must be installed first, then your portal software, followed by any other modifications...


Start

1.| Get Your Webspace & Domain:
First before you can do anything, you will need some webspace to create your site on. There are several free hosts that give you webspace, and a lot of paid ones. Paid webspace is the better way to go, but varies in quality and resources from host to host. You will need php, ftp or shell access, a domain name, and the ability to create a mysql database. Always do your research before buying webspace...

You can read about some servers and hosts at this site HERE.
   
There will be technical "requirements" in order for your portal to work. You can read about these requirements HERE.


Next

2.| Get A Good FTP Program:
After acquiring your webspace, I recommend getting a good FTP program. Some are free and some are paid. Do some research and find out what is best for you. You will need to setup your FTP program so that you can FTP files to your newly acquired host & domain. In the future, you may need the FTP program to continue expanding your site and for other things...


Next

3.| Download/Upload/Install Simple Machines Forum:
Now you must first install SMF (simple machines forum) onto your webspace. SMF is a brilliant "forum software" that must be installed before you install the TP "portal software". Visit www.simplemachines.org , then the downloads section to download the latest "stable" release. You will also see beta/RC releases for testing, but use those at your own risk.

* You can read the SMF online documentation on how to install, upgrade, and how to convert HERE.


Next

4.| Download/Install Tiny Portal:
Once you have SMF installed on your domain and working, now you are ready to install TP (Tiny Portal). First you must download the TP software to your PC. You can find the software HERE. Then on your SMF site, go to "ADMIN > PACKAGES > DOWNLOAD NEW PACKAGES > PACKAGE TO UPLOAD". Click "browse" and select the TP package you downloaded to your PC, and then click "upload". Once you have uploaded successfully, it will give you an option to "apply mod". Click apply mod and it will show you the results of a "test installation" to see if there are any problems. If you have no lines that say "test failed", you are ready to proceed to installing TP. At this time click "continue", and follow any instructions that are prompted at the top. Your TP/SMF website installation should be complete.

* You can also read documentation on how to use TP HERE.


Optional

5.| Other Languages For Your Site:
Sometimes this isn't enough for some sites. The standard language set for a TP/SMF site is "english". If you wish to apply other languages to your site, you will first need to download & install languages files for SMF. After you have installed the languages for SMF, you then do the same for TP. Simply upload your language files to the Themes/default/languages folder.
 
You can get your SMF language files HERE. Make sure your language version matches your SMF installation version.

You can get your TP language files HERE. Make sure your language version matches your TP installation version.


End


Doc Written By: Xarcell


How Do I Get My Server Info?

As discussed HERE over at SMF forums, phpinfo.php file will show your php server info when you run the file.

I have attached the file here to save you some time if you wish to use it. Just upload it to your SMF root directory and run it by going it to it's URL.

Doc Written By: Xarcell


How Do I Take A Screenshot?

Screenshots are always helpful when showing off a block code snippet, module/modification feature, or when asking for help with a problem on your site.

If you are unfamiliar with photo/image editing problems, this is your basic Windows default on setting up a screenshot with MS Paint.

  • Step 1.| Make sure you can see clearly on your screen what you want to take a screenshot of.

     
  • Step 2.| Press "Print Screen".

  • Step 3.| Go To Start > Accessories > Paint and open the program.

  • Step 4.| Now Press [Ctrl V] or select "edit > paste" within the paint program.

  • Step 5.| Now in the Paint program, select "file > save as > choose name and select jpg from the dropdown list. NOTE: remember where you saved the file on your PC!

  • Step 6.| To apply the screenshot to your post, click "Additional Options..." below the textarea, then select "browse" and find the image on your PC that you want attach.

  • Step 7.| When you are finished writing your post, and have selected the image you want to attach, just click submit as usual and your good to go!


Note: some sites have a tight restriction on attachment file size.

Other Options:

If you have a photo/image editor you would rather use than MS paint. Simply press "print screen" as stated above and paste it in your workspace within your favorite photo/image editing program.

Doc Written By: Xarcell


The safe way to Clone or Upgrade your Livesite

The safe way to Clone or Upgrade your "livesite":

Having a testsite can be very useful when trying out new mods and additions to your site and can also offer a safe and easy way to upgrade your livesite files to the latest versions of SMF/TP.
This How-to covers both the clone and upgrade methods so be sure to download the correct files for end result you wish to achieve.

NOTE: Always backup your livesite data before working on your files!
  • 1. On your host server create a new database through your cPanel or phpMyAdmin.
  • 2. Create a folder in your www/root or in your cPanel and name it "testsite".
  • 3. Point your browser to Simple Machines Forum (SMF) forums and there you browse to their download section.
  • 4. Download the "Full install" package for either the same version you're running on your livesite to create a clone of the livesite, OR the 'Full install' of the new version you want to upgrade to on your livesite. Please note that as this is written TinyPortal will not yet work with SMF 2.0.
  • 5. Extract the package on your local computer and with your fav FTP software, go to the folder you created "testsite" and upload the extracted files and folders from the 'Full install' package to that "testsite" folder.
  • 6. Now you point your browser to "install.php" in the "testsite" folder and you will get a screen (the same as you saw when you installed your SMF livesite ) where you fill in your account settings and the new DB you created for the testsite.
  • 7. When the install of SMF is done, you now have a working 'testsite' to play with instead of your livesite and you will not have to worry about breaking it because it's just a testsite.
To create a "clone" of your livesite, you installed the same version as you have on your livesite; but if you want to upgrade your site, you installed the newer version to the testsite instead.

Now you come to the part where you have some options:
If you want to upgrade your entire site you download the newer versions of the Mods you already have on your livesite. Start with TinyPortal (TP) of course as it will probably be the biggest Mod so it will be easier to install that first.

  • 8. Download the 'version of TP' you HAVE on your livesite if you are creating a clone, OR the newer version if you want to upgrade your entire site.
  • 9. Install it through the SMF Package Manager and check so everything works the way it was meant to.
  • 10. Check your livesites packages list now, note down a list of the Mods you have installed there and browse to the "SMF Customization" site. Search and find the Mods you have noted, and install them through the package manager to your testsite.
  • 11. When you have the mods installed to your testsite, you now have a clone of your livesite.

If you are doing an upgrade to your livesite these steps will guide you through that process:
Now you need to set your LIVEsite to maintenance mode, and then set the theme to Default SMF Core theme and English ISO ( not utf8 ) language.
Be sure to backup your data!

  • 12. To use this testsite to help you upgrade your livesite, you simply download all the files from your testsite folder to your local computer. Then upload them again but this time you upload into your livesite folder and choose to overwrite the older files in that folder.
  • 13. When the files are uploaded, you browse back to SMF and the download section again but this time you download the 'Large upgrade' package.
  • 14. Extract the upgrade package to your local computer, and take out the two (2) ".SQL" files and the "upgrade.php" file.
    Upload these 3 files to your livesites folder and point your browser to the "upgrade.php" and let it update your database, you will see the progress during the update.
  • 15. When the upgrade is done, you point your browser to the file "manual_tp_install.php" and that will upgrade your TP tables and when it's done you refresh and the upgraded forum and TP should show on your screen now.


Here comes the tricky part... the other mods:
Open your FTP software and browse to your "livesite" folder called Packages.
Remove the old zips and rar files from that folder.
Then upload the new mods zips and rar files you installed on the testsite to the Packages folder.

Now you open your livesite and browse to the Package Manager and you will now see a list of all the mods, but they will all have the [install] link. Install them one by one; the mods are already in your files so you will get error on most files but ignore them as it doesn't matter. The mods will turn green and bigger mods like Arcade etc will update the DB that's important.

After you check to be sure everything is back to normal, you can set your forum to your custom default theme if you like. If you had really old versions of SMF or and TP, you might have to replace your themes with updated ones. But most themes will work so you can check things out.

Doc Written By: G6


What Is A Chmod?

Chmod is short for "change mode", a UNIX command that changes the access permissions of files or directories in order to read, write or execute files.

Various FTP programs have different routes about chmodding your files. However, I'm going to explain how to do this by default, with Internet Explorer.

To access your host files by default, open Internet Explorer(IE) and in the URL address bar type in: ftp://username:password@yourdomain . Or just type in ftp://yourdomain and a prompt will appear for your login info.

*Your username, password, and domain is your FTP access information to your server account, which may differ from your actual server login.

Once you are logged in, find the file you wish to chmod. Right click the file and you should see "properties". Click that and you should see a bunch of boxes. Check/uncheck the boxes as needed to suit your chmodding needs.

I have attached a screenshot below.


.:: ADVANCED ::.


Your chmod will appear in numbers or letters.

Example:
  • Numbers like  755 or 777
  • Letters like rwxr-xr-x     or rwxrwxrwx 

FIRST, let's tackle the numbers:

  • Read is given the value of     4
  • Write is given the value of     2
  • Execute is given the value of 1

This then is translated by adding the values together for each of the groups of permissions.

Therefore if setting permissions for the file as in the Table above:

  • User can read(4), write(2) and execute(1)  ::  4 + 2 + 1 = 7
  • Group can read(4), and execute(1)            :: 4 + 0 + 1 = 5
  • World can read(4), and execute(1)             :: 4 + 0 + 1 = 5

In this case permission would be 755.

If the group could write as well read and execute Group would = 4+2+1 =7. Therefore the permission would be 775.

SECOND,  let's tackle the letters:

Basically this is the same as the numbers but using letters instead of numbers:

  • Read        = r      (4)
  • Write       = w      (2)
  • Execute   = x      (1)

So to set permission to 765  as above it would translate to: rwx rw- r-x ,

OR to set to 777 : rwx rwx rwx
OR to set to 644: rw- r--   r--

644 meaning owner can read and write and group and world can read only.

# Letters Extended:

Working with letters is slightly more complicated and is detailed below.

Besides the letters relating to the permissions  r  w  x, there is another set of letters  relating to sets of permissions:

  • u    User
  • g    Group
  • o    World or Others
  • a     All the above

Permissions are granted with the following operators:

  • +    Add a permission
  • =    Assign a permission
  • -     Remove a permission


Format    chmod   usr|grp|othr  operator  permission


EXAMPLES:


  • chmod  ugo=rwx filename

This would assign the file filename in the current directory read write and execute permissions to the user group and others (world) (777).

-------------------

  • chmod  u=rwx,go=rx filename

This would assign the file filename in the current directory read write and execute permission for the user and read and execute only for the group and world (755).

-------------------

  • chmod  go= filename

This would clear all permissions for group and the world for the file filename.

-------------------

  • chmod  o-x *.cgi

This would remove execute permission for the world for all files with the extension cgi.

-------------------

  • chmod  u=rwx,go=r directory

This would set the directory named directory and all files and subdirectories in it to user read write and execute the group and world to read only (744).

-------------------

  • chmod  go+w directory

This would add write permission for the group and world to the directory named directory and all the files and subdirectories in it.

Doc Written By: Xarcell


What Is A Cron Job?

What is cron?

Actually it is called 'cron daemon'. Cron is an automatic task machine. You will use it on your Unix or Linux operating systems for doing some tasks at specific intervals with out your intervention every time. You set the clock and forget. The cron daemon runs the work for you.

What is cron tab?

'Cron tab(CRON TABLE)' is a text file that contains a series of cron functions.

What cron will do for you?

If you want to send your email sources to your subscribers at 11.30 night, you will set the cron job on your server.And your cron manager sends the one email every day at 11.30 until all the emails will be finished.

If you want to send them on Sundays, you can schedule it with your cron.

You can schedule it to delete your website members with expired accounts.

You can schedule it to receive an update on your subscribers from your mailing list manager.

How Do I create a Cron?
First you will need telnet/ssh access. I reccommend using PuTTY telnet or OpenSSH.

Once logged on, here are a few basic commands along with their meanings that you can use.

  • crontab -e
    Edit your crontab file, or create one if it doesn't already exist.
  • crontab -l
    Display your crontab file.
  • crontab -r
    Remove your crontab file.
  • crontab -v
    Display the last time you edited your crontab file. (This option is only available on a few systems.)


OPERATORS :
There are several ways of specifying multiple values in a field:

The comma (',') operator specifies a list of values, for example: "1,3,4,7,8"
The dash ('-') operator specifies a range of values, for example: "1-6", which is equivalent to "1,2,3,4,5,6"
The asterisk ('*') operator specifies all possible values for a field. For example, an asterisk in the hour time field would be equivalent to 'every hour'.
The slash ('/') operator can be used to skip a given number of values. For example, "*/3" means to skip to every third value. So for example "*/3" in the hour time field is equivalent to "0,3,6,9,12,15,18,21"; "*" specifies 'every hour' but the "/3" means that only the first, fourth, seventh...and such values given by "*" are used.

FIELDS:
The first five fields of the line are the date and time field which specify how frequently and when to execute a command.

Field no.
 
Description
 
Permitted values 
1
 
minute
 
0-59
2
 
hour
 
0-23
 
3
 
day of the month 1-31
 
4
 
month
 
1-12
5
 
day of the week 0-7
 
[/table]


* For day of the week, both 0 and 7 are considered Sunday. The time is based on that of the server running cron.

The sixth and subsequent fields (i.e., the rest of the line) specify the command to be run.

OUTPUT:
The output from commands is determined by the last entries on the line. By default (i.e. if you don't specify anything at all) regular and error output will be e-mailed to you. According to "man cron," when executing commands, any output is mailed to the owner of the crontab (or to the user named in the MAILTO environment variable in the crontab, if such exists). The MAILTO variable may be set in the crontab file.

You can redirect the standard output and the errors wherever you like by using ">". When you use ">" without a number before it, it defaults to "1>", and this the 1st output is the standard (non-error) output. When you use "2>" you are saying what to do with the error output. So, for example, ">/my_file.txt" would redirect standard output to a file called "my_file.txt", and "2>/my_errors.txt" would redirect the errors to a file called "my_errors.txt".


Examples Start


Example 1
:
This will run a command at 4:10pm, and email you the regular and error output:
Code: [Select]
10 16 * * * /home/someone/bin/mycoolscript.pl

Example 2:
This will run a command at 2:00am on Saturday, and only email you errors:
Code: [Select]
0 2 * * 6 /home/me/weekly/weekly-pruning.sh >/dev/null

Example 3:
This will run at midnight on newyears, and not tell you anything:
Code: [Select]
0 0 1 1 0 /home/you/happy.new.years.pyc >/dev/null 2>&1

In that example I used a special redirection. '2>&1' sends the second output (error output, stderr) to the same place that regular output goes (standard out, stdout). In place of that you could have given anything, such as a error log: 2>/home/me/cron.errors.log, or the bit bucket again: 2>/dev/null.

* It may be necessary for you to use two digit minute and hour fields. One user reported as having to do this to get cron to accept the entry. For example:
Code: [Select]
01 02 * * * perl /home/me/awstats

Example 4:
This will run a php page called cron.php every hour:
Code: [Select]
0 * * * * wget http://www.somedrupaldomain.com/cron.php

Example 5:
This will run a script every 15 minutes:
Code: [Select]
*/15 * * * * /usr/local/bin/perl /home/myuser/mydomain.com/myscript.pl


Examples End



Doc Written By: Xarcell


What Is A WYSIWYG Editor?

A WYSIWYG (pronounced "wiz-ee-wig") has the ability to convert an HTML TEXTAREA fields or other HTML elements to editor instances. Somewhat like a wordprocessor where a developer can see what the end result will look like while the interface or document is being created without knowledge of HTML or CSS. However, most editors have an option to switch directly to source, for hard coding HTML and CSS if preferred.

WYSIWYG is an acronym for "what you see is what you get".

Doc Written By: Xarcell


What Is ASCII & Binary?

Summary

In FTP you have to decide whether your transfers are to be in ASCII or binary mode. If the files are not uploaded in the proper mode, your browser will have trouble reading them and they will not display properly.

We won't go into detail about the differences between the 2 modes. It mostly deals with 0's and 1's.

Setting Your FTP Program to "Auto":

Most FTP programs have the option to set your upload to auto. What this usually does is compare the file type you're transferring against a list of known file types and set it to binary or ascii upload on its own.

By default, most FTP programs will have a pre-set list of files to be transferred in ascii and will upload / download everything else in binary. (These settings are in different places depending on the program you are using. Check the "Read Me" file or their Website if you can't find it.) Be sure to double check that the files you want to transfer are in the appropriate list.

The general rule of thumb is if you can view the file in a text editor like notepad (ie. .html, .js, .css files etc) you should upload in ASCII mode, most others (including images, sound files, video, zip files, executable's etc) should be uploaded in Binary.

Exceptions to the Rule

It seems all things related to computers have exceptions to the rules. Yes, this is yet another case of it.

If your text files contain international characters (ie. Chinese or Japanese text), they are to be uploaded as binary. The reason is that ascii takes into account differences between DOS and UNIX files (7 bits) but it doesn't do well with text using higher bits.

ASCII Files
.htm .html .shtml .php .pl .cgi .js .cnf .css
.forward .htaccess .map .pwd .txt .grp .ctl

Binary Files
.jpg .gif .png .tif .exe .zip .sit .rar .ace
.class .mid .ra .avi .ocx .wav .mp3 .au

Doc Written By: Xarcell


What Is FTP?

FTP is the TCP/IP standard way of transferring files across the Internet and between computers, servers, or computer to server. This is necessary for uploading files to your website.

As a webmaster, you should find yourself a good FTP program. If you cannot afford one, I recommend SmartFTP or Filezilla which are both excellent and free.

FTP is an acronym for "File Transfer Protocol"

Doc Written By: Xarcell


What Programs Do I Need?

When building websites, you will need at least one text editor, one FTP program for file transfers, and one graphics's program.

With SMF though, you can edit your template files without a text editor by going to:
Admin > Themes & Layout > Modify Themes > "theme that you want to modify".


Start Needed Programs


Free Text Editors:

1.| Notepad (comes free with windows)
2.| EditPad Lite
3.| Context

Paid Text Editors:
1.| EditPad Pro
2.| UltraEdit-32
3.| Dreamweaver
4.| TextPad

Free FTP Programs:
1.| Filezilla
2.| SmartFTP

Paid FTP Programs:
1.| CuteFTP
2.| WS_FTP

Free Graphics's Editor:
1.| MS Paint (comes free with windows)

Paid Graphics's Editor:
1.| Photoshop
2.| Paint Shop Pro


End Needed Programs


Doc Written By: Xarcell


Why Do My Uploads & Downloads Always Time Out?

The majority of these problems are server configuration. Many hosts will not allow you to adjust the settings that affect this unfortunately. However, listed below are the things that we are aware of that can affect uploads and downloads. Here are a some things you can check.
For upload problems:
  • Check permissions on your upload directory. Make sure that the server has the permission to read and write to the directory. If you don't know anything about permissions, consult your host for more information.
  • upload_max_filesize - default PHP install is set to 2M. This means you can only upload a max file size of 2MB. This setting is usually changed in the php.ini file on your server. Consult your host for more information on changing this value.
  • max_execution_time - default setting is 30 seconds. This sets the number of seconds a script is allowed to run. In other words, if it takes more than 30 seconds to upload your file this can cause a time out.
  • max_input_time - default is 60 seconds. This sets the maximum time in seconds a script is allowed to parse input data, like POST, GET and file uploads.
  • post_max_size - The post_max_size sets the upper limit on the amount of data that a script can accept in this manner. Ideally this value should be larger than the value that you set for upload_max_filesize.
For download problems:
  • Permissions - There are often many security settings and file permissions associated in these problems. We could not possibly list them here. Make sure your files are readable and writable by the server. Beyond that, consulting with your host after exhausting your resources is advised.
  • As crazy as this may sound, Anti-virus and Firewall software have been known to cause issues. As you download a file and it is filtered or scanned by these software, things can happen that may turn a download into a corrupt file. Disable any software of this type to test if it is a problem for you.


Articles in « Documentation Library tool (TinyPortal) »

Comments *