Default country at new events

In the insertform for new events there can the default country modified with this litte hack:

In modules/boonex/events/classes/BxEventsFormAdd.php search for:


'Country' => array(
'type' => 'select',
'name' => 'Country',
'caption' => _t('_bx_events_caption_country'),
'values' => $aCountries,
'required' => true,
'checker' => array (
'func' => 'preg',
'params' => array('/^[a-zA-Z]{2}$/'),
'error' => _t ('_bx_events_err_country'),
),

and replace with:

'Country' => array(
'type' => 'select',
'name' => 'Country',
'caption' => _t('_bx_events_caption_country'),
'values' => $aCountries,
'value' => 'DE',
'required' => true,
'checker' => array (
'func' => 'preg',
'params' => array('/^[a-zA-Z]{2}$/'),
'error' => _t ('_bx_events_err_country'),
),

where 'value' => 'DE', changed to your country!

More Tipps and tricks in German (!) will be found at http://www.free-dolphin.de

Rappi

Bezirzer.de, elbrocker.de, tierschutz-community.de
Quote · 12 Mar 2010

Thank you and keep them coming.

Glen

Quote · 12 Mar 2010

Nice tip. Thanks for the share.

https://dolphin-techs.com - Skype: Dolphin Techs
Quote · 14 Mar 2010

What file would you edit for the Ads section to add a default country (boonex/ads/ ..)?

Thanks in advance!

Quote · 26 Mar 2010

We don´t use Ads but look here:

modules/boonex/ads/classes/BxAdsModule.php

Search for:

'Country' => array(
'type' => 'select',
'name' => 'Country',
'caption' => _t('_bx_ads_caption_country'),
'values' => $aCountries,
'value' => $sCountry,
'required' => true,
'checker' => array (
'func' => 'preg',
'params' => array('/^[a-zA-Z]{2}$/'),
'error' => _t ('_bx_ads_err_country'),
),

and replace  'value' => $sCountry, with: the value you need!

Example for german:

'Country' => array(
'type' => 'select',
'name' => 'Country',
'caption' => _t('_bx_ads_caption_country'),
'values' => $aCountries,
'value' => 'DE',
'required' => true,
'checker' => array (
'func' => 'preg',
'params' => array('/^[a-zA-Z]{2}$/'),
'error' => _t ('_bx_ads_err_country'),
),                                       

I don´t know if it works...... Please give Feedback!

Rappi

Bezirzer.de, elbrocker.de, tierschutz-community.de
Quote · 30 Mar 2010

Your mod also works for Ads.

Thank you so much.  I wish if I knew German so that I could check out your site.

Glen

Quote · 31 Mar 2010

Thanks for your feedback!

And now I have on more tip for my site Wink

Learn german and feel free to join Laughing

Rappi

Bezirzer.de, elbrocker.de, tierschutz-community.de
Quote · 31 Mar 2010

http://translate.google.com/

:-)
Quote · 31 Mar 2010

I can't believe I've been here this long an never seen this post! Life saver! Thanks!!

I also added

'City' => array(

                    'type' => 'text',

                    'name' => 'City',

                    'value' => 'Jacksonville',

'caption' => _t('_bx_events_caption_city'),

                    'required' => true,

                    'checker' => array (

                        'func' => 'length',

                        'params' => array(3,50),

                        'error' => _t ('_bx_events_err_city'), 

added what is in red, saves the member two steps!  I am adding this to every class file that needs it.  Thanks again!

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 11 May 2012

Awesome post! 

Quote · 1 Jul 2012

I did try this but it won't work for me !

Value i did put GB ...

I have City and Place , when i insert my city in uk it shows in USA ( the name of my city exist also in usa ) so wondering what should i change to make events pick only uk cities and not usa.

Thanks

Proud Hosted by Zarconia.net
Quote · 18 Jun 2015

Bump

Proud Hosted by Zarconia.net
Quote · 18 Jun 2015

bump

Proud Hosted by Zarconia.net
Quote · 18 Jun 2015

Bumpa !

Proud Hosted by Zarconia.net
Quote · 18 Jun 2015

bumpa

Proud Hosted by Zarconia.net
Quote · 19 Jun 2015

Hi.

Use UK instead of GB.....

I think that solve your problem...

Rappi

Bezirzer.de, elbrocker.de, tierschutz-community.de
Quote · 19 Jun 2015

I did Rappi , it just won't work, cleared the cache and everything but still getting a city in usa

This shit driving me nut for two days !

Proud Hosted by Zarconia.net
Quote · 19 Jun 2015

What module do you use?

Bezirzer.de, elbrocker.de, tierschutz-community.de
Quote · 19 Jun 2015

default module but now purchased Modz module does the trick ! Thanks

Proud Hosted by Zarconia.net
Quote · 19 Jun 2015

Modzzz is a very good developer!!!

I have many mods from Modzzz.

Good luck.

Bezirzer.de, elbrocker.de, tierschutz-community.de
Quote · 19 Jun 2015

Challenge: This would be super cool if it defaulted to the city and country of the user who is creating the event.

Quote · 21 Jun 2015

Modz event does the Job ! It works like charm :)

Proud Hosted by Zarconia.net
Quote · 21 Jun 2015

 

Challenge: This would be super cool if it defaulted to the city and country of the user who is creating the event.

 

That is one of the things the GEO Locator does by default. It also fills in country and city information for registration and search forms.

http://www.boonex.com/m/geo-locator

Dedicated servers for as little as $32 (28 euro) - See http://denre.com for more information
Quote · 21 Jun 2015
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.