News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Zodiac Starsigns

Started by koji, November 14, 2006, 09:04:04 PM

Previous topic - Next topic

koji

Link to Mod
Rate this Mod

If a member has supplied their birth date, then their starsign will be displayed on their Profile page and by each of their Posts (under their avatar).

The starsigns are displayed as an image icon.

The HTML title attribute is used to display a string of words that describe a typical person of the relevant starsign.

TechnoDragon

Thank you...this was the part of your original mod that I wanted!
Don't tell me to get into shape...I have a shape...It is round!


DomDom Skye

Hello

Thx a lot for your mod.
I use SMF 1.09 and the install was well, but I've no starsign under my avatar in post, only in profile.
Could you help?
My forum:
-> http://www.john-howe.com/forum/

Thx a lot in advance.
Regards, Dominique

beejay

I have the same problem with djavet. I use SMF 1.12 and the install was well, but I've no starsign under my avatar in post.

Marianita

Im using a theme diferent than default (when i test it in a default themes it goes ok) and it gives me these errors when trinig to install:

1. Execute Modification zodiac_starsigns.xml Modification parse error
2. Execute Modification - Modification parse error
3. Extract Tree ./Themes/default/images/zodiac


???? Any ideas???

hotjunkie

Any plans to make this mod compatible for 1.1.2? I know my members would love it. ;)

Marianita

Finally i installed it in 1.1.2 . I did it manually , it works fine.  :)

rastarasta

I have got the same 'no images in posts' problem.

If I right click on the img on a profile the correct path to the images is shown.
If I right click on the red x on the profile the path has /index.php/image_directory which I guess is why it isn't working !! I just dont know what is creating the extra index.php ???

rastarasta

ok I have managed to solve the problem by changing the code in subs.php

For the moon signs change this

$seal_src = 'Themes/global_images/13moon/seal_' . str_pad($signDays, 2, '0', STR_PAD_LEFT). '.gif';

$tone_src = 'Themes/global_images/13moon/tone_' . str_pad($toneName, 2, '0', STR_PAD_LEFT). '.gif';


To this

$seal_src = 'http://www.YOUR_FORUM_PATH.com/Themes/global_images/13moon/seal_' . str_pad($signDays, 2, '0', STR_PAD_LEFT). '.gif';

$tone_src = 'http://www.YOUR_FORUM_PATH.com/Themes/global_images/13moon/tone_' . str_pad($toneName, 2, '0', STR_PAD_LEFT). '.gif';


and for the star signs change this

$img = '<img src="Themes/global_images/zodiac/'.strtolower($zodiac).'.gif" width="15" height="15" style="margin-bottom:2px;" alt="'.$zodiac.'" title="'.$words.'" />';


to this

$img = '<img src="http://www.YOUR_FORUM_PATH.com/Themes/global_images/zodiac/'.strtolower($zodiac).'.gif" width="15" height="15" style="margin-bottom:2px;" alt="'.$zodiac.'" title="'.$words.'" />';

hadesflames

u should make it so that next to the image it says which sign it is. like next to capricorn sign it says capricorn. i mean for the posts. u can also make it so that its optional to do that

Meira

Hello, I installed that mod in my forum of version 1.1.2 and theme Default, but it is not usually working. When installing, the images of the signs don't appear in the profile and nor in the messages of the topics. 
What can she make to solve that problem? 
 
I wait for an answer. 
Thank you very much!
Fórum PC Gamers venha fazer parte.
(Come to do part.)

L'AltroWeb

#11
Quote from: rastarasta on March 19, 2007, 09:03:22 AM
ok I have managed to solve the problem by changing the code in subs.php ...
Instead of entire url you can sample modify from:
<img src="Themes/default/images/zodiac/
to
<img src="/forum/Themes/default/images/zodiac/

My forum path is forum!
-
PS i have modify display.template.php and i have put code of modification here...
         // This shows the popular messaging icons.
         echo '
                        ', $message['member']['icq']['link'], '
                        ', $message['member']['msn']['link'], '
                        ', $message['member']['aim']['link'], '
                        ', $message['member']['yim']['link'], '<br />';

         // Show Zodiac starsign?
         if (isset($message['member']['birth_date']))
         {
            list ($birth_year, $birth_month, $birth_day) = sscanf($message['member']['birth_date'], '%d-%d-%d');
            $zodiac = getZodiac($birth_day, $birth_month);
            echo '
                           <div style="width:100%;" />', $zodiac['img'], '';
         }

         // Show the profile, website, email address, and personal message buttons.
see result  :)
http://darkwolf.altervista.org/forum/index.php?topic=5.msg10#msg10
PS for best result modify also Subs.php
   $img = '<img src="Themes/default/images/zodiac/'.strtolower($zodiac).'.gif" width="15" height="15" style="vertical-align:middle;" alt="'.$zodiac.'" title="'.$words.'" />'; to
   $img = '<img src="Themes/default/images/zodiac/'.strtolower($zodiac).'.gif" width="15" height="15" alt="'.$zodiac.'" title="'.$words.'" />';  ;)
PPS sorry for my bad english  :-[
-
I have make the same modification to PersonalMessage.template.php  ;)

Meira

#12
It is not giving right also in my forum... why will be?

It is going the files enclosed "display.template.php and subs.php", analyze and verify what it is wrong, please.
Fórum PC Gamers venha fazer parte.
(Come to do part.)

Kindred

Quote from: rastarasta on March 19, 2007, 09:03:22 AM
ok I have managed to solve the problem by changing the code in subs.php

For the moon signs change this

$seal_src = 'Themes/global_images/13moon/seal_' . str_pad($signDays, 2, '0', STR_PAD_LEFT). '.gif';

$tone_src = 'Themes/global_images/13moon/tone_' . str_pad($toneName, 2, '0', STR_PAD_LEFT). '.gif';


To this

$seal_src = 'http://www.YOUR_FORUM_PATH.com/Themes/global_images/13moon/seal_' . str_pad($signDays, 2, '0', STR_PAD_LEFT). '.gif';

$tone_src = 'http://www.YOUR_FORUM_PATH.com/Themes/global_images/13moon/tone_' . str_pad($toneName, 2, '0', STR_PAD_LEFT). '.gif';


and for the star signs change this

$img = '<img src="Themes/global_images/zodiac/'.strtolower($zodiac).'.gif" width="15" height="15" style="margin-bottom:2px;" alt="'.$zodiac.'" title="'.$words.'" />';


to this

$img = '<img src="http://www.YOUR_FORUM_PATH.com/Themes/global_images/zodiac/'.strtolower($zodiac).'.gif" width="15" height="15" style="margin-bottom:2px;" alt="'.$zodiac.'" title="'.$words.'" />';


BTW: There is no need to hardcode the url... you should use one of the SMF variables to fix the display of the images.   I'll post the corrected code his weekend when I get back to my development machine.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Meira

Thank you, I will wait on the weekend for the correct code to do the images of the signs they appear at my forum. 
 
Thankful,   
Meira.
Fórum PC Gamers venha fazer parte.
(Come to do part.)

Meira

Hi, Kindred.

I am waiting as it is done to apply the modification so that the images of the signs appear in the profiles and messages. 
Fórum PC Gamers venha fazer parte.
(Come to do part.)

Kindred

hmmm....   my function does not call for seal_src, it calls for seal_pic..

but anyway...   replace the call for the hardcoded url to this:

$settings['default_images_url'] . '/13moon/seal_'
i.e.

$seal_pic = $settings['default_images_url'] . '/13moon/seal_' . str_pad($signDays, 2, '0', STR_PAD_LEFT). '.gif';

$tone_pic = $settings['default_images_url'] . '/13moon/tone_' . str_pad($toneName, 2, '0', STR_PAD_LEFT). '.gif';

$tone_img = '<img src="'.$tone_pic.'" width="25" height="21" alt="'.$theTone.'" title="'.$theTone.': '.$toneInfo.'" />';

$seal_img = '<img src="' . $seal_pic . '" width="21" height="21" alt="'.$signName.' - '. $signDesc[$signDays] .'" title="'.$signName.' '. $signDesc[$signDays] .'" />';

for the seal stuff and

$img = '<img src="'.$settings['default_images_url'] . '/zodiac/'.strtolower($zodiac).'.gif" width="15" height="15" style="margin-bottom:2px;" alt="'.$zodiac.'" title="'.$words.'" />';

for the zodiac stuff.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Meira

The sign is only appearing in my profile and in my messages, but the one of the other users doesn't appear.&nbsp; &nbsp;
I am him passing the file SUBS.PHP to analyze it for me, please.

I only use the mod " Zodiac Starsigns ", that just places the signs in the profile and in the messages... doesn't have anything of moons.
Fórum PC Gamers venha fazer parte.
(Come to do part.)

fakeDecoy

It's a great mod, but the Zodiac signs are inaccurate. July 23 gives Cancer, and it should be Leo. Or is it going by Vedic astrology? If so, any way to adjust it to Western?

Kindred

Quote from: Meira on July 09, 2007, 11:07:08 PM
The sign is only appearing in my profile and in my messages, but the one of the other users doesn't appear.&nbsp; &nbsp;
I am him passing the file SUBS.PHP to analyze it for me, please.

I only use the mod " Zodiac Starsigns ", that just places the signs in the profile and in the messages... doesn't have anything of moons.

Meira,

What would the subs.php have to do with this?
If it works for you and not for one user... it might be that the user did not enter a birth date?

Quote from: fakeDecoy on August 05, 2007, 12:16:56 AM
It's a great mod, but the Zodiac signs are inaccurate. July 23 gives Cancer, and it should be Leo. Or is it going by Vedic astrology? If so, any way to adjust it to Western?

Different groups, even in Western astrology interpret the cusp as different dates as well...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

fakeDecoy

#20
Quote from: Kindred on August 05, 2007, 08:23:06 AM
Different groups, even in Western astrology interpret the cusp as different dates as well...


The Western dates have a strict standard from what I've seen, and it's only very few people in the Western world using anything else, or Vedic astrology. I'm sure there are other interpretations, but wouldn't it make sense to use what 99.999% of forum administrators and users are familiar with?

Kindred

except, I don't believe that the original author is from the western world.

and, no...  if you look at the daily newpaper, different papers even use different dates for each sign... ranging from the 19th through the 23rd as the change-over to the next sign...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

TrueSatan

(mutters quietly to avoid being drawn into argument)

Post installing the mod in Source directory find Subs.php find this code and edit it to your particular requirements:

{
case 1: $zMonth = '9:10'; $limit = 20; break;
case 2: $zMonth = '10:11'; $limit = 20; break;
case 3: $zMonth = '11:0'; $limit = 21; break;
case 4: $zMonth = '0:1'; $limit = 21; break;
case 5: $zMonth = '1:2'; $limit = 22; break;
case 6: $zMonth = '2:3'; $limit = 23; break;
case 7: $zMonth = '3:4'; $limit = 24; break;
case 8: $zMonth = '4:5'; $limit = 24; break;
case 9: $zMonth = '5:6'; $limit = 24; break;
case 10: $zMonth = '6:7'; $limit = 23; break;
case 11: $zMonth = '7:8'; $limit = 23; break;
case 12: $zMonth = '8:9'; $limit = 23; break;
}

perplexed

is there a way to not have this text display on posts and only in profiles, there's enough stuff on the posts at the moment?  I would like only the sign on the posts, and the text about the sign in the profiles.


I would quite like one for chinese astrology but since it depends on the year of birth instead of month, that would be quite a big list :(

Kindred

You can alter the display in display.template.php
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

fakeDecoy

Quote from: perplexed on August 06, 2007, 05:00:40 AM

I would quite like one for chinese astrology but since it depends on the year of birth instead of month, that would be quite a big list :(

That sounds cool too. It wouldn't be a big list - it would just do the math, the same as you would to figure out what sign someone born in 1923 is.

perplexed

@ kindred - thanks Kindred :)

@ fakedecoy - yeah but the chinese astrology is based on a lunar year I think, and Chinese new year is a different date each year, so if you were born in 1923 you could be a dog or a pig depending which month you were born

koji

Sorry everyone.

When a mod is submitted it automatically creates a forum thread like this - but it doesn't automatically send Notifications of Replies. So I only just saw this thread.

If you downloaded an early version of the mod, I may have been working on it still, so I would recommend that everyone uninstall it and install the latest version. I updated the code a few weeks ago (fixed a few bugs).

BTW I am "from the Western world"! Born and bred in the UK

Hmm I can't remember where I got the dates from. If anyone can suggest an ultimately accurate source, let me know.

I would love to incorporate the Chinese Astrology but I know nothing about it. I'll code it if someone explains it!

fakeDecoy

#28
hxxp:en.wikipedia.org/wiki/Zodiac [nonactive]

See the table halfway down the page. This one is accurate - Any others you find that are very similar but off by a day or two here and there were meant to follow the tropical zodiac but simply are from sources that didn't write them down correctly - it's not a matter of different astrological calculations, just sloppiness.

The tropical zodiac is the common Western one. The only other similar one in significant use, to my knowledge, that isn't a result of copying errors is the sidereal or "Vedic " zodiac, listed alongside that in the table.

Edit: But the Chinese zodiac would be cool to see too!

Manu.G

I have installed the Zodiac Starsigns mod, everything works good.
The image in the profile is to see, but not the image profile by the postings to see.
It seems it's an error in the Subs.php, but I don't know what error.

When I check the URL of the images I can see this:
http://forum.arseniums.com/index.php/Themes/default/images/zodiac/pisces.gif

Isn't it this the correct address to the images?
http://forum.arseniums.com/Themes/default/images/zodiac/pisces.gif

What must I change to show the images correct?
Version SMF 2.0.8
SimplePortal 2.3.5

koji

Hi,

Are you using the latest version of the mod (1.1) ?

Manu.G

I loaded down the mod yesterday.

QuoteLast Modified:     15-08-2007, 02:26:44
Latest Version:     1.1
Version SMF 2.0.8
SimplePortal 2.3.5

koji

Hmm.

The image path is hard-coded, so it should work. Are you using mod_rewrite or anything like that?

Oh wait, are you using the Turkish version?

Manu.G

I don't use mod_rewrite and I don't use the turkish version, I use the English one.
Version SMF 2.0.8
SimplePortal 2.3.5

koji

Ok. I think the false image path is because of something to do with your server. I think you could fix it by changing what you have set for your main board address. At the moment you have it as something like :

http://forum.arseniums.com/index.php

If you change that to:

http://forum.arseniums.com/

... then the images should work (both those addresses point to the same place, the index.php file is displayed automatically).

But I should use an absolute path for the images anyway. Ill try to make that change ASAP and upload it by tomorrow, hopefully. ;)

Sorry for any inconvenience!

Kindred

NO!  You should not use an absolute or hardcoded path...

you should be using the theme directory and/or image directory variables.

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

koji

Well I was, but evidently it leads to problems for some people. I don't see what's so bad about using an absolute path to the theme/image directory?

I mean something like:

$path
= $boarddir . PATH_SEPARATOR . $settings['default_images_url'] .  PATH_SEPARATOR . 'path/to/image.gif';

I just need to work out which SMF variable contains the main board address.

Manu.G

So, what must I do to show the images in the profile by the postings?
I'm not php confirm.  :'(
Version SMF 2.0.8
SimplePortal 2.3.5

koji

Hey Manu, I just looked at your forum and the zodiac images seem to be working! Is it ok now?

Manu.G

Yes, now it's ok.

I changed the Subs.php and insert the code:
Quote$img = '<img src="http://www.arseniums.com/Themes/default/images/zodiac/'.strtolower($zodiac).'.gif" width="15" height="15" style="margin-bottom:2px;" alt="'.$zodiac.'" title="'.$words.'" />';

And it works.
I saw the code at page 1 of this topic.
When I copied the code as it is shown here, it wont work. I checked it cause here the code is
Quote$img = '<img src="http://www.YOUR_FORUM_PATH.com/Themes/global_images/zodiac/'.strtolower($zodiac).'.gif" width="15" height="15" style="margin-bottom:2px;" alt="'.$zodiac.'" title="'.$words.'" />';

I saw something was missing. The folder "default" was missing after "Themes" and  "global_images". After I insert "default" the zodiacs in the profiles by the postings were shown. ;)

But I think you have to check the code in the Subs.php, and maybe you can find a way not to use direct path. ;)

Thanks for help :)
Version SMF 2.0.8
SimplePortal 2.3.5

Kindred

Manu,

A little lower down on the page...

Quote from: Kindred on July 09, 2007, 12:38:38 PM
but anyway...   replace the call for the hardcoded url to this:

$settings['default_images_url'] . '/13moon/seal_'
i.e.

$seal_pic = $settings['default_images_url'] . '/13moon/seal_' . str_pad($signDays, 2, '0', STR_PAD_LEFT). '.gif';

$tone_pic = $settings['default_images_url'] . '/13moon/tone_' . str_pad($toneName, 2, '0', STR_PAD_LEFT). '.gif';

$tone_img = '<img src="'.$tone_pic.'" width="25" height="21" alt="'.$theTone.'" title="'.$theTone.': '.$toneInfo.'" />';

$seal_img = '<img src="' . $seal_pic . '" width="21" height="21" alt="'.$signName.' - '. $signDesc[$signDays] .'" title="'.$signName.' '. $signDesc[$signDays] .'" />';

for the seal stuff and

$img = '<img src="'.$settings['default_images_url'] . '/zodiac/'.strtolower($zodiac).'.gif" width="15" height="15" style="margin-bottom:2px;" alt="'.$zodiac.'" title="'.$words.'" />';

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Manu.G

I have tried this:
Quote$img = '<img src="'.$settings['default_images_url'] . '/zodiac/'.strtolower($zodiac).'.gif" width="15" height="15" style="margin-bottom:2px;" alt="'.$zodiac.'" title="'.$words.'" />';

When I using this code the url for the images is wrong:
http://forum.arseniums.com/zodiac/pisces.gif the url must be:
http://forum.arseniums.com/Themes/default/images/zodiac/pisces.gif
I really don't know why the code up wont work correct, cause I'm a loser
in php.  :'(
Version SMF 2.0.8
SimplePortal 2.3.5

Kindred

If the code does not work, that really indicates that you have a problem in your theme configuration.

try running reapir_settings.php and check that your default theme/images directory is actually set correctly.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Manu.G

#43
Quote from: Kindred on September 21, 2007, 10:46:15 AM
If the code does not work, that really indicates that you have a problem in your theme configuration.

try running reapir_settings.php and check that your default theme/images directory is actually set correctly.

I moved last week the forum, cause lots of things were going wrong.
After I had finish I loaded up the repair_settings.php and checked everything
with it and corrected with the repair_settings.php wrong configurations. ;)

At the moment I using this code:
Quote$img = '<img src="http://forum.arseniums.com/Themes/default/images/zodiac/'.strtolower($zodiac).'.gif" width="15" height="15" style="margin-bottom:2px;" alt="'.$zodiac.'" title="'.$words.'" />';
in my Subs.php and the images are shown in the profile by the postings.
Here is the url for the zodiac pisces http://forum.arseniums.com/Themes/default/images/zodiac/pisces.gif

Please tell me were my theme configurations are wrong. :)
Version SMF 2.0.8
SimplePortal 2.3.5

Kindred

if this variable:
$settings['default_images_url'] 
is not printing this string:
http://www.forum.arseniums.com/Themes/default/images

then you have something misconfigured.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Manu.G

Quote from: Kindred on September 21, 2007, 02:32:28 PM
if this variable:
$settings['default_images_url'] 
is not printing this string:
http://www.forum.arseniums.com/Themes/default/images

then you have something misconfigured.
I used for installing the package manager and the install was successfully, I got
no error messages. In the profile itself the images were shown, only in the profile of
the postings the images weren't seen.
When I use the code you showed, the url for the zodiac images looks like this:
http://forum.arseniums.com/zodiac/pisces.gif  :'(

Could be something is wrong in the settings of the forum, but why doesn't the repair_settings.php show it  ???
Version SMF 2.0.8
SimplePortal 2.3.5

L'AltroWeb

Hi!
One question please:
Can i delete index.php file in the zodiac image directory?
What is utility of this index.php file?
Because if i go to:
http;//www,mysite,xx/forum/Themes/default/images/zodiac/index.php
i receive:
Quote// Look for Settings.php.... if (file_exists(dirname(dirname(__FILE__)) . '/Settings.php')) { // Found it! require(dirname(dirname(__FILE__)) . '/Settings.php'); header('Location: ' . $boardurl); } // Can't find it... just forget it. else exit;
:-\

TrueSatan

Leave the file in place please...having an index.php file there add an extra level of security to your site by way of preventing an outsider listing the contents of a directory and then being able to use the files therein directly...say by using your hosting for the images for his/her site rather than hosting them him/her self.

L'AltroWeb

#48
Quote from: TrueSatan on November 30, 2007, 08:41:40 PM
Leave the file in place please...having an index.php file there add an extra level of security to your site by way of preventing an outsider listing the contents of a directory and then being able to use the files therein directly...say by using your hosting for the images for his/her site rather than hosting them him/her self.
ok thanks!
But in this case isn't a problem for me because my host (altervista) doesn't permit listing of directory  :)
For this reason i can delete  ;)
-
NB in any case to work correctly this file change from:
// Look for Settings.php....
if (file_exists(dirname(dirname(__FILE__)) . '/Settings.php'))
{
// Found it!
require(dirname(dirname(__FILE__)) . '/Settings.php');
header('Location: ' . $boardurl);
}
// Can't find it... just forget it.
else
exit;
to:
<?php

// This file is here solely to protect your zodiac image directory.

Header("Location:../../");

?>
  ;)

Jade Elizabeth

is there a way i can put the starsign infront of the traits?
so it would say "TAURUS: trait trait trait" on hover?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Island Wave

Quote from: Alundra on January 11, 2008, 12:03:27 AM
is there a way i can put the starsign infront of the traits?
so it would say "TAURUS: trait trait trait" on hover?

If you'd like to add the text for the Zodiac sign when you hover over you can edit /Sources/subs.php and replace


$img = '<img src="'.$settings['default_images_url'].'/zodiac/'.strtolower($zodiac).'.gif" width="15" height="15" style="vertical-align:middle;" alt="'.$zodiac.'" title="'.$words.'" />';


with..


$img = '<img src="'.$settings['default_images_url'].'/zodiac/'.strtolower($zodiac).'.gif" width="15" height="15" style="vertical-align:middle;" alt="'.$zodiac.'" title="'. strtoupper($zodiac) . " - " . $words.'" />';

Jade Elizabeth

Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

perplexed

when you hold your cursor over the starsign it displays the traits but it seems to cut off the end

example

Sensitive, Compassionate, Imaginative, Adaptable, Intuititve, Idealistic, Secretive, Vuln...

So it cuts off in the middle of the word at the end.  Is this normal or is there something wrong with it?

Thanks

Advertisement: