Advertisement:

Author Topic: Is there any way to change the City Area to say zip code?  (Read 1177 times)

lichtinger

  • Newbie
  • *
  • Posts: 18
Is there any way to change the City Area to say zip code?
« on: June 12, 2017, 08:02:38 pm »
Is there any way to change the City Area to say Zip Code instead.  I will only have listings for US so I really need to change the City Area to Zip Code and the Region to State

neverseenbigfoot

  • Newbie
  • *
  • Posts: 4
Re: Is there any way to change the City Area to say zip code?
« Reply #1 on: July 02, 2017, 06:48:06 pm »
Same question here. I can't find any answer in the forum. Does someone know where the page is in 3.7.3 to change this coding?

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: Is there any way to change the City Area to say zip code?
« Reply #2 on: July 02, 2017, 08:25:53 pm »
Hi. There is. Which version of osclass are you using and which theme?
And one language(which one?) ore more languages?
« Last Edit: July 02, 2017, 08:28:06 pm by marius-ciclistu »


neverseenbigfoot

  • Newbie
  • *
  • Posts: 4
Re: Is there any way to change the City Area to say zip code?
« Reply #4 on: July 03, 2017, 12:24:09 am »
Thanks for the reply!

3.7.3 osclass

bender 3.1.4

English

Where it asks in the 'Listing Location' for...

Region
City
City Area
Address

I only need the City. How do I remove the other options?

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: Is there any way to change the City Area to say zip code?
« Reply #5 on: July 03, 2017, 12:56:49 am »
Let me get this right. You want to change the words:
 City Area to say Zip Code instead.
and the Region to State ?


for City Area
go to oc-content/languages/en_US

Download core.po

Open it with poedit

click on CIty Area and translate it to Zip Code
click on Region and translate it to State

Save it.
In the same folder you have core.po, a core.mo file will be generated.

Close poedit.

Just for verification, open core.po with text editor. You should find the following code in it.

Code: [Select]
msgid "City area"
msgstr "Zip Code"

and

Code: [Select]
msgid "Region"
msgstr "State"

Now if everithing is ok, close the text editor and upload the coire.po and core.mo files on the server (DO A BACK-up first!), overwriting the existing ones.

Now repeat the above for theme.po file.


For removing the rest, please explain more, I don't understant, maybe attach a picture.

« Last Edit: July 03, 2017, 01:36:53 pm by marius-ciclistu »

neverseenbigfoot

  • Newbie
  • *
  • Posts: 4
Re: Is there any way to change the City Area to say zip code?
« Reply #6 on: July 03, 2017, 02:29:14 am »
I only want 'City' to be available.

Region
City
City Area
Address

So Region, City Area and Address would not show and would not be shown anyplace else on the site.

Thanks for your time on this!
:-)


marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: Is there any way to change the City Area to say zip code?
« Reply #7 on: July 03, 2017, 09:09:15 am »
Ok, so you need to make some modifications in your theme's files (Remember that if you update your theme , you will have to remake them).

/oc-content/themes/bender/item-post.php

comment out the following code for example:

Code: [Select]
<!-- <div class="control-group">
                                <label class="control-label" for="cityArea"><?php _e('City Area''bender'); ?></label>
                                <div class="controls">
                                    <?php ItemForm::city_area_text(osc_user()); ?>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label" for="address"><?php _e('Address''bender'); ?></label>
                                <div class="controls">
                                  <?php ItemForm::address_text(osc_user()); ?>
                                </div>
                            </div> -->

or you can

Code: [Select]
               <div style="display:none;" class="control-group">
                                <label class="control-label" for="cityArea"><?php _e('City Area''bender'); ?></label>
                                <div class="controls">
                                    <?php ItemForm::city_area_text(osc_user()); ?>
                                </div>
                            </div>
                            <div style="display:none; class="control-group">
                                <label class="control-label" for="address"><?php _e('Address''bender'); ?></label>
                                <div class="controls">
                                  <?php ItemForm::address_text(osc_user()); ?>
                                </div>
                            </div>

This is for address and city area only. You do it in a similar way for the rest of fields you don't want to be shown.

In a similar way you must do changes in the following files (Remember that if you update your osclass , you will have to remake them).

oc-admin/themes/modern/items/frm.php (for the admin area if you use modern theme)
oc-admin/themes/modern/users/frm.php (for the admin area if you use modern theme)

oc-content/themes/bender/user-profile.php

I think that is it.



PS. Why change Region and City Area if you want to remove them?
« Last Edit: July 03, 2017, 01:31:55 pm by marius-ciclistu »

neverseenbigfoot

  • Newbie
  • *
  • Posts: 4
Re: Is there any way to change the City Area to say zip code?
« Reply #8 on: July 03, 2017, 08:33:20 pm »
THANKS!

That is exactly what I wanted to know and it worked perfect.

You asked me:
'Why change Region and City Area if you want to remove them?'

That original question was from someone other than me and I figured if I stayed on the same thread and got the answer to that I could comment out the coding to eliminate what I wanted. It worked fine since you answered how to change the coding and also answered how to delete the coding.

Thanks again and have a nice day!

 ;D

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: Is there any way to change the City Area to say zip code?
« Reply #9 on: July 03, 2017, 08:40:04 pm »
You're welcome. You as well.