Go Back   Flash Flash Revolution > General Discussion > Chit Chat
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
Old 01-29-2007, 08:50 PM   #1
UberMario
FFR Player
 
UberMario's Avatar
 
Join Date: Aug 2005
Location: Plus I'm hungry for ****.
Age: 23
Posts: 1,777
Send a message via AIM to UberMario Send a message via MSN to UberMario Send a message via Skype™ to UberMario
Default Learning PHP

Oh boy.

Well, I'm learning mysql and JavaScript too, possibly.

I am building a website and need help, I'm going to post onto this thread with what I need help with. I hope some people will contribute. I've many questions. Right now I'm mainly only using php. I'm going to try and build an avatar system so I think that may be javascript but I'm not too sure.

So no bashing me for stupidity...

First question IS if the avatar system (A picture with other items at certain coordinates) is infact JavaScript. Then I'll look into that.

It's all very very confusing for me since I didn't even know what 'ftp' was until just recently. I don't fully understand mysql, But I'm going to look through old posts in this subforum just to see if there's anything I can learn off others' questions.

Edit:

Okay, another thing is I've two scripts running on my website right now. One a subdomain and one in sitename.com/yummy/. I'm looking through the files and noticed config.php seeming extremely necessary for the subdomain to work at all. Some other pre-made scripts had installations that would just point the information I gave it to those. Atleast one script seems to have those files. I'm suspecting this stuff can be in any type of named file as long as it's in the right directory?

Here's the stuff:

Code:
<?php

    $CFG->sitename = 'Yukapoko';

    $CFG->tagline = '';

    $CFG->wwwroot = 'http://town.website.com/';

    $CFG->dirroot=$_SERVER['DOCUMENT_ROOT'].'/';

    $CFG->sysadminemail = 'hans@website.com';

    $CFG->newsinitialpassword = 'EDITED';

    $CFG->defaultlocale = 'en_GB';

    $CFG->publicreg = true;

    $CFG->publicinvite = true;

    $CFG->maxusers = 0;

    $CFG->walledgarden = 0;

    $CFG->emailfilter = "";
    
    $CFG->default_access = "LOGGED_IN";

    $CFG->disable_publiccomments = true;

    $CFG->dataroot='/home2/yukapok/public_html/data/';

//$CFG->directorypermissions = 0777;
//$CFG->filepermissions = 0666;

    $CFG->dbtype = 'mysql';
    $CFG->dbhost = 'localhost';
    $CFG->dbuser = 'EDITED';
    $CFG->dbpass = 'EDITED';
    $CFG->dbname = 'EDITED';
    $CFG->dbpersist = false;
Am I supposed to know this stuff already or is $CFG->word being used somewhere else and I should make a function that is something like that once I start making one from scratch?

By the way, I decided to make my website from scratch.

Edit:

Okay, I'm thinking that anything with a '$' before it as in "$CFG->dbpersist" is equal to whatever it is after it. Well, I know that's what it is. Just... I want to know, does that work for all scripts? Or do you have to have something that says something that connects to config.php to have that $CFG->dbpersist to be an actual function?

require_once($CFG->dirroot.'lib/cache/lib.php');

I'm learning by just talking to myself. Okay, and use that site JKey gave me to figure out require_once... includes and evaluates the specific file... Hm.

Okay, I'll read through this and post my questions more neatly.

1. Does an avatar system work under JavaScript?
2. I really need a better explanation on MySql, I don't understand it. I will look into how to use it more, maybe I can figure this out.
3. Do you need to use require() (or require_once() or include()) to be able to use the $ functions from that script?
__________________
That's cool Mario, but how come whenever you eat mushrooms, everything gets bigger but your dick?

Last edited by UberMario; 01-30-2007 at 12:22 AM..
UberMario is offline   Reply With Quote
Old 01-31-2007, 10:15 AM   #2
robotdonkey
FFR Player
FFR Veteran
 
robotdonkey's Avatar
 
Join Date: Sep 2006
Age: 35
Posts: 29
Send a message via MSN to robotdonkey
Default Re: Learning PHP

the $ sign indicates a php variable.
I'm assuming that $CFG is a variable array, from the fact that it is pointing to something and giving it a value.

require_once(); tells the page to include a file. However, it will only do so if the page hasn't already been called in any way.
Include and require are the same, but you can call them more than once (useful for if you have a file of functions)

MySQL is a way of storing data. It is very useful and easy to manipulate.

An avatar system does work under Javascript, but it is very fiddly.
You don't have to use javascript for the avatar system, you could use CSS and use absoulte positioning (giving each image it's own ID... It would probably be easier using divs and having the image and extra content all in that div, with a unique identifier for each one)
You should explain what you mean by an avatar system. It'll help.
__________________
robotdonkey is offline   Reply With Quote
Old 01-31-2007, 04:26 PM   #3
UberMario
FFR Player
 
UberMario's Avatar
 
Join Date: Aug 2005
Location: Plus I'm hungry for ****.
Age: 23
Posts: 1,777
Send a message via AIM to UberMario Send a message via MSN to UberMario Send a message via Skype™ to UberMario
Default Re: Learning PHP

For an avatar system, take Gaia for a example. A person that you put clothing on.

The clothing will always be in the same spot when you put it on on the certain model (male or female). I'm also looking to try something like say... a room. and you can move the furniture anywhere you'd like and after you move it all around, it'll save it like that, but I'm making that part of it in the future.
__________________
That's cool Mario, but how come whenever you eat mushrooms, everything gets bigger but your dick?
UberMario is offline   Reply With Quote
Old 01-31-2007, 04:37 PM   #4
JasonKey
FFR Underseer
Retired StaffFFR Veteran
 
JasonKey's Avatar
 
Join Date: Jul 2003
Location: Hinterlands, NC
Posts: 2,643
Default Re: Learning PHP

$CFG-> implies object.
__________________

Quote:
Originally Posted by Synthlight View Post
I will be fix this. No worries. It happened during a version upgrade.
Cheers,
Synthlight
JasonKey is offline   Reply With Quote
Old 02-11-2007, 11:36 PM   #5
UberMario
FFR Player
 
UberMario's Avatar
 
Join Date: Aug 2005
Location: Plus I'm hungry for ****.
Age: 23
Posts: 1,777
Send a message via AIM to UberMario Send a message via MSN to UberMario Send a message via Skype™ to UberMario
Default Re: Learning PHP

I started over on a new script. Way better, but I'm still having trouble with probably half of my to-do list (the other half completed..).

I can't figure out how to change my System time. It's stuck in CMT.
System Informations
System time: Sunday February 11th 2007, 11:39 PM
PHP Version: 4.4.4

Another problem is age. It is a year above the person's age. I'm 17 apparently. I may figure this out just by reading a bunch.

Oh, and Jason. I suggested FTPZilla to my partner (for this website) and she said she can't delete things. Any idea why?



Also, I figure that $CFG->word is, as a whole, a function made on its own. I thought the arrow indicated something different. It's basically the same as $word as long as everything that is like "echo $CFG->word" is now as "echo $word" and the attribute given to it is the same. Right?
UberMario is offline   Reply With Quote
Old 03-7-2007, 03:13 PM   #6
Razor[Aw]
FFR Player
 
Razor[Aw]'s Avatar
 
Join Date: Feb 2007
Posts: 4
Default Re: Learning PHP

nope. the $CFG variable is an object, as jason said. it was created by calling a class. $CFG->anythinghere is a variable or a function that exists within the class.

eg.

$CFG = new someClass;

$CFG->variableInClass;
$CFG->functionInClass();
Razor[Aw] is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

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 -5. The time now is 10:56 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright FlashFlashRevolution