*

dragutturgut

  • ***
  • 54 posts
Option to hide country name or country code from listing
« on: December 30, 2022, 03:56:57 PM »
HI MB Theme / Osclasspoint.com

I am very thankful and grateful to osclass and mb theme for providing osclass service that enable non coding people like me to start a journey in listing/advertising website. So many thank osclasspoint/mb theme

Here i would like to suggest an idea,

In Occlass admin panel, i suggest, please provide an option where osclass user can hide country name (or country code) from being shown in any listing details. Most of us only have 1 country to show/advertise . To view state and name of city where an advertisment is located from/advertised from already good enough and pleasant to our website visitor.

I attach a sprint screen for reference

Once again thank you osclasspoint and mb theme

Cheers

Dragutrtgut

*

MB Themes

Re: Option to hide country name or country code from listing
« Reply #1 on: December 30, 2022, 06:17:23 PM »
Edit loop-single.php, there is location function.
Replace with osc_item_city() function
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

dragutturgut

  • ***
  • 54 posts
Re: Option to hide country name or country code from listing
« Reply #2 on: December 31, 2022, 01:57:59 AM »
Edit loop-single.php, there is location function.
Replace with osc_item_city() function


Hi mb theme,
Thank you for fast reply. appreciated.

I opened my  loop-single.php, i coundnt find the location function (i dont know which one). can i know which line its..?
i am on delta theme.

Thank you very much

*

MB Themes

Re: Option to hide country name or country code from listing
« Reply #3 on: December 31, 2022, 08:48:43 AM »
Its going to be something like del_loc or del_location....
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

dragutturgut

  • ***
  • 54 posts
Re: Option to hide country name or country code from listing
« Reply #4 on: December 31, 2022, 11:41:34 AM »
Its going to be something like del_loc or del_location....

my apologize, neither these words " del_loc " or " del_location " exist in single-loop.php file.

Cheers

*

MB Themes

Re: Option to hide country name or country code from listing
« Reply #5 on: January 02, 2023, 01:19:14 PM »
del_item_location

Don't tell me you have not searched for word "location"

Edit loop-single.php, there is location function.
Replace with osc_item_city() function

Then in functions.php for this function, replace
Code: [Select]
osc_item_country_code() => null
osc_premium_country_code() => null
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

dragutturgut

  • ***
  • 54 posts
Re: Option to hide country name or country code from listing
« Reply #6 on: January 02, 2023, 07:32:41 PM »
del_item_location

Don't tell me you have not searched for word "location"

Edit loop-single.php, there is location function.
Replace with osc_item_city() function

Then in functions.php for this function, replace
Code: [Select]
osc_item_country_code() => null
osc_premium_country_code() => null

I am sorry .. yeaah.. my mistake.. at the moment, after following your steps, i able to hide country code from latest listing. but country code still appear in premium listing. i tried to used the both code u provided above, but went wrong. 505 error came out. what really the exact command to make these two codes work. do i need to remove the " ; " or just leave blank after => null at the end of the line..?

there are few occurence where i found " osc_item_country_code  " and
" osc_premium_country_code " in function.php file. do i need to put the same command for them all ..?

hope mb theme would help to tell me which line the above code exactly. this is my final request, i will not make any changes on design unless for six month. i am bout to concentrating on marketing side . hope mb theme will to help.

thank you a lot osclasspoint and amb theme. i am indebted to osclass and mb theme.

*

MB Themes

Re: Option to hide country name or country code from listing
« Reply #7 on: January 02, 2023, 10:05:32 PM »
Do you see something related to semicolon (;) ?

Code: [Select]
osc_item_country_code() => null
osc_premium_country_code() => null
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

dragutturgut

  • ***
  • 54 posts
Re: Option to hide country name or country code from listing
« Reply #8 on: January 03, 2023, 01:24:43 PM »
Do you see something related to semicolon (;) ?

Code: [Select]
osc_item_country_code() => null
osc_premium_country_code() => null

Thank you very much for replying. Yes, i could see the semicolon related to the above code in functions.php file.
( by the way, what i know semicolon is referring to this sign " ; "

Below are the line that contain " osc_item_country_code "
$loc = array_filter(array(osc_item_city(), osc_item_region(), osc_item_country_code()));

____________________
      $loc = array_filter(array(osc_item_city(), (osc_item_city() == '' ? osc_item_region() : ''), osc_item_country_code()));

____________________
        if(osc_item_country_code() > 0) {

___________________
          $array['sCountry'] = osc_item_country_code();

While for " osc_premium_country_code " :

$loc = array_filter(array(osc_premium_city(), (osc_premium_city() == '' ? osc_premium_region() : ''), osc_premium_country_code()));
_________

        if(osc_premium_country_code() > 0) {
_________

          $array['sCountry'] = osc_premium_country();

( i draw the line to separate each of them)

How should i edit (also which one) so that i can replace them as per code you have provided :

Code: [Select]
osc_item_country_code() => null
osc_premium_country_code() => null


Thank you very much


Edit (8/1/2023)
- finally, after few days i able to follow your instructions. Thank you very much mb theme @osclasspoint.com. i am so grateful.  so many thanks to all of you mb theme developer.

« Last Edit: January 07, 2023, 05:19:19 PM by dragutturgut »