Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/15/18 in all areas

  1. Hello Unfortunately, can't do it as addon. So we have to work a little FIrstly need open FluxCP/lib/Flux.php Find this if ($lang=self::config('DefaultLanguage')) { $current = $addonName ? FLUX_ADDON_DIR."/$addonName/lang/$lang.php" : FLUX_LANG_DIR."/$lang.php"; } And add few lines after // [Sanasol] LangSwitcher $dictionary = array("en" => "en_us", "ru" => "ru_ru"); // keeping bad guys from use ../../../../ if(!empty($_COOKIE["language"]) && array_key_exists($_COOKIE["language"], $dictionary)) { $lang = $dictionary[$_COOKIE["language"]]; $current = $addonName ? FLUX_ADDON_DIR."/$addonName/lang/$lang.php" : FLUX_LANG_DIR."/$lang.php"; } // [Sanasol] LangSwitcher Here you should change $dictionary to your own lang list. For example: "lang_key" => "lang_file" and create translation file in FluxCP/lang/ named lang_file.php And now output switcher Open FluxCP/themes/your_theme/footer.php or other theme part where you want to place it. For default theme I added to footer.php some magic code before this line <?php if (Flux::config('ShowCopyright')): ?> add this <tr> <td colspan="3"></td> <td> <script> function setCookie(key, value) { var expires = new Date(); expires.setTime(expires.getTime() + expires.getTime()); // never expires document.cookie = key + '=' + value + ';expires=' + expires.toUTCString(); } function getCookie(key) { var keyValue = document.cookie.match('(^| ?' + key + '=([^;]*)(;|$)'); return keyValue ? keyValue[2] : null; } $(document).ready(function(){ $("a[data-lang]").click(function(e){ e.preventDefault(); if(getCookie('language') != $(this).data("lang")) { setCookie('language', $(this).data("lang")); reload(); } }); $("a[data-lang]").each(function(i){ if(getCookie('language') == $(this).data("lang")) { $(this).css("font-weight","700"); } }); }); </script> <p> <a href="#" data-lang="en">English</a>/<a href="#" data-lang="ru">Russian</a> </p> </td> <td></td> </tr> Very simple code. You see lang links where data-lang = lang_key Thats all! When you save it and visit your site you will see something like this Now you can switch language in your FluxCP. Demo available here: http://ro.sanasol.ws/demo/fluxcp/?module=woe Only this page have differences in langs Interesting fact: drawing logo (two flags with poring(from DeviantArt)) took more time than writing code
    1 point
  2. This morning started as any other day, I wake up, I check my personal emails, I eat breakfast, I check my business emails, I put my boots on then check rAthena emails. This is where this morning differed. Over the last fortnight an astonishing number of chargeback disputes have been filed with Paypal, and a particular dispute that was closed by Paypal this morning in favor of the buyer was the last straw. This particular dispute was for a file that cost $10. The fee for chargeback disputes to the seller when lost is now $20. rAthena is essentially being scammed out of more and more money each month because of these fees and dirty scumbags, and I can no longer justify spending my own money to cover them. And people wonder why it's taking a while for Withdrawals to be processed. Paypal has been removed as a payment method on rAthena. Users who have submitted chargeback disputes have been banned. What does this mean? It means that if you would like to pay for an invoice, you may use your credit/debit card which will be processed by Stripe. Your card details are not saved on our webserver. Since the Stripe module was enabled almost 2 weeks ago, there have been a number of attempted transactions that have been refused by Stripe due to their fraud rules. And we are loving it! If your rAthena account name, address and phone number don't match the cardholder's details, you'll be declined. If you don't put in your CVC (3 digits on the back), you'll be declined. If your rAthena account is less than 20 days old, your transaction will be authorised but placed on hold for manual review. If you're dumb, you'll be banned. How does this affect Withdrawals? Essentially, it doesn't. Your Withdrawal request will still be processed through Paypal via our automated script. To be quite honest, i'm very disappointed with a select area of our community.
    1 point
  3. @Radian 2.4b http://upaste.me/0c8149627b3ddc0c6 - fix a typo in mission limitation can do daily or only once, actually allows to do twice instead of once - fix a typo in mission time limit, if your mission no.2/3/4 has expired, the script always says slot no.1
    1 point
  4. I just modify existing paste then http://upaste.me/b10549617c6f2d960 curious ... do you want to randomize the item requirement too ? I don't really understand what you say I just do it with different aura then
    1 point
  5. Honestly I don't get why donations even need a chargeback option. Donations are donations and not a purchase.
    1 point
  6. Oh! That's quite easy. I'll give it a go this afternoon.
    1 point
  7. @reloadnpc is already a command in rathena https://github.com/rathena/rathena/blob/7dc6f7577c972e0544b6ef30a598cdd419832283/doc/atcommands.txt#L1450 --------------------------------------- @reloadnpcfile <path> Unloads and loads an NPC. Same as @unloadnpcfile and @loadnpc but ran as one command. Example: @reloadnpcfile npc/custom/jobmaster.txt --------------------------------------- https://github.com/rathena/rathena/blob/7dc6f7577c972e0544b6ef30a598cdd419832283/conf/atcommand_athena.conf#L65 reloadnpcfile: ["reloadnpc"]
    1 point
×
×
  • Create New...