Looking How to inject data from an extender into the HTML of the main Community Board? (HELP)

fa1thDEV

Baron
Customer
Hello guys, sorry for being so annoying, but this is how I learn.... I am working and learning to program from scratch in Lucera 2 Classic. I am creating functionalities through extenders in an ext.jar

I have set out to make the Community Board's main page (index.htm in this case) display real-time information, such as the status of events (TvT, CTF), offline traders, and the server time.

What I did and the problem:

I created an extender that implements ICommunityBoardHandler and has the logic to obtain the status of events and replace placeholders such as %tvt_status%.
I added these placeholders directly to the main HTML file of the Community Board -> (.../community/pages/index.htm).

However, the result I got was not what I was looking for. In the game, the page displays the literal text %tvt_status% instead of the actual event status


I think this happens because the core script CommunityBoard.java (which I cannot edit) is the one that loads that HTML, and logically it does not recognize my new placeholders. My extender never runs for that main page, only for the bypasses that I register.

Knowing that I can't edit the core script, what is the correct way to get my information to appear on the home page? Is the correct solution to have the main index.htm redirect to another page that my extender does control, or is there a more direct or “elegant” method to inject the information?

family guy help GIF
 
What specific "online" information do you want to display? I don't quite understand what exactly you are interested in. I do not store anything in the player regarding customs, including whether it is registered or not.
Your request lacks logic.
 
What specific "online" information do you want to display? I don't quite understand what exactly you are interested in. I do not store anything in the player regarding customs, including whether it is registered or not.
Your request lacks logic.
The idea is to create a placeholder that displays the following:

%ctf% -> Shows whether the event is in progress - to register - or how long until the next one (In progress, 5 minutes left, Register!)
%tvt% -> Shows whether the event is in progress - to register - or how long until the next one (In progress, 5 minutes left, Register!)
%dm% -> Shows whether the event is in progress - to register - or how long until the next one (In progress, 5 minutes left, Register!)
%server_time% -> Shows the current server time

Unless I use a bypass command/button, it doesn't show me the information, and the idea is that these placeholders are displayed when opening the Community Board (ALT B). In others world a global placeholder or similar to this
 
The idea is to create a placeholder that displays the following:

%ctf% -> Shows whether the event is in progress - to register - or how long until the next one (In progress, 5 minutes left, Register!)
%tvt% -> Shows whether the event is in progress - to register - or how long until the next one (In progress, 5 minutes left, Register!)
%dm% -> Shows whether the event is in progress - to register - or how long until the next one (In progress, 5 minutes left, Register!)
%server_time% -> Shows the current server time

Unless I use a bypass command/button, it doesn't show me the information, and the idea is that these placeholders are displayed when opening the Community Board (ALT B). In others world a global placeholder or similar to this
Write the launch time of the events in CB and the %current_time%.....
 
Write the launch time of the events in CB and the %current_time%.....
But that would only be static. I want to create something that is more informative, so they know when it starts or is in progress, since my server and others are based purely on contact with the CB.
 
Back
Top