I using phpDesigner IDE to develop this application, so you should also use it and add project with root to script root folder.
Category Archives: Real estate agency portal
How to change default auto activation?
if you want auto reactivation after update listing
In application\config\ cms_config.php add:
$config['reactivation_enabled'] = TRUE;
For listings:
$data[‘is_activated’] = 0;
to:
$data[‘is_activated’] = 1;
Or you can search (CTRL+F) for $data[‘is_activated’] in that file…
For quick submission:
Not suggested because of possible spamming disaster, but if you really wish:
For users registration:
You can enable email activation:
In application\config\cms_config.php you can add:
$config['email_activation_enabled'] = TRUE;
If you wish to customize this functionality, then open:
application\controllers\frontend.php
and search for “email_activation_enabled”, should be line around 1963 depends on your version. PHP knowledge is required for customization.
Admin reactivation?
Only agent/owner can move listing out of expire date, if you want that admin also do that, then:
If you need our customization services, guide:
How to center watermark on images?
This is currently possible with customization:
In script version 1.5.5.:
Open file application\libraries\UploadHandler.php, lines around 383:
search for $watermark_centered = FALSE; and change to TRUE
In script versions <= 1.5.4. :
Open file application\libraries\UploadHandler.php, lines around 375, or search for “$sy = imagesy($stamp);”.
There you should change existing code with something like:
// Set the margins for the stamp and get the height/width of the stamp image
//$marge_right = 10;
//$marge_bottom = 10;
//$sx = imagesx($stamp);
//$sy = imagesy($stamp);
// center watermark on the photo
$wx = (imagesx($new_img)/2)-(imagesx($stamp)/2);
$wy = (imagesy($new_img)/2)-(imagesy($stamp)/2);
//$success = $success && imagecopy($new_img, $stamp, imagesx($new_img) – $sx – $marge_right, imagesy($new_img) – $sy – $marge_bottom, 0, 0, imagesx($stamp), imagesy($stamp));
$success = $success && imagecopy($new_img, $stamp, $wx, $wy, 0, 0, imagesx($stamp), imagesy($stamp));
How to change user type when submitting new property?
$this->estate_m->save_dynamic(
After that you can execute your query, something like:
$this->db->where('id', $user->id);
$this->db->update('user', array('type' => 'AGENT'));
More details: http://www.codeigniter.com/
How to change default user type on registration?
This is not suggested but if you really want…
In script version for real estate > 1.6.0 you can in cms_config.php add:
$config['dropdown_register_enabled'] = TRUE;
General customization hints:
First of all you need to read this: http://iwinter.com.hr/support/?p=174
AGENT by default can be registered on that link for example: http://real-estate.iwinter.com.hr/index.php/admin/user/register
$data[‘type’] = ‘USER';
to:
$data[‘type’] = ‘AGENT';
How to change logo URL
templates\bootstrap2-responsive\components\header*.php
You should search for “{homepage_url_lang}” and change it…
How to install script on localhost?
DBNAME: “mywebsite”DBUSER: “root”
DBPASSWORD: LEAVE EMPTYEDIT:We noticed XAMPP >=8.1.6 causing blank screen issuequickfix solution:after you extract zipedit application\config\production\database.phpthis change to false:
How to change favicon?
Juut replace current favicon icons…
templates/bootstrap2-responsive/assets/img/favicon.png
admin-assets/img/favicon/favicon.png
How to add / translate to additional language
Add new language via admin:
Login to admin->Settings->languages->Add language->enter for example ‘russian’ and code to for example ‘ru’.
Your language code need to be in ISO format: http://www.sitepoint.com/web-foundations/iso-2-letter-language-codes/
Then translate everything, instructions here:
http://iwinter.com.hr/support/?p=156
How to enable cookie warning for EU?
In application\config\cms_config.php add:
$config['cookie_warning_enabled'] = TRUE;
Cookie warning message can be customized in file:
templates\bootstrap2-responsive\assets\js\cookiewarning4.js
For change message, open translate file, and find line with:
$lang['Accept cookiebar']
file: templates\{your-template-name}\language\{your-language}\frontend_template_lang.php
Add field / option manually via phpmyadmin
For WP themes or plugin version:
If you accidentally remove red locked option from the database and now you need it… Now can be added via phpMyAdmin only, SQL queries:
wp_ is database prefix, may be different based on your wp configuration.
80 is field id in such example for badge
INSERT INTO `wp_sw_field` (`idfield`, `parent_id`, `order`, `type`, `is_locked`, `is_table_visible`, `is_preview_visible`, `is_submission_visible`, `is_hardlocked`, `is_required`, `is_translatable`, `is_quickvisible`, `max_length`, `repository_id`, `image_filename`, `image_gallery`, `image_id`, `columns_number`) VALUES (80, NULL, NULL, 'DROPDOWN', '1', NULL, NULL, '1', '1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
and then:
INSERT INTO `wp_cp_4`.`wp_sw_field_lang` (`idfield_lang`, `field_id`, `lang_id`, `field_name`, `values`, `prefix`, `suffix`, `hint`, `placeholder`) VALUES (NULL, '80', '1', 'Badge', 'b1,b2,b3', NULL, NULL, NULL, NULL);
Then will appear like this:
For PHP scripts:
If you accidentally remove red locked option from the database and now you need it… Now can be added via phpMyAdmin only, SQL queries:
To add option:
INSERT INTO `option` (`id` ,`parent_id` ,`order` ,`type` ,`visible` ,`is_locked` ,`is_frontend` ,`is_hardlocked`
) VALUES ('4', '0', NULL , 'DROPDOWN', '1', '1', '1', '1')
To add translations for option:
INSERT INTO `option_lang` (`option_id`, `language_id`, `option`, `values`, `prefix`, `suffix`) VALUES (4, 1, 'Purpose', 'Sale,Rent,Sale and Rent', NULL, ''), (4, 2, 'Namjena', 'Prodaja,Najam,Prodaja i najam', NULL, '');
In this example we adding ID #4, and 1,2 was languages ID.
Another example for translation with just one language:
INSERT INTO `option_lang` (`option_id`, `language_id`, `option`, `values`, `prefix`, `suffix`) VALUES (8, 1, 'Short description', '', NULL, '');
In this example we adding ID #8, and 1 was languages ID because now we have only one language.
By ID of course we mean original field ID which you need to restore.
example query for listing category in classified script:
INSERT INTO `option` (`id` ,`parent_id` ,`order` ,`type` ,`visible` ,`is_locked` ,`is_frontend` ,`is_hardlocked`
) VALUES ('79', '0', NULL , 'TREE', '1', '1', '1', '1')
To add translations for option:
INSERT INTO `option_lang` (`option_id`, `language_id`, `option`, `values`, `prefix`, `suffix`) VALUES (79, 1, 'Listing Category', '', NULL, '');
How to add Facebook comments?
In Admin->Settings->Design comments->Change “Facebook Javascript SDK code”
You can generate this codes on facebook page:
https://developers.facebook.com/docs/plugins/comments
You don’t need to change “Facebook comments code” but if you realy want, leave data-href attribute with this value: “http://example.com/comments”, script will change this value with current page…
How to earn / win some money with real estate script:
- With selling properties listing submission activation for visitors, Admin->Settings->Change price
- With selling property featured listing submission for visitors, Admin->Settings->Change price
- With adsense or simmilar network banners, Admin->Settings->change adsense codes
- With selling ad banners (I have additional modul for this, not available with standard script license)
- With paid packages for listing num limitation and days limitation (I have additional modul for this, not available with standard script license)
- With booking, reservation of apartments (I have additional modul for this, not available with standard script license)
You can receive money with PayPal or Cash
How to change uploaded thumbnails size?
Thumbnail images size can be configured in: application\libraries\UploadHandler.php, lines 117 – 121. Will work only for new uploaded images…
'thumbnail' => array( 'max_width' => 300, 'max_height' => 225, 'jpeg_quality' => 90 )
How to remove print button?
Just remove it from: templates\bootstrap2-responsive\property.php, line around 651-653:
<p style="text-align:right;">
<a target="_blank" type="button" class="btn" href="{estate_data_printurl}"><i class="icon-print"></i> {lang_PrintVersion}</a>
</p>
How to add Google translator widget to automatically translate your website?
Follow Google instructions here to create widget: https://translate.google.com/manager/website/
Code for head part is available in file, so place code there:
templates\bootstrap2-responsive\widgets\head.php
or in older script version:
templates\bootstrap2-responsive\components\head.php
And code for display best will be to replace current language menu, so in:
templates\bootstrap2-responsive\widgets\header_mainmenu.php
or in older script version:
- templates\bootstrap2-responsive\components\header.php
- templates\bootstrap2-responsive\components\header-filter.php
- templates\bootstrap2-responsive\components\header-slideshow.php
Replace {print_lang_menu} in above files…
If you using other template you can search thru files for {print_lang_menu}, also some additional CSS corrections may be required.
How to add custom field to property preview page?
First you should add new field via your administration:
Admin->Real estate->Fields (You can see # part there, what is field ID)
Then you should add it to your template file property.php
{estate_data_option_#}
Where # represents field id / key of option
You can also use alternative PHP syntax, for example:
<?php if(!empty($estate_data_option_#))echo $estate_data_option_#; ?>
More details are available in documentation:
http://iwinter.com.hr/real-estate/documentation/#!/property_template
To add new category, most simple way is to just copy example code from another category and modify by your needs.
Or use this code example:
<?php
$category_id = 1;
?>
<?php if(isset(${"category_options_$category_id"}) && ${"category_options_count_$category_id"}>0): ?>
<h3 class="page-header"><?php echo ${"options_name_$category_id"} ?></h3>
<div class="property-amenities clearfix">
<ul>
<?php foreach(${"category_options_$category_id"} as $key=>$row): ?>
<?php if(!empty($row['option_value'])): ?>
<?php if(count($row['is_text']) > 0): ?>
<div class="panel-row">
<p class="bottom-border"><strong><?php _che($row['option_name']); ?>:</strong> <span><?php echo _che($row['option_prefix']); ?> <?php echo _che($row['option_value']); ?> <?php echo _che($row['option_suffix']); ?></span><br style="clear: both;" /></p>
</div>
<?php elseif(count($row['is_dropdown']) > 0): ?>
<div class="panel-row">
<p class="bottom-border"><strong><?php _che($row['option_name']); ?>:</strong> <span class="label label-success"><?php echo _che($row['option_prefix']); ?> <?php echo _che($row['option_value']); ?> <?php echo _che($row['option_suffix']); ?></span><br style="clear: both;" /></p>
</div>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
</ul>
</div><!-- /.property-amenities -->
<?php endif; ?>
How to move map to the bottom or other location?
<div class="wrap-map" id="wrap-map"> </div>
How to add custom field to registration form?
$data = $this->user_m->array_from_post(array(…
How to delete / remove hard / red locked fields / options?
If you really want to unlock those items, you need to know what you are doing, here is instructions:
Run this SQL query on your database via PhpMyadmin for example:
UPDATE `option` SET is_hardlocked=0





