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

Horoscope v.1.1 plugin for DLE 13.x and higher

4.7
(19)
6 comments
Platform
DLE
Platf. vers.
v.14.x
PHP version
7.2
Cron
Yes
Interface
Rus
Views
1 595

Capabilities

Beautiful horoscope output plugin for your website. The horoscope is parsed from the site horo.mail.ru. The plugin has a template that you can change for your site. And also this plugin add value to your site which is very important for the site.

The plugin parses data not every time your users view the site. You need to run the module file once a day (CRON) on your hosting.

With this simple plugin, you can display a horoscope on your website. This will add value to your site and it will be interesting for users of your site to read their horoscope for the period: yesterday, today, tomorrow, week, month, current year.

How does the plugin work?

The plugin parses the horoscope from horo.mail.ru and saves it to the engine/data folder in the data file on your website. Since the horoscope is updated every day. In order for the module to update the horoscope itself, you need to indicate in the "Task Schedule (cron)" on your hosting that the file https://site.com/cron-horoscope.php is launched once a day (preferably at midnight 0:00). A template is connected to the plugin so that you can stylize it for your website.

Installation

To bring the plugin to the site, just specify this line anywhere in the template:

{include file="engine/modules/horoscope/horoscope.php"}

Plugin template

The plugin provides a template for displaying a horoscope on your site. It is needed so that you yourself could modify the horoscope to the style of your site. When you install the plugin in the folder of your site template, the horoscope folder is created. The plugin template consists of the following files:

  • horoscope/main.tpl - Block output 12 signs of the zodiac;
  • horoscope/li-sign.tpl - The conclusion of a particular zodiac in the block "Horoscope";
  • horoscope/popup.tpl - PopUp of the selected horoscope.

Each of these files has its own set of tags (ShortCode).

main.tpl

  • {list-sign} - Output of zodiac signs in the format of buttons (12 zodiac signs);
  • [horoscope] text [/horoscope] - Display text if a horoscope is formed (saved to a file);
  • [not-horoscope] text [/not-horoscope] - Display the text if the horoscope has not yet been formed (there is no file on the site).

li-sign.tpl

  • {link-img} - Picture (utl) of the zodiac sign;
  • {name} - The name of the zodiac sign;
  • {date} - The period of the zodiac sign in the format: March 21 - April 19;
  • {dates} - The period of the zodiac sign in the format: 21.03 - 19.04;
  • [button] text [/button] - Wrap this tag with the text you need, this button when you click on it, the horoscope PopUp will open.

popup.tpl

  • {link-img} - Picture (url) of the zodiac sign;
  • {sort} - Horoscope sorting output: Yesterday, Today, Tomorrow, Week, Month, Current Year;
  • [forecast]{forecast}[/forecast] - Displays information for which period/date a horoscope is formed;
  • [title]{title}[/title] - Displays the horoscope title for a specific period;
  • [text]{text}[/text] - Horoscope text output;
  • [close] text [/close] - horoscope popup close button.

ShortCode (tags) [forecast], [title], [text] - Required

Screenshots

  • Comments 6
    You need to log in to comment
    1. User AAZ
      Добрый день, Дмитрий! Почему-то очень много ошибок выводит при запуске /cron-horoscope.php... Ошибки вида- Warning: file_get_contents(https://horo.mail.ru/prediction/aries/yesterday/): failed to open stream: HTTP request failed! HTTP/1.1 429 Too Many Requests in /var/www/1423/public_html/site.ru/engine/classes/horoscope.php on line 21
      1. User AAZ
        Для 14 версии тоже подходит?
      2. User mitya
        это предупредительная ошибка (она не кретична). Для 14 версии тоже подходит.
      3. User AAZ
        У вас на сайте гороскоп не выводит за сегодня последние 5 знаков зодиака.
      4. User mitya
        На этом сайте kaifovo.com в полной новости установлен этот плагин
    2. User mitya
      Да заметил, скорее что-то поменялось в верстке майла. Нужно смотреть