Advertisement:

Author Topic: Auto Region name Usage / Inserting into META Description field  (Read 1659 times)

mrtsoftware

  • Sr. Member
  • ****
  • Posts: 343
Re: Auto Region name Usage / Inserting into META Description field
« Reply #15 on: January 25, 2018, 10:38:22 pm »
Code is working, but it is inserting " item title " into description ( you had used - ".osc_item_title(); )

description should be ; category, region, item text.......( first 140 - 150 characters ) same as Osclass original settings...

Also need keyword modification; region category name, region, category name, category custom word, region custom word )

Example : amsterdam dance schools, amsterdam, dance schools, dance schools list, amsterdam classifieds site

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: Auto Region name Usage / Inserting into META Description field
« Reply #16 on: January 26, 2018, 12:10:30 am »
You lost me....

anyway

Code: [Select]
osc_add_hook('search_ads_listing_medium', 'search_ads_listing_medium_fn');

function cust_ad_meta_desc($desc) {
    if (osc_is_ad_page()) {
        return osc_item_category()." ".osc_item_city().", ".osc_item_region()." - ".substr(osc_item_description(),0,150);
    }
    else return $desc;
}

osc_add_filter('meta_description_filter', 'cust_ad_meta_desc');
?>

if you use multibyte string

https://stackoverflow.com/questions/3787540/how-to-get-first-5-characters-from-string#3787576
Code: [Select]
// singlebyte strings
$result = substr($myStr, 0, 5);
// multibyte strings
$result = mb_substr($myStr, 0, 5);
« Last Edit: January 26, 2018, 12:12:46 am by marius-ciclistu »

mrtsoftware

  • Sr. Member
  • ****
  • Posts: 343
Re: Auto Region name Usage / Inserting into META Description field
« Reply #17 on: January 26, 2018, 12:13:07 pm »
marius-ciclistu@ Thanks a lot, it works but small problem...

it makes description area 2 lines, at the end of 1 line it inserts <br /> 
Please see secreenshoot!
How to ignore those marks and let to show description line as 1 line. Without <br /> signs..

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: Auto Region name Usage / Inserting into META Description field
« Reply #18 on: January 26, 2018, 12:23:12 pm »
If the description has new lines it's normal. Use str_replace('<br />',' ', &haystack)
Look online for that function.

mrtsoftware

  • Sr. Member
  • ****
  • Posts: 343
Re: Auto Region name Usage / Inserting into META Description field
« Reply #19 on: January 26, 2018, 03:06:04 pm »
In original osclass has no 2 lines into description and it is not putting <br> or other signs...Check your osclass site source code...

I have no PHP knowledge, I will check online forums if I can understand

mrtsoftware

  • Sr. Member
  • ****
  • Posts: 343
Re: Auto Region name Usage / Inserting into META Description field
« Reply #20 on: January 26, 2018, 03:27:06 pm »
Do you know into which file located original osclass META GENERATOR function? May be we need to do some changes there,...

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: Auto Region name Usage / Inserting into META Description field
« Reply #21 on: January 26, 2018, 04:15:53 pm »
Man... You don't stop do you :)
If you don't have php knowledge why are you trying to change the script? Use it as it is, buy plugins etc. Or learn php and javascript and then modify it.
Your meta  changes are .... Insignificant . Aficionado told you to leave the metas as they are.
:)

mrtsoftware

  • Sr. Member
  • ****
  • Posts: 343
Re: Auto Region name Usage / Inserting into META Description field
« Reply #22 on: January 26, 2018, 06:18:28 pm »
I have also bought SEO plugin from Osclass, but it is also not making what I want, only give options custom meta for categories, regions, cities etc...( I can not enter custom meta for thousands categories ), that's way something dynamic auto META generation options needed...If you know a plugin of if you have sell me. I pay...

I do not need big changes, just adding " region name " into META description...This is just easy to add somewhere .osc_item_region(), but I do not know where and how...

Of course I started to learn PHP ( in 1 day can not learn )

I see that you are very good in PHP and Osclass, pls help me for those small modification, I pay you ( send me your paypal adress )


Aficionado

  • Guest
Re: Auto Region name Usage / Inserting into META Description field
« Reply #23 on: January 26, 2018, 06:22:45 pm »
If you have thousands of categories as you say, then your site design is wrong.

As for the rest, we just say that your fixation with seo, metas etc, will not help you rank. Take or leave it.

Hire someone to help you out.

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: Auto Region name Usage / Inserting into META Description field
« Reply #24 on: January 26, 2018, 06:27:41 pm »
I'm not here to receice payment. I also learned alot in this forum. You already received some solutions here, you just need to fine tune them to do what you want. Ask google when you don't know something and work on the function you already received here.

Leave the metas. Osclass has many other weak points that need o be addressed. :)

mrtsoftware

  • Sr. Member
  • ****
  • Posts: 343
Re: Auto Region name Usage / Inserting into META Description field
« Reply #25 on: January 26, 2018, 07:31:33 pm »
marius-ciclistu@ if you spend a time for someone, it should be covered...You need also money for life...
Yes, I have already received much helps from here...

Coming to creating thousands of categories is due to having speciality of Turkish language...it is not like english language...

Example ; " English Teacher " keyword can be only searched as " English Teacher(s) in Melbourne ",
But in Turkish there are 7-10 different variations...That's way I am creating category for each search variation to get better search results...and this let to increase number of categories...Of course increasing category number causing another problems on hosting..etc...

As Aficionado adviced; I should stop using Osclass.
Thank you very much for all helps and giving time untill now...

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: Auto Region name Usage / Inserting into META Description field
« Reply #26 on: January 26, 2018, 07:37:20 pm »
You will get warnings on google webmaster tools for empty categories.
People search online for items not categories.
I for example, have url like city/item-title and osclass is generating the item's title as item title city, so if you google that exact phrase you'll get results.
Others put categories in url(osclsss' default) but in my opinion the url is too big like that.

Aficionado

  • Guest
Re: Auto Region name Usage / Inserting into META Description field
« Reply #27 on: January 26, 2018, 07:57:37 pm »

As Aficionado adviced; I should stop using Osclass.
Thank you very much for all helps and giving time untill now...

Never said that. The "take it or leave it" (if you mean that) is for the SOLUTIONS and IDEAS offered.

Please don't put words into my mouth.

Aficionado

  • Guest
Re: Auto Region name Usage / Inserting into META Description field
« Reply #28 on: January 26, 2018, 07:59:19 pm »
You will get warnings on google webmaster tools for empty categories.
People search online for items not categories.
I for example, have url like city/item-title and osclass is generating the item's title as item title city, so if you google that exact phrase you'll get results.
Others put categories in url(osclsss' default) but in my opinion the url is too big like that.

The best way for the guy to do a Turkish site is to COPY THE WAY other Turkish classifieds do it. Simple as that.

mrtsoftware

  • Sr. Member
  • ****
  • Posts: 343
Re: Auto Region name Usage / Inserting into META Description field
« Reply #29 on: January 26, 2018, 09:03:50 pm »
marius-ciclistu@ in Turkish language peoples always use first city name when they search something, example;
Melbourne diving school(s)
Melbourne tailor(s)
-----
That's way, a small changes in auto META DESCRIPTION + KEYWORD FUNCTION is a must.

Also META of city+category variations ( diving-school_melbournexxxxx ) must be modified. Of course thousands URLS can not be entered as manuel, that's way a dynamic AUTO META GENERATOR modification is a need as same ;

                                                             /city name- category

When you click this URL, still no item placed under this " city-category" variation url.
But when I look source code, DYNAMIC META generated very good. And when you search words in GOOGLE related with this CİTY + CATEGORY , this url is coming at the top of page in spite of no item placed yet...There are thousands URLS like this which still no ad placed yet, but they are coming at the top of search results...

Do you understand what I mean?


Aficionado@ I did not want to put words into your mouth. I apogolize for misunderstanding. Just as not an experienced person about PHP, I see that I never success with Osclass...I meant that!.

Osclass market is very very poor for plugins, I want to pay. I do not seek something freeware...
in Osclass market there are only 2 SEO plugins, and both do not help what I want...or same as example site URL given up!

If you know someone who can help me with payment about those modifications, let me to know...
Thanks
« Last Edit: February 05, 2018, 05:30:54 pm by mrtsoftware »