Loading


Advertisement:

Author Topic: bug with ads. Please help  (Read 700 times)

didkap84

  • Full Member
  • ***
  • Posts: 189

teseo

  • Hero Member
  • *****
  • Posts: 5937
Re: bug with ads. Please help
« Reply #1 on: April 13, 2015, 09:20:38 pm »
Hi,

Couldn't find another way than modifying a core file. ??? Try this:

1.- Look in oc-includes/osclass/helpers/hDefines.php for:

Code: [Select]
$url = str_replace('{ITEM_TITLE}', osc_sanitizeString($item['s_title']), $url);
and replace it with:

Code: [Select]
$url = str_replace('{ITEM_TITLE}', osc_sanitizeString( cust_cyrillic_to_latin($item['s_title']) ), $url);

Now, being a core file, remember that you need to redo this modification every time you upgrade Osclass.

2.- Add this at the very bottom of your theme functions.php (take care not to leave blank lines after this):

Code: [Select]
<?php
function cust_cyrillic_to_latin($textcyr) {
    
$cyr  = array('а','б','в','г','д','e','ж','з','и','й','к','л','м','н','о','п','р','с','т','у',
        
'ф','х','ц','ч','ш','щ','ъ','ь''ю','я','А','Б','В','Г','Д','Е','Ж','З','И','Й','К','Л','М','Н','О','П','Р','С','Т','У',
        
'Ф','Х','Ц','Ч','Ш','Щ','Ъ','Ь''Ю','Я' );
    
$lat = array( 'a','b','v','g','d','e','zh','z','i','y','k','l','m','n','o','p','r','s','t','u',
        
'f' ,'h' ,'ts' ,'ch','sh' ,'sht' ,'a' ,'y' ,'yu' ,'ya','A','B','V','G','D','E','Zh',
        
'Z','I','Y','K','L','M','N','O','P','R','S','T','U',
        
'F' ,'H' ,'Ts' ,'Ch','Sh' ,'Sht' ,'A' ,'Y' ,'Yu' ,'Ya' );

    return 
str_replace($cyr$lat$textcyr); 
}
?>

Regards

Sophia_OS

  • Jr. Member
  • **
  • Posts: 55
delete this post please
« Reply #2 on: September 23, 2017, 12:31:40 am »
delete this post please
« Last Edit: September 29, 2017, 12:55:33 am by Sophia_OS »