Advertisement:

Author Topic: [TUTORIAL] How to make City and Regions specific main pages  (Read 31590 times)

computerbar

  • Tutor
  • Sr. Member
  • *
  • Posts: 279
Re: [TUTORIAL] How to make City and Regions specific main pages
« Reply #15 on: November 10, 2012, 03:39:21 am »
Hi

Is there a way to change th ecode on the twitter menu for regions too?

I have started to change the site at www.placeformotors.co.uk you can see a region page at http://placeformotors.co.uk/index.php?page=myhome&sRegion=East+Yorkshire

Thanks for a great tutorial the only thing that i've noticed is the problem with the menu and also is there a way for the search box on my page to automactilly select the city region its on?

Thank you

can you please your querry I did not get what you mean by "change the ecode on twitter menu"

What problem with the menu?

For search box In myhome.php in theme folder change the City and region from dropdown to text-box then it should be autofilled with city or region name depend on where the previous link came from...

« Last Edit: November 10, 2012, 03:47:58 am by computerbar »

BuySellAndSwap

  • Sr. Member
  • ****
  • Posts: 389
Re: [TUTORIAL] How to make City and Regions specific main pages
« Reply #16 on: November 10, 2012, 10:53:34 pm »
Sorry for not explaining well... as an example at http://placeformotors.co.uk/index.php?page=myhome&sRegion=East+Yorkshire the header menu just goes back to whole the ads on the site rather than the region.... I would like it so if some one is in a region they could click on cars and it shows cars in that region if that makes sense?

Thanks for your help

computerbar

  • Tutor
  • Sr. Member
  • *
  • Posts: 279
Re: [TUTORIAL] How to make City and Regions specific main pages
« Reply #17 on: November 11, 2012, 01:23:52 am »
Sorry for not explaining well... as an example at http://placeformotors.co.uk/index.php?page=myhome&sRegion=East+Yorkshire the header menu just goes back to whole the ads on the site rather than the region.... I would like it so if some one is in a region they could click on cars and it shows cars in that region if that makes sense?

Thanks for your help
No Problem. I just could get my head around it :)

OK for menu.. as there was no menu in Modern thats why I did not mentioned in tut.

Because you are using Twitter theme

in your case your just need to change the URLs in your TOP menu from
<?php echo osc_search_category_url() ; ?>
to
"../index.php?page=myhome&sCity=<?php echo osc_search_city();?>&sRegion=<?php echo osc_search_region();?>&sCategory[]=<?php echo osc_category_id() ; ?>"

it will show results on same myhome.php page user are seeing or you can also redirect the user to default search.php by changing the myhome in url to search.

give it a try and let me know how it goes...

TIP: Look in first post the URLs in categories..

See demo here
http://jamal.pk/index.php?page=myhome&sRegion=Azad%20Kashmir
« Last Edit: November 11, 2012, 04:00:37 am by computerbar »

digitalcorner

  • Newbie
  • *
  • Posts: 15
  • Web Application Developer , SEO Consultant
Re: [TUTORIAL] How to make City and Regions specific main pages
« Reply #18 on: November 12, 2012, 08:11:04 am »
Please let me know if u figure out this


http://www.digitalcorner.net/classified

computerbar

  • Tutor
  • Sr. Member
  • *
  • Posts: 279
Re: [TUTORIAL] How to make City and Regions specific main pages
« Reply #19 on: November 12, 2012, 05:15:49 pm »
Please let me know if u figure out this


http://www.digitalcorner.net/classified
Figure out what?
I already figured it out hence made this tutorial  :P

Legion

  • Hero Member
  • *****
  • Posts: 622
  • I am founder of top20remedies.com buyeradvise.com
Re: [TUTORIAL] How to make City and Regions specific main pages
« Reply #20 on: December 18, 2012, 02:31:28 am »
@computerbar

i Really like this but when i select lahore at latest listings it shows
ads from other cities too i want to show ads from only
lahore  if i am in lahore is it possible?

computerbar

  • Tutor
  • Sr. Member
  • *
  • Posts: 279
Re: [TUTORIAL] How to make City and Regions specific main pages
« Reply #21 on: December 18, 2012, 01:51:25 pm »
@computerbar

i Really like this but when i select Lahore at latest listings it shows
ads from other cities too i want to show ads from only
Lahore  if i am in Lahore is it possible?
Thanks..  If you have followed the tutorial you should see selected city adverts only.

To answer your query... It is already DONE!
When you select Lahore you should see (1) Advert in Lahore. (see image)
Other latest listing are from the whole site..

Your search queries from the city page still goes to default search page instead of myhome as shown in tutorial.

I suggest you read the whole tutorial again...  8)

 
« Last Edit: December 18, 2012, 01:59:52 pm by computerbar »

Legion

  • Hero Member
  • *****
  • Posts: 622
  • I am founder of top20remedies.com buyeradvise.com
Re: [TUTORIAL] How to make City and Regions specific main pages
« Reply #22 on: December 18, 2012, 03:28:08 pm »
one more question my theme is totally modified see www.offersvalley.com is this possible to cities put at footer? Instead of sidebar Like olx has.

computerbar

  • Tutor
  • Sr. Member
  • *
  • Posts: 279
Re: [TUTORIAL] How to make City and Regions specific main pages
« Reply #23 on: December 19, 2012, 12:08:17 am »
one more question my theme is totally modified see www.offersvalley.com is this possible to cities put at footer? Instead of sidebar Like olx has.

just copy and paste your cities from sidebar into footer...

see here jamal.pk

Legion

  • Hero Member
  • *****
  • Posts: 622
  • I am founder of top20remedies.com buyeradvise.com
Re: [TUTORIAL] How to make City and Regions specific main pages
« Reply #24 on: December 19, 2012, 01:30:05 am »
Now lets go to myhome.php on root and we need to edit it to change all mSearch references to mMyhome (be careful its mMyhome)
on line 20 change CWebSearch to CWebMyhome [as above set in index.php] then use you find and replace function in ftp client to change all mSearch to mMyhome.

Then on line 33 and 381 replace the word search to myhome.

That done now save and upload and close this page.




I HAVE MYHOME WHICH SEARCH.PHP BUT I AM NOT FINDING LINE 381 THE LAST LINE I HAVE IS 342

computerbar

  • Tutor
  • Sr. Member
  • *
  • Posts: 279
Re: [TUTORIAL] How to make City and Regions specific main pages
« Reply #25 on: December 19, 2012, 04:28:50 pm »
Now lets go to myhome.php on root and we need to edit it to change all mSearch references to mMyhome (be careful its mMyhome)
on line 20 change CWebSearch to CWebMyhome [as above set in index.php] then use you find and replace function in ftp client to change all mSearch to mMyhome.

Then on line 33 and 381 replace the word search to myhome.

That done now save and upload and close this page.




I HAVE MYHOME WHICH SEARCH.PHP BUT I AM NOT FINDING LINE 381 THE LAST LINE I HAVE IS 342

sorry I have made the tutorial based on Version 3.01 as mentioned on the top of tut.

*I have made a demo site http://singer.pk installing the latest Osclass 3.0.1 today.

If you are using different version you should not follow the line guidance just look for what is needed. i.e CWebSearch  &  mSearch

I hope it helped you

Legion

  • Hero Member
  • *****
  • Posts: 622
  • I am founder of top20remedies.com buyeradvise.com
Re: [TUTORIAL] How to make City and Regions specific main pages
« Reply #26 on: December 19, 2012, 05:50:58 pm »
i am using 3.2 and  where is msearch i didnt understand my english is not good

thanks


computerbar

  • Tutor
  • Sr. Member
  • *
  • Posts: 279
Re: [TUTORIAL] How to make City and Regions specific main pages
« Reply #27 on: December 20, 2012, 08:54:09 pm »
i am using 3.2 and  where is msearch i didnt understand my english is not good

thanks

Can you please read the tutorial again and make your own notes if you are struggling.

All the changes you need to do are in the following files.
Use the Find function of your browser.... and let me know if you still can't find it...


root file Index.php
https://github.com/osclass/Osclass/blob/master/index.php
 
here is the root file search.php
https://github.com/osclass/Osclass/blob/master/search.php

main.php in modern theme folder
https://github.com/osclass/Osclass/blob/master/oc-content/themes/modern/main.php

Legion

  • Hero Member
  • *****
  • Posts: 622
  • I am founder of top20remedies.com buyeradvise.com
Re: [TUTORIAL] How to make City and Regions specific main pages
« Reply #28 on: December 21, 2012, 11:56:18 am »
thanks a lot Dear

danz0l

  • Newbie
  • *
  • Posts: 3
Re: [TUTORIAL] How to make City and Regions specific main pages
« Reply #29 on: February 03, 2013, 10:28:46 pm »
I checked out your demo site, hoping this mod would allow me to just show items on the main page from a certain location but it doesn't appear to work. When i click one of your areas (that states it has 1 advert in) on your demo site http://singer.pk it doesn't then display any adverts from the main page. Ironically the main page changes to reflect the region but the number count on categories doesn't.

So here for example i click Balochistan, which shows it has one add. The main page changes to reflect we are now in Balochistan region, but all the categories, including count, doesn't change. Now if you click say animals category which is now stating it has 2 items, nothing is displayed. Is this not working ?