• 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:
Oh. it's been a while I didn't realize it wasn't on there.

I'm using latest znote and tfs 1.1
You are free to add me on discord, cornex#9334, and I will help you to add this. :)
 
Last edited:
Bumping this up. After a few attempts to reach Cornex, I have not heard back from him. I'm still looking for help if anyone is upto it.
 
Thank you Cornex for the help with that. I have updated the main thread with another small annoyance that I have not been able to figure out.
 
I did what you said here and got this all fixed up. Thank you a lot.

I have a question though. There is a replies column on the page, but it does not count the number like it should. Instead it shows who the last poster was in replies column, and last post column is empty.

Any advice?

I have found out where the "Replies" counter is going. When I click on a forum board, it is at the top of the page. It is under the board name, but above the table. I cannot figure out how to fix it though :(



If using the link above, it starts about line 818
 
Last edited by a moderator:
I have the one you posted the first time setup the way I'd like it to be, except for the error somewhere causing the replies number to not be where it goes. I guess I'll look around the code some more and see what I can find.

Edit, my biggest issue though, is that I do not know how to display the replies. is it count($posts) or count($replies), or something completely different?

I have resolved the issue I was having. I will post the fix when I get home from work. I also plan on update the first post to make the fixes visible without having to scroll through all of the posts for anyone else needing help with these.

Will probably add another issue if I can't figure it out.
 
Last edited by a moderator:
Back
Top