Osclass Support Forums

Osclass theme support => Veronika Osclass Responsive Theme => Topic started by: mohsan on February 28, 2017, 08:43:22 PM

Title: Footer Menu
Post by: mohsan on February 28, 2017, 08:43:22 PM
Dear Admin,

In the bottom right corner of the footer. It show the state name. would you like to let me know how can i i change to city name instead of state name.

Thanks
Mohsan
Title: Re: Footer Menu
Post by: MB Themes on February 28, 2017, 09:29:23 PM
@mohsan
in footer.php in theme folder you have:
Code: [Select]
        <?php $regions RegionStats::newInstance()->listRegions('%%%%''>''i_num_items DESC'); ?>
        <?php $i 1?>
        <?php foreach($regions as $r) { ?>
          <?php if($i <= 12) { ?>
            <span class="region-span"><a href="<?php echo osc_search_url(array('page' => 'search''sRegion' => $r['pk_i_id']));?>"><?php echo $r['s_name']; ?></a></span>
            <?php $i++; ?>
          <?php ?>
        <?php ?>

change it to:
Code: [Select]
        <?php $cities CityStats::newInstance()->listCities('%%%%''>''i_num_items DESC'); ?>
        <?php $i 1?>
        <?php foreach($cities as $r) { ?>
          <?php if($i <= 12) { ?>
            <span class="region-span"><a href="<?php echo osc_search_url(array('page' => 'search''sCity' => $r['pk_i_id']));?>"><?php echo $r['s_name']; ?></a></span>
            <?php $i++; ?>
          <?php ?>
        <?php ?>
Title: Re: Footer Menu
Post by: mohsan on March 02, 2017, 10:11:20 PM
Is that possible, you can add this option in the admin panel.

1. Show/hide Footer Menu
2. Show city or Region name (if possible) (One more thing. also define the city limit max 10 to 15 cities can be show.According to design need to be adjusted. if possible)

 <?php $cities = CityStats::newInstance()->listCities('%%%%', '>', 'i_num_items DESC'); ?>
        <?php $i = 1; ?>
        <?php foreach($cities as $r) { ?>
          <?php if($i <= 12) { ?>
            <span class="region-span"><a href="<?php echo osc_search_url(array('page' => 'search', 'sCity' => $r['pk_i_id']));?>"><?php echo $r['s_name']; ?></a></span>
            <?php $i++; ?>
          <?php } ?>
        <?php } ?>

This code i replace with sregion. It can't show me any cities in the footer. can you please let me know what mistake am i doing?
Title: Re: Footer Menu
Post by: MB Themes on March 03, 2017, 09:22:08 AM
@mohsan
Thanks for suggestion, will consider it in next update.
Title: Re: Footer Menu
Post by: mohsan on March 03, 2017, 04:08:57 PM
Dear Frosticek,

This code is not working.

  <?php $cities = CityStats::newInstance()->listCities('%%%%', '>', 'i_num_items DESC'); ?>
        <?php $i = 1; ?>
        <?php foreach($cities as $r) { ?>
          <?php if($i <= 12) { ?>
            <span class="region-span"><a href="<?php echo osc_search_url(array('page' => 'search', 'sCity' => $r['pk_i_id']));?>"><?php echo $r['s_name']; ?></a></span>
            <?php $i++; ?>
          <?php } ?>
        <?php } ?>

It show blank instead of showing cities.

Thanks
Mohsan
Title: Re: Footer Menu
Post by: Ivanko on March 04, 2017, 12:15:57 AM
@Mohsan

Replace code :

Code: [Select]
<div class="location">
        <?php $regions RegionStats::newInstance()->listRegions('%%%%''>''i_num_items DESC'); ?>
        <?php $i 1?>
        <?php foreach($regions as $r) { ?>
          <?php if($i <= 12) { ?>
            <span class="region-span"><a href="<?php echo osc_search_url(array('page' => 'search''sRegion' => $r['pk_i_id']));?>"><?php echo $r['s_name']; ?></a></span>
            <?php $i++; ?>
          <?php ?>
        <?php ?>
      </div>


With this one:

Code: [Select]
<div class="location">
    <?php $i_count=0;
while(osc_has_list_cities()) { ?>

<a href="<?php echo osc_search_url(array('sCity' => osc_list_city_name()));?>"><?php echo osc_list_city_name() ; ?> <em>(<?php echo osc_list_city_items() ; ?>)</em></a>
<?php $i_count++; 
 if ($i_count==25) {
  break;
} } ?>

</div>
Title: Re: Footer Menu
Post by: mohsan on March 04, 2017, 02:09:29 PM
Dear Ivanko,

Thanks this code work for me. I need some change in design aspect. I am sending you image. Please have a look on it.

1. I don't need the count of the item
2. need to show the city name same as it before you showing the region.

Thanks
Mohsan
Title: Re: Footer Menu
Post by: Ivanko on March 04, 2017, 02:25:51 PM
Then you just remove counts :

Code: [Select]
<div class="location">
    <?php $i_count=0;
while(osc_has_list_cities()) { ?>

<a href="<?php echo osc_search_url(array('sCity' => osc_list_city_name()));?>"><?php echo osc_list_city_name() ; ?> </a>
<?php $i_count++; 
 if ($i_count==25) {
  break;
} } ?>

</div>
Title: Re: Footer Menu
Post by: mohsan on March 04, 2017, 03:59:19 PM
Thank you. I add one more class and also i edit in the cities function. it show the same output. which i need.

Thanks for your help
Title: Re: Footer Menu
Post by: mohsan on March 04, 2017, 04:08:08 PM
Sorry to bother you again and again. one more thing. it's showing cities name design is also fine. now i want one more small change, show the latest ads post city name instead of showing the alphabetic.


Thanks
Mohsan
Title: Re: Footer Menu
Post by: Ivanko on March 04, 2017, 04:53:54 PM
@Mohsan
Sorry we are discussing bugs and malfunctions, missed items in theme, in order admin can follow up and upgrade the staff if he consider so.
For the custom functions better you go to osclass forum, sure you will get faster reply.
Title: Re: Footer Menu
Post by: amraneo on August 07, 2017, 03:35:35 PM
@mohsan
in footer.php in theme folder you have:
Code: [Select]
        <?php $regions RegionStats::newInstance()->listRegions('%%%%''>''i_num_items DESC'); ?>
        <?php $i 1?>
        <?php foreach($regions as $r) { ?>
          <?php if($i <= 12) { ?>
            <span class="region-span"><a href="<?php echo osc_search_url(array('page' => 'search''sRegion' => $r['pk_i_id']));?>"><?php echo $r['s_name']; ?></a></span>
            <?php $i++; ?>
          <?php ?>
        <?php ?>

change it to:
Code: [Select]
        <?php $cities CityStats::newInstance()->listCities('%%%%''>''i_num_items DESC'); ?>
        <?php $i 1?>
        <?php foreach($cities as $r) { ?>
          <?php if($i <= 12) { ?>
            <span class="region-span"><a href="<?php echo osc_search_url(array('page' => 'search''sCity' => $r['pk_i_id']));?>"><?php echo $r['s_name']; ?></a></span>
            <?php $i++; ?>
          <?php ?>
        <?php ?>

Hi,

I changed the regions code to cities code but it doesn't work, could you fixe it please ?

Regards,
Title: Re: Footer Menu
Post by: MB Themes on August 07, 2017, 04:05:11 PM
@amraneo
what does not work there?
Title: Re: Footer Menu
Post by: amraneo on August 07, 2017, 04:59:51 PM
There is nothing shown in the footer right side with the cities code. When I put back the code of regions theses are shown.
Title: Re: Footer Menu
Post by: MB Themes on August 07, 2017, 05:03:53 PM
@amraneo
Then try to refresh status for cities/locations and if does not work, you need to play with this line:
Code: [Select]
<?php $cities CityStats::newInstance()->listCities('%%%%''>''i_num_items DESC'); ?>
alternative could be:
Code: [Select]
<?php $cities CityStats::newInstance()->listCities('''>''i_num_items DESC'); ?>
Try to check on osclass forums how people use this function.
Title: Re: Footer Menu
Post by: eddy on April 23, 2018, 10:30:50 AM
Then you just remove counts :

Code: [Select]
<div class="location">
    <?php $i_count=0;
while(osc_has_list_cities()) { ?>

<a href="<?php echo osc_search_url(array('sCity' => osc_list_city_name()));?>"><?php echo osc_list_city_name() ; ?> </a>
<?php $i_count++; 
 if ($i_count==25) {
  break;
} } ?>

</div>
Hey @Ivanko
thanks for the tips. its now showing. but one more thing. how to arrange them in column as shown in veronika demo site?
also is there a way to only show popular cities instead of alphabetical order? Thanks
Title: Re: Footer Menu
Post by: ferry on April 24, 2018, 02:36:24 AM
if you use original footer.php everything works fine eddy
Title: Re: Footer Menu
Post by: zhongguo on April 28, 2021, 11:06:36 AM
I want to change the color of the menu of which folder is the file menu
veronika themes
Title: Re: Footer Menu
Post by: MB Themes on April 28, 2021, 01:25:18 PM
@zhongguo
All styles are in CSS files, you can find it using inspect tools from your browser.