{"id":200382,"date":"2013-10-31T16:01:08","date_gmt":"2013-10-31T12:01:08","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=200382"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=200382","title":{"rendered":"<span class=\"post_title\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044f \u043f\u043e\u0434 Drupal 7. \u0427\u0430\u0441\u0442\u044c 2<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<habracut\/><\/p>\n<h4>\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435<\/h4>\n<p>  \u0412 <a href=\"http:\/\/habrahabr.ru\/post\/200340\/\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u044f \u043f\u043e\u043a\u0430\u0437\u0430\u043b \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u043e\u0434 Drupal 7. \u0418 \u043a\u0430\u043a \u044f \u0438 \u043e\u0431\u0435\u0449\u0430\u043b, \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043a \u043c\u043e\u0434\u0443\u043b\u044f\u043c js-\u0444\u0430\u0439\u043b\u044b (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043d\u0438\u0445 jQuery) \u0438 \u043a\u0430\u043a \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f.<\/p>\n<h4>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 js-\u0444\u0430\u0439\u043b\u043e\u0432<\/h4>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432 \u043f\u0430\u043f\u043a\u0435 \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c \u043b\u044e\u0431\u043e\u0439 js-\u0444\u0430\u0439\u043b. \u042f \u043d\u0430\u0437\u0432\u0430\u043b \u0435\u0433\u043e <i>main.js<\/i>.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0444\u0430\u0439\u043b<i> rss_feeds.info<\/i> \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n<p>  <i>scripts[] = main.js<\/i><\/p>\n<p>  \u0412 \u0441\u0432\u043e\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u0435 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b jQuery. \u0412 <i>main.js<\/i> \u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u043a\u043d\u043e\u043f\u043a\u0438 \u00ab\u0412\u0432\u0435\u0440\u0445\u00bb. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0431\u044b\u043b\u043e \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"javascript\">(function ($) {  })(jQuery); <\/code><\/pre>\n<p>  \u0418 \u0432 \u044d\u0442\u043e\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u0438\u0448\u0435\u043c \u043a\u043e\u0434:<\/p>\n<pre><code class=\"javascript\">$.fn.extend({         topMouseover: function(self) {             this.on('mouseover',function() {                 self.opacity.stop().animate({opacity:&quot;1&quot;},300);                 self.button.stop().animate({opacity:&quot;1&quot;},300);             });         },         topMouseout: function(self) {             this.on('mouseout',function() {                 self.opacity.stop().animate({opacity:&quot;0&quot;},300);                 self.button.stop().animate({opacity:&quot;0.4&quot;},300);             });         },         wScroll: function(g) {             if(g == 0) this.removeClass(&quot;no-count&quot;);             if(!this.hasClass(&quot;no-count&quot;)){                 if(g &gt; 500 && this.is(&quot;:hidden&quot;)){                     this.addClass(&quot;visible&quot;);                     this.css(&quot;cursor&quot;,&quot;pointer&quot;);                     this.fadeIn(500);                     this.click(function(){                         $(&quot;body, html&quot;).animate({scrollTop:0},600);                         this.fadeOut(300);                         this.addClass(&quot;no-count&quot;);                     });                 }                 if(g &lt; 200 && this.hasClass(&quot;visible&quot;)){                     this.removeClass(&quot;visible&quot;);                     this.fadeOut(300);                 }             }else{                 this.unbind(&quot;click&quot;);             }         }     });      function toTopBtn(toTop, opacity, btn) {         this.toTopBtn = $(toTop);         this.opacity = $(opacity);         this.button = $(btn);         this.windowScroll();         this._init();         return this;     }      toTopBtn.prototype = {         _init: function () {             var self = this;             this.toTopBtn.topMouseover(self);             this.toTopBtn.topMouseout(self);         },         windowScroll: function() {             var g = $(window).scrollTop();             this.toTopBtn.wScroll(g);         }     }     $(document).ready(function() {         upButton = new toTopBtn(&quot;.toTopWrapper&quot;,&quot;.toTopOpacity&quot;,&quot;.toTopBtn&quot;);          $(window).scroll(function(){             upButton.windowScroll();         });     }); <\/code><\/pre>\n<p>  \u041d\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432 Drupal 7 \u0438\u0434\u0435\u0442 <i>jQuery 1.4.4<\/i>. \u0424\u0443\u043d\u043a\u0446\u0438\u044f <i>.on()<\/i> \u0432 \u043d\u0435\u0439 \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430. \u0414\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f jQuery \u0441\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u043c\u043e\u0434\u0443\u043b\u044c <i><a href=\"https:\/\/drupal.org\/project\/jquery_update\">Query Update<\/a><\/i>. \u0412 \u043d\u0435\u043c \u0432\u0441\u0435 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e. \u0412 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e (\u044f \u0432\u044b\u0431\u0440\u0430\u043b 1.8).<\/p>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043a\u043d\u043e\u043f\u043a\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u043b\u0430\u0441\u044c, \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u0444\u0430\u0439\u043b <i>rssfeeds_content.tpl.php<\/i>:<\/p>\n<pre><code class=\"php\">&lt;div class=&quot;toTopWrapper&quot;&gt; \t&lt;div class=&quot;toTopOpacity&quot;&gt;&lt;\/div&gt; \t&lt;div class=&quot;toTopPanel&quot; title=&quot;Up&quot;&gt; \t\t&lt;div class=&quot;toTopBtn&quot;&gt; \t\t\t&lt;span class=&quot;arrow&quot;&gt;\u2191&lt;\/span&gt; &lt;span class=&quot;label&quot;&gt;up&lt;\/span&gt; \t\t&lt;\/div&gt; \t&lt;\/div&gt; &lt;\/div&gt; &lt;br&gt;&lt;br&gt; &lt;?php foreach ($items-&gt;channel-&gt;item as $item): ?&gt; \t&lt;span class=&quot;title&quot;&gt;&lt;a href=&quot;&lt;?php echo $item-&gt;link; ?&gt;&quot;&gt;&lt;?php echo $item-&gt;title; ?&gt;&lt;\/a&gt;&lt;\/span&gt;&lt;br&gt;&lt;br&gt; \t&lt;?php echo $item-&gt;description; ?&gt;&lt;br&gt;&lt;br&gt;&lt;?php echo $item-&gt;pubDate; ?&gt; \t&lt;hr&gt;&lt;br&gt;&lt;br&gt; &lt;?php endforeach; ?&gt; <\/code><\/pre>\n<p>  \u2026 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0438\u043b\u0438 \u0432 main.css:<\/p>\n<pre><code class=\"css\">\/* &quot;TO UP&quot; BUTTON *\/  .toTopWrapper { \tposition:fixed; \ttop:0; \tbottom:0; \tleft:0; \twidth:7%; \tdisplay:none; \tbackground-color: #87ceeb; \topacity: 0.3; }  .toTopOpacity { \tposition:fixed; \ttop:0; \tbottom:0; \tleft:0; \twidth:7%; \tbackground-color: #87ceeb; \topacity: 0.1; } .toTopWrapper .toTopPanel { \twidth:100%; \theight:100%; \tfont-size:13px; \tcolor: black; \tpadding-top:10px; \tposition:relative; } .toTopWrapper .toTopBtn { \ttext-align:left; \tline-height:15px; \tmargin-left: 30%; \tfont-family:tahoma,arial,verdana,sans-serif; \tfont-weight:bold; \topacity: 0.2; } .toTopWrapper .toTopBtn .arrow{ \tfont-size:14px; \tfont-weight:bold; \tvertical-align:middle; }  \/* END OF &quot;TO UP&quot; BUTTON *\/ <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 RSS-\u043b\u0435\u043d\u0442\u044b \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043a\u043d\u043e\u043f\u043a\u0430 \u00ab\u0412\u0432\u0435\u0440\u0445\u00bb.<\/p>\n<h4>\u041b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f<\/h4>\n<p>  \u0412\u0441\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044b \u043c\u043e\u0434\u0443\u043b\u044f \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0435 <i>translations<\/i> \u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u0442 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0438\u0437 \u0434\u0432\u0443\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u2014 <i>modulename.pot<\/i> (\u044d\u0442\u043e \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430) \u0438 <i>modulename.po<\/i> (\u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0430\u043c \u043f\u0435\u0440\u0435\u0432\u043e\u0434). <\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044c <i><a href=\"https:\/\/drupal.org\/project\/potx\">Translation Template Extractor<\/a><\/i>. \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u044d\u0442\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <i>admin\/config\/regional\/translate<\/i> \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u043a\u043b\u0430\u0434\u043a\u0443 <i>EXTRACT<\/i>. \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0430\u0448 \u043c\u043e\u0434\u0443\u043b\u044c \u0438 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c <i>Extract<\/i>:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/f97\/a7e\/294\/f97a7e294eecb21556c454bb261800bb.png\"\/><\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0448\u0430\u0431\u043b\u043e\u043d\u0430<i> rss_feeds.pot<\/i>, \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0435\u0433\u043e \u0432 \u043f\u0430\u043f\u043a\u0443 \u043c\u043e\u0434\u0443\u043b\u044f <i>translations<\/i>.<\/p>\n<p>  \u041f\u043e\u0442\u043e\u043c \u043f\u0440\u043e\u0434\u0435\u043b\u044b\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u0442\u043e \u0436\u0435, \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0430\u0432\u0438\u043c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u043d\u0430 <i>Template file for Russian translations<\/i> \u0438 \u0441\u0442\u0430\u0432\u0438\u043c \u0433\u0430\u043b\u043e\u0447\u043a\u0443 \u043d\u0430 <i>Include translations<\/i>. \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 <i>rss_feeds.ru.po<\/i> \u0432 \u044d\u0442\u0443 \u0436\u0435 \u043f\u0430\u043f\u043a\u0443.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044c .po-\u0444\u0430\u0439\u043b \u0438 \u0432\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0443\u0434\u0430 \u0441\u0432\u043e\u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044b. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043c\u043e\u0434\u0443\u043b\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u044f \u0437\u0430\u043a\u043e\u043d\u0447\u0443 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u0435\u0439 \u043d\u0430 \u0442\u0435\u043c\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043f\u043e\u0434 Drupal. \u041f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0439\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 Drupal&#8217;a, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0433\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0441\u0442\u043e\u0438\u0442 \u0443\u0437\u043d\u0430\u0442\u044c. \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u044d\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u043a\u043e\u043c\u0443-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u0443\u0442\u0438 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f Drupal. <\/p>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435!    \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/200382\/\"> http:\/\/habrahabr.ru\/post\/200382\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<habracut\/><\/p>\n<h4>\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435<\/h4>\n<p>  \u0412 <a href=\"http:\/\/habrahabr.ru\/post\/200340\/\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u044f \u043f\u043e\u043a\u0430\u0437\u0430\u043b \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u043e\u0434 Drupal 7. \u0418 \u043a\u0430\u043a \u044f \u0438 \u043e\u0431\u0435\u0449\u0430\u043b, \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043a \u043c\u043e\u0434\u0443\u043b\u044f\u043c js-\u0444\u0430\u0439\u043b\u044b (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043d\u0438\u0445 jQuery) \u0438 \u043a\u0430\u043a \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f.<\/p>\n<h4>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 js-\u0444\u0430\u0439\u043b\u043e\u0432<\/h4>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432 \u043f\u0430\u043f\u043a\u0435 \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c \u043b\u044e\u0431\u043e\u0439 js-\u0444\u0430\u0439\u043b. \u042f \u043d\u0430\u0437\u0432\u0430\u043b \u0435\u0433\u043e <i>main.js<\/i>.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0444\u0430\u0439\u043b<i> rss_feeds.info<\/i> \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n<p>  <i>scripts[] = main.js<\/i><\/p>\n<p>  \u0412 \u0441\u0432\u043e\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u0435 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b jQuery. \u0412 <i>main.js<\/i> \u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u043a\u043d\u043e\u043f\u043a\u0438 \u00ab\u0412\u0432\u0435\u0440\u0445\u00bb. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0431\u044b\u043b\u043e \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"javascript\">(function ($) {  })(jQuery); <\/code><\/pre>\n<p>  \u0418 \u0432 \u044d\u0442\u043e\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u0438\u0448\u0435\u043c \u043a\u043e\u0434:<\/p>\n<pre><code class=\"javascript\">$.fn.extend({         topMouseover: function(self) {             this.on('mouseover',function() {                 self.opacity.stop().animate({opacity:&quot;1&quot;},300);                 self.button.stop().animate({opacity:&quot;1&quot;},300);             });         },         topMouseout: function(self) {             this.on('mouseout',function() {                 self.opacity.stop().animate({opacity:&quot;0&quot;},300);                 self.button.stop().animate({opacity:&quot;0.4&quot;},300);             });         },         wScroll: function(g) {             if(g == 0) this.removeClass(&quot;no-count&quot;);             if(!this.hasClass(&quot;no-count&quot;)){                 if(g &gt; 500 &#038;& this.is(&quot;:hidden&quot;)){                     this.addClass(&quot;visible&quot;);                     this.css(&quot;cursor&quot;,&quot;pointer&quot;);                     this.fadeIn(500);                     this.click(function(){                         $(&quot;body, html&quot;).animate({scrollTop:0},600);                         this.fadeOut(300);                         this.addClass(&quot;no-count&quot;);                     });                 }                 if(g &lt; 200 &#038;& this.hasClass(&quot;visible&quot;)){                     this.removeClass(&quot;visible&quot;);                     this.fadeOut(300);                 }             }else{                 this.unbind(&quot;click&quot;);             }         }     });      function toTopBtn(toTop, opacity, btn) {         this.toTopBtn = $(toTop);         this.opacity = $(opacity);         this.button = $(btn);         this.windowScroll();         this._init();         return this;     }      toTopBtn.prototype = {         _init: function () {             var self = this;             this.toTopBtn.topMouseover(self);             this.toTopBtn.topMouseout(self);         },         windowScroll: function() {             var g = $(window).scrollTop();             this.toTopBtn.wScroll(g);         }     }     $(document).ready(function() {         upButton = new toTopBtn(&quot;.toTopWrapper&quot;,&quot;.toTopOpacity&quot;,&quot;.toTopBtn&quot;);          $(window).scroll(function(){             upButton.windowScroll();         });     }); <\/code><\/pre>\n<p>  \u041d\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432 Drupal 7 \u0438\u0434\u0435\u0442 <i>jQuery 1.4.4<\/i>. \u0424\u0443\u043d\u043a\u0446\u0438\u044f <i>.on()<\/i> \u0432 \u043d\u0435\u0439 \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430. \u0414\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f jQuery \u0441\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u043c\u043e\u0434\u0443\u043b\u044c <i><a href=\"https:\/\/drupal.org\/project\/jquery_update\">Query Update<\/a><\/i>. \u0412 \u043d\u0435\u043c \u0432\u0441\u0435 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e. \u0412 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e (\u044f \u0432\u044b\u0431\u0440\u0430\u043b 1.8).<\/p>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043a\u043d\u043e\u043f\u043a\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u043b\u0430\u0441\u044c, \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u0444\u0430\u0439\u043b <i>rssfeeds_content.tpl.php<\/i>:<\/p>\n<pre><code class=\"php\">&lt;div class=&quot;toTopWrapper&quot;&gt; \t&lt;div class=&quot;toTopOpacity&quot;&gt;&lt;\/div&gt; \t&lt;div class=&quot;toTopPanel&quot; title=&quot;Up&quot;&gt; \t\t&lt;div class=&quot;toTopBtn&quot;&gt; \t\t\t&lt;span class=&quot;arrow&quot;&gt;\u2191&lt;\/span&gt; &lt;span class=&quot;label&quot;&gt;up&lt;\/span&gt; \t\t&lt;\/div&gt; \t&lt;\/div&gt; &lt;\/div&gt; &lt;br&gt;&lt;br&gt; &lt;?php foreach ($items-&gt;channel-&gt;item as $item): ?&gt; \t&lt;span class=&quot;title&quot;&gt;&lt;a href=&quot;&lt;?php echo $item-&gt;link; ?&gt;&quot;&gt;&lt;?php echo $item-&gt;title; ?&gt;&lt;\/a&gt;&lt;\/span&gt;&lt;br&gt;&lt;br&gt; \t&lt;?php echo $item-&gt;description; ?&gt;&lt;br&gt;&lt;br&gt;&lt;?php echo $item-&gt;pubDate; ?&gt; \t&lt;hr&gt;&lt;br&gt;&lt;br&gt; &lt;?php endforeach; ?&gt; <\/code><\/pre>\n<p>  \u2026 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0438\u043b\u0438 \u0432 main.css:<\/p>\n<pre><code class=\"css\">\/* &quot;TO UP&quot; BUTTON *\/  .toTopWrapper { \tposition:fixed; \ttop:0; \tbottom:0; \tleft:0; \twidth:7%; \tdisplay:none; \tbackground-color: #87ceeb; \topacity: 0.3; }  .toTopOpacity { \tposition:fixed; \ttop:0; \tbottom:0; \tleft:0; \twidth:7%; \tbackground-color: #87ceeb; \topacity: 0.1; } .toTopWrapper .toTopPanel { \twidth:100%; \theight:100%; \tfont-size:13px; \tcolor: black; \tpadding-top:10px; \tposition:relative; } .toTopWrapper .toTopBtn { \ttext-align:left; \tline-height:15px; \tmargin-left: 30%; \tfont-family:tahoma,arial,verdana,sans-serif; \tfont-weight:bold; \topacity: 0.2; } .toTopWrapper .toTopBtn .arrow{ \tfont-size:14px; \tfont-weight:bold; \tvertical-align:middle; }  \/* END OF &quot;TO UP&quot; BUTTON *\/ <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 RSS-\u043b\u0435\u043d\u0442\u044b \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043a\u043d\u043e\u043f\u043a\u0430 \u00ab\u0412\u0432\u0435\u0440\u0445\u00bb.<\/p>\n<h4>\u041b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f<\/h4>\n<p>  \u0412\u0441\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044b \u043c\u043e\u0434\u0443\u043b\u044f \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0435 <i>translations<\/i> \u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u0442 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0438\u0437 \u0434\u0432\u0443\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u2014 <i>modulename.pot<\/i> (\u044d\u0442\u043e \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430) \u0438 <i>modulename.po<\/i> (\u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0430\u043c \u043f\u0435\u0440\u0435\u0432\u043e\u0434). <\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044c <i><a href=\"https:\/\/drupal.org\/project\/potx\">Translation Template Extractor<\/a><\/i>. \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u044d\u0442\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <i>admin\/config\/regional\/translate<\/i> \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u043a\u043b\u0430\u0434\u043a\u0443 <i>EXTRACT<\/i>. \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0430\u0448 \u043c\u043e\u0434\u0443\u043b\u044c \u0438 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c <i>Extract<\/i>:<\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0448\u0430\u0431\u043b\u043e\u043d\u0430<i> rss_feeds.pot<\/i>, \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0435\u0433\u043e \u0432 \u043f\u0430\u043f\u043a\u0443 \u043c\u043e\u0434\u0443\u043b\u044f <i>translations<\/i>.<\/p>\n<p>  \u041f\u043e\u0442\u043e\u043c \u043f\u0440\u043e\u0434\u0435\u043b\u044b\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u0442\u043e \u0436\u0435, \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0430\u0432\u0438\u043c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u043d\u0430 <i>Template file for Russian translations<\/i> \u0438 \u0441\u0442\u0430\u0432\u0438\u043c \u0433\u0430\u043b\u043e\u0447\u043a\u0443 \u043d\u0430 <i>Include translations<\/i>. \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 <i>rss_feeds.ru.po<\/i> \u0432 \u044d\u0442\u0443 \u0436\u0435 \u043f\u0430\u043f\u043a\u0443.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044c .po-\u0444\u0430\u0439\u043b \u0438 \u0432\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0443\u0434\u0430 \u0441\u0432\u043e\u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044b. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043c\u043e\u0434\u0443\u043b\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u044f \u0437\u0430\u043a\u043e\u043d\u0447\u0443 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u0435\u0439 \u043d\u0430 \u0442\u0435\u043c\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043f\u043e\u0434 Drupal. \u041f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0439\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 Drupal&#8217;a, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0433\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0441\u0442\u043e\u0438\u0442 \u0443\u0437\u043d\u0430\u0442\u044c. \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u044d\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u043a\u043e\u043c\u0443-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u0443\u0442\u0438 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f Drupal. <\/p>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435!    \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/200382\/\"> http:\/\/habrahabr.ru\/post\/200382\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-200382","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/200382","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=200382"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/200382\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=200382"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=200382"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=200382"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}