vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   PHP Help (https://vborg.vbsupport.ru/showthread.php?t=40614)

[D]Vincent 07-03-2002 03:22 PM

PHP Help
 
I'm new to PHP and don't know much about it, but I'm trying to make a rpg class hack for my forums. This of course would be simple, but I'm making it to where they select a class in User CP and level up in it, so I was wondering how to make something equal something with two if's. Like I need it to be if $rpgclass equals Squire and $shwolevel equals 3 through 7 then it will equal something else like Knight or something. I would have just created multipule post fields and did it like
If ($showlevel == 3)
{
$post[fieldwhatever] = Knight
}
But then I have the porblem with postbit of getting them all into and I still don't know how to make it equal that level to another level. Can someone help?

GSHelpBoy 07-03-2002 03:46 PM

PHP Code:

<?php
if ($rpgclass == "Squire" and ($showlevel => and $showlevel <= 7)) {
    
$post[field] = Knight
}
?>


[D]Vincent 07-03-2002 03:50 PM

Thanks so much ^_^

[D]Vincent 07-03-2002 04:03 PM

I get this error x_x

Parse error: parse error in /usr/local/psa/home/vhosts/fflounge.com/httpdocs/board/admin/functions.php on line 285

Fatal error: Call to undefined function: getuserinfo() in /usr/local/psa/home/vhosts/fflounge.com/httpdocs/board/admin/sessions.php on line 110

Xenon 07-03-2002 04:05 PM

use this code, GS has forgotten some things ;)

PHP Code:

if ($rpgclass == "Squire" and ($showlevel => and $showlevel <= 7)) {
    
$post[field] = "Knight";



[D]Vincent 07-03-2002 04:10 PM

I still get this error x_x

Parse error: parse error in /usr/local/psa/home/vhosts/fflounge.com/httpdocs/board/admin/functions.php on line 283

Fatal error: Call to undefined function: getuserinfo() in /usr/local/psa/home/vhosts/fflounge.com/httpdocs/board/admin/sessions.php on line 110

g-force2k2 07-03-2002 04:31 PM

[D]Vincent where did you put your coding :p (in admin/functions of cousrse) but what line?

g-force2k2

[D]Vincent 07-03-2002 04:37 PM

Vincent]I don't know the exact line but I put it after
Quote:

if ($post['receivepm'] and $enablepms==1) {
eval("\$post[pmlink] = \"".gettemplate("postbit_sendpm")."\";");
} else {
$post[pmlink] = "";
}
O_o is that not right...

g-force2k2 07-03-2002 04:40 PM

take the coding out that you inserted and then reupload the admin/functions.php see if it runs fine then? just wondering if it is the addition or not?

g-force2k2

[D]Vincent 07-03-2002 06:07 PM

It's that I know because when I took it out it started working, I've been trying to mess with it but I can't figure out what's wrong...

Question, could it possibly be that I can't edit that postfield? Because I made it $post[field38] instead of the $rpgclass


All times are GMT. The time now is 12:08 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.01799 seconds
  • Memory Usage 1,736KB
  • 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
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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