Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Simple Zodiac Hack Details »»
Simple Zodiac Hack
Version: 1.00, by Slynderdale Slynderdale is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 04-26-2002 Last Update: Never Installs: 22
 
No support by the author.

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.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 04-29-2002, 01:21 PM
HyperS HyperS is offline
 
Join Date: Dec 2001
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #13  
Old 04-29-2002, 04:02 PM
Slynderdale Slynderdale is offline
 
Join Date: Mar 2002
Location: New York State
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #14  
Old 04-30-2002, 01:01 PM
212rikanmofo 212rikanmofo is offline
 
Join Date: Nov 2001
Location: paris
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #15  
Old 04-30-2002, 01:30 PM
Slynderdale Slynderdale is offline
 
Join Date: Mar 2002
Location: New York State
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #16  
Old 04-30-2002, 06:50 PM
212rikanmofo 212rikanmofo is offline
 
Join Date: Nov 2001
Location: paris
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...
Reply With Quote
  #17  
Old 05-01-2002, 03:38 PM
Slynderdale Slynderdale is offline
 
Join Date: Mar 2002
Location: New York State
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm just add $zodiacimage and tell me what it says
Reply With Quote
  #18  
Old 05-02-2002, 05:14 AM
212rikanmofo 212rikanmofo is offline
 
Join Date: Nov 2001
Location: paris
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nothing shows up at all when i add $zodiacimage into my postbit template.... hrmmm
Reply With Quote
  #19  
Old 05-15-2002, 06:05 PM
archgimp archgimp is offline
 
Join Date: Apr 2002
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #20  
Old 06-29-2002, 02:08 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #21  
Old 06-30-2002, 08:12 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:31 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04549 seconds
  • Memory Usage 2,311KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_code
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete