L2JMobius

Introducing L2JMobius ACM: An Account Management and Donations Panel

G-hamsteR · 148 · 52024

Offline osminog93

  • Vassal
  • *
    • Posts: 2
You need to enable CustomMailManager

CustomMailManagerEnabled = True

Where to find CustomMailManager?
I dont have it in JAVA

Should i implement this code in JAVA?

https://gitlab.com/-/snippets/3644316


Offline G-hamsteR

  • Count
  • *****
    • Posts: 419
Where to find CustomMailManager?
I dont have it in JAVA

Should i implement this code in JAVA?

https://gitlab.com/-/snippets/3644316

The gitlab snippet is neccessary only of you want to use the task manager. This allows you to perform some server tasks, like server restart.

The custom mail manager is required to send in-game items to players. It's built-in in all l2jmobius versions. You don't need any java, just find it in the configs.


Offline G-hamsteR

  • Count
  • *****
    • Posts: 419
Wordpress has nothing to offer in this case. You can't take advantage of any of its plugins, or even its base structure.

Any chance to move the project to Wordpress?


If so, I can help with the migration.


Advantages (in my opinion):


Modular
Themes
AdminCP (Separate from the page)
UserCP (On a separate page in the front-end)
Plug-ins to enhance ACM functions
RestAPI (integration with GameServer to expose all classes to view inventory, manage inventory, send items, boss list, skill list, clan management (if you have a DKP system or similar) a lot of things can be done with an API that exposes endpoints correctly)
Security (WordPress is not insecure, a bad installation makes it insecure)


Probably the only downside is that, depending on the plugins the person uses or the modifications they make directly to the code (which is not recommended), it opens security vulnerabilities. Aside from that... I think it's a good idea if done well and well maintained; security is also a strong point.

If's not "i want to mantain project as is" it's ok too...

It was just an idea... when I install this ACM to use on my server, contributions in this regard (exposing the gameserver a bit more) will come.


Online Naker

  • Count
  • *****
    • Posts: 450
  • Coding Dreams
Just to let you know on debian guide
point 6 have errors is typed
Code: [Select]
apt install gettext
pt install php8.2-getttext

and should be
Code: [Select]
apt install gettext
apt install php8.2-gettext
missing a and extra t


Offline G-hamsteR

  • Count
  • *****
    • Posts: 419
Just to let you know on debian guide
point 6 have errors is typed
Code: [Select]
apt install gettext
pt install php8.2-getttext

and should be
Code: [Select]
apt install gettext
apt install php8.2-gettext
missing a and extra t

Thank you for the information. Fixed with the latest commit.


Offline bOOOgz

  • Heir
  • **
    • Posts: 10
I'm trying to install on Ubuntu 22.04. Everything goes fine until I get to the Nginx configuration.

I'm doing it like this:

bash
sudo nano /etc/nginx/sites-available/l2server
Then:

bash
sudo ln -s /etc/nginx/sites-available/l2server /etc/nginx/sites-enabled/
I don't have a domain name yet, so I'm using my IP address: 194.87.118.218

In my Nginx config I have:

nginx
server_name 194.87.118.218;
root /var/www/l2jmobius-acm/public;
Then in the configuration file /var/www/l2jmobius-acm/.env:

env
#Url settings
APP_NAME='L2jMobius CT0'
APP_SCHEME='http'
APP_DOMAIN='194.87.118.218'
APP_CDN="${APP_DOMAIN}/assets"
DEMO_MODE=false
But it's not working for me. The site is still unavailable.





Offline G-hamsteR

  • Count
  • *****
    • Posts: 419
I'm trying to install on Ubuntu 22.04. Everything goes fine until I get to the Nginx configuration.

I'm doing it like this:

bash
sudo nano /etc/nginx/sites-available/l2server
Then:

bash
sudo ln -s /etc/nginx/sites-available/l2server /etc/nginx/sites-enabled/
I don't have a domain name yet, so I'm using my IP address: 194.87.118.218

In my Nginx config I have:

nginx
server_name 194.87.118.218;
root /var/www/l2jmobius-acm/public;
Then in the configuration file /var/www/l2jmobius-acm/.env:

env
#Url settings
APP_NAME='L2jMobius CT0'
APP_SCHEME='http'
APP_DOMAIN='194.87.118.218'
APP_CDN="${APP_DOMAIN}/assets"
DEMO_MODE=false
But it's not working for me. The site is still unavailable.




Instead of server_name 194.87.118.218;, try server_name default_server;

if this doesn't work, try adding a random domain and change your hosts files to point it to your IP.


Offline yoko

  • Black Sheep
  • Heir
  • **
    • Posts: 10
I can't figure out how to install it. I uploaded it to the hosting. What should I do to make it work?


Offline G-hamsteR

  • Count
  • *****
    • Posts: 419
I can't figure out how to install it. I uploaded it to the hosting. What should I do to make it work?


I can't help you with your specific hosting provider. There are few requirements, like php version 8+, composer, getext, etc.

There are guides available for Windows and Linux machines. You can find them in the repository.


Offline yoko

  • Black Sheep
  • Heir
  • **
    • Posts: 10


Offline Robotukas5

  • Heir
  • **
    • Posts: 24
Hello,

In paypal.php (IPN webhook), txn_id is checked:

SELECT COUNT(*) FROM acm_donations WHERE tnx_id = ?

but I cannot find where tnx_id is actually saved to the database.

The update only sets:
status = 1
date_paid = ...

Because of this, it looks like the duplicate protection might not work as intended, since txn_id is never stored after a successful payment.

Is txn_id supposed to be saved somewhere else, or is this a missing part of the implementation?

Thanks.


Offline G-hamsteR

  • Count
  • *****
    • Posts: 419
Hello,

In paypal.php (IPN webhook), txn_id is checked:

SELECT COUNT(*) FROM acm_donations WHERE tnx_id = ?

but I cannot find where tnx_id is actually saved to the database.

The update only sets:
status = 1
date_paid = ...

Because of this, it looks like the duplicate protection might not work as intended, since txn_id is never stored after a successful payment.

Is txn_id supposed to be saved somewhere else, or is this a missing part of the implementation?

Thanks.

tnx_id should be stored at the acm_donations table. This is the sql schema:

Code: [Select]
CREATE TABLE `acm_donations` (
`id` int UNSIGNED NOT NULL,
`char_id` int UNSIGNED DEFAULT NULL,
`char_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`account_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`date_created` datetime DEFAULT NULL,
`date_paid` datetime DEFAULT NULL,
`donation_id` int UNSIGNED DEFAULT NULL,
`item_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`payment_method` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`price` decimal(10,2) DEFAULT NULL,
`status` tinyint(1) DEFAULT \'0\',
`payment_hash` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`item_id_to_give` int UNSIGNED DEFAULT NULL,
`quantity_to_give` int UNSIGNED DEFAULT NULL,
`tnx_id` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
ALTER TABLE `acm_donations`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `tnx_id` (`tnx_id`);
ALTER TABLE `acm_donations`
MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;


EDIT: You were right. I made a new commit with the fix.