• 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!

Website codes

Jfrye

Mapper, trying to learn scripting
Joined
Jan 8, 2009
Messages
365
Solutions
5
Reaction score
86
Location
Mexico Missouri
EDIT : I am updating lower posts for a couple other issues I am looking for help with.
Issue 1. Wanting to add guild creation date, join date, and invitation date to website.
1) Looking for some help from those who are better at this php/mysql stuff than I am. I am wanting to add tables to database for my guilds. I am looking to add a creation date, join date, and invitation date, so that I can show this information on the website.

Once thats created(if possible), how do I call the data into the php code?
TFS 1.1 / 1.2
Code:
ALTER TABLE `guild_membership`
ADD `created` INT(11);

ALTER TABLE `guild_invites`
ADD `created` INT(11);

guilds.php
https://gist.github.com/eklundkristoffer/2cd2ba750cd28592119fcfe408717e04

engine/function/users.php
https://gist.github.com/eklundkristoffer/06ddb745db81c514cc8d9936b142c1f1

Vx3EXo3uws.png
Issue 2. Wanting to make sure forum posts and times update correctly when someone posts.
The second request for help I have is when it comes to the forum pages.
The issue I am having here is that the last post wont update from when a new post is made inside a thread. The main page shows December 31 1969 1900 by: "Player name". Player name does show up as a clickable link, but not for the person who last posted. The name that ALWAYS shows up is the thread starter.

Code:
                                    <td>
                                    <font size="1" color="black">
                                    <?php
                                   
                                        echo getClock($threadData['updated'], true);
                                    ?>
                                     by:
                                 
                                    <font size="1" color="blue"><?php
                                        echo "<a href='characterprofile.php?name=". $post['player_name'] ."'><font color='blue'>". $thread['player_name'] ."</a>";
                                    ?>
                                </td>

The fix was mostly found here : https://github.com/Znote/ZnoteAAC/pull/171/files

If you use this link though, I have made appropiate changes to lines 878-890. Replace those lines with this :
Code:
                                       $lastpostdate = $thread['updated'];
                                    }
                                    ?>
                                </td>
                                <td>
                                <span style="font-size:100%;"><font color="black"><center><b><?php echo $replies; ?></span>
                                </td>
                                <td><?php
                                $url = url("characterprofile.php?name=". $lastposter);
                                ?>
                                <span style="font-size:75%;"><font color="black"><?php echo getClock($lastpostdate, true); ?><br>
                                by <a href="<?php echo $url;?>"><font color="blue"><?php echo $lastposter;?></a></span></td>
                            </tr>

This fix I posted will move the Replies counter to the correct column along with the last post information.

Issue 3. I am having issues loading the houses page after making changes to the overall layout and house selection style of the page. I changed to a radio selection from a drop down box. Further details below in posts.

Any help is appreciated.
 
Last edited:
The next issue that I cannot seem to figure out comes to my houses page. I went through and made changes to make it look like tibia setup. I mad the towns show up as a radio selection instead of a drop down list. My problem now is, when I click on a town to load the houses, it will not show any houses. It pops up and says
No house selected.
Go back to the house list and select a house for further details.
Clicking on the house list just goes back to the option to select a town, guildhall and what not. Below are links to each file, and maybe someone can tell me where I messed up.

house.php
http://pastebin.com/GMNv4grq

houses.php
http://pastebin.com/chVjftWS
 
TFS 1.1 / 1.2
Code:
ALTER TABLE `guild_membership`
ADD `created` INT(11);

ALTER TABLE `guild_invites`
ADD `created` INT(11);

guilds.php
guilds.php (https://gist.github.com/eklundkristoffer/2cd2ba750cd28592119fcfe408717e04)

engine/function/users.php
users.php (https://gist.github.com/eklundkristoffer/06ddb745db81c514cc8d9936b142c1f1)

Vx3EXo3uws.png
I'm using this, and i have a small problem in the "joining date" part.
When someone create a new guild, the joining date is not added to him.
joining date.png
 
Back
Top