vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Can anyone help me get this to work? (https://vborg.vbsupport.ru/showthread.php?t=48025)

Ember 01-23-2003 08:19 AM

Can anyone help me get this to work?
 
1 Attachment(s)
Hi, I am working on my first hack, it is a bit of a modified version of dark vincents RPG stats hack, but only used bits, and added some more.

Its so each member can have their own pet, each pet has its own name, its own breed, and wether its male or femal.

I have attatched what I have so far, but I cant get it to work... I dont know why, can anyone help me? Major credits to anyone who can :D

Thanks in advance :)

PS. Please tell me what I am doing wrong and not just fix it, I need to know my mistakes, so I can learn from them :)

PPS. Any comments on the hack are very grateful!

PPPS. My friend is working on some little graphics for the animals, so I will add them to version 2.

Neo 01-23-2003 08:45 AM

I want to be the very best, like no one ever was. To catch them is my retest, to train them is my cause..

I will travel throughout the land, searching far and wide..

to understant the power thats inside..

Ember 01-23-2003 08:49 AM

=(

Insanity really is your gift.

Heres what isnt working:

When you update your profile I am fairly sure it adds it to the database ok - but it wont show up right in the postbit.

It shows the petname ok, but not the gender or type.

geniuscrew 01-23-2003 11:49 AM

Poke-Neo!

I actually requested this hack a while back lol
https://vborg.vbsupport.ru/showthrea...threadid=44462

What exactly are you updating in the profile? Have you defined the right variables?

I'll be willing to help if I can, but I'm no php whizz lol

Edited: Just saw the attachment - *doh*

Ember 01-23-2003 11:53 AM

Ok, take a peek at the attatchment and you should get the idea, I really hope you can help, I have been looking at the code for a while and cant figure out what is wrong... I hope you can :)

I intend on modifying the code a lot more... integrating the RPG stats hack to have Pet stats etc.

geniuscrew 01-23-2003 11:55 AM

From what I know, and it's not a lot :p, I think there's currently no way of putting the user's pet info into the database - but I dunno exactly *shrugs*

Try adding one manually using phpMyAdmin or something, and see if it shows

Ember 01-23-2003 11:56 AM

There is, lots of other hacks do it.... I have got it to add the pet name to the database, so that part works... Its just the other 2 things.

geniuscrew 01-23-2003 11:57 AM

Like I said, I'm no PHP whizz - have you tried adding one manually?

Ember 01-23-2003 12:00 PM

Yah, but then in the postbit it displays the number of the pet, in the functions it should change the 1 to dog, 2 to cat etc. but its not doing that... I bet dark vincent could help, cos its his hack I based it on... grrr.

geniuscrew 01-23-2003 12:03 PM

I'll have a look at his -

Ember 01-23-2003 12:06 PM

Thanks :) Hope we get it working, I have a lot of plans for this... hehe.

geniuscrew 01-23-2003 12:22 PM

Hey Ember lol

Try this:

replace

PHP Code:

//start Pet types
    
if ($post[pettype] == "0") {
     
$pettype "None";
    } elseif (
$post[pettype] == "1") {
     
$pettype "Dog";
    } elseif (
$post[pettype] == "2") {
     
$pettype "Cat";
    } elseif (
$post[pettype] == "3") {
     
$pettype "Hamster";
    } elseif (
$post[pettype] == "4") {
     
$pettype "Frog";
    } elseif (
$post[pettype] == "5") {
     
$pettype "Fish";
    }
//end Pet types 


PHP Code:

//start Pet types
    
if ($post[pettype] == "0") {
     
$pettype1 "None";
    } elseif (
$post[pettype] == "1") {
     
$pettype1 "Dog";
    } elseif (
$post[pettype] == "2") {
     
$pettype1 "Cat";
    } elseif (
$post[pettype] == "3") {
     
$pettype1 "Hamster";
    } elseif (
$post[pettype] == "4") {
     
$pettype1 "Frog";
    } elseif (
$post[pettype] == "5") {
     
$pettype1 "Fish";
    }
//end Pet types 

and replace

PHP Code:

<b>Type:</b$post[pettype]<br>
<
b>Gender:</b$post[petgender]<br

with

PHP Code:

<b>Type:</b$post[pettype1]<br>
<
b>Gender:</b$post[petgender1]<br

PS - I have a very vague idea how this works, but I dunno if it will :P

Ember 01-23-2003 12:32 PM

No luck. It doesnt display anything there now, I will have a play around... see what I can do :(

Ember 01-23-2003 12:34 PM

I think its something to do with the member.php - not putting the things into the database, or not correctly...

geniuscrew 01-23-2003 12:34 PM

Sorry lol -

Can you tell me what it did and didn't display before - Just realised I have another hour before my next lesson ^^

Ember 01-23-2003 12:37 PM

Ok, the name displays fine...

It didnt show the name of the type, or the name of the gender.

I am still checking its putting stuff into the database.

Ember 01-23-2003 12:40 PM

Its not putting stuff into the database, so I am now putting info in via phpmyadmin, and checking how it displays.

Ember 01-23-2003 12:47 PM

ok, I am going to use

PHP Code:

$pettype1 

and see if that works in the postbit, it should.

But first need to reboot.

geniuscrew 01-23-2003 12:52 PM

I asked you like 3 times to try putting stuff in using phpMyAdmin lol :P

Ember 01-23-2003 12:55 PM

I know, and I thought it was working :P

geniuscrew 01-23-2003 12:57 PM

:P any luck?

Ember 01-23-2003 12:58 PM

Result!

Its getting it out of the database fine now... I just need to it to put the info in when the user updates his profile...

geniuscrew 01-23-2003 01:02 PM

OOO Nice 1

Try replacing:

pettype='$bbuserinfo[pettype]',petgender='$bbuserinfo[petgender]'

with

pettype='$pettype',petgender='$petgender'

Ember 01-23-2003 01:03 PM

Will do, I am fixing a few things I spotted in the template first, then I will try that :)

geniuscrew 01-23-2003 01:04 PM

KK lemme know how it goes!

Ember 01-23-2003 01:05 PM

It works! :D

geniuscrew 01-23-2003 01:09 PM

Fantastic!

Ember 01-23-2003 01:10 PM

I am just remaking the install guide, then I will release this version.

My friend is making the images for version 2 now, and I will include pet stats in that version.

geniuscrew 01-23-2003 01:12 PM

cool cool

Neo 01-23-2003 05:26 PM

Quote:

Originally posted by Ember
=(

Insanity really is your gift.


*crys*

If I had'nt made 4 hacks yesterday and was up 18 hours I would have helped... but after that post I kinda passed out. :banana:

Ember 01-23-2003 05:31 PM

awww, there there :)

Well its done and released now, and now I am working on the stats.


All times are GMT. The time now is 08:45 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.01200 seconds
  • Memory Usage 1,789KB
  • 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (31)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