vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=34)
-   -   vB3 Pets (https://vborg.vbsupport.ru/showthread.php?t=60947)

NTLDR 01-30-2004 11:18 AM

Quote:

Originally Posted by AutomatikStudio
+For some reason when you make your selections for type, gender, and name they weren't getting inserted into the database so I had to use $_POST to make it work. That obviously needs fixing. Any help there would be good.

I wouldn't really say that needs fixing, however if your reffering to say $_POST['gender'] working and $gender not working then you need to run the variables through the globalize() function, take alook at it in functions.php and how vB's file use it. I assume thats the issue, but I haven't looked at your code yet ;)

I also asume if this is just a straight forward port you have the origional authors permission?

AutomatikStudio 01-30-2004 01:17 PM

Quote:

Originally Posted by Cyricx
Question :)
What about someone like me who has other animals that I want to add?
I'm trying to figure it out, but for the life of me, I can't seem to. It could be the 2 hours of sleep in 72 hours, or it's just not there.
Cyricx

It's not really as easy as just "adding" one...you have to make multiple changes. You also would have to have a male and female version of your new pets, otherwise you'll have a broken image in your postbit. If you're still interested, let me know and I'll type it all out. In future versions I'll include a guide to adding new pets...possibly even a way to add them through the Admin CP

Quote:

Originally Posted by NTLDR
I wouldn't really say that needs fixing, however if your reffering to say $_POST['gender'] working and $gender not working then you need to run the variables through the globalize() function, take alook at it in functions.php and how vB's file use it. I assume thats the issue, but I haven't looked at your code yet ;)

Yes that is indeed what I'm refering too...I'll take a look in functions.php. Thanks!

Quote:

Originally Posted by NTLDR
I also asume if this is just a straight forward port you have the origional authors permission?

Yep. I actually just got done talking to Ember (original Pet hack creator).

AutomatikStudio 01-30-2004 01:46 PM

Quote:

Originally Posted by NTLDR
I wouldn't really say that needs fixing, however if your reffering to say $_POST['gender'] working and $gender not working then you need to run the variables through the globalize() function, take alook at it in functions.php and how vB's file use it. I assume thats the issue, but I haven't looked at your code yet ;)

Good googly moogly...I just read almost all 3600 lines of functions.php and still can't figure out exactly where to put what. Any ideas?

NTLDR 01-30-2004 01:50 PM

Instead of:

PHP Code:

//##### Begin vB3 Pets #####    
$pettype $_POST['pettype'];
$petgender $_POST['petgender'];
$petname $_POST['petname'];
//##### End vB3 Pets ##### 

Use:

PHP Code:

//##### Begin vB3 Pets #####    
globalize($_POST, array(
    
'pettype' => INT,
    
'petgender' => INT,
    
'petname' => STR_NOHTML
));
//##### End vB3 Pets ##### 


AutomatikStudio 01-30-2004 01:51 PM

So I don't need to worry about functions.php now?

NTLDR 01-30-2004 02:04 PM

The globalize function is in functions.php which will be required already, so its just that block you need.

C.Birch 01-30-2004 02:08 PM

installed and working but would love to see the other things that are planned, any idea when that might be btw?

AutomatikStudio 01-30-2004 02:11 PM

Quote:

Originally Posted by C.Birch
installed and working but would love to see the other things that are planned, any idea when that might be btw?

Depends on how much other people wanna help out ;) . But the first order of business is to get this out of Beta, which I hope will be later today. And then after that I'll begin work on some new features.

C.Birch 01-30-2004 02:13 PM

lol i would say i would help but.......... im over worked has it is with a number of things plus a full time job lol.

one prob i found you got a missing img for when someone has no pet, also it might be better if it all the pet info dont show in a user's postbit who dont have a pet.

AutomatikStudio 01-30-2004 02:16 PM

Quote:

Originally Posted by NTLDR
Instead of:

PHP Code:

//##### Begin vB3 Pets #####    
$pettype $_POST['pettype'];
$petgender $_POST['petgender'];
$petname $_POST['petname'];
//##### End vB3 Pets ##### 

Use:

PHP Code:

//##### Begin vB3 Pets #####    
globalize($_POST, array(
'pettype' => INT,
'petgender' = > INT,
'petname' => STR_NOHTML
));
//##### End vB3 Pets ##### 


I get a parse error on 'petgender' => INT...it says expecting `')''....


All times are GMT. The time now is 09:52 AM.

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.01688 seconds
  • Memory Usage 1,756KB
  • 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
  • (4)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete