The situation is this: the widget "VK.MneI Like" was put on the site.

There the URL of the page on which it is located is automatically inserted and therefore it turns out that for each page there is a different counter ...

How to fix it NOW? Because setting the page_id = УРЛ_ГЛАВНАЯ parameter page_id = УРЛ_ГЛАВНАЯ not enough, because it leads to the reset of the counter (I don’t see the page or I’m pointing to the wrong page).

Quote from contact

The ID of the page on your site. Integer 32 bit number. It is used if the same article can have several addresses, as well as on dynamic sites that only have a hash. The default value is a checksum from location.href.

The question is, in fact, how the generates this page_id to substitute the main id there (so that the counter is the main one for all pages) - well, actually solve the problem

Give a sad formula (on php for smarti)

 {php}echo crc32('http://мойсайт.ru/');{/php} 

does not work.

  • nobody knows? - armenka
  • Similar question. How is this page_id default? - user9023

1 answer 1

As I understand it, this may be useful to you:

If anyone else is interested, faced the same problem, there was a domain on it there were 5k comments, then the site moved to the domain, the problem was all decided to save openi.js to your site and replacing a couple of lines, pData.url with pData.url.replace("","") , in total on the new site we load old comments.

By analogy, you can also do:

 pData.url.replace(location.href, ""); 
  • you did not understand) or I did not understand. I do not need to replace the principle. I need to insert the same URL on the counter like this ... I try to set the website address (with / without www http: // /) does not help anything, so I’m thinking how to find out the page_id of the main page to insert it fixed into the template and everything. because I need one like on all pages - armenka