Hello! We did not recognize you :)
Or with your social network

Plugin FavoritesPRO v.2 for CMS DLE 13.x and higher

Home » Plugins » Plugins for DLE » Plugin FavoritesPRO v.2 for CMS DLE 13.x and higher
4.4
(42)
15 comments
1400$
Buy
Open source and not tied to a domain
Platform
DLE
Platf. vers.
v.14.x
PHP version
7.2
Interface
Ru
Views
5 529

Capabilities

Hello, I’ll start with the problem that made me write this plugin. As you understand from the name, this plugin is dedicated to the add or remove button from bookmarks on the site. I had a need to do it so that adding or removing bookmarks worked on Ajax technology. Yes in DLE there is already a standard output {favorites} of this button.

But the problem is that this is all tailored to one kind of button for the whole site, and I want several of these types. I don’t want to use [favorites] text [/favorites] because a pop-up window will already be triggered there.

The solution of the problem

I developed a plugin that adds a new {favoritespro} tag with the following parameters:

  • imgplus – specify the address of the picture when adding to bookmarks on the site;
  • imgminus – specify the address of the picture when deleting from bookmarks;
  • titleplus – specify a hint when adding to bookmark the site;
  • titleminus – specify a hint when hovering to remove from bookmarks.

Usage example:

{favoritespro imgplus="/img/ic-like.svg" imgminus="/img/ic-like-a.svg" titleplus="Add to Desired" titleminus="Remove from desired"}

And so we ourselves indicate which pictures for these buttons will be used and tips. This tag will work in summary (shortstory.tpl), the entire article (fullstory.tpl) and in custom templates from the {custom} tag.

If the tag {favoritespro} is without parameters, then the tips will be pulled from DLE. The plugin has standard images for this button.

Latest update

03.07.2020

  • Added caption to the button on the right
Comments 15
You need to log in to comment
  1. User Smoki
    Скажите а как можно добавить текст рядом с выводимой иконкой?
    1. User mitya
      Такой возможности нет, в новой версии добавлю
    2. User Smoki
      А когда приблизительно можно ожидать?
    3. User mitya
      Через пару недель
  2. User Smoki
    Новой версии еще нету ?
  3. User Smoki
    Спасибо большое за плагин
  4. User Андрей Какурин
    Здравствуйте.Поставил ваш плагин,а вывести как в новость?У меня чего то не появляется.Помогите пожалуйста.
  5. User Андрей Какурин
    при уставноке кода со странички появляется только надпись добавить в желаемые и все.
    1. User mitya
      Здравствуйте, в шаблоне нужно убрать стандартный {favorites} и заменить на {favoritespro imgplus="/img/ic-like.svg" imgminus="/img/ic-like-a.svg" titleplus="Добавить в желаемые" titleminus="Убрать из желаемых"}
  6. User Иннокентий Данилов
    Можно вывести список закладок в aside? и их кол-во
    1. User mitya
      функционал описан в описании плагина
  7. User lekskokori
    Жалко что плагин на DLE 14.3 уже не работает(
    Теперь строчек
    $fav_arr = explode( ',', $member_id['favorites'] );
    нет в файлах
    1. User mitya
      В каком именно файле, у меня стоит на сайте этот плагин и некаких проблем нет, сейчас на этом сайте версия DLE 15.0
    2. User lekskokori
      В файлах engine/modules/show.short.php и engine/modules/show.custom.php этих строчек теперь не существует.
      Я про DLE 14.3., также как и в DLE 15.0 и последующих версиях.

      Но к слову без этих строк он работает, тогда зачем эти строки вообще нужны?)

      if( strpos( $tpl->copy_template, "{favoritespro" ) !== false ) {
      $favoritesPro = new favoritesPro($row['id']);
      $tpl->copy_template = preg_replace_callback( "#\\{favoritespro(.+?)\\}#i", array($favoritesPro, "callback"), $tpl->copy_template );
      }
      $imgMinus = $config['http_home_url']."templates/{$config['skin']}/dleimages/minus_fav.png";
      $imgPlus = $config['http_home_url']."templates/{$config['skin']}/dleimages/plus_fav.png";
      $titleMinus = $lang['news_minfav'];
      $titlePlus = $lang['news_addfav'];

      if( ! in_array( $row['id'], $fav_arr ) ) {
      $tpl->set( '{favoritespro}', "<a id=\"fav-id-{$row['id']}\" href=\"$PHP_SELF?do=favorites&amp;doaction=add&amp;id={$row['id']}\"><img src=\"{$imgPlus}\" onclick=\"doFavoritesPro('{$row['id']}', 'plus', '{$imgMinus}', '{$imgPlus}', '{$titleMinus}', '{$titlePlus}'); return false;\" title=\"{$titlePlus}\" alt=\"\"><span>{$titlePlus}</span></a>" );
      } else {
      $tpl->set( '{favoritespro}', "<a id=\"fav-id-{$row['id']}\" href=\"$PHP_SELF?do=favorites&amp;doaction=del&amp;id={$row['id']}\"><img src=\"{$imgMinus}\" onclick=\"doFavoritesPro('{$row['id']}', 'minus', '{$imgMinus}', '{$imgPlus}', '{$titleMinus}', '{$titlePlus}'); return false;\" title=\"{$titleMinus}\" alt=\"\"><span>{$titleMinus}</span></a>" );
      }
    3. User mitya
      Обновил, в описании плаина найдете ссылку на новую версию