dapurhosting.com Blog for Tech

May 1, 2018

Disable Product Recommend Virtuemart Joomla

Filed under: CMS — Tags: , , — dh @ 6:26 am

Edit administrator/components/com_virtuemart/html/shop.recommend.php

Di bawah code
if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );

Tambahkan kode baru:

header('Location: http://google.com/');
exit;

April 13, 2018

Spamming Joomla

Filed under: CMS — Tags: , — dh @ 4:37 pm


UPDATE jos_extensions SET params = '{\"show_contact_category\":\"hide\",\"show_contact_list\":\"0\",\"presentation_style\":\"sliders\",\"show_name\":\"1\",\"show_position\":\"1\",\"show_email\":\"0\",\"show_street_address\":\"1\",\"show_suburb\":\"1\",\"show_state\":\"1\",\"show_postcode\":\"1\",\"show_country\":\"1\",\"show_telephone\":\"1\",\"show_mobile\":\"1\",\"show_fax\":\"1\",\"show_webpage\":\"1\",\"show_misc\":\"1\",\"show_image\":\"1\",\"image\":\"\",\"allow_vcard\":\"0\",\"show_articles\":\"0\",\"show_profile\":\"0\",\"show_links\":\"0\",\"linka_name\":\"\",\"linkb_name\":\"\",\"linkc_name\":\"\",\"linkd_name\":\"\",\"linke_name\":\"\",\"contact_icons\":\"0\",\"icon_address\":\"\",\"icon_email\":\"\",\"icon_telephone\":\"\",\"icon_mobile\":\"\",\"icon_fax\":\"\",\"icon_misc\":\"\",\"show_headings\":\"1\",\"show_position_headings\":\"1\",\"show_email_headings\":\"0\",\"show_telephone_headings\":\"1\",\"show_mobile_headings\":\"0\",\"show_fax_headings\":\"0\",\"allow_vcard_headings\":\"0\",\"show_suburb_headings\":\"1\",\"show_state_headings\":\"1\",\"show_country_headings\":\"1\",\"show_email_form\":\"0\",\"show_email_copy\":\"1\",\"banned_email\":\"\",\"banned_subject\":\"\",\"banned_text\":\"\",\"validate_session\":\"1\",\"custom_reply\":\"0\",\"redirect\":\"\",\"show_category_crumb\":\"0\",\"metakey\":\"\",\"metadesc\":\"\",\"robots\":\"\",\"author\":\"\",\"rights\":\"\",\"xreference\":\"\"}' WHERE name = 'com_contact' AND type = 'component';

UPDATE jos_extensions SET params = '{\"allowUserRegistration\":\"0\",\"new_usertype\":\"2\",\"useractivation\":\"1\",\"frontend_userparams\":\"1\",\"mailSubjectPrefix\":\"\",\"mailBodySuffix\":\"\"}' WHERE name = 'com_users' AND type = 'component';

ganti jos_extensions dengan nama table extensions user.

March 7, 2018

Disable form kontak Prestashop

Filed under: CMS — dh @ 9:58 am

Buka file controllers/front/ContactController.php

Cari kode


public function initContent()
{

tambahkan kode berikut


Tools::redirect('pagenotfound'); // redirect contact page to 404 page

December 6, 2014

htaccess Lokomedia

Filed under: CMS — dh @ 4:40 am

(more…)

October 19, 2013

Mod_rewrite di codeigniter

Filed under: CMS — dh @ 9:05 am

Mod_rewrite di codeigniter
refernsi: http://www.farinspace.com/codeigniter-htaccess-file/


 
    RewriteEngine On
    RewriteBase /
 
    ### Canonicalize codeigniter URLs
 
    # If your default controller is something other than
    # "welcome" you should probably change this
    RewriteRule ^(welcome(/index)?|index(\.php)?)/?$ / [L,R=301]
    RewriteRule ^(.*)/index/?$ $1 [L,R=301]
 
    # Removes trailing slashes (prevents SEO duplicate content issues)
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+)/$ $1 [L,R=301]
 
    # Enforce www
    # If you have subdomains, you can add them to
    # the list using the "|" (OR) regex operator
    RewriteCond %{HTTP_HOST} !^(www|subdomain) [NC]
    RewriteRule ^(.*)$ http://www.domain.tld/$1 [L,R=301]
 
    # Enforce NO www
    #RewriteCond %{HTTP_HOST} ^www [NC]
    #RewriteRule ^(.*)$ http://domain.tld/$1 [L,R=301]
 
    ###
 
    # Removes access to the system folder by users.
    # Additionally this will allow you to create a System.php controller,
    # previously this would not have been possible.
    # 'system' can be replaced if you have renamed your system folder.
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php/$1 [L]
 
    # Checks to see if the user is attempting to access a valid file,
    # such as an image or css document, if this isn't true it sends the
    # request to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
 

 

 
    # Without mod_rewrite, route 404's to the front controller
    ErrorDocument 404 /index.php
 

Apply These Final Touches to Clean Up the URL

Remember, once you have your CodeIgniter htaccess file setup, you will want to go into your “/system/application/config/config.php”, find the following:

$config['index_page'] = "index.php";

and change it to:

$config['index_page'] = "";

April 21, 2013

Disable Joomla User Registration

Filed under: CMS — dh @ 1:26 pm

disable use registration in Joomla 1.5
phpmyadmin > jos_component > User Manager > params > allowUserRegistration=0

disable use registration in Joomla 2.5
phpmyadmin > jos_extension > mod_user > params > allowUserRegistration=0

March 14, 2012

How to disable comments in Drupal

Filed under: CMS — dh @ 3:02 am

If you have admin access to Drupal log in and go to Administer – Content – Content Types. Then edit the content type of your choice and make sure comments are set to off by default.

Alternatively the above can be done directly by executing the following query in your database:

UPDATE system SET status = '0' WHERE filename = 'modules/comment/comment.module';

When you decide to re-enable the module simply issue the reverse query:

UPDATE system SET status = '1' WHERE filename = 'modules/comment/comment.module';

Disable User Registration

UPDATE variable SET 'value' = 's:1:”0?;'  WHERE 'name' = 'user_register'; 

December 13, 2011

Disable WordPress Spam Comment

Filed under: CMS — Tags: , — dh @ 5:15 am

UPDATE `wp_posts` SET `comment_status` = 'closed', `ping_status` = 'closed';
UPDATE `wp_options` SET `option_value` = 'closed' WHERE `option_name` = 'default_comment_status';
UPDATE `wp_options` SET `option_value` = 'closed' WHERE `option_name` = 'default_ping_status';
UPDATE `wp_options` SET `option_value` = '0' WHERE `option_name` = 'users_can_register';

RENAME TABLE wp_comments To wp_comments_spam;

Powered by WordPress