Page 51 of 162 FirstFirst ... 41495051525361101151 ... LastLast
Results 501 to 510 of 1617
  1. #501
    Community Contributor
    Join Date
    Nov 2011
    Posts
    3,009
    Quote Originally Posted by Level View Post
    Hey THX nice Update ^^

    how can I add more servers? I have two BF4 Server.
    How can you add more servers? Buy more servers?

    The servers are added to the stats page automatically. Is one of them not appearing for you or something?

  2. #502
    Hi there!

    This little mod will change stats webpage by adding map graphics on server background and BF3 BL style buttons. You can view example at http://cnpc.org.pl/stats/index.php.

    All you have to do is download archive http://cnpc.org.pl/stats/upgradeV2.rar and extract it to your root folder of stats web page.

    If You want to put changes manually
    Files to edit:
    root/common/displayservers.php
    root/common/stats.css

    EDIT:
    root/common/displayservers.php

    FIND:
    Code:
        echo '
        <tr>
        <td width="100%" style="text-align: left;">
        <br/>
        <div class="shadowcontent">
        <table width="95%" align="center" border="0">
        <tr>
        <td width="35%">
        <br/><a href="' . $_SERVER['PHP_SELF'] . '?ServerID=' . $this_ServerID . '"><font size="3">' . $ServerName . '</font></a><br/><br/>
        </td>
        <td width="22%">
        <br/><br/><font class="information">Current Players In Server:</font> ' . $players . '<br/><br/>
        </td>
        <td width="22%">
        <br/><br/><font class="information">Current Map:</font> ' . $map_name . '<br/><br/>
        </td>
        <td width="21%">
        <br/><br/><font class="information">Users Viewing Stats:</font> ' . $sessions . '<br/><br/>
        </td>
        </tr>
        <tr>
        <td width="35%">
        <a href="' . $_SERVER['PHP_SELF'] . '?ServerID=' . $this_ServerID . '"><img src="./images/viewstatsbtn.png" alt="view stats" class="imagebutton" /></a> &nbsp;
        <a href="http://battlelog.battlefield.com/bf4/servers/pc/?filtered=1&amp;expand=0&amp;useAdvanced=1&amp;q=' . urlencode($ServerName) . '" target="_blank"><img src="./images/joinbtn.png" alt="join" class="imagebutton" /></a><br/><br/>
        </td>
        <td width="22%">
        <font class="information">Players Logged:</font> ' . $total_players . '<br/><br/><br/>
        </td>
        <td width="22%">
        <font class="information">Total Score:</font> ' . $score . '<br/><br/><br/>
        </td>
        <td width="21%">
        <font class="information">Total Kills:</font> ' . $kills . '<br/><br/><br/>
        </td>
        </tr>
        </table>
        </div>
        </td>
        </tr>
        ';
    REPLACE WITH:
    Code:
        echo '
        <tr>
        <td width="100%" style="text-align: left; padding-left: 25px; padding-right: 25px;">
        <br/>
        <div style="background-position: left center; background-repeat: repeat; background-size: 100% auto; border-radius: 10px; box-shadow: 2px 2px 20px 2px rgba(0,0,0,0.5); background-image: url(./images/maps/' . $CurrentMap_r['mapName'] . '.png)">
        <div class="shadowcontent">
        <table width="95%" align="center" border="0">
        <tr>
        <td width="35%">
        <br/><a href="' . $_SERVER['PHP_SELF'] . '?ServerID=' . $this_ServerID . '" style="color: white !important;"><font size="3">' . str_replace('[OPBC] ', '', $ServerName) . '</font></a><br/><br/>
        </td>
        <td width="22%">
        <br/><br/><div class="bloczek"><font class="information">Current Players In Server:</font> <span style="font-weight: 700;">' . $players . '</span></div><br/><br/>
        </td>
        <td width="22%">
        <br/><br/><div class="bloczek"><font class="information">Current Map:</font> <span style="font-weight: 700;">' . $map_name . '</span></div><br/><br/>
        </td>
        <td width="21%">
        <br/><br/><div class="bloczek"><font class="information">Users Viewing Stats:</font> <span style="font-weight: 700;">' . $sessions . '</span></div><br/><br/>
        </td>
        </tr>
        <tr>
        <td width="35%">
        <a href="' . $_SERVER['PHP_SELF'] . '?ServerID=' . $this_ServerID . '"><img src="./images/view-stats.png" alt="" /></a> &nbsp;
        <a href="http://battlelog.battlefield.com/bf4/pl/servers/pc/?filtered=1&amp;expand=0&amp;useAdvanced=1&amp;q=' . urlencode($ServerName) . '" target="_blank"><img src="./images/join-server.png" alt="" /></a><br/><br/>
        </td>
        <td width="22%">
        <div class="bloczek"><font class="information">Players Logged:</font> <span style="font-weight: 700;">' . $total_players . '</span></div><br/><br/><br/>
        </td>
        <td width="22%">
        <div class="bloczek"><font class="information">Total Score:</font> <span style="font-weight: 700;">' . $score . '</span></div><br/><br/><br/>
        </td>
        <td width="21%">
        <div class="bloczek"><font class="information">Total Kills:</font> <span style="font-weight: 700;">' . $kills . '</span></div><br/><br/><br/>
        </td>
        </tr>
        </table>
        </div>
        </div>
        </td>
        </tr>
        ';
    EDIT:
    root/common/stats.css

    AT THE END OF FILE ADD:
    Code:
    .bloczek {
        padding: 5px;
        background: none repeat scroll 0% 0% rgba(0, 0, 0, 0.7);
        float: left;
        border-radius: 5px;
    }
    Upload content of root/images/ from given archive to you images folder of stats page.

    Refresh and enjoy!

  3. #503
    Community Contributor
    Join Date
    Nov 2011
    Posts
    3,009
    Quote Originally Posted by Borzywit View Post
    Hi there!

    This little mod will change stats webpage by adding map graphics on server background and BF3 BL style buttons. You can view example at http://cnpc.org.pl/stats/index.php.

    All you have to do is download archive http://cnpc.org.pl/stats/upgradeV2.rar and extract it to your root folder of stats web page.

    If You want to put changes manually
    Files to edit:
    root/common/displayservers.php
    root/common/stats.css

    EDIT:
    root/common/displayservers.php

    FIND:
    Code:
        echo '
        <tr>
        <td width="100%" style="text-align: left;">
        <br/>
        <div class="shadowcontent">
        <table width="95%" align="center" border="0">
        <tr>
        <td width="35%">
        <br/><a href="' . $_SERVER['PHP_SELF'] . '?ServerID=' . $this_ServerID . '"><font size="3">' . $ServerName . '</font></a><br/><br/>
        </td>
        <td width="22%">
        <br/><br/><font class="information">Current Players In Server:</font> ' . $players . '<br/><br/>
        </td>
        <td width="22%">
        <br/><br/><font class="information">Current Map:</font> ' . $map_name . '<br/><br/>
        </td>
        <td width="21%">
        <br/><br/><font class="information">Users Viewing Stats:</font> ' . $sessions . '<br/><br/>
        </td>
        </tr>
        <tr>
        <td width="35%">
        <a href="' . $_SERVER['PHP_SELF'] . '?ServerID=' . $this_ServerID . '"><img src="./images/viewstatsbtn.png" alt="view stats" class="imagebutton" /></a> *
        <a href="http://battlelog.battlefield.com/bf4/servers/pc/?filtered=1&expand=0&useAdvanced=1&q=' . urlencode($ServerName) . '" target="_blank"><img src="./images/joinbtn.png" alt="join" class="imagebutton" /></a><br/><br/>
        </td>
        <td width="22%">
        <font class="information">Players Logged:</font> ' . $total_players . '<br/><br/><br/>
        </td>
        <td width="22%">
        <font class="information">Total Score:</font> ' . $score . '<br/><br/><br/>
        </td>
        <td width="21%">
        <font class="information">Total Kills:</font> ' . $kills . '<br/><br/><br/>
        </td>
        </tr>
        </table>
        </div>
        </td>
        </tr>
        ';
    REPLACE WITH:
    Code:
        echo '
        <tr>
        <td width="100%" style="text-align: left; padding-left: 25px; padding-right: 25px;">
        <br/>
        <div style="background-position: left center; background-repeat: repeat; background-size: 100% auto; border-radius: 10px; box-shadow: 2px 2px 20px 2px rgba(0,0,0,0.5); background-image: url(./images/maps/' . $CurrentMap_r['mapName'] . '.png)">
        <div class="shadowcontent">
        <table width="95%" align="center" border="0">
        <tr>
        <td width="35%">
        <br/><a href="' . $_SERVER['PHP_SELF'] . '?ServerID=' . $this_ServerID . '" style="color: white !important;"><font size="3">' . str_replace('[OPBC] ', '', $ServerName) . '</font></a><br/><br/>
        </td>
        <td width="22%">
        <br/><br/><div class="bloczek"><font class="information">Current Players In Server:</font> <span style="font-weight: 700;">' . $players . '</span></div><br/><br/>
        </td>
        <td width="22%">
        <br/><br/><div class="bloczek"><font class="information">Current Map:</font> <span style="font-weight: 700;">' . $map_name . '</span></div><br/><br/>
        </td>
        <td width="21%">
        <br/><br/><div class="bloczek"><font class="information">Users Viewing Stats:</font> <span style="font-weight: 700;">' . $sessions . '</span></div><br/><br/>
        </td>
        </tr>
        <tr>
        <td width="35%">
        <a href="' . $_SERVER['PHP_SELF'] . '?ServerID=' . $this_ServerID . '"><img src="./images/view-stats.png" alt="" /></a> *
        <a href="http://battlelog.battlefield.com/bf4/pl/servers/pc/?filtered=1&expand=0&useAdvanced=1&q=' . urlencode($ServerName) . '" target="_blank"><img src="./images/join-server.png" alt="" /></a><br/><br/>
        </td>
        <td width="22%">
        <div class="bloczek"><font class="information">Players Logged:</font> <span style="font-weight: 700;">' . $total_players . '</span></div><br/><br/><br/>
        </td>
        <td width="22%">
        <div class="bloczek"><font class="information">Total Score:</font> <span style="font-weight: 700;">' . $score . '</span></div><br/><br/><br/>
        </td>
        <td width="21%">
        <div class="bloczek"><font class="information">Total Kills:</font> <span style="font-weight: 700;">' . $kills . '</span></div><br/><br/><br/>
        </td>
        </tr>
        </table>
        </div>
        </div>
        </td>
        </tr>
        ';
    EDIT:
    root/common/stats.css

    AT THE END OF FILE ADD:
    Code:
    .bloczek {
        padding: 5px;
        background: none repeat scroll 0% 0% rgba(0, 0, 0, 0.7);
        float: left;
        border-radius: 5px;
    }
    Upload content of root/images/ from given archive to you images folder of stats page.

    Refresh and enjoy!
    I had it appear that way previously but removed it. I personally think it is not attractive and does not agree with the rest of the page's style.

    BTW, for the background image, you might want to do:

    if(in_array($CurrentMap_r['mapName'],$map_array))
    {
    ...
    }

    To verify that a DLC hasn't just released and make sure that non-existent resources aren't attempted to be loaded.
    Last edited by ty_ger07; 26-01-2014 at 14:22.

  4. #504
    THNX!

    I personally like it like this, that is why I posted.

  5. #505
    Quote Originally Posted by ty_ger07 View Post
    How can you add more servers? Buy more servers?

    The servers are added to the stats page automatically. Is one of them not appearing for you or something?
    The BF4 servers have different database server.

  6. #506
    Community Contributor
    Join Date
    Nov 2011
    Posts
    3,009
    Quote Originally Posted by Level View Post
    The BF4 servers have different database server.
    If they are in different databases, you will have to handle them as different pages. You can make multiple copies of my code in different folders -- one for each server.

    Normally, you should avoid splitting your servers up into different databases.

  7. #507
    Junior Member
    Join Date
    May 2011
    Location
    TEXAS
    Posts
    9
    i have the chat logger working now, now im trying to get stats web page to work. hopefully this can be solve like the other.

    http://www.iba-gaming.com/bf4stats/


    // DATABASE INFORMATION
    DEFINE('HOST', ''); localhost or IP that data base is on i tried both // database host address
    DEFINE('PORT', '3306'); // database port - default is 3306
    DEFINE('NAME', 'bf4stats'); // database name
    DEFINE('USER', 'xxxxxxx'); // database user name
    DEFINE('PASS', 'xxxxxxx'); // database password

  8. #508
    Community Contributor
    Join Date
    Nov 2011
    Posts
    3,009
    Quote Originally Posted by IBA_DR_DEATH View Post
    i have the chat logger working now, now im trying to get stats web page to work. hopefully this can be solve like the other.

    http://www.iba-gaming.com/bf4stats/


    // DATABASE INFORMATION
    DEFINE('HOST', ''); localhost or IP that data base is on i tried both // database host address
    DEFINE('PORT', '3306'); // database port - default is 3306
    DEFINE('NAME', 'bf4stats'); // database name
    DEFINE('USER', 'xxxxxxx'); // database user name
    DEFINE('PASS', 'xxxxxxx'); // database password
    Since you are storing the database on your computer, your computer has to be accessible from the internet in order for your website to connect to your computer's database.

    'localhost' and '127.0.0.1' will not work. You would need to know what IP address your ISP has given you and your IP address would have to never change. Also, your home network would have to be configured to allow internet traffic in.

    It's really a huge security risk to turn your computer into a web server and allow anyone over the internet to connect to your computer. You shouldn't do it unless you know what you are doing (which I don't).

  9. #509
    Latest pull on github breaks the graphs. I updated the pchart library and everything works again.

    http://www.pchart.net/download

  10. #510
    The new Weapons won't be in my Webstats log.... Procon read it out of the BF4.def and added it to the DB - but there is no killcount for them. example the ASVal.

    Anyone else this problem?

    What should i do?

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •