Currency Converter WeBid 1.1.1/1.1.2 ONLY

Add a currency converter

  1. renlok
    WeBid Version:
    • 1.1.1/1.1.2
    Title: Currency Converter
    As the currency convert is being removed as of 1.2 as its terrible and broken I am keeping it here as a mod if anyone wishes to re add the feature

    Version(s): 1.0

    Credits: renlok

    Install Time: 15 mins

    Install Difficulty: easy

    Description: Adds currency converter into WeBid if you use multiple currencies

    Demo: None

    Files/List of changes:
    ajax.php
    langauge/EN/messages.php
    themes/admin/increments.tpl
    themes/default/sell.tpl
    themes/default/bid.tpl
    includes/functions_global.php

    Instructions:
    Open:
    PHP:
    ajax.php
    Find:
    PHP:
    switch ($do)
    {
    After add:
    PHP:
        case 'converter':
            
    converter_call();
            break;
    Open:
    langauge/EN/messages.php

    Find:
    PHP:
    ?>
    Add before:
    PHP:
    $MSG['5010'] = 'Currency Converter';
    Open:
    themes/admin/increments.tpl

    Find:
    HTML:
    {L_135}
    After Add:
    HTML:
    <p>[&nbsp;<a href="javascript:window_open('{SITEURL}converter.php','incre',650,250,30,30);">{L_5010}</a>&nbsp;]</p>
    Open:
    themes/default/bid.tpl

    Find:
    HTML:
        $("#qty").keyup(function(){
            $("#bidcost").html((parseFloat(($("#qty").val()) * ($("#bid").val()))).toFixed(2) + ">{CURRENCY}</a>");
        });
        $("#qty").click(function(){
            $("#bidcost").html((parseFloat(($("#qty").val()) * ($("#bid").val()))).toFixed(2) + ">{CURRENCY}</a>");
        });
        $("#bid").keyup(function(){
            $("#bidcost").html((parseFloat(($("#qty").val()) * ($("#bid").val()))).toFixed(2) + ">{CURRENCY}</a>");
        });
        <!-- ELSE -->
        $("#bid").keyup(function(){
            $("#bidcost").html((parseFloat({QTY} * ($("#bid").val()))).toFixed(2) + ">{CURRENCY}</a>");
        });
    Replace with:
    HTML:
        $("#qty").keyup(function(){
            $("#bidcost").html((parseFloat(($("#qty").val()) * ($("#bid").val()))).toFixed(2) +" <a href={SITEURL}converter.php?AMOUNT="+(parseFloat(($("#qty").val())* ($("#bid").val()))).toFixed(2)+">{CURRENCY}</a>");
        });
        $("#qty").click(function(){
            $("#bidcost").html((parseFloat(($("#qty").val()) * ($("#bid").val()))).toFixed(2) +" <a href={SITEURL}converter.php?AMOUNT="+(parseFloat(($("#qty").val())* ($("#bid").val()))).toFixed(2)+">{CURRENCY}</a>");
        });
        $("#bid").keyup(function(){
            $("#bidcost").html((parseFloat(($("#qty").val()) * ($("#bid").val()))).toFixed(2) +" <a href={SITEURL}converter.php?AMOUNT="+(parseFloat(($("#qty").val())* ($("#bid").val()))).toFixed(2)+">{CURRENCY}</a>");
        });
        <!-- ELSE -->
        $("#bid").keyup(function(){
            $("#bidcost").html((parseFloat({QTY} * ($("#bid").val()))).toFixed(2) +" <a href={SITEURL}converter.php?AMOUNT="+(parseFloat({QTY} * ($("#bid").val()))).toFixed(2)+">{CURRENCY}</a>");
        });
    Open:
    themes/default/sell.tpl

    Find Each:
    HTML:
    {CURRENCY}
    After Add:
    HTML:
    &nbsp;&nbsp;(<a href="converter.php" alt="converter" class="new-window">{L_5010}</a>)
    Open:
    includes/functions_global.php

    Find:
    PHP:
    $currency $this->SETTINGS['currency'];
    Replace with:
    PHP:
    $currency '<a href="' $this->SETTINGS['siteurl'] . 'converter.php?AMOUNT=' $str '" alt="converter" class="new-window">' $this->SETTINGS['currency'] . '</a>';