Please login or register. Welcome to the Studio, guest!


Quick Links:


newBookmarkLockedFalling

Xikeon

Xikeon Avatar

***
Dedicated Member

152


August 2005
Here is a tut/script how to get ?page=something

First of, You need to use the $_GET[""] function. Between the " and " we do page because then it will be ?page. (hope you understand)

Here is an example:
<?php

if($_GET["page"] == "home" OR $_GET["page"] == ""){
echo "This page will show up when you do ?page=home or ?page= or just the url of your site.";
}
?>

Verry easy isn't it? :P

Now let's add another page:
<?php

if($_GET["page"] == "home" OR $_GET["page"] == ""){
echo "This page will show up when you do ?page=home or ?page= or just the url of your site.";
}
else if($_GET["page"] == "downloads"){
echo "For example downloads page. ?page=downloads is the url for this page.";
}
?>

Now an error page. Just add an else at the end of all pages:
<?php

if($_GET["page"] == "home" OR $_GET["page"] == ""){
echo "This page will show up when you do ?page=home or ?page= or just the url of your site.";
}
else if($_GET["page"] == "downloads"){
echo "For example downloads page. ?page=downloads is the url for this page.";
}
else{
echo "Page does not exist!";
}
?>


That was it!

Hope you understand and have fun! ;)


Chris

Chris Avatar

******
Head Coder

19,519


June 2005
:P Since its a tut... I'm gonna move it to the tut board. ;)

Edit: Oh, and good job. :P I need to write up some tuts...


Last Edit: Aug 23, 2005 18:58:34 GMT by Chris

Xikeon

Xikeon Avatar

***
Dedicated Member

152


August 2005
Thanks, and soz. Need to look around a min to learn the board :P

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
Its fine. :P Its a sub-board, so some people wouldn't see it.

Xikeon

Xikeon Avatar

***
Dedicated Member

152


August 2005
Ah ok, well hope to see your tuts soon ;)

Xikeon

Xikeon Avatar

***
Dedicated Member

152


August 2005
Yes, But yours is a different way >.> I hate the way you said it :P

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
Now now guys :P Both get in the database, and both suck. XD NAh... both are good :P

Xikeon

Xikeon Avatar

***
Dedicated Member

152


August 2005
Haha.. Mine is better >=] :P Lol j/k Gimme a cookie and I will stop :D

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
>_> setCookie("Cookie","1000");

Is that even right? XD

Xikeon

Xikeon Avatar

***
Dedicated Member

152


August 2005
Yes, But now all Can have it :( Here like this:

setCookie("Cookie","1000","studiozero.proboards44.com/ index.cgi?action=viewprofile&user=mikeo");

Now the domain is my profile :P (I think it's like that.. Not sure out of my head >_>


Last Edit: Aug 24, 2005 12:05:29 GMT by Chris

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
Yeah, I know what you mean <_<

storme

storme Avatar

*
New Member

12


September 2011
So does this tut tell you how to create a page on proboards that isn't a forum board? Like, just a page with text? Sorry, I'm new to this. x_x

Benjamin

Benjamin Avatar
#YOCO... You only color once.

******
Elite Mod

1,959


November 2006
storme Avatar
So does this tut tell you how to create a page on proboards that isn't a forum board? Like, just a page with text? Sorry, I'm new to this. x_x


This is for hand-coding websites in PHP. So for instance, if I had a very simple site with three pages (home about contact) I would do something like:


<?php
$page = isset($_GET['page']) ? $_GET['page'] : 'home');

if($page == 'home') {
echo 'You are home!';
} else if($page == 'about') {
echo 'Here's a little something about me...';
} else if($page == 'contact') {
echo 'Contact me at +1-000-123-4567';
}
else {
echo 'Sorry, page not found...';
}
?>


To create a custom page on proboards, you can link it anywhere you want and then use javascript to replace the "warning, this doesn't exist" table with something else. ;)
Lucifer Avatar
I'm gonna start dishing out internet beatings if people keep it up with this 4chan shit, I swear.





storme

storme Avatar

*
New Member

12


September 2011
Ah, right. xD
I'm not sure what you mean by linking it to anywhere and using javascript to replace the text though. o.O"

Benjamin

Benjamin Avatar
#YOCO... You only color once.

******
Elite Mod

1,959


November 2006
Check this out:

secretreflection.proboards.com/?action=testing

It should say something about an invalid addModule call.

You can use javascript to change that into whatever content you want. I'm guessing there are scripts in the DB that do this, but if you can't find one, make a request and I'll help you out.
Lucifer Avatar
I'm gonna start dishing out internet beatings if people keep it up with this 4chan shit, I swear.





newBookmarkLockedFalling