Jump to content

Recommended Posts

Posted (edited)

Don't use mysql (deprecated) / mysqli! There is PDO and nothing else. :lol:

 

Also, you can build something like a template engine...

For example:

 

index.php

<?php

function render($tplFile, array $data) {
    ob_start();
    extract($data, EXTR_SKIP);
    require "template/{$tplFile}";
    echo ob_get_clean();
}

$someData = [
    'title' => 'Cool Page Title',
    'text' => 'Some cool text'
];

render('home.php', $someData);
template/home.php

<!DOCTYPE html>
<html>
    <head>
        <title><?= $data['title']; ?></title>
    </head>
    <body>
        <div><?= $data['text']; ?></div>
    </body>
</html>
Edited by Tessa
Posted

I know pdo is used on the updated version.

First adding more donation options and debugging the system as best i can.

i will try to keep this in mind when i'm going to worry about templates ^^

Posted

It's not about templates. When you separate the HTML (also known as 'view') from the programming logic, your code becomes more readable. You can also separate the database logic and your application will be even easier to debug. :)

Posted

It's not about templates. When you separate the HTML (also known as 'view') from the programming logic, your code becomes more readable. You can also separate the database logic and your application will be even easier to debug. :)

 

I still prefer the good clean jsp and servlets

Posted

I still prefer the good clean jsp and servlets

PHP can be clean too, there are a lot of frameworks you can use to do that.

 

For a web apps I prefer Python + Django. Python is sweet, Django is powerful. :lol:

Posted

I'm not that good at coding. if something comes out, its mostly chaotic.

But yea i'm trying my best to give a free tool to the l2j community.

I'm mostly working alone at it so some help is welcome.

Maby giving ideas to better handle the code.

With example would be very usefull :)

  • 3 weeks later...
Posted (edited)

Yes i will explain it a bit on how to test.

 

Login: https://developer.paypal.com/webapps/developer/applications/ipn_simulator

Step1: choose your ipn file and select web accept:

8546e594-d0f2-11e5-9338-b30f01f1b338.png

 

Step2: check if its instant, confirmed and verified:

e00a54fe-d0f0-11e5-8946-cc45eae5b663.png

 

step3: you can select every donation option just change mc_gross and custom field:

66eaeb78-d0f1-11e5-842e-f07d08eb4f25.png

 

Options for custom field:

 

// Note for selecting the correct option (coins karma pk) use the correct mc_gross amount same as your config.
Charactername|Coins
Charactername|Karma
Charactername|Pkpoints

 

// These ones are for the enchant option.

charname|Enchitems|Shirt
charname|Enchitems|Helmet
charname|Enchitems|Necklace
charname|Enchitems|Weapon
charname|Enchitems|FullarmorBreastplate
charname|Enchitems|Shield
charname|Enchitems|Ring1
charname|Enchitems|Ring2
charname|Enchitems|Earring1
charname|Enchitems|Earring2
charname|Enchitems|Gloves
charname|Enchitems|Leggings
charname|Enchitems|Boots
charname|Enchitems|Belt

 

Change  MC_gross = donation amount. Same as your config otherwise the donations wont work.

It will get logged into admin/donationoverview because the donation amount is not correct.

 

And turn sandbox mode on in config if you are testing trough the ipn simulator. Otherwise it will also fail.

 

Edit: Also good to know this system is not tested good yet, and maby it could burn your server in the near future :P.

 

Still working on it i just dont have so mutch time lately to learn and code.

When i have more time i will try to make it better.

Edited by dasoldier
  • 2 months later...
Posted (edited)

Hey all,

 

I have shared a donation system.

Still improving it and try to solve problems i have encountered.

Note: Spanish is not in there yet.

https://github.com/Dasoldier1/Donation_Center

 

* register form

* Now players connect their character to their donation center account

 

5aaeba7c-29bd-11e6-903e-53b355093e91.jpg

 

5ad06a00-29bd-11e6-9bd6-46b5c4090123.jpg

 

It is exerimental so if you encounter some problems with the system inform us and we will look for a solution.

 

Greetings,

Dasoldier

Edited by dasoldier
  • 3 years later...
Posted (edited)

When you donate with a sandbox personal account to a sandbox business account, payment status is set to Pending for some reason and not Completed. So be aware guys

Edited by Zake

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




  • Posts

    • Hello, I'm working with custom Icons and noticed that you can use 64x64 icons and the client will handle them without problems in the Inventory and when you Drag them, they look HD so it's really cool, the problem starts when you move them to the shortcut bar, when they're placed there instead of rescaling the icon it just show the upper left corner (so it's 32x32 but showing only the part that fits in that space). I tried checking interface.u but can't find the line where the size for the icons in the shortcut bar are handled.   When in Inventory the item shows in a 32x32 size, if I use a 64x64 icon it re-scales so the icon looks great When dragging the item the image becomes 64x64 which looks pretty big, but it works good When placing the item in the shortcut bar only the top left of the icon is visible   Is there a way I can adjust the shortcut bar so that it re-scales the icon?
    • If you want to edit a large amount of entries in the L2 File-edit I recommend using excel, since both work with columns you can copy the entire file or just a few lines and paste it in excel and it will copy without problems, after you're done with editing you just select the cells and paste them in the .dat file making sure you're formatting correctly. I'm currently doing a massive edit on all gear and that's how i'm handling the .dat work
    • the logic is the "stacking" that is a filter if you use it then the item cannot co-exist (stack)
    • [Exclusive L2Gold Weekend Server] Available ONLY on Saturdays & Sundays – nowhere else, no other time ! Custom Armors (Dynasty, Apella) Custom Weapons (L2Gold Weapons) Custom Jewelry (L2Gold Jewelry) Custom Teleport System Custom AIO Buffer Custom Zones & NPCs Custom Raidboss … and much more waiting for you every weekend! This is not just another private server – it’s a limited-time battleground. When the weekend comes, everyone gathers in one place for the ultimate L2 experience. 👉 Online: Saturday–Sunday only 👉 Contact / Info: [https://www.facebook.com/profile.php?id=61578869175323]
    • ⏳ The price drops like sand slipping down in an hourglass.   📉 USA numbers are already at the lowest 💸 🌍 Next in line: Europe, Asia, and dozens of other countries.     All next week we’ll be actively working on lowering prices. The process has already started  soon costs will be much cheaper. 🔥 Get ready: the price drop will affect every country!   Website link — https://vibe-sms.net/ Our Telegram channel — https://t.me/vibe_sms
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock