[cBB Blog 1.0.1] Ru


User avatar
MaxTr
 
Posts: 16
Joined: Tue Jul 09, 2013 12:58 pm
Location: Saint-Petersburg
 Tue Sep 03, 2013 4:45 pm • via Web
Good day. Love the modification. An example can be uvidit (no ads) pauk.ru.com/blog/. Translated into Russian language almost everything. tagcloud.swf with support for Russian language, taken from another mod, but I can not adjust Includes friendly URLs (SEO) for the Russian language, please tell me if there is a solution. Thank you.

Alternative solutions for phpBB SEO Ultimate SEO URL
- Open phpbb_seo/phpbb_seo_class.php
Code: Select all
    return;
       }

- after
Code: Select all
// Custom characters replacement
          $url_replace = array(
             'А' => 'A', 'а' => 'a',
             'Б' => 'B', 'б' => 'b',
             'В' => 'V', 'в' => 'v',
             'Г' => 'G', 'г' => 'g',
             'Д' => 'D', 'д' => 'd',
             'Е' => 'E', 'е' => 'e',
             'Ё' => 'E', 'ё' => 'e',
             'Ж' => 'J', 'ж' => 'j',
             'З' => 'Z', 'з' => 'z',
             'И' => 'I', 'и' => 'i',
             'Й' => 'Y', 'й' => 'y',
             'К' => 'K', 'к' => 'k','Л' => 'L', 'л' => 'l',
             'М'=> 'M', 'м' => 'm',
             'Н' => 'N', 'н' => 'n',
             'О' => 'O', 'о' => 'o',
             'П' => 'P', 'п' => 'p',
             'Р' => 'R', 'р' => 'r',
             'С' => 'S', 'с' => 's',
             'Т' => 'T', 'т' => 't',
             'У' => 'U', 'у' => 'u',
             'Ф' => 'F', 'ф' => 'f',
             'Х' => 'H', 'х' => 'h',
             'Ц' => 'C', 'ц' => 'c',
             'Ч' => 'CH', 'ч' => 'ch',
             'Ш' => 'SH', 'ш' => 'sh',
             'Щ' => 'SHCH', 'щ' => 'shch',
             'Ъ' => '', 'ъ' => '',
             'Ы' => 'I', 'ы' => 'i',
             'Ь' => '', 'ь' => '',
             'Э' => 'E', 'э' => 'e',
             'Ю' => 'U', 'ю' => 'u',
             'Я' => 'YA','я' => 'ya',   
          );
          $this->seo_opt['url_find'] = array_keys($url_replace);
          $this->seo_opt['url_replace'] = array_values($url_replace);
          // Custom characters replacement


- Find:
Code: Select all
$url = preg_replace('`[.*]`U','',$url);


- after
Code: Select all
$url = str_replace( $this->seo_opt['url_find'], $this->seo_opt['url_replace'], $url );




Sorry for the bad Google translation
Attachments
tagcloud_rus.zip
tagcloud.swf with support for Russian language
(50.63 KB) Downloaded 679 times
Article 29 paragraph 4 of the Constitution of the RF: "Everyone has the right to seek, receive, transmit, produce and disseminate information by any lawful means. The list of information constituting a state secret is determined by federal law "
User avatar
IvanPF
Administrator
 
Posts: 2157
Joined: Fri Jun 17, 2011 12:15 am
Location: España (Spain)
 Mon Sep 16, 2013 4:07 pm • via Android
Hi,

Sorry for my delay on reply you and thanks for your contribution.
I dont have a lot of free time but i will check your problem in this week
User avatar
MaxTr
 
Posts: 16
Joined: Tue Jul 09, 2013 12:58 pm
Location: Saint-Petersburg
 Mon Sep 16, 2013 6:40 pm • via Web
Thank you very much, will definitely wait;)
Article 29 paragraph 4 of the Constitution of the RF: "Everyone has the right to seek, receive, transmit, produce and disseminate information by any lawful means. The list of information constituting a state secret is determined by federal law "
User avatar
IvanPF
Administrator
 
Posts: 2157
Joined: Fri Jun 17, 2011 12:15 am
Location: España (Spain)
 Wed Sep 18, 2013 4:59 pm • via Web
Hi,

Try This:
- Open: blog/includes/functions_seo.php
- Find:
Code: Select all
      $url = preg_replace('#\[.*\]#U','', $url);
      $url = htmlentities($url, ENT_COMPAT, 'UTF-8');

- Replace with:
Code: Select all
      global $user;

      $url = preg_replace('#\[.*\]#U','', $url);
      $url = htmlentities($url, ENT_COMPAT, 'UTF-8');
      
      if(isset($user->lang['blog_seo_replaces']))
      {
         $url = str_replace(array_keys($user->lang['blog_seo_replaces']), array_values($user->lang['blog_seo_replaces']), $url);
      }


- Open language/ru/mods/blog/main.php
- Find:
Code: Select all
?>

- Add before:
Code: Select all
// Seo custom replaces
$lang = array_merge($lang, array(
   'blog_seo_replaces' => array(
      'А' => 'A',      'а' => 'a',
      'Б' => 'B',      'б' => 'b',
      'В' => 'V',      'в' => 'v',
      'Г' => 'G',    'г' => 'g',
      'Д' => 'D',      'д' => 'd',
      'Е' => 'E',      'е' => 'e',
      'Ё' => 'E',      'ё' => 'e',
      'Ж' => 'J',      'ж' => 'j',
      'З' => 'Z',      'з' => 'z',
      'И' => 'I',      'и' => 'i',
      'Й' => 'Y',      'й' => 'y',
      'К' => 'K',      'к' => 'k',
      'Л' => 'L',      'л' => 'l',
      'М' => 'M',      'м' => 'm',
      'Н' => 'N',      'н' => 'n',
      'О' => 'O',      'о' => 'o',
      'П' => 'P',      'п' => 'p',
      'Р' => 'R',      'р' => 'r',
      'С' => 'S',      'с' => 's',
      'Т' => 'T',      'т' => 't',
      'У' => 'U',      'у' => 'u',
      'Ф' => 'F',    'ф' => 'f',
      'Х' => 'H',    'х' => 'h',
      'Ц' => 'C',      'ц' => 'c',
      'Ч' => 'CH',    'ч' => 'ch',
      'Ш' => 'SH',   'ш' => 'sh',
      'Щ' => 'SHCH',   'щ' => 'shch',
      'Ъ' => '',      'ъ' => '',
      'Ы' => 'I',      'ы' => 'i',
      'Ь' => '',      'ь' => '',
      'Э' => 'E',      'э' => 'e',
      'Ю' => 'U',      'ю' => 'u',
      'Я' => 'YA',   'я' => 'ya',
   )
));
User avatar
Hd321kbps
 
Posts: 28
Joined: Fri Sep 20, 2013 7:48 pm
Location: Russian
 Fri Sep 20, 2013 8:00 pm • via Web
Thank you very much for mod. I liked it very much. I made a Russian translation, and there is a tag cloud. Also found a error the installation widget recent entries, how to fix it? What are your plans for the future and how we can implement the friendly Url to Russian link.
Attachments
rus.rar
Ru Lang
(65.09 KB) Downloaded 747 times
error.png
Error
Last edited by Hd321kbps on Sat Sep 21, 2013 9:03 am, edited 1 time in total.
User avatar
MaxTr
 
Posts: 16
Joined: Tue Jul 09, 2013 12:58 pm
Location: Saint-Petersburg
 Sat Sep 21, 2013 6:45 am • via Web
Thank you very much, it worked!
Code: Select all
http://blog.pauk.ru.com/phpbb3/kak-ubrat-pristavku-zagolovkov-soobshcheniy-p13.html

True error is due to address /phpbb3/ please tell me how to clean, I think it will not work just fine! Thank you very much for the MOD
Article 29 paragraph 4 of the Constitution of the RF: "Everyone has the right to seek, receive, transmit, produce and disseminate information by any lawful means. The list of information constituting a state secret is determined by federal law "
User avatar
MaxTr
 
Posts: 16
Joined: Tue Jul 09, 2013 12:58 pm
Location: Saint-Petersburg
 Sat Sep 21, 2013 6:47 am • via Web
Hd321kbps wrote: Also found a error........
Please show your site.
Ru /Пожалуйста, покажите Ваш Сайт.
Article 29 paragraph 4 of the Constitution of the RF: "Everyone has the right to seek, receive, transmit, produce and disseminate information by any lawful means. The list of information constituting a state secret is determined by federal law "
User avatar
Hd321kbps
 
Posts: 28
Joined: Fri Sep 20, 2013 7:48 pm
Location: Russian
 Sat Sep 21, 2013 8:46 am • via Web
Site on localhost yet.
User avatar
Hd321kbps
 
Posts: 28
Joined: Fri Sep 20, 2013 7:48 pm
Location: Russian
 Sat Sep 21, 2013 9:17 am • via Web
error corrected.
Tell me how to do sitemap.xml and robots.txt for blog?
User avatar
IvanPF
Administrator
 
Posts: 2157
Joined: Fri Jun 17, 2011 12:15 am
Location: España (Spain)
 Sat Sep 21, 2013 9:27 am • via Web
Hi,

@MaxTr the subdomain http://blog.pauk.ru.com/ not working for me.
To use the subdomain you need to add it into the Blog configuration. Are you did this?

@Hd321kbps Try this to solve the problem:
- open "blog/widgets/recent_comments_widget.php
- Find:
Code: Select all
$sql = 'SELECT c.comment_id, c.post_id, c.user_id, c.username, p.post_title, p.post_url

- Replace with:
Code: Select all
$sql = 'SELECT c.comment_id, c.post_id, c.user_id, c.username, p.post_title, p.post_url,


PD: @Hd321kbps It is best open a new topic for each problem for not mixing.
Next

Who is online

Users browsing this forum: No registered users and 0 guests