This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Change Joomla user groups programatically | |
jimport('joomla.user.helper'); | |
JUserHelper::removeUserFromGroup($user_id, $group_id); | |
JUserHelper::addUserToGroup($user_id, $group_id); | |
// Get a user's view levels |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Collection of useful php snippets | |
// html readable print_r for arrays | |
echo '<pre>'; | |
print_r($myarray); | |
echo '</pre>'; | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Block comment spammers, bad bots and some proxies | |
RewriteCond %{REMOTE_HOST} 24.117.121.113 [OR] | |
RewriteCond %{REMOTE_HOST} ^211.138.198.* [OR] | |
RewriteCond %{REMOTE_HOST} 216.246.60.183 [OR] | |
RewriteCond %{REMOTE_HOST} 203.94.229.227 [OR] | |
RewriteCond %{REMOTE_HOST} 91.121.3.29 [OR] | |
RewriteCond %{REMOTE_HOST} 210.0.141.247 [OR] | |
RewriteCond %{REMOTE_HOST} 210.197.97.67 [OR] | |
RewriteCond %{REMOTE_HOST} 74.95.182.57 [OR] | |
RewriteCond %{REMOTE_HOST} 222.36.12.42 [OR] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add these to the standard Joomla .htaccess file, depending on the errors you get | |
# you'll either get a server error or the install warnings will go away | |
# Replace 'yoursite.com' if you use the fourth one | |
php_flag register_globals off | |
php_flag magic_quotes_gpc on | |
php_flag display_errors on | |
php_value session.save_path "/var/www/vhosts/yoursite.com/httpdocs/tmp" |