• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Gesior: Player decide what to show on characters.php

raf

Active Member
Joined
Jan 10, 2011
Messages
261
Reaction score
38
Location
Warsaw, PL
Hey Otland fellows, i wan't to add a feature to my AAC, basicly i want players to choose (in accountmanagement.php) what they want to show to ppl: Equipment, skills, hp/mana/xp to next level and stuff like this. I know how to do everything except part with each player being able to set it to their own preference.
 
Hey Otland fellows, i wan't to add a feature to my AAC, basicly i want players to choose (in accountmanagement.php) what they want to show to ppl: Equipment, skills, hp/mana/xp to next level and stuff like this. I know how to do everything except part with each player being able to set it to their own preference.
CSS is your friend :p

You don't need to store the entire layout in the database, just the values you want to allow the players to turn on and off, before the page loads you can write a php procedure to retrieve the values from the database unless those values are already cached and when the page loads its loads the layout.

If you want this to take place in real time you would need to use ajax, there are security issues with that tho :(
 
Last edited:
CSS is your friend :p

You don't need to store the entire layout in the database, just the values you want to allow the players to turn on and off, before the page loads you can write a php procedure to retrieve the values from the database unless those values are already cached and when the page loads its loads the layout.

If you want this to take place in real time you would need to use ajax, there are security issues with that tho :(
You just gave me an idea - which i don't why, i didn't found earlier :D You know there's a hide your character info in gesior, i might look into that and then check if i can make it work with other stuff :). Anyway, thank you and i will reply as soon as i figure it out.
 
CSS is your friend :p

You don't need to store the entire layout in the database, just the values you want to allow the players to turn on and off, before the page loads you can write a php procedure to retrieve the values from the database unless those values are already cached and when the page loads its loads the layout.

If you want this to take place in real time you would need to use ajax, there are security issues with that tho :(
You should not achieve this through css, but php. Check if the variables are set to true, then echo the part of code containing everything. Of course some css will be needed, but not on checking
 
You should not achieve this through css, but php. Check if the variables are set to true, then echo the part of code containing everything. Of course some css will be needed, but not on checking
I've already achieved this using css and of course html i wouldn't recommend something if I didn't already test it out for myself :)

I did mention php btw, anyway, css controls the layout its what we see or don't see visually, relying solely on php is not a great way to learn about web development and relying only on php to handle this then you would have to reload the page in order for it to take effect because php executes only on the server.

If i wanted to hide information in real time I would use css & ajax to a call to php to store the changes in the database, ajax allows us to change the content in real time without having to reload the page.
 
I've already achieved this using css and of course html i wouldn't recommend something if I didn't already test it out for myself :)

I did mention php btw, anyway, css controls the layout its what we see or don't see visually, relying solely on php is not a great way to learn about web development and relying only on php to handle this then you would have to reload the page in order for it to take effect because php executes only on the server.

If i wanted to hide information in real time I would use css & ajax to a call to php to store the changes in the database, ajax allows us to change the content in real time without having to reload the page.
Hes not talking about hiding the information in real time, he wants the player to selec other people will be able to see on his characters page, so you should write it all and just hide the parts unchecked, you should not print at all the unchecked ones.
 
Hes not talking about hiding the information in real time, he wants the player to selec other people will be able to see on his characters page, so you should write it all and just hide the parts unchecked, you should not print at all the unchecked ones.
:(
 
Account Management:

Boolean fields to display. Save boolean values to new fields in the database.

Characters Page:

Echo only character information bits set to true in the database

If I cared at all for PHP I'd probably provide a helpful example. Unfortunately, I don't care at all for PHP.
Red
 
Thanks for tips guys, i've already achieved it relying on my last post. I did follow up on hide char info and managed to do the same for quests :)
 
Back
Top