To capture the encoding from the XML tag of the file. We need to read the first line, and pass it to the function to capture the encoding value.
The first line looks like this:
< ?xml version="1.0" encoding="utf-8"? >
The PHP code:
PLAIN TEXT
PHP:
function readfirstline($file){
$fp = @fopen($file, "r");
$firstline = fgets($fp);
fclose($fp);
return $firstline;
}
function get_attr( $line [...]
This wordpress plugins adds a radio button to the comment form so users can tell if a post is hot or not. Depending on the value that is chosen, another css class is added to comment .
Download the plugin
Download the Hot Or Not plugin here
Unzip this file into the /wp- content/plugins/ folder.
Adding the radionbutton [...]
When you would try to change the filepermission with a php script on your hosting, you would probably run into an "Operation not permitted" error.
This is because save mode is enabled. To bypass this limitation you could login unter ftp and change the file permission from there.
PLAIN TEXT
PHP:
//settings
$folders = array("/feeds/","/sitemap/");
$ftp_details['ftp_user_name'] = "username";
$ftp_details['ftp_user_pass'] = "pw";
$ftp_details['ftp_root'] = [...]
Just a quick not on mod_rewrite & wordpress.
If you want to write your own .htaccess code in combination with wordpress you have to put it above the default wordpress code.
<ifmodule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^arolabs\.com$ [NC]
RewriteRule ^(.*)$ http://www.arolabs.com/$1 [R=301,L]
</ifmodule>
# BEGIN WordPress
<ifmodule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</ifmodule>
# END WordPress
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jun | ||||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | 31 | ||