Добрый день! Скажите, можно ли в плагине устанавливать период, через который станет доступен скрытый материал? Например, я хочу, чтобы матер

  • Алла Иванова
  • Алла Иванова's Avatar Topic Author
  • Visitor
10 years 5 months ago - 10 years 5 months ago #3022 by Алла Иванова
Добрый день! Скажите, можно ли в плагине устанавливать период, через который станет доступен скрытый материал? Например, я хочу, чтобы материал стал доступен через 3 часа после опубликования ссылки в соцсети. Иначе пользователи удаляют ссылку сразу после получения доступа к файлам.
Last edit: 10 years 5 months ago by Алла Иванова.

Please Log in or Create an account to join the conversation.

  • JoomLine
  • JoomLine 's Avatar
  • Visitor
10 years 5 months ago - 10 years 5 months ago #3023 by JoomLine
К сожалению такую функцию нельзя реализовать. Так как мы вычисляем разницу между лайками. Через 3 часа вычислить правильно не представляется возможным. Да и зная психологию человека, если вдруг кому, то надо удалить ссылку со своей страницы, он все равно ее удалит и через три часа и через день.
Last edit: 10 years 5 months ago by JoomLine .

Please Log in or Create an account to join the conversation.

  • Алла Иванова
  • Алла Иванова's Avatar Topic Author
  • Visitor
10 years 5 months ago - 10 years 5 months ago #3024 by Алла Иванова
Last edit: 10 years 5 months ago by Алла Иванова.

Please Log in or Create an account to join the conversation.

More
10 years 5 months ago - 10 years 5 months ago #3025 by Андрей Кривошеин
Честно говоря не понятно... Возможно сам вопрос не ясный. Расскажу более развернуто:
1) В материалах я использую стандартные ссылки Joomla 3 clip2net.com/s/ib2Ncu
2) в шаблоне они выводятся при помощи подключения файла шаблона <?php echo $this->loadTemplate('links'); ?>

Как мне подключать мои ссылки с использованием этого плагина?
{jllikelock}<?php echo $this->loadTemplate('links'); ?>{/jllikelock} естественно не работает
Last edit: 10 years 5 months ago by Андрей Кривошеин.

Please Log in or Create an account to join the conversation.

  • JoomLine
  • JoomLine 's Avatar
  • Visitor
10 years 5 months ago - 10 years 5 months ago #3026 by JoomLine
$this->loadTemplate('links') = str_replace('str_replace',$var_text,$this->item->text); - это вставить в переопределенный шаблон материалов.
/templates/ваш шаблон/html/com_content/article/default.php
{jllikelock}str_replace{/jllikelock} - это вставить непосредственно в редактор в материале.
По идее должно работать...
Last edit: 10 years 5 months ago by JoomLine .

Please Log in or Create an account to join the conversation.

More
10 years 5 months ago - 10 years 5 months ago #3027 by Андрей Кривошеин
Нет, вставляю $this->loadTemplate('links') = str_replace('str_replace',$var_text,$this->item->text); - выводится белый экран...

К тому же, в данном случае мне придется в каждом материале указывать вывод ссылок, что очень хлопотно :(

Возникла такая идея:
1) В шаблоне материала подключаем файл плагина, который будет прятать наши ссылки
2) В этом файле плагина, мы подключаем файл ссылок и соответствующую вёрстку
3) Включаем в настройках автодобавление и делаем, что бы оно не прятало текст, только выводила ссылки в конце материала.

Понимаю, что потом нельзя будет прятать отдельный текст - что ж... Я готов пожертвовать этим, т.к. покупал плагин именно для ссылок
Last edit: 10 years 5 months ago by Андрей Кривошеин.

Please Log in or Create an account to join the conversation.

  • JoomLine
  • JoomLine 's Avatar
  • Visitor
10 years 5 months ago - 10 years 5 months ago #3028 by JoomLine
Не будет работать так как шаблон материала вызывается по другому событию нежели материал. Внес в трекер задач на развитие.
Но рекомендую вам создать еще дополнительно тикет с запросом такой функции joomline.net/helpdesk.html.
Last edit: 10 years 5 months ago by JoomLine .

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum

Last from the forum

    • After searching the house and finding nothing, Sam...
    • One day, a curious boy named Sam moved into the house with his family. As he explored the property, he noticed a rusty, old key lying under a bush. Sam picked it up, wondering what it might unlock. After searching the house and finding nothing, Sam decided to try the key on the garden gate. To his surprise, the key fit perfectly. With a turn of the key and a creak of the hinges, the gate slowly swung open. Inside the garden, Sam was greeted by a sight of wonder. The garden was overgrown but full of vibrant flowers, exotic plants, and a small, sparkling pond. In the middle of the garden stood a beautiful stone statue of a unicorn. As Sam explored further, he discovered a small plaque next to the statue. It read: "To whoever finds this garden, may you always find joy in the beauty of nature and the magic of discovery." Sam spent hours in the garden, exploring every corner and marveling at the hidden beauty. The garden seemed to have a magical quality that made Sam feel at peace and incredibly happy. From that day on, Sam made it a habit to visit the garden every day, taking care of it and sharing its beauty with his friends and family. The once-forgotten garden became a place of joy and wonder for everyone who visited. And so, Sam learned that sometimes, the greatest treasures are not just the secrets we uncover but the beauty and joy we find in them.
    • In Component / Afisha Joomla
    • how to get sponsored for running
    • <!--td {border: 1px solid #cccccc;}br {mso-data-placement:same-cell;}-->I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article. <!--td {border: 1px solid #cccccc;}br {mso-data-placement:same-cell;}-->
    • In Component / JL Weather
    • One day, a curious boy named Sam moved i
    • One day, a curious boy named Sam moved into the house with his family. As he explored the property, he noticed a rusty, old key lying under a bush. Sam picked it up, wondering what it might unlock. After searching the house and finding nothing, Sam decided to try the key on the garden gate. To his surprise, the key fit perfectly. With a turn of the key and a creak of the hinges, the gate slowly swung open. Inside the garden, Sam was greeted by a sight of wonder. The garden was overgrown but full of vibrant flowers, exotic plants, and a small, sparkling pond. In the middle of the garden stood a beautiful stone statue of a unicorn. As Sam explored further, he discovered a small plaque next to the statue. It read: "To whoever finds this garden, may you always find joy in the beauty of nature and the magic of discovery." Sam spent hours in the garden, exploring every corner and marveling at the hidden beauty. The garden seemed to have a magical quality that made Sam feel at peace and incredibly happy. From that day on, Sam made it a habit to visit the garden every day, taking care of it and sharing its beauty with his friends and family. The once-forgotten garden became a place of joy and wonder for everyone who visited. And so, Sam learned that sometimes, the greatest treasures are not just the secrets we uncover but the beauty and joy we find in them.  
    • In Component / JL TV
© 2010- JoomLine
The Joomla!® name is used under a limited license from Open Source Matters in the United States and other countries. joomline.net is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.

email: This email address is being protected from spambots. You need JavaScript enabled to view it.