Answer the question
In order to leave comments, you need to log in
How to get a unique joomla material id for VK comments?
I install VK comments on Joomla. But not on a simple Joomla, but on CCK (cobalt 7).
Plus, the built-in cobalt comments are already installed.
And this same cobalt generates a bunch of duplicate urls: when you add a comment, when you delete it, even when you log in / out, the same material gets a new url. From an SEO point of view, duplicates do not scare me (for now), because the site is for internal use. But there is another problem: VK comments take its url as a unique page id. And the pandemonium begins: I went to the page - there are VK comments. Logged in - the url changed, they disappeared, others appeared, which were left in a logged in state, and so on. 4 different states revealed)
In general, the question is simple: how can you get and pass a unique material id to the vk script using js? I would be grateful for any help, because this Joomla got me (((
Answer the question
In order to leave comments, you need to log in
In general, I decided myself. I don't know why I didn't come up with it right away)
<?php $id_mat = $this->item->id; ?>
Make a redirect after authorization to the page from which an unauthorized user originally came to it. And it's better to use one page, one url for articles, regardless of whether it's a random person or user.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question