Sei sulla pagina 1di 4

More Create Blog Sign In

Share by email

Share with Facebook

Share with Twitter

Report Abuse

Your preferred Vtiger cookbook

Sunday, 11 November 2012

Configure incoming Server Config With Gmail (IMAP)


Use this configuration for getting incoming mail from your google[apps] account.

• Mail Server: imap.gmail.com

• Username: user@domain.com

Preferred link

• Password: ***** • Vtiger Official site


• The Official Vtiger CRM Blog
• Vtiger Wiki
• Mail Protocol: imap 2

Search This Blog

• SSL Options: SSL Certificate Search

Blog Archive
• Validations: Do Not Validate SSL Cert
2012 (4)
November (3)
• Refresh Timeout: 1 minute Configure incoming Server Config With
Gmail (IMAP)...
Customize Vtiger footer
• Email per Page: 25
Change Page Title

October (1)

https://www.vtiger.com/blogs/?p=623
Popular Posts

Posted by estevan at 02:02 1 comment:


Customize Vtiger footer
If you want customize Vtiger footer open
index.php and search for the following lines
of code echo "<script language = 'Java...
Customize Vtiger footer
Extending and customize Organization
If you want customize Vtiger footer open index.php and search for the following lines of code details
In this tutorial I would like to explain you
how you can simply add some fields in the
organization detail module. Remember that
echo "<script language = 'JavaScript' type='text/javascript' src =
this part...
'include/js/popup.js'></script>";

Configure incoming Server Config With


echo "<br><br><br><table border=0 cellspacing=0 cellpadding=5 width=100% Gmail (IMAP)
class=settingsSelectedUI >"; Use this configuration for getting incoming
mail from your google[apps] account. Mail
echo "<tr><td class=small align=left><span style='color: Server: imap.gmail.com Username:
rgb(153, 153, 153);'>Powered by vtiger CRM <span
user@do...
id='_vtiger_product_version_'>$vtiger_current_version</span></
Change Page Title
span></td>"; echo "<td class=small align=right><span>&copy;
In this article you can understand how
2004-".date('Y')." <a href='http://www.vtiger.com' change page title. For customizing the page
target='_blank'>vtiger.com</a> | <a title you have to change the value of the
string "...
href='javascript:mypopup()'>".$app_strings['LNK_READ_LICENSE']

."</a> | <a

href='http://www.vtiger.com/products/crm/privacy_policy.html'
Please, support the
target='_blank'>".getTranslatedString('LNK_PRIVACY_POLICY')."< vTiger Cookbook
/a></span> $statimage</td></tr></table>"; blog by clicking on
our sponsors ad!

edit this lines and see new footer

Posted by estevan at 01:14 2 comments:


Change Page Title

In this article you can understand how change page title.

For customizing the page title you have to change the value of the string
"LBL_BROWSER_TITLE".
The string is available in the language file located in /include/language/en_us.lang.php.

(If you are using another language edit the correct language file)

$app_strings = array ('LBL_BROWSER_TITLE' => 'vtiger CRM 5 -


Commercial Open Source CRM',...'LBL_BROWSER_TITLE' => 'Your
custom string',

Posted by estevan at 00:51 No comments:

Sunday, 21 October 2012

Extending and customize Organization details


In this tutorial I would like to explain you how you can simply add some fields in the organization
detail module.

Remember that this part of VTiger CRM does not allow custom field features but you need to
modify database table and source code related.

Suppose we want add the taxcode field.

First of all you need to alter table vtiger_organizationdetails and add field taxcode like this
sample:

alter table vtiger_organizationdetails add column `taxcode`


VARCHAR(50) NULL DEFAULT NULL

Edit file /modules/Settings/OrganizationConfig.php and add this piece of code

$organization_taxcode = decode_html($adb-
>query_result($result,0,'taxcode'));

Some row below

if (isset($organization_taxcode))
$smarty-
>assign("ORGANIZATIONTAXCODE",$organization_taxcode);

Edit file /modules/Settings/EditCompanyDetails.php

$organization_taxcode = decode_html($adb-
>query_result($result,0,'taxcode'));

Some row below

if (isset($organization_taxcode))
$smarty->assign("ORGANIZATIONTAXCODE",$organization_taxcode);

Edit file /modules/Settings/SaveCompany.php

// get from request


$organization_taxcode = $_REQUEST['organization_taxcode'];
Edit and add piece of code in this insert query
//insert data
$organizationId = $this->db->getUniqueID('vtiger_organizationdetails');
$sql="insert into
vtiger_organizationdetails(organization_id,organizationname, address,
city, state, code, country, phone, fax, website, taxcode)
values(?,?,?,?,?,?,?,?,?,?,?)";
$params = array($organizationId, $organization_name,
$organization_address, $organization_city, $organization_state,
$organization_code, $organization_country, $organization_phone,
$organization_fax, $organization_website, $organization_taxcode);

//Handling update
else
{
$sql="update vtiger_organizationdetails set organizationname = ?,
address = ?, city = ?, state = ?, code = ?, country = ?, phone = ?,
fax = ?, website = ?, taxcode = ? where organizationname = ?";
$params = array($organization_name, $organization_address,
$organization_city, $organization_state, $organization_code,
$organization_country, $organization_phone, $organization_fax,
$organization_website, $organization_taxcode, $org_name);
}

5)vtigercrm/modules/Settings/add2db.php

if($saveflag=="true")
{
...
$organization_logo=from_html($_REQUEST['organization_logo']);
$organization_taxcode=from_html($_REQUEST['organization_taxcode']);
...

if($org_name=='')
{
$organizationId = $this->db->getUniqueID('vtiger_organizationdetails');
$sql="INSERT INTO vtiger_organizationdetails
(organization_id,organizationname, address, city,
state, code, country, phone, fax, website, logoname, taxcode) values
(?,?,?,?,?,?,?,?,?,?,?)";
$params = array($organizationId,$organization_name,
$organization_address, $organization_city, $organization_state,
$organization_code,
$organization_country, $organization_phone,
$organization_fax, $organization_website, $organization_logoname,
$taxcode);
}

....
Some row below

$sql = "UPDATE vtiger_organizationdetails


SET organizationname = ?, address = ?, city = ?, state
= ?, code = ?, country = ?,
phone = ?, fax = ?, website = ?, logoname = ?,
taxcode=? WHERE organizationname = ?";
$params = array($organization_name, $organization_address,
$organization_city, $organization_state, $organization_code,
$organization_country, $organization_phone,
$organization_fax, $organization_website,
decode_html($organization_logoname), $taxcode, $org_name);
}

Edit template /Smarty/templates/Settings/CompanyInfo.tpl

Add this line of code for inserting this new field


<tr>
<td width="20%" class="small cellLabel"><strong>{$MOD.LBL_ORGANIZATION_TAXCODE}
</strong></td>
<td width="80%" class="small cellText">{$ORGANIZATIONTAXCODE}</td>
</tr>

Edit template /Smarty/templates/Settings/EditCompanyInfo.tpl

<tr>
<td class="small cellLabel"><strong>{$MOD.LBL_ORGANIZATION_TAXCODE}
</strong></td>
<td class="small cellText">
<input type="text" name="organization_taxcode"
class="detailedViewTextBox small" value="{$ORGANIZATIONTAXCODE}">
</td>
</tr>
Add custom language translation in file vtigercrm/modules/Settings/language/XXXXXXX

'LBL_ORGANIZATION_TAXCODE' => 'Tax code',

Setting header report


/include/InventoryPDFController.php

find function buildHeaderModelColumnLeft

and add this line

$modelColumnLeft = array(
'logo' => "test/logo/".$resultrow['logoname'],
'summary' =>
decode_html($resultrow['organizationname']) .
"\n".getTranslatedString("LBL_ORGANIZATION_TAXCODE", "Settings")." ".
$resultrow['taxcode']
,'content' => $this->joinValues($addressValues, ' ').
$this->joinValues($additionalCompanyInfo, ' ')
);

Posted by estevan at 13:54 1 comment:

Home

Subscribe to: Posts (Atom)

Simple theme. Powered by Blogger.

Potrebbero piacerti anche