NOTICE TO NEW MEMBERS!

Before doing anything, please fill out the form in the Starter Pack Bonus thread!
(You can find it by going to "Information Desk" and then clicking the thread titled "Starter Pack Bonus".)

You will not be able to play the games, trade with others, take from updates, etc. until after you've been moved from the Pending section on the Members List!

A little organization help

For talking about anything else that doesn't fall under the other topics!
Post Reply
User avatar
Alecks
Posts: 167
Joined: Wed Feb 28, 2018 8:48 pm
Location: SLC
Contact:

A little organization help

Post by Alecks » Fri Mar 09, 2018 12:35 am

It's been a long while since I've had a post and I used to be able to do this but I cannot, for the life of me, remember how to make different pages for collecting and keeping and such and such on my post where it's like sakura.php?collecting and everything... can someone help me out with a refresher on that?

User avatar
Cassidy
Mobage Support & Expert
Posts: 6938
Joined: Sun Jan 31, 2016 4:40 am
Location: ♡ idol hell ♡
Contact:

Re: A little organization help

Post by Cassidy » Fri Mar 09, 2018 5:26 am

i don't know how/if others do it this way nor do i even know what the official name of this is called LOL but what i do is include the following code at the very beginning of my main trade post file (in this case it'd be sakura.php):

Code: Select all

<?php if (!$_SERVER['QUERY_STRING']) { ?>

then wherever i decide the cut off for the main/front page of my trade post will be (for me, it's after the event achievements) i add the php include for the footer and after a few line breaks, the following code:

Code: Select all

<? } elseif ($_SERVER['QUERY_STRING'] == "collecting") { ?>

which is then followed by the php include for the header and the php line to call up the func.php file since i use etcg. then like i did above, i decide the cut off for that section and add the footer php include then repeat for every other section i want on my trade post, replacing "collecting" with the name of whatever section like "future", "trading", etc. the codes i use are basically just making each section like its own page although it's all contained in one file which is why i keep repeating the mentioned codes/header/footer!

at the end of the file, i also add the following code which i believe closes the first code i have at the beginning so there are no errors when you upload & view the page afterwards:

Code: Select all

<?php } ?>

then on a separate file i have for the navigation which i also link to in each section with a php include, the links are all just /tcgs/sakura.php?section except for my masteries page, which i do on its own separate masteries.php page because i can't figure out how to keep it on my main trade post file without breaking the code/causing errors lmao...

this was kind of a quick explanation but hopefully this helps somewhat!! if not, you can ask me any questions although i feel like someone else will probably chime in on how to do it and explain better LOL

User avatar
Alecks
Posts: 167
Joined: Wed Feb 28, 2018 8:48 pm
Location: SLC
Contact:

Re: A little organization help

Post by Alecks » Fri Mar 09, 2018 11:01 am

I DID IT. In my sleep deprived state, I actually managed to follow what you said and I did it and it works! Thank you so much!

Post Reply