Creating Fully functional mods [tutorial request]

Started by ɔɔɔɔɔɔuɥoɾ, October 07, 2009, 12:00:01 PM

Previous topic - Next topic

ɔɔɔɔɔɔuɥoɾ

Hi,

Im starting to learn some PHP coding and since PHP has great MySQL functions too, I would like to learn more and start creating some mods, Im not here asking someone to tell me how, but rather, any free sites that offer these tutorials, Im talking about in small steps for n00bs, like myself lol..


Ive looked in the online manual, it offers quiet a bit, but its not really for new comers, I only understand very little of it


Thanks in Advanced :)


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Arantor

Well, Google has plenty of tutorials listed, just search for 'php tutorial' and find one that seems logical.

There is, even, a partial tutorial listed in the Parham's PHP Tutorials sub-board in the Archived Boards at the bottom of the board index, here at simplemachines.org.

ɔɔɔɔɔɔuɥoɾ

Now, I see the tutorials, I will assume all the information given is good, but where would be a good place to practice.

I mean, one would start by creating a simple page on a sub domain,

Also, should one learn PHP and MySQL together or separately?


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Arantor

Many do both together, I did.

If you're doing SMF modding you'll find you don't interact with MySQL directly anyway.

As for practicing, set up a local webserver and go from there. I do all my development and testing on my personal PC by having it function as a webserver. Packages like Xampp make this easy though.

ɔɔɔɔɔɔuɥoɾ

Quote from: Arantor on October 07, 2009, 12:19:08 PM
Many do both together, I did.

If you're doing SMF modding you'll find you don't interact with MySQL directly anyway.

As for practicing, set up a local webserver and go from there. I do all my development and testing on my personal PC by having it function as a webserver. Packages like Xampp make this easy though.

I have Windows, Windows 7 at that, setting up a local server would be hell, since Windows is a pain in the XXX when coming down to PHP.
Do you know anyway that can be achieved easily with Windows?
or shall I just forget it and setup a sub domain?


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Arantor

Yes, installing Xampp. It has it all in one, PHP, webserver, MySQL. You just install it from their website.

sangwe11

Quote from: johncccccc on October 07, 2009, 12:22:51 PM
Quote from: Arantor on October 07, 2009, 12:19:08 PM
Many do both together, I did.

If you're doing SMF modding you'll find you don't interact with MySQL directly anyway.

As for practicing, set up a local webserver and go from there. I do all my development and testing on my personal PC by having it function as a webserver. Packages like Xampp make this easy though.

I have Windows, Windows 7 at that, setting up a local server would be hell, since Windows is a pain in the XXX when coming down to PHP.
Do you know anyway that can be achieved easily with Windows?
or shall I just forget it and setup a sub domain?

Windows 7 runs XAMPP just fine, and infact I am using it as I write this :D

It does IMHO run better than it ran on Windows XP

ɔɔɔɔɔɔuɥoɾ



SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

ɔɔɔɔɔɔuɥoɾ

hmm sorry to sound like a complete n00b, but Ive installed xxamp

the only thing I have accomplished is accessing phpmyadmin, I set it to c:\xampp (localhost/xampp/

but I don't see where I can start uploading/copying files too ???


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Arantor


ɔɔɔɔɔɔuɥoɾ

well it relocated after installing so as of c:\xampp there is another xampp in side alone then inside that one there is

well its quicker to make a screenshot here:

C:\xampp\xampp


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Arantor


ɔɔɔɔɔɔuɥoɾ



that index.php contains

<?php
	
if (!empty(
$_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
	
	
$uri 'https://';
	
} else {
	
	
$uri 'http://';
	
}
	
$uri .= $_SERVER['HTTP_HOST'];
	
header('Location: '.$uri.'/xampp/');
	
exit;
?>
Something is wrong with the XAMPP installation :-(


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Arantor

Doesn't look like it is to me.

If you go to http://localhost/ where do you end up?

ɔɔɔɔɔɔuɥoɾ



SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Arantor


ɔɔɔɔɔɔuɥoɾ

localhost/xampp

localhost on its own redirects there automatically ???

Ive uninstalled it, starting over

I should install it to just c:\


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Arantor

Yes, the index.php file does that redirect. You can remove it if you like.

ɔɔɔɔɔɔuɥoɾ

OK
reinstalled using default C:\
I renamed the index file in C:\xampp\htdocs to index2 now it does not redirect, instead loads the index.html and says it works

I will upload a test forum there for starts, to test the SQL and the apache (PHP) at the same time


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Arantor

Sounds good.

Then start by trying small pieces of code as per the guides you have before doing bigger pieces of code.

It also wouldn't hurt to look over some mods, look at their code to see what they do and how they do it.

Advertisement: