I wanted to learn how to do PHP.
I already know Javascript, HTML, and CSS.
What a good site for resources on PHP and how I can use it to apply to MyBB and potentially for plugins
http://www.lmgtfy.com/?q=learn+php
^First result...
And as for applying it to MyBB plugins, you're going to need to learn it fairly thoroughly before you attempt to make plugins I think, unless you want to get super frustrated and just rage quit MyBB ;P.
What's with the w3schools links guys? I've never liked 'em >.> This is by far my favourite:
http://www.tizag.com/phpT/
Also, if you're just looking for function documentation, you cant beat the official site.
I learned php from w3 and php.NET and I did fine. I learned most of HTML from w3 too
IDK why, but I just don't like how they explain things really. I way prefer tizag. OP: I'd recommend a book the best though. Check your local bookstore for good ones or a second hand shop ^^
Thanks guys!!
Also I would like to know how to:
1)add text area , save it and you come back to it later and its still there
2) Have a php link (my.php) and have it my.php?viewuid=*
* means the user id
The textarea is a html form. Once submitted, you need a PHP file to either store the text in an sql database or as a file. You then also fetch the text and "re-fill" the textarea via php
?data=x simple signifies a GET request. The stuff before the = is the name of the data and the stuff after is the data. Example:
$page = $_GET['page'];
Print $page;
Say the above was test.php. If you went to test.php?page=xyz, the string "xyz" would be shown on screen.
(2011-02-23, 12:21 PM)Anman Wrote: [ -> ]fizz, seriously?
http://www.lmgtfy.com/?q=learn+php&l=1
FTFY
Gahh my bad, thanks for the fix ;P
(2011-02-23, 09:55 PM)Wes the Bes Wrote: [ -> ]Thanks guys!!
Also I would like to know how to:
1)add text area , save it and you come back to it later and its still there
2) Have a php link (my.php) and have it my.php?viewuid=*
* means the user id
Well..once again you need to learn PHP before you mess with this. For the textarea, in a plugin you'll need to add a new setting like so:
$arrname = array(
"sid" => "NULL",
"name" => "setting_name",
"title" => "Field title on plugin settings page",
"description" => "This shows below the title and should explain it.",
"optionscode" => "textarea", //<-- textarea, text, yesno, etc.. just experiment with that
"value" => "Value that is auto-added (can be changed obviously)",
"disporder" => "1", //display order on the plugin config page
"gid" => groupid, //(needs to be a number, look at other plugins to see how they do it, this is kinda a rough example and wouldn't work)
);
$db->insert_query("settings", $arrname);
For your second request you need to learn what you're asking...my.php is a file not a link, and you're going to need to read up on $_GET and $_POST PHP values. (the format for reading a GET or POST value with mybb is
$mybb->input['action']
This would read
file.php?action=VALUEHERE