Username:
Password:
 Log me on automatically each visit
 
Aeroion.Ru
Форумы сервера Aeroion.Ru
Welcome

Aeroion.Ru Forum Index
  » Технические форумы
   » Поддержка и моды для phpBB2
    » Мод Zodiac/Horoscope add-on for Birthdays by TerraFrost
   знаки зодиака и гороскоп при просмотре темы и профиля пользователя
printer-friendly view
AuthorМод Zodiac/Horoscope add-on for Birthdays by TerraFrost
Sergey Gender:Male


Местный босс - администратор


Joined: 06 Jan 2005
Location: Оренбург
Posts: 1127
Last Visited: Today at 01:43
Кредиты: 3594
Reputation: 47
Age: 41
Zodiac: Aquarius Pig

Описание мода: Показывает знак зодиака для пользователя, указавшего дату рождения, при просмотре темы и профиля пользователя.
Версия мода: 1.0.3
Сложность установки: Легко
Время установки: ~10 минут

Примечание автора:

  • Мод является адд-оном к моду Birthdays Mod by TerraFrost.
  • В состав мода входит адд-он Horoscope (в папке contrib/horoscope), который выдает гороскоп пользователя на текущую/завтрашнюю дату при клике на изображении зодиака в профиле пользователя или при просмотре темы. Разработан по просьбе Peter77sx. Адд-он основан на Horoscopes block. Гороскоп запрашиватся с сайта Horoscopes.astrology.com и выдается на английском языке.
  • При разработке мода использован Birthday ADD-ON zodiac's by Niels и Birthday Zodiac Optimization by Xpert.


Download new_birthdays with zodiac.zip (19.42 KB). Added/Updated Tue 22 Feb, 2011 20:10. Downloaded 681 Time(s).
знаки зодиака и гороскоп при просмотре темы и профиля пользователя для мода Birthdays MOD by TerraFrost


_________________
Профессионал - это тот же дилетант, только знающий где ошибется. Генератор db_update.php для phpBB2 с некоторыми удобствами.
Как ставить моды. Что такое [SQL] и с чем его едят | Как правильно задавать вопросы и получать адекватные ответы | Правила форума
Бесплатная техподдержка только на форуме! Не надо стучаться в аську, слать емайлы, пытаться писать в приват. Спасибо за понимание.
Please do not PM, ICQ or email me for support help - you won't get any reply. If you have a question or issue, post it in the appropriate forum/topic. Thanks!
Back to topOffline View user's profile Skype Name
Sergey Gender:Male


Местный босс - администратор


Joined: 06 Jan 2005
Location: Оренбург
Posts: 1127
Last Visited: Today at 01:43
Кредиты: 3594
Reputation: 47
Age: 41
Zodiac: Aquarius Pig

+ Добавлен адд-он Horoscope (находится в папке contrib/horoscope).
В всплывающем окне выдает гороскоп пользователя на текущую дату при щелчке на изображении зодиака в профиле пользователя или при просмотре темы.
Пока гороскоп выдается на английском языке (Astrology.com).

_________________
Профессионал - это тот же дилетант, только знающий где ошибется. Генератор db_update.php для phpBB2 с некоторыми удобствами.
Как ставить моды. Что такое [SQL] и с чем его едят | Как правильно задавать вопросы и получать адекватные ответы | Правила форума
Бесплатная техподдержка только на форуме! Не надо стучаться в аську, слать емайлы, пытаться писать в приват. Спасибо за понимание.
Please do not PM, ICQ or email me for support help - you won't get any reply. If you have a question or issue, post it in the appropriate forum/topic. Thanks!
Back to topOffline View user's profile Skype Name
Sergey Gender:Male


Местный босс - администратор


Joined: 06 Jan 2005
Location: Оренбург
Posts: 1127
Last Visited: Today at 01:43
Кредиты: 3594
Reputation: 47
Age: 41
Zodiac: Aquarius Pig

Мод обновлён до версии 1.0.2
+ изменен код по мотивам Birthday Zodiac Optimization (спасибо Xpert'у)
+ пофиксены незначительные ошибки в шаблонах
+ изменена одна инструкция FIND для совместимости с Birthdays mod 2.0.2
+ внесены изменения в адд-он Horoscope для совместимости с текущей версией (файл обновления адд-она в каталоге contrib/horoscope/)

Файлы апдейта находятся в архиве мода в каталоге contrib/update_from_1.0.1a_to_1.0.2
После обновления и закачки файлов на сервер не забудьте запустить zodiac_update.php для обновления таблицы пользователей.

_________________
Профессионал - это тот же дилетант, только знающий где ошибется. Генератор db_update.php для phpBB2 с некоторыми удобствами.
Как ставить моды. Что такое [SQL] и с чем его едят | Как правильно задавать вопросы и получать адекватные ответы | Правила форума
Бесплатная техподдержка только на форуме! Не надо стучаться в аську, слать емайлы, пытаться писать в приват. Спасибо за понимание.
Please do not PM, ICQ or email me for support help - you won't get any reply. If you have a question or issue, post it in the appropriate forum/topic. Thanks!
Back to topOffline View user's profile Skype Name
smart2008 Gender:Male

Постоянный клиент


Joined: 20 Aug 2008
Posts: 36
Last Visited: Wed 30 Dec, 2009 10:57
Кредиты: 351
Reputation: 0


Такой вопрос, поставил мод Birthdays и знаки зодиака к ним. Но там условия стоят, что показывается знак зодиака, в том случае, если выставлен год рождения. Я думаю для знака зодиака не важно, какой год. Подскажите, пожалуйста, что нужно поменять, чтобы знаки зодиак показывались в сообщениях без указания года рождения.
Offtopic:
(Надеюсь суда написал)
Back to topOffline View user's profile
Sergey Gender:Male


Местный босс - администратор


Joined: 06 Jan 2005
Location: Оренбург
Posts: 1127
Last Visited: Today at 01:43
Кредиты: 3594
Reputation: 47
Age: 41
Zodiac: Aquarius Pig

Наверное, надо так

Code:
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php

#
#-----[ FIND ]------------------------------------------------
#
        if ( $age !== false )

#
#-----[ REPLACE WITH ]------------------------------------------------
#
        if ( ($postrow[$i]['user_birthday'] != 0) && ($postrow[$i]['birthday_display'] != BIRTHDAY_NONE) )
 

_________________
Профессионал - это тот же дилетант, только знающий где ошибется. Генератор db_update.php для phpBB2 с некоторыми удобствами.
Как ставить моды. Что такое [SQL] и с чем его едят | Как правильно задавать вопросы и получать адекватные ответы | Правила форума
Бесплатная техподдержка только на форуме! Не надо стучаться в аську, слать емайлы, пытаться писать в приват. Спасибо за понимание.
Please do not PM, ICQ or email me for support help - you won't get any reply. If you have a question or issue, post it in the appropriate forum/topic. Thanks!
Back to topOffline View user's profile Skype Name
smart2008 Gender:Male

Постоянный клиент


Joined: 20 Aug 2008
Posts: 36
Last Visited: Wed 30 Dec, 2009 10:57
Кредиты: 351
Reputation: 0


Спасибо, работает.
Я думаю это надо сделать по умолчанию в мод, т.к для знака зодиака не важен год.
Back to topOffline View user's profile
Sergey Gender:Male


Местный босс - администратор


Joined: 06 Jan 2005
Location: Оренбург
Posts: 1127
Last Visited: Today at 01:43
Кредиты: 3594
Reputation: 47
Age: 41
Zodiac: Aquarius Pig

Apxив c мoдoм пepeзaлил. Кому потребуется, могут сами рaскомeнтировaть cоотвeтcтвyющyю cтpoкy для viewtopic.php

_________________
Профессионал - это тот же дилетант, только знающий где ошибется. Генератор db_update.php для phpBB2 с некоторыми удобствами.
Как ставить моды. Что такое [SQL] и с чем его едят | Как правильно задавать вопросы и получать адекватные ответы | Правила форума
Бесплатная техподдержка только на форуме! Не надо стучаться в аську, слать емайлы, пытаться писать в приват. Спасибо за понимание.
Please do not PM, ICQ or email me for support help - you won't get any reply. If you have a question or issue, post it in the appropriate forum/topic. Thanks!
Back to topOffline View user's profile Skype Name
cavallino

Участник


Joined: 20 Dec 2009
Posts: 9
Last Visited: Tue 05 Jul, 2011 17:06
Кредиты: 78
Reputation: 0
Age: 32
Zodiac: Pisces Goat

Hello Sergey! I hope you can help.. cause probably you are the only one who can still fix this problem...
Recently the site astrology.com have changed the way to report horoscopes... therefore the contribution inside the mod package is not working anymore....
As you know, the file to call the variables is inside phpHoroscope.class.php!

Code:
<?php

if ( !defined('IN_PHPBB') )
{
    die('Hacking attempt');
}

define('base', 'http://horoscopes.astrology.com');
define('obase', base . '/daily');
define('ebase', base . '/dailylong');
define('qbase', base . '/dailyquick');

class phpHoroscope
{
    var $sign;
    var $date;
    var $quickie;
    var $extended;

    function phpHoroscope()
    {
        $this->sign = 'aquarius';
        $this->date = 'today';
        $this->quickie = FALSE;
        $this->extended = FALSE;
    }

    function safeSigns()
    {
        unset($safeSigns);
        return $safeSigns = array('aquarius', 'aries', 'cancer',
            'capricorn', 'gemini', 'leo', 'libra', 'pisces', 'sagittarius',
            'scorpio',    'taurus', 'virgo');
    }

    function safeDates()
    {
        unset($safeDates);
        return $dates = array('today', 'yesterday', 'tomorrow');
    }

    function setSign($signControl)
    {
        $signControl = strtolower($signControl);
        if (empty($signControl))
        {
            message_die(GENERAL_ERROR, 'Sign is undefined!');
        }
        if (in_array($signControl, $this->safeSigns()))
        {
            $this->sign = $signControl;
        }
        else
        {
            message_die(GENERAL_ERROR, $signControl . ' is not a valid sign!');
        }
    }

    function setDate($dateControl)
    {
        if (empty($dateControl))
        {
            message_die(GENERAL_ERROR, 'Error: date is undefined!');
        }
        if (in_array($dateControl, $this->safeDates()))
        {
            $this->date = $dateControl;
        }
        else
        {
            message_die(GENERAL_ERROR, $dateControl . ' is not a valid date!');
        }
    }

    function setQuickie()
    {
        $this->extended = FALSE;
        $this->quickie = TRUE;
    }

    function setExtended()
    {
        $this->quickie = FALSE;
        $this->extended = TRUE;
    }

    function setOverview()
    {
        $this->quickie = FALSE;
        $this->extended = FALSE;
    }

    function buildUrl()
    {
        if ($this->extended)
        {
            $url = ebase;
        }
        else if ($this->quickie)
        {
            $url = qbase;
        }
        else
        {
            $url = obase;
        }

        if ($this->date == 'today')
        {
            $url = $url . $this->sign . '.html';
        }
        else
        {
            $url = $url . $this->sign . substr($this->date, 0, 3) . '.html';
        }
        return $url;
    }

    function getHoroscope()
    {
        $url = $this->buildUrl();
          if (!$file = @file_get_contents($url))
          {
             message_die(GENERAL_ERROR, "Remote file '" . $url . "' couldn\'t be opened!");
          }
          if (preg_match("#<span id=\"intelliTxt\">(.*)</span>#siU", $file, $result))
          {
             $horoscope = $result[0];
          }
          else
          {
             $horoscope = '';
          }
            return $horoscope;
    }

    function displayHoroscope()
    {
        if (!empty($this->sign) && !empty($this->date))
        {
            if (in_array($this->sign, $this->safeSigns()) && in_array($this->date, $this->safeDates()))
            {
                echo $this->getHoroscope();
            }
            else
            {
                message_die(GENERAL_ERROR, 'Sign and/or date are not valid!');
            }
        }
        else
        {
            message_die(GENERAL_ERROR, 'Sign and/or date are undefined!');
        }
    }
}
?>


I tired to change
define('base', 'http://horoscopes.astrology.com');
in
define('base', 'http://www.astrology.com/horoscopes');

but nothing changes Sad
Can you help?

Thanks!

Posted after 11 hours 39 minutes 46 seconds:

Looking at their site.. if this might help, I noticed that they also use RSS feeds

Posted after 36 seconds:

so for example... http://feeds.astrology.co.....ilyquickie for Daily Quickie
http://feeds.astrology.co.....lyextended for Daily Extended
http://feeds.astrology.co.....lyoverview for Daily Overview...
Back to topOffline View user's profile
Sergey Gender:Male


Местный босс - администратор


Joined: 06 Jan 2005
Location: Оренбург
Posts: 1127
Last Visited: Today at 01:43
Кредиты: 3594
Reputation: 47
Age: 41
Zodiac: Aquarius Pig

cavallino, Надеюсь, пишу понятно, сможете перевести.
Я понял вас. Надо переписывать мод. Они кардинально изменили не только параметры вызова страниц, но и html-код.

_________________
Профессионал - это тот же дилетант, только знающий где ошибется. Генератор db_update.php для phpBB2 с некоторыми удобствами.
Как ставить моды. Что такое [SQL] и с чем его едят | Как правильно задавать вопросы и получать адекватные ответы | Правила форума
Бесплатная техподдержка только на форуме! Не надо стучаться в аську, слать емайлы, пытаться писать в приват. Спасибо за понимание.
Please do not PM, ICQ or email me for support help - you won't get any reply. If you have a question or issue, post it in the appropriate forum/topic. Thanks!
Back to topOffline View user's profile Skype Name
cavallino

Участник


Joined: 20 Dec 2009
Posts: 9
Last Visited: Tue 05 Jul, 2011 17:06
Кредиты: 78
Reputation: 0
Age: 32
Zodiac: Pisces Goat

Sergey I can't understand.. can you write it in english?
Maybe you said that phpbb2 support is over now? Crying or Very sad
Back to topOffline View user's profile
Sergey Gender:Male


Местный босс - администратор


Joined: 06 Jan 2005
Location: Оренбург
Posts: 1127
Last Visited: Today at 01:43
Кредиты: 3594
Reputation: 47
Age: 41
Zodiac: Aquarius Pig

cavallino,
I hope, I write understandably. Very Happy
It's necessary to alter this of MOD. They cardinally have changed not only parameters of call of pages, but also html-code.

_________________
Профессионал - это тот же дилетант, только знающий где ошибется. Генератор db_update.php для phpBB2 с некоторыми удобствами.
Как ставить моды. Что такое [SQL] и с чем его едят | Как правильно задавать вопросы и получать адекватные ответы | Правила форума
Бесплатная техподдержка только на форуме! Не надо стучаться в аську, слать емайлы, пытаться писать в приват. Спасибо за понимание.
Please do not PM, ICQ or email me for support help - you won't get any reply. If you have a question or issue, post it in the appropriate forum/topic. Thanks!
Back to topOffline View user's profile Skype Name
cavallino

Участник


Joined: 20 Dec 2009
Posts: 9
Last Visited: Tue 05 Jul, 2011 17:06
Кредиты: 78
Reputation: 0
Age: 32
Zodiac: Pisces Goat

Ah, yes now I understand Smile
Thanks! Smile Yes, they have changed a lot... but maybe the fact that they are using RSS now its a good thing for the future.. it will be hard now to change format again...
Take your time, and when you have time..you can look into the code better Smile
Back to topOffline View user's profile
cavallino

Участник


Joined: 20 Dec 2009
Posts: 9
Last Visited: Tue 05 Jul, 2011 17:06
Кредиты: 78
Reputation: 0
Age: 32
Zodiac: Pisces Goat

Sergey, you will never fix this mod? Rolling Eyes Sad Neutral Sad
Back to topOffline View user's profile
Sergey Gender:Male


Местный босс - администратор


Joined: 06 Jan 2005
Location: Оренбург
Posts: 1127
Last Visited: Today at 01:43
Кредиты: 3594
Reputation: 47
Age: 41
Zodiac: Aquarius Pig

Адд-он гороскопов адаптирован под новый дизайн www.astrology.com

Для обновления достаточно залить на сервер файлы:
copy horoscope.php to horoscope.php
copy horoscopes/phpHoroscope.class.php to horoscopes/phpHoroscope.class.php

----------------
Horoscopes add-on adapted was for the new design www.astrology.com

To update enough upload to your server the following files:
copy horoscope.php to horoscope.php
copy horoscopes/phpHoroscope.class.php to horoscopes/phpHoroscope.class.php

-------------------------
If you like this add-on, please consider a small donation. Thank you!
You can be put a few dollars to the account 4100187523564 on http://money.yandex.ru/
Exchange of virtual currency: http://www.roboxchange.com/ http://onlinechange.com/

_________________
Профессионал - это тот же дилетант, только знающий где ошибется. Генератор db_update.php для phpBB2 с некоторыми удобствами.
Как ставить моды. Что такое [SQL] и с чем его едят | Как правильно задавать вопросы и получать адекватные ответы | Правила форума
Бесплатная техподдержка только на форуме! Не надо стучаться в аську, слать емайлы, пытаться писать в приват. Спасибо за понимание.
Please do not PM, ICQ or email me for support help - you won't get any reply. If you have a question or issue, post it in the appropriate forum/topic. Thanks!
Back to topOffline View user's profile Skype Name
cavallino

Участник


Joined: 20 Dec 2009
Posts: 9
Last Visited: Tue 05 Jul, 2011 17:06
Кредиты: 78
Reputation: 0
Age: 32
Zodiac: Pisces Goat

You are absolutely great Sergey!!
Thanks so so much!! Razz Cool
Back to topOffline View user's profile
Display posts from previous:   

Summary Rating For >> Мод Zodiac/Horoscope add-on for Birthdays by TerraFrost
Average Rating: 0.00 :: Min Rating: 0 :: Max Rating: 0 :: Number of Ratings: 0
Choose Rating: 1   2   3   4   5  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Мод Chinese Zodiac add-on for Birthda...
знаки китайского зодиака при просмотр...
Sergey Поддержка и моды для phpBB2 16 Mon 26 Mar, 2007 21:50 View latest post
Leo
No new posts Мод Horoscope add-on for Birthday by ...
гороскоп пользователя при просмотре т...
Sergey Поддержка и моды для phpBB2 0 Sat 18 Mar, 2006 15:55 View latest post
Sergey
No new posts Локализация и описание мода Birthdays...
день рождения в профиле пользователя
Sergey Поддержка и моды для phpBB2 32 Wed 17 Jun, 2009 04:56 View latest post
zhserg
No new posts Мод Birthdays by TerraFrost add-on Ex...
ранг для пользователей, празднующих д...
Sergey Поддержка и моды для phpBB2 0 Wed 07 Feb, 2007 13:53 View latest post
Sergey
No new posts Как в моде Birthdays by TerraFrost в ... paha Поддержка и моды для phpBB2 1 Mon 16 Jun, 2008 07:12 View latest post
Sergey




All times are UTC + 3 Hours
All times are synchronized with the forum server time
Users browsing this topic:
Registered Users: None

Jump to:   
printer-friendly view
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum