vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Simple Zodiac Hack (https://vborg.vbsupport.ru/showthread.php?t=37938)

Slynderdale 04-26-2002 10:00 PM

Simple Zodiac Hack
 
Ok, I know its been a while, but I finally fixed up the code for this, now it all works well and its all template driven, sorry for all the errors with the old code, this was one of my first hacks I ever made and my skills improved since then.

Heres what this hack does:
It gets the users chinese and astrological zodiac from the user's birthday and also gets the users current age where you then can display it in there profile.

The zip below contains the new install instructions and also a zodiac_templates.php file to install all the templates for you (Theres one for each chinese and astrological zodiac).

I tested this pretty well and it works fine, but if some how you get an error or it doesnt work, please post about it and this time ill fix it asap.

Enjoy the hack, also like all my other hacks, if you use this on your forum, all I ask of you is to click the install button, thank you.

Also, if for some reason your getting an old version of this zip, try clearing your cache first and then download it, also right clicking on it and choosing save as might work as well.

Floris 04-27-2002 01:41 PM

It is advicable to make a installation instruction file, so unlicensed users can't get the source :)

And, wasn't such a hack released beginning this week already?

Slynderdale 04-27-2002 01:51 PM

Quote:

Originally posted by xiphoid
It is advicable to make a installation instruction file, so unlicensed users can't get the source :)

And, wasn't such a hack released beginning this week already?

that was a gender edit and users can select any zodiac sign they want, mine automaticly shows the correct zodiac sign for there birthday

Slynderdale 04-27-2002 02:01 PM

i placed the screen shot and install text in the zipfile and also added a way to show the chinese zodiac sign too, unlike the other zodiac, the users dont choose there zodiac like the gender hack, it shows the zodiac and age depending in there birthday date, it will show N/A if the birthday date isnt set, its really simple to add, and if you want to show an image instead have like <img src="$zodiacsign.gif">, Enjoy

Slynderdale 04-27-2002 02:17 PM

Heres my profile with it

NyCwill 04-27-2002 04:22 PM

can like use pic of zodiac instead of text?

snyx 04-27-2002 06:45 PM

looks tight man! im gunna play with it, try to work some of my images into, if I sucseed, I will post, if not.... I will cry! hahaha

Slynderdale 04-28-2002 11:01 AM

Quote:

Originally posted by NyCwill
can like use pic of zodiac instead of text?
it already works with images, you can either change the php code to the image like <img src="cancer.gif"> or have in the template
<img src="$zodiacsign.gif"> and make images like Cancer.gif, thats all

Slynderdale 04-28-2002 11:57 AM

Updates:

added a text and image varible for the zodiac hack and added a image pack for it, also fixed up some code, see the zip file ion the first post for the update

Slynderdale 04-29-2002 11:02 AM

tell me what you think :)

HyperS 04-29-2002 01:21 PM

This is a great hack Slynderdale. Congrats!

I want to release some hacks very soon. I have some good ideas so I think people will like them.

I was watching at that screenshot of your profile and I was wondering how did you add that picture at the top of the profile. Did you make it as a custom field and made people just enter the url or did you use something better?

Slynderdale 04-29-2002 04:02 PM

Quote:

Originally posted by HyperS
This is a great hack Slynderdale. Congrats!

I want to release some hacks very soon. I have some good ideas so I think people will like them.

I was watching at that screenshot of your profile and I was wondering how did you add that picture at the top of the profile. Did you make it as a custom field and made people just enter the url or did you use something better?

Something better :)
Its actually a picture hack i made, its almost done.
More info here:
https://vborg.vbsupport.ru/showthrea...=&pagenumber=1

212rikanmofo 04-30-2002 01:01 PM

you said this hack is for vb 2.2.5?

in your instructions it stated to find this line in my members.php

Code:

// Set birthday fields right here!
    if ($userinfo[birthday] == '0000-00-00') {
        $birthday = "N/A";
    } else {
        $bday = explode("-",$userinfo[birthday]);
        if (date("Y")>$bday[0] and $bday[0]>1901 && $bday[0]!='0000') {
          $birthday = @date($calformat1,mktime(0,0,0,$bday[1],$bday[2],$bday[0]));
        } else {
          // lets send a valid year as some PHP3 don't like year to be 0
          // $calformat2 should not contania year identifier so the year doesn't matter
          $birthday = @date($calformat2,mktime(0,0,0,$bday[1],$bday[2],1993));
        }
        if ($birthday=="") {
          $birthday="$bday[1]-$bday[2]-$bday[0]";
        }
    }
    eval("\$birthday = \"".gettemplate("getinfo_birthday")."\";");
  }

but in mine members.php its:
Code:

    // Set birthday fields right here!
    if ($bbuserinfo[birthday] == '0000-00-00') {
        $daydefaultselected = "selected";
        $monthdefaultselected = "selected";
    } else {
        $birthday = explode("-",$bbuserinfo[birthday]);
        $dayname = "day".$birthday[2]."selected";
        $$dayname = "selected";
        $monthname = "month".$birthday[1]."selected";
        $$monthname = "selected";
        if (date("Y")>$birthday[0] && $birthday[0]!='0000')
          $year = $birthday[0];
    }
    eval("\$birthday = \"".gettemplate("register_birthday")."\";");
  } else {
                $birthday = '';
        }

so what exactly do i change? im afraid to change it, since it's like almost different... and i have vb 2.2.5

Slynderdale 04-30-2002 01:30 PM

Quote:

Originally posted by 212rikanmofo
you said this hack is for vb 2.2.5?

in your instructions it stated to find this line in my members.php

Code:

// Set birthday fields right here!
    if ($userinfo[birthday] == '0000-00-00') {
        $birthday = "N/A";
    } else {
        $bday = explode("-",$userinfo[birthday]);
        if (date("Y")>$bday[0] and $bday[0]>1901 && $bday[0]!='0000') {
          $birthday = @date($calformat1,mktime(0,0,0,$bday[1],$bday[2],$bday[0]));
        } else {
          // lets send a valid year as some PHP3 don't like year to be 0
          // $calformat2 should not contania year identifier so the year doesn't matter
          $birthday = @date($calformat2,mktime(0,0,0,$bday[1],$bday[2],1993));
        }
        if ($birthday=="") {
          $birthday="$bday[1]-$bday[2]-$bday[0]";
        }
    }
    eval("\$birthday = \"".gettemplate("getinfo_birthday")."\";");
  }

but in mine members.php its:
Code:

    // Set birthday fields right here!
    if ($bbuserinfo[birthday] == '0000-00-00') {
        $daydefaultselected = "selected";
        $monthdefaultselected = "selected";
    } else {
        $birthday = explode("-",$bbuserinfo[birthday]);
        $dayname = "day".$birthday[2]."selected";
        $$dayname = "selected";
        $monthname = "month".$birthday[1]."selected";
        $$monthname = "selected";
        if (date("Y")>$birthday[0] && $birthday[0]!='0000')
          $year = $birthday[0];
    }
    eval("\$birthday = \"".gettemplate("register_birthday")."\";");
  } else {
                $birthday = '';
        }

so what exactly do i change? im afraid to change it, since it's like almost different... and i have vb 2.2.5

ahhh...i made it on 2.2.3, any ways, i added the instructions below in the text for you to add it also i updated the zip file in the first post

212rikanmofo 04-30-2002 06:50 PM

hrmm thanks for the fix, but its still not working, i tried to enter this into my postbit template and the image doesnt show up:

Code:

<img src="{imagesfolder}/zodiac/$zodiacimage" alt="$zodiacsign" align="absmiddle" border="0">
hrmm help me please...

Slynderdale 05-01-2002 03:38 PM

hmm just add $zodiacimage and tell me what it says

212rikanmofo 05-02-2002 05:14 AM

nothing shows up at all when i add $zodiacimage into my postbit template.... hrmmm

archgimp 05-15-2002 06:05 PM

well for some reason nothing is showing up @ all in our postbit either...

I've tried several permutations and have currently got this:

PHP Code:

Posts$post[posts]<br>
    
Sign: <img src="{imagesfolder}/zodiac/$zodiacsign.gif" alt="$zodiacsignalign="absmiddle" border="0"><br>
                
$zodiacimage
                Chinese Sign
$chinesezodiacsign<BR>
                
Age$userage<BR>
    
$modaw<br

it's giving me a broken image box tho; and in that it says http://correct.path.to/imagedir/zodiac/ .gif

anyone have any ideas?

Much appreciated if anyone has any ideas...

merci beaucoup,

--gimP

Boofo 06-29-2002 02:08 AM

I just installed your zodiac hack and when I went in to view the profile, none of the info was there. I went in and set the year for my birthday and it changed the whole date to December 31, 1969 for some reason and my birthday is on January 31st of another year. In my profile in the user cp it still shows the right date but in the profile view it shows the other date and the zodiac info does not show up. Any ideas on this one? :)

Boofo 06-30-2002 08:12 AM

Slynderdale, are you still supporting this hack? I can't get it to work.

Boofo 06-30-2002 11:56 PM

Ok, I've narrowed it down to this: If you enter a full bithdate prior to December 31, 1969, it shows that date in your profile no matter what it is set to in your profile options. If you don't enter a year, it shows the correct day and month. But no matter what you enter or what it shows, the Userage, Zodiac Sign and Chinese Zodiac sign do not show up in the user's profile. Is there going to be any fix for this or do we need to un-install it?

Logician 07-01-2002 03:12 PM

Slynderdale FYI:

The hack instruction is not correct:
a) The text that should be replaced points the wrong section: You ask to replace the text in editprofile section, where it should be the part "getinfo" and the replacement text is wrong either.
b) The text that you ask to be replaced has mistakes. There are some parts which are inrelevant and should not be added and the parts that needs to be inserted has other mistakes too.
c) Some of the images the hack points is not included in the instructions. (like $chinesezodiacimage)

I dont use this hack, just tried to install for a friend and discovered these points. The hack cant work with the provided instructions and it requires a lot of modifications. Just wanted to let you know..

Regards,
Logician

Boofo 07-11-2002 07:41 PM

Slynderdale,

Since you seem to no longer be supporting this hack, I will be releasing a working version shortly. The code you had (like Logocian said) had many mistakes which is why I could never get it it work right on my board. Also, your Chinese Zodiavc sign should actually be Ox instead of Buffalo. :) Just thought you should know. Thanks for steering me in the right direction, though. :)

Floris 01-28-2003 05:07 PM

Quote:

Originally posted by Boofo
Slynderdale,

Since you seem to no longer be supporting this hack, I will be releasing a working version shortly. The code you had (like Logocian said) had many mistakes which is why I could never get it it work right on my board. Also, your Chinese Zodiavc sign should actually be Ox instead of Buffalo. :) Just thought you should know. Thanks for steering me in the right direction, though. :)

Hurry! :) :banana: I could use your update :)

Boofo 01-28-2003 05:10 PM

pm me and I'll get it to you. ;)

Slynderdale 02-05-2003 09:09 PM

I finally completly rewrote the code and fixed it up, see the first post for more info.

auz1111 03-19-2003 03:44 PM

i just installed this and it is not showing up... march 19th, 2003

anyone got it working yet?

Slynderdale 03-19-2003 04:22 PM

Its works fine for me and the boards I tested it on, send me your member.php file and ill see if you added it the right spot.

NuclioN 03-19-2003 09:20 PM

It's showing up in the profile but not in the postbit. Also i'm an OX and that surprises me because i'm a rat. :D

Slynderdale 03-20-2003 10:27 AM

2.0 Is a working version


All times are GMT. The time now is 02:02 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01265 seconds
  • Memory Usage 1,817KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (1)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (30)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete