Post by klee2010 » Thu Dec 05, 2013 4:20 am

I using 1.5.6
I want to change admin login path and I did change the word admin in admin/config.php to new name and I did change the admin folder to new name but I have install Vqmod to my site so I just wondering do I need to change any file in Vqmod and any other file?

Thank You

New member

Posts

Joined
Fri Nov 22, 2013 3:56 pm

Post by stokeyblokey » Thu Dec 05, 2013 4:50 am

The short answer is yes.

You will need to open each xml file in the vqmod/xml folder and check for the word "admin" and replace all the file paths containing it to your new name. eg: admin/controller/module/account.php becomes NEWNAME/controller/module/account.php

Check carefully - if you miss any then use the vQmod logs (or vQmod manager which has an easy error log) to see which ones didn't fire up - the error will say something aboutnot finding admin/whatever and you can see which xml to edit from the log.

From now on you will need to edit them before you upload them - the same with any modules which have an "admin" folder to upload - rename it BEFORE you upload it or it will not work.

Good luck

Stokey

Stokey


User avatar
Active Member

Posts

Joined
Sat Aug 31, 2013 10:19 pm

Post by klee2010 » Thu Dec 05, 2013 9:34 am

From now on you will need to edit them before you upload them - the same with any modules which have an "admin" folder to upload - rename it BEFORE you upload it or it will not work.
What do you mean by that? like what file or thing that I need to edit them befor I can upload to my site? Can you tell me more and give me an example because I new to opencart and don't know much about these stuff.

THank You

New member

Posts

Joined
Fri Nov 22, 2013 3:56 pm

Post by stokeyblokey » Thu Dec 05, 2013 9:51 am

Well lots of the vQmods act on pages in the admin part of the site.

When you want to use a vQmod that does this you should open it in notepad++ (free download here) and check for the word admin - use ctrl+f to find any instances.

Where the word is part of a file path like in my earlier post you need to change it:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<modification>
	<id>Admin Category Filter</id>
	<version>2.0</version>
	<vqmver>2.1.5</vqmver>
	<author>wetutorial.com</author>


    <file name="admin/view/template/catalog/product_list.tpl" error="log">
Needs to be changed to:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<modification>
	<id>Admin Category Filter</id>
	<version>2.0</version>
	<vqmver>2.1.5</vqmver>
	<author>wetutorial.com</author>


    <file name="YOURNEWADMINNAMEview/template/catalog/product_list.tpl" error="log">
where YOURNEWADMINNAME is the name you changed your admin folder to.

Is that clear now?

There is another method which saves you having to do it manually each time but I have never done that way - if you go to your vqmod folder there is a file called pathReplaces.php

If you open that there are instructions for setting an automatic path replace for your admin folder.

Good luck

Stokey

Stokey


User avatar
Active Member

Posts

Joined
Sat Aug 31, 2013 10:19 pm

Post by klee2010 » Thu Dec 05, 2013 12:59 pm

Are there any other way to keep my site safe from hacker without changing admin login path?

New member

Posts

Joined
Fri Nov 22, 2013 3:56 pm


Post by madimar » Thu Dec 05, 2013 2:40 pm

Hi guys, last versions of vqmod have a simple configuration setting to manage path replaces like that one without need to modify all the xml scripts. Please check vqmod documentation, it is really easy to set up.
M

Inviato dal mio HTC Desire HD utilizzando Tapatalk

-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------


User avatar
Active Member

Posts

Joined
Thu Sep 24, 2009 6:27 pm


Post by stokeyblokey » Fri Dec 06, 2013 8:40 am

Hi madimar - I did mention that option, just I have never done it myself :)

@klee2010 - probably the easiest is to password protect your admin folder using cPanel or equivalent - search the net for how to do it or have a look in your server panel and you should find it - in Plesk you have to click on the down arrow which is kind of hidden at the bottom of the main Web Domains screen like in this picture:
password protect 1.jpg

password protect 1.jpg (91.84 KiB) Viewed 2985 times

Then you should see something like this:
password protect 2.jpg

password protect 2.jpg (63.58 KiB) Viewed 2985 times

Then this:
password protect 3.jpg

password protect 3.jpg (16.26 KiB) Viewed 2985 times

Then you set the path to your admin folder and choose a password - hey presto another layer of security before even getting to the Opencart admin panel :)

Stokey


User avatar
Active Member

Posts

Joined
Sat Aug 31, 2013 10:19 pm

Post by klee2010 » Fri Dec 06, 2013 1:24 pm

Thank You stokeyblokey.

New member

Posts

Joined
Fri Nov 22, 2013 3:56 pm

Post by klee2010 » Sun Dec 08, 2013 4:20 am

1) If I rename the admin folder, do I have to reinstall Vqmod or I can just go and rename some file in Vqmod?
2) Everytime I adding a new module or theme to my site, do I have to rename the admin folder in the module or theme to the new name before I upload to my site?
3) Do I need to rename any other file that in the module or theme befroe I can upload?

New member

Posts

Joined
Fri Nov 22, 2013 3:56 pm


Post by madimar » Sun Dec 08, 2013 4:39 pm

Klee, maybe my post was not clear... You can easily avoid to change all the scripts for ever. Don't rename anything in the scripts leaving "admin", just set a proper path replace in vqmod settings!
M

Inviato dal mio HTC Desire HD utilizzando Tapatalk

-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------


User avatar
Active Member

Posts

Joined
Thu Sep 24, 2009 6:27 pm

Re:


Post by klee2010 » Mon Dec 09, 2013 12:05 pm

madimar wrote:Klee, maybe my post was not clear... You can easily avoid to change all the scripts for ever. Don't rename anything in the scripts leaving "admin", just set a proper path replace in vqmod settings!
M

Inviato dal mio HTC Desire HD utilizzando Tapatalk
@madimar, can you please show me step by step how to do it?

Thank You

New member

Posts

Joined
Fri Nov 22, 2013 3:56 pm

Post by stokeyblokey » Tue Dec 10, 2013 8:43 am

klee2010 I think you simply find the file /vqmod/pathReplaces.php and edit it to show this:

Code: Select all

<?php

/**
*  File for path replacements in xml paths. Examples:
*
*  $replaces[] = array('~^admin\b~', 'admin123'); // This replaces the admin folder name for use when admin folder's renamed
*  $replaces[] = array('~\btheme/default\b~', 'theme/my-theme-name'); // Theme name replace to apply mods to your theme
*
*  Place your replaces between the START and END lines below
**/


// START REPLACES //
$replaces[] = array('~^admin\b~', 'YOURNEWADMINNAME');
// END REPLACES //
Replace YOURNEWADMINNAME with the renamed admin folder name and upload it back to the server in the same place and you should be good to go.

Wish I had known about this 3 months ago.... :-[

Stokey


User avatar
Active Member

Posts

Joined
Sat Aug 31, 2013 10:19 pm

Post by klee2010 » Tue Dec 10, 2013 12:48 pm

stokeyblokey wrote:klee2010 I think you simply find the file /vqmod/pathReplaces.php and edit it to show this:

Code: Select all

<?php

/**
*  File for path replacements in xml paths. Examples:
*
*  $replaces[] = array('~^admin\b~', 'admin123'); // This replaces the admin folder name for use when admin folder's renamed
*  $replaces[] = array('~\btheme/default\b~', 'theme/my-theme-name'); // Theme name replace to apply mods to your theme
*
*  Place your replaces between the START and END lines below
**/


// START REPLACES //
$replaces[] = array('~^admin\b~', 'YOURNEWADMINNAME');
// END REPLACES //
Replace YOURNEWADMINNAME with the renamed admin folder name and upload it back to the server in the same place and you should be good to go.

Wish I had known about this 3 months ago.... :-[
This mean I only need edit /vqmod/pathReplaces.php and don't need to rename admin folder to new name and don't need to change admin/config?

New member

Posts

Joined
Fri Nov 22, 2013 3:56 pm

Post by stokeyblokey » Tue Dec 10, 2013 11:11 pm

No - you do still need to change the admin folder name and the config.php files, then you use the above pathReplaces.php change to tell vQmod that your admin folder is now named YOURNEWADMINNAME so that you do not have to change all the xml files one by one.

Is that clear now?

Stokey


User avatar
Active Member

Posts

Joined
Sat Aug 31, 2013 10:19 pm


Post by madimar » Wed Dec 11, 2013 12:38 am

I confirm last posts. I hope everything is clear now.
M

Inviato dal mio HTC Desire HD utilizzando Tapatalk

-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------


User avatar
Active Member

Posts

Joined
Thu Sep 24, 2009 6:27 pm


Post by klee2010 » Wed Dec 11, 2013 12:05 pm

Thank You

New member

Posts

Joined
Fri Nov 22, 2013 3:56 pm
Who is online

Users browsing this forum: Amazon [Bot], Bing [Bot] and 36 guests