Blog

/

Instructions

/

Customizing Themes "Atlas" and "Basis"

Customizing Themes "Atlas" and "Basis"

1. How to change the name of the site?

In the admin panel go to "Translation Management". Choose a category "module_seo":

siteName - Open Real Estate CMS

Find a constant "siteName", its value will be the name of the site.
In the meaning of the constant "siteKeywords" general keywords for all pages are stored. In the meaning of "siteDescription" - general description for all pages.

The same can be done from the section "SEO Settings". In addition to everything else, set individual keywords and description for the pages.

siteName - Open Real Estate CMS

2. Change the logo in the Theme "Atlas".

Open the files themes\atlas\views\layouts\main.php, find the code:

<div class="logo">
<a title="<?php echo Yii::t('common', 'Go to main page'); ?>" href="<?php echo Yii::app()->controller->createAbsoluteUrl('/'); ?>">
<div class="logo-img"> <img width="77" height="70" alt="" src="<?php echo Yii::app()->theme->baseUrl; ?>/images/pages/logo-open-ore.png" /></div>
<div class="logo-text"><?php echo CHtml::encode(Yii::app()->name);?></div>
</a>
</div>

Here you can change the image. Instead of:

<img width="77" height="70" alt="" src="<?php echo Yii::app()->theme->baseUrl; ?>/images/pages/logo-open-ore.png" />
Insert:
<img width="width_in_pixels" height="height_in_pixels" alt="" src="<?php echo Yii::app()->theme->baseUrl; ?>/images/pages/my-logo.png" />

In this case, your image should be called my-logo.png and be in the folder themes/atlas/images/pages.
Pay attention that instead of width_in_pixels and height_in_pixels you need to insert the actual size of the image.

You can also change the site name manually:

<div class="logo-text"><?php echo CHtml::encode(Yii::app()->name);?></div>

Instead of name);?> insert your text.

If you need to remove the line under the site name, then in the files \themes\atlas\css\style_img.css and \themes\atlas\css\style_main_rtl.css remove for selector "div.logo a" all properties and their meanings.

Also change the logo for the page "Comparison List". To do this, make the above changes in the file themes\atlas\views\layouts\compare.php.

3. How to change links in the top menu for the Atlas template?

In the "Manage menu" admin panel, select "Header - Template: Atlas and Classic":

Header - Atlas and Classic - Open Real Estate CMS

Deactivate or activate menu items.

To remove the link "Booking a property" in file \protected\helpers\HMenu.php comment the code:

$controller->aData['userCpanelItems'][] = array(
'label' => tt('Reserve apartment', 'common'),
'url' => array('/booking/main/mainform'),
'visible' => Yii::app()->user->checkAccess('backend_access') === false,
'linkOptions' => array('class' => 'fancy mgp-open-ajax'),
'itemOptions' => array('class' => 'depth_zero'),
);

4. How to change links in the top menu for the template Basis?

In the "Manage menu" admin panel, select "Header - Template: Basis":

Header - Template Basis - Open Real Estate CMS

Deactivate or activate menu items.

5. Change the bottom of the site (footer) in the Atlas template.

Change the bottom of the site (footer) in the Atlas template - Open Real Estate CMS

Open the file \themes\atlas\views\layouts\main.php and find starting with div id="footer"
To remove the buttons "List your property" and "Reserve apartment" delete the following code:

<a class="footer_add_ad" rel="nofollow" href="<?php echo Yii::app()->createUrl('guestad/main/create');?>" target="_blank"><?php echo tc('List your property');?></a>
 
<div class="footer_request_block">
<a class="link" rel="nofollow" href="<?php echo Yii::app()->createUrl('booking/main/mainform');?>"><?php echo tc('Reserve apartment');?></a>
</div>

In order to remove the display of icons of social networks, remove the entire block div class="footer_social_block" or turn off in the settings. (Admin panel-> Settings-> "Share" section).

To change the email that is displayed in this block, go to the "Settings" section, the "Mail" section and change to the required value.

Change the bottom of the site (footer) in the Atlas template - Open Real Estate CMS

6. Change the bottom of the site (footer) in the Theme "Basis".

Change the bottom of the site (footer) in the Theme Basis - Open Real Estate CMS

All code is in file \themes\basis\views\layouts\_footer.php.

In order to remove the block with the buttons "Reserve apartment", "List your property" and "Dashboard" delete the code:

<div class="h3 h_line"></div>
<div class="footer_content">
<ul class="list-unstyled">
<li><a href="<?php echo Yii::app()->createUrl('/booking/main/mainform') ?>" class="slow btn btn-default fancy"><?php echo tt('Reserve apartment', 'common') ?></a></li>
<li class="plus"><a href="<?php echo Yii::app()->createUrl('/guestad/add') ?>" class="slow btn btn-primary"><?php echo tc('List your property') ?></a></li>
<li class="lk"><a href="<?php echo Yii::app()->createUrl('/usercpanel/main/index') ?>" class="slow btn btn-default"><?php echo Yii::t('common', 'Control panel') ?></a></li>
</ul>
</div>

Remove the display "We are in social networks" can be removed by block:

<div class="col-md-6 col-sm-6 text-right">
<?php
	$vkUrl = Themes::getParamJson('i_vk');
	$fbUrl = Themes::getParamJson('i_facebook');
	$twUrl = Themes::getParamJson('i_twitter');
	if($vkUrl || $fbUrl || $twUrl){
		echo tt('We are in social networks', 'theme_basis').' — ';
		if ($vkUrl) echo '&nbsp;<a href="'.$vkUrl.'" target="_blank"><i class="fab fa-vk"></i></a>';
if ($fbUrl) echo '&nbsp;<a href="'.$fbUrl.'" target="_blank"><i class="fab fa-facebook-f"></i></a>';
if ($twUrl) echo '&nbsp;<a href="'.$twUrl.'" target="_blank"><i class="fab fa-twitter"></i></a>';
}
?>
</div>

You can change phone number, skype, email for footer in the "Translations", section "module_theme_basis":

Change the bottom of the site (footer) in the Theme Basis - Open Real Estate CMS

7. View listing: how to remove the text "Is it your listing? Would you like to rent out a property quicker? apply paid services" in Atlas and Basis Themes?

View listing - Open Real Estate CMS

To delete in the Theme Atlas, open the file: \themes\atlas\views\modules\apartments\views\view.php. Remove the following code:

<?php if (issetModule('paidservices') && param('useUserads')): ?>
<?php
$wantTypes = HApartment::getI18nTypesArray();
$typeName = (isset($wantTypes[$model->type]) && isset($wantTypes[$model->type]['current'])) ? mb_strtolower($wantTypes[$model->type]['current'], 'UTF-8') : '';
?>
<?php if ($typeName) : ?>
<div class="promotion-paidservices-in-apartment">
<div class="paidservices-promotion-title"><?php echo tt('Is it your listing?', 'apartments'); ?></div>
<div class="paidservices-promotion-title-promotion-title"><?php echo tt('Would you like to', 'apartments'); ?>
&nbsp;<?php echo $typeName; ?>&nbsp;<?php echo tt('quicker?', 'apartments'); ?></div>
<div class="paidservices-promotion-description">
<?php echo tt('Try to', 'apartments'); ?>&nbsp;
<?php echo CHtml::link(tt('apply paid services', 'apartments'), Yii::app()->createUrl('/userads/main/update', array('id' => $model->id, 'show' => 'paidservices')), array()); ?>
</div>
<div class="clear"></div>
</div>
<?php endif; ?>
<?php endif; ?>

View listing - Open Real Estate CMS

To delete a block with a QR code and mini-statistics in the same file, delete the following code:

<div class="block_item">
<?php if (param('qrcode_in_listing_view', 1)): ?>
<?php
$url = $model->getUrl();
echo '<span class="qr-code">';
$this->widget('application.extensions.qrcode.QRCodeGenerator', array(
'data' => $url,
'filename' => 'qr_' . md5($url) . '-' . $model->id . Yii::app()->language . '.png',
'matrixPointSize' => 3,
'fileUrl' => Yii::app()->getBaseUrl(true) . '/uploads',
//'color' => array(33, 72, 131),
'color' => array(0, 0, 0),
));
echo '</span>';
?>
<div class="clear"></div>
<?php endif; ?>
 
<?php if (isset($statistics) && is_array($statistics)) : ?>
<?php echo tt('views_all') . ': ' . $statistics['all'] ?>
<br/><?php echo tt('views_today') . ': ' . $statistics['today']; ?><br/>
<?php echo tc('Date created') . ': <span class="nobr">' . $model->getDateTimeInFormat('date_created') . '</span>'; ?>
<?php endif; ?>
</div>

View listing - Open Real Estate CMS

To delete in the Theme Basis, open the file: \themes\basis\views\modules\apartments\views\_view_column.php. Remove the following code:

<?php if (issetModule('paidservices') && param('useUserads') && $typeName) { ?>
<div class="alert alert-warning promotion-paidservices-in-apartment">
<div class="h4"><strong><?php echo tt('Is it your listing?', 'apartments'); ?></strong></div>
<p>
<?php echo tt('Would you like to', 'apartments'); ?>&nbsp;<?php echo $typeName; ?>&nbsp;<?php echo tt('quicker?', 'apartments'); ?>
</p>
<p>
<?php
echo CHtml::link(tt('apply paid services', 'apartments'), Yii::app()->createUrl('/userads/main/update', array('id' => $model->id, 'show' => 'paidservices')), array());
 
?>
</p>
</div>
<?php } ?>

View listing - Open Real Estate CMS

To delete a block with a QR code and mini-statistics in the same file, delete the following code:

<div class="box widget qrcode_block">
 
<?php if (param('qrcode_in_listing_view', 1)): ?>
<?php
        $url = $model->getUrl();
echo '<div class="qr-code text-center">';
$this->widget('application.extensions.qrcode.QRCodeGenerator', array(
'data' => $url,
'filename' => 'qr_' . md5($url) . '-' . $model->id . Yii::app()->language . '.png',
'matrixPointSize' => 3,
'fileUrl' => Yii::app()->getBaseUrl(true) . '/uploads',
//'color' => array(33, 72, 131),
'color' => array(0, 0, 0),
));
echo '</div>';
 
?>
<?php endif; ?>
 
<?php if (isset($statistics) && is_array($statistics)) : ?>
<br/>
<ul class="list-unstyled user_link">
<li><?php echo tt('views_all') . ': ' . $statistics['all'] ?></li>
<li><?php echo tt('views_today') . ': ' . $statistics['today']; ?></li>
<li><?php echo tc('Date created') . ': <span class="nobr">' . $model->getDateTimeInFormat('date_created') . '</span>'; ?></li>
</ul>
<?php endif; ?>
</div>

In order to make changes in files, we recommend you to use text editor Notepad++ or any other, which can support correct work with coding "UTF-8 without BOM".