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 |
Thank you and keep them coming.
Glen
|
Nice tip. Thanks for the share. https://dolphin-techs.com - Skype: Dolphin Techs |
What file would you edit for the Ads section to add a default country (boonex/ads/ ..)?
Thanks in advance!
|
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 |
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
|
Thanks for your feedback!
And now I have on more tip for my site
Learn german and feel free to join
Rappi
Bezirzer.de, elbrocker.de, tierschutz-community.de |
:-) |
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! |
|
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 |
Proud Hosted by Zarconia.net |
Proud Hosted by Zarconia.net |
Proud Hosted by Zarconia.net |
Proud Hosted by Zarconia.net |
Hi.
Use UK instead of GB.....
I think that solve your problem...
Rappi
Bezirzer.de, elbrocker.de, tierschutz-community.de |
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 |
Bezirzer.de, elbrocker.de, tierschutz-community.de |
default module but now purchased Modz module does the trick ! Thanks Proud Hosted by Zarconia.net |
Modzzz is a very good developer!!!
I have many mods from Modzzz.
Good luck.
Bezirzer.de, elbrocker.de, tierschutz-community.de |
Challenge: This would be super cool if it defaulted to the city and country of the user who is creating the event. |
Modz event does the Job ! It works like charm :) Proud Hosted by Zarconia.net |
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 |