Wednesday, February 20, 2019

Remove vTiger 7.1.0 banner advertisement

Installed Vtiger 7.1.0 but don't want the banner advertisement on the desktop?
here's what you do:

create file " removead.php " in /var/www/html/DirectoryOfvTiger 

Inside this file put in the following:

<?php
include_once 'vtlib/Vtiger/Module.php';
$moduleInstance = Vtiger_Module::getInstance('ExtensionStore');
if ($moduleInstance) $moduleInstance->deleteLink('HEADERSCRIPT', 'ExtensionStoreCommonHeaderScript');
echo "ads removed";
?>


Save that file
now from a web browser run that file

http://FQDNorIP/removead.php

You should see the web browser display "vtiger banner has been removed"

You can now delete the file removead.php

 vTIGER login screen logo

That logo is stored in /var/www/html/vtigercrm/layouts/v7/modules/Users/Login.tpl

in a filename of vtiger.png and is located at /var/www/html/scansourcecrm/layouts/v7/resources/Images


 vTIGER login background screen logo
That is stored in is stored 

in /var/www/html/vtigercrm/layouts/v7/modules/Users/Login.tpl
refereed to by a file called "login-background.jpg"



The code to display the advertisement on the login screen is located in
 /var/www/html/vtigercrm/layouts/v7/modules/Users/Login.tpl

from lines from around 260 to 310 
you'll see it start with this bit:

<div class="col-lg-5">
<div class="marketingDiv widgetHeight">{if $JSON_DATA}
and end around line 310 with

   <a href="https://marketplace.vtiger.com/app/listings" target="_blank" style="margin-right: 25px;"><img src="layouts/v7/resources/Images/extensionstore.pn#" style="width: 85%; height: 100%; margin-top: 25px;"/></a>
                                        </div>
                                {/if}

The alignment for the login box is at around line 208.



This keeps it left justified
leftclass=”col-log-5″ 

This would make it middle justified
 class=”col-lg-4 col-lg-offset-4″

How to enable SSL on your vTiger CRM


Get an SSL certificate, free one from let’s encrypt will work
Edit config.inc.php to add https:// to your site URL
Force everyone to be redirected to the https version of the app. To force that, you need to access your CRM folder in the server and create a new file called “.htaccess” At the top of the file, you need to include the following code:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]

Save the file and test!

Optimize Vtiger Mysql server

MariaDB has a system known as  “Slow Query Log", but is default off.
To enable the slow query log 


mysql -u root -pSET GLOBAL slow_query_log = 'ON';SET GLOBAL long_query_time = X;
By default, the log file is stored in /var/lib/mysql/hostname-slow.log. You can change it with the following command


SET GLOBAL slow_query_log_file = '/path/filename';
Continue to monitor the slow query log file to see which queries take a long time to run.
You can trigger a sleep with this command.
SELECT SLEEP(X);SET GLOBAL slow_query_log = 'OFF';

Now that you have identified the slow or problematic queries you will need to fix and improve them
Fixing bad or slow queries
MariaDB has an EXPLAIN command which will look at queries for performance issues:
EXPLAIN describes how a SELECT statement
EXPLAIN EXTENDED provides information of the table rows that are filtered by the statement

No comments:

Post a Comment