Jump to content

Latest ban and report RSS Feed v1.1


ImportBot

Recommended Posts

Originally Posted by TMiland*:

 

Latest ban and report RSS Feed v1.1

 

Create XML Feed from BF4 Servers!

 

This requires AdKats & Chat, GUID, Stats and Mapstats Logger, everything set properly up with a Mysql database and a webserver with php/apache.

 

Banfeed.php shows your latest bans as RSS Feed, see example: http://nbfc.no/feed/banfeed.php

Reportfeed.php shows your latest reports as RSS Feed, see example: http://nbfc.no/feed/reportfeed.php

 

I'm using this to add to my admin & ban appeal forums dynamically! :cool:

 

Please contribute if you have anything to correct or add.

 

I have created this to educate myself, as i'm by no means a coder. (i just understand the logic) ;-)

 

 

This is how imported bans look like in Xenforo:

 

Posted Image

 

And from the post content:

 

Posted Image

 

 

 

Changelog:

 

v 1.1

  • Changed player link to player id, so the player can be linked to the AdKats webadmin tool.

 

Download:

On Github: Latest ban and report RSS Feed v1.1

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Is it only permabans? Or do you show the duration of temp bans in the feed as well?

I have filtered out the temporary bans on line 25:

 

Code:

if(strpos($row['record_message'], 'Temporary') !== FALSE)
			{
				continue;
			}
You can adjust that to suit your needs. :smile:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

I have filtered out the temporary bans on line 25:

 

Code:

if(strpos($row['record_message'], 'Temporary') !== FALSE)
			{
				continue;
			}
You can adjust that to suit your needs. :smile:
Off topic: I am still a bit of a php noob after years of practice. What is the advantage of using continue in the loop instead of wrapping the whole output inside the if statement or filtering out the undesirable value from the original query?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ColColonCleaner*:

 

Off topic: I am still a bit of a php noob after years of practice. What is the advantage of using continue in the loop instead of wrapping the whole output inside the if statement or filtering out the undesirable value from the original query?

There isn't, i think he's just making it more easily editable. It would be more efficient to exclude them from the original query, but he has it set to pull all bans in the original query to make it more boilerplate/editable.

 

There is no "Temporary" standard naming in AdKats bans, all bans are in essence temporary, they just have a very long timeout. Temporary must be a keyword he uses in all of his ban reasons.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

There isn't, i think he's just making it more easily editable. It would be more efficient to exclude them from the original query, but he has it set to pull all bans in the original query to make it more boilerplate/editable.

 

There is no "Temporary" standard naming in AdKats bans, all bans are in essence temporary, they just have a very long timeout. Temporary must be a keyword he uses in all of his ban reasons.

That is correct, it is easier to edit the query to exclude what you want this way. You could also use preg_match with a regex, but as i understand it is more expensive to execute.

 

To be honest, a friend of mine did that if statement, as my head stopped working after trying to exclude the temp bans from the original query, just was too much lol!

 

Our temp bans are "ban reason (Temporary/10)", witch is 10 minute bans from the pistols & knife server.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ColColonCleaner*:

 

That is correct, it is easier to edit the query to exclude what you want this way. You could also use preg_match with a regex, but as i understand it is more expensive to execute.

 

To be honest, a friend of mine did that if statement, as my head stopped working after trying to exclude the temp bans from the original query, just was too much lol!

 

Our temp bans are "ban reason (Temporary/10)", witch is 10 minute bans from the pistols & knife server.

WHERE DATEDIFF(adkats_bans.ban_endTime, adkats_bans.ban_startTime) > 365

 

would be a better way of doing it. That will exclude all temp bans. Unless for some reason you temp ban for longer than a year.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

WHERE DATEDIFF(adkats_bans.ban_endTime, adkats_bans.ban_startTime) > 365

 

would be a better way of doing it. That will exclude all temp bans. Unless for some reason you temp ban for longer than a year.

That's a nice one! Thanks! :biggrin:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by cdd3068*:

 

Ah this is great! I was just looking for something like this for an RSS feed. Now to incorporate ifttt tweaks. Thank you very much!!!

 

Out of curiosity, I don't run Adkats...does this plugin really rely on this plugin? I have the other requirements already in place, but trying to understand where and how adkats is involved here. Can't I tweak to allow any ban that occurs on the server to be reported via RSS feed?

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ColColonCleaner*:

 

Ah this is great! I was just looking for something like this for an RSS feed. Now to incorporate ifttt tweaks. Thank you very much!!!

 

Out of curiosity, I don't run Adkats...does this plugin really rely on this plugin? I have the other requirements already in place, but trying to understand where and how adkats is involved here. Can't I tweak to allow any ban that occurs on the server to be reported via RSS feed?

Not just AdKats, AdKats with Ban Enforcer enabled. This plugin requires those tables to be used.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Ah this is great! I was just looking for something like this for an RSS feed. Now to incorporate ifttt tweaks. Thank you very much!!!

 

Out of curiosity, I don't run Adkats...does this plugin really rely on this plugin? I have the other requirements already in place, but trying to understand where and how adkats is involved here. Can't I tweak to allow any ban that occurs on the server to be reported via RSS feed?

I tested it with ifttt, and there seems to be some problems with the validity of the rss feed. :huh:

 

"Feed has items without valid urls"

 

I'll see what i can do about that. :smile:

 

Yes, as Colon said, you need AdKats. :smile: No reason to NOT run that great tool! :cool:

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by p19blo*:

 

cant get it to work. editted config.php and get this

 

Fatal error: Call to undefined function mysqli_connect() in /home/vanucci/public_html/rockpapergodmode.com/rss/config.php on line 2

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

cant get it to work. editted config.php and get this

 

Fatal error: Call to undefined function mysqli_connect() in /home/vanucci/public_html/rockpapergodmode.com/rss/config.php on line 2

Have you configured the mysqli extension on your web server? LINK
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by cdd3068*:

 

I tested it with ifttt, and there seems to be some problems with the validity of the rss feed. :huh:

 

"Feed has items without valid urls"

 

I'll see what i can do about that. :smile:

 

Yes, as Colon said, you need AdKats. :smile: No reason to NOT run that great tool! :cool:

I don't have Adkats running yet...so I can't test yet, but maybe try running the XML output file through w3c validator?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Great stuff! How do you get it to show all bans? Right now I have 3 perm and 3 temp bans in adkats and it is only showing the 3 perm.

Take at my answer here: myrcon.net/...latest-ban-and-report-rss-feed-v11#entry49223

 

I don't have Adkats running yet...so I can't test yet, but maybe try running the XML output file through w3c validator?

That's what i have done already, but it's ifttt that's the problem. :P
* Restored post. It could be that the author is no longer active.
Link to comment
  • 1 month later...

Originally Posted by HARDCOREBF*:

 

I tested it with ifttt, and there seems to be some problems with the validity of the rss feed. :huh:

 

"Feed has items without valid urls"

 

I'll see what i can do about that. :smile:

 

Yes, as Colon said, you need AdKats. :smile: No reason to NOT run that great tool! :cool:

Hi i have secsesfuly impemented it , but url is incorrect ,

http://hardcorebf.com/bans/banfeed.php

 

If click on actual Url , it take to same page where rss feed

[orange link]

 

http://i.gyazo.com/4967c267ada1df635b4aab7bce44ce59.png

4967c267ada1df635b4aab7bce44ce59.png

 

is there a way to actual link url to player profile , to webadmin like this http://dgns.hardcorebf.com/bf4/playerinfo/8553

 

plz help ,thnx for great work tho

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Hi i have secsesfuly impemented it , but url is incorrect ,
http://hardcorebf.com/bans/banfeed.php

If click on actual Url , it take to same page where rss feed
[orange link]

http://i.gyazo.com/4967c267ada1df635b4aab7bce44ce59.png
4967c267ada1df635b4aab7bce44ce59.png

is there a way to actual link url to player profile , to webadmin like this http://dgns.hardcorebf.com/bf4/playerinfo/8553

plz help ,thnx for great work tho
Please change this to your title, link and desc.

Code:
<title>nbfc.no | Latest Bans</title>
<link>http://www.nbfc.no</link>
<description>The Norwegian Battlefield Community</description>
I'll see what i can do, but i cannot promise anything. :smile:

*edit

Here you go:

Code:
<?php
include("config.php");
    $sql    =    "SELECT `adkats_records_main`.*,`tbl_server`.`ServerName` FROM `adkats_records_main` INNER JOIN `tbl_server` ON `tbl_server`.`ServerID` = `adkats_records_main`.`server_id` WHERE `adkats_records_main`.`command_type` = 8 ORDER BY `record_time` DESC LIMIT 20";
    $query    = mysqli_query($con, $sql) or die(mysqli_error($con));

    $atomlink = "http://nbfc.no/feed/banfeed.php";
    $title = "nbfc.no | Latest Bans";
    $titledescription = "The Norwegian Battlefield Community";
    $link = "http://www.nbfc.no";
    $webadminlink = "http://webadmin.nbfc.no";

header("Content-type: text/xml");

  echo "<_xml version='1.0' encoding='UTF-8'?>
        <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
        'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
        <rss version='2.0' xmlns:atom='http://www.w3.org/2005/Atom'>
        <channel>
        <atom:link href='$atomlink' rel='self' type='application/rss+xml' />
        <title>$title</title>
        <link>$link</link>
        <description>$titledescription</description>";

        //Get info
        while($row = mysqli_fetch_array($query, MYSQLI_ASSOC)) {
            if(strpos($row['record_message'], 'Temporary') !== FALSE)
            {
                continue;
            }
            $title            = $row['source_name'] . ' Banned: ' . $row['target_name'];
            $description    = htmlspecialchars($row['source_name'] . ' Banned: <a href="'. $webadminlink .'/bf4/playerinfo/' . $row['target_id'] . '">' . $row['target_name'] . '</a></div></br><div> Server: ' . $row['ServerName'] . '</div></br></br>');
            $message        = ' Message: ' . htmlspecialchars($row['record_message']);
            $pubdate        = date('r', strtotime($row['record_time']));
            $guidlink        = ''. $webadminlink .'/bf4/playerinfo/' . $row['target_id'];
            echo "
                <item>
                    <title>$title</title>
                        <description>
                            $description
                            $message
                        </description>
                    <pubDate>$pubdate</pubDate>
                    <guid isPermaLink='false'>$guidlink</guid>
                </item>";
        }
echo "</channel></rss>";
Change what is marked with red according to your prefs. :smile:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by HARDCOREBF*:

 

Yes link working properly , thnx allot .

But only one thing , it is possible to remove title , its shows double

Here is example

http://www.webrss.com/mysite_feed_se...mysiteId=73328

1st line : title (no link )

2nd line : title with link

 

So if its possible to remove 1st one

 

.....

 

Or here is other example where Link goes to homepage for some reason

 

http://feed.mikle.com/

enter feed : http://hardcorebf.com/bans/banfeed.php

* Restored post. It could be that the author is no longer active.
Link to comment
  • 4 months later...
  • 2 weeks later...

Originally Posted by aduh*:

 

Hi i have secsesfuly impemented it , but url is incorrect ,

http://hardcorebf.com/bans/banfeed.php

 

If click on actual Url , it take to same page where rss feed

[orange link]

 

http://i.gyazo.com/4967c267ada1df635b4aab7bce44ce59.png

4967c267ada1df635b4aab7bce44ce59.png

 

is there a way to actual link url to player profile , to webadmin like this http://dgns.hardcorebf.com/bf4/playerinfo/8553

 

plz help ,thnx for great work tho

Good job. Could you please share the code of this nice widget and let us know how you parse rss to html ?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by HARDCOREBF*:

 

Good job. Could you please share the code of this nice widget and let us know how you parse rss to html ?

Well, the one you see in DirtyGuns Website its build in widget with Enjin . But you can achive same with http://feed.mikle.com/

Just add you banfeed.php and tweek it how you like . :smile:

* Restored post. It could be that the author is no longer active.
Link to comment
  • 2 weeks later...

Originally Posted by Prophet731*:

 

Updated to v 1.1, see first post. :smile:

Just to let you know i've incorporated an RSS Feed for bans now into the BFAdminCP. The URL to access them would be http://some.domain.tld/rss/bans/{bf3,bf4}

 

If you want to test it out, its live on our instance for the moment. If you know the URL to ours just added the URI to it. :smile:

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Just to let you know i've incorporated an RSS Feed for bans now into the BFAdminCP. The URL to access them would be http://some.domain.tld/rss/bans/{bf3,bf4}

 

If you want to test it out, its live on our instance for the moment. If you know the URL to ours just added the URI to it. :smile:

That's great! Bans for the people! :biggrin:
* Restored post. It could be that the author is no longer active.
Link to comment

ERROR: HTML content DIV found.

 

 

OLD THREADID: 7576 ; OLD POSTID: 110556

 

ORIGINAL FILE: /root/Desktop/CONVERTER/7576-Latest-ban-and-report-RSS-Feed-v1-1/page1/index.html

 

 

POST IN BASE64:T3JpZ2luYWxseSBQb3N0ZWQgYnkgW2JdW2NvbG9yPSMyYjVjMDBdaXJhcWlib3k5MCpbL2NvbG9yXVsvYl06CgpJIGxvdmUgdGhlIHBsdWdpbiA6c21pbGU6CgpUaGluZ3MgdGhhdCBJIGhhZCB0byBjb3JyZWN0IGJlY2F1c2Ugb3V0ZGF0ZWQgb3Igd3JvbmcgOnNtaWxlOgoKLSBNaXNzaW5nIDxkaXY+IHRhZyBvbiBiYW5mZWVkLnBocAotIFdyb25nIHdlYmFkbWluIGxpbmsgKHRoZSBuZXcgdmVyc2lvbiBhdCBsZWFzdCkgb24gcmVwb3J0ZmVlZC5waHAgYW5kIGJhbmZlZWQucGhwCkNvZGU6IFtjb2RlPW5vY29kZTowXTMxLiAgICAgICAgICAgICRkZXNjcmlwdGlvbiAgICA9IGh0bWxzcGVjaWFsY2hhcnMoW3VdJzxkaXY+JyAuIFsvdV0kcm93Wydzb3VyY2VfbmFtZSddIC4gJyBCYW5uZWQ6IDxhIGhyZWY9IicuICR3ZWJhZG1pbmxpbmsgLidbdV0vcGxheWVyL1svdV0nIC4gJHJvd1sndGFyZ2V0X2lkJ10gLiAnIj4nIC4gJHJvd1sndGFyZ2V0X25hbWUnXSAuICc8L2E+PC9kaXY+PC9icj48ZGl2PiBTZXJ2ZXI6ICcgLiAkcm93WydTZXJ2ZXJOYW1lJ10gLiAnPC9kaXY+PC9icj48L2JyPicpO1svY29kZV1Db2RlOiBbY29kZT1ub2NvZGU6MF0zNC4gICAgICAgICAgICAkZ3VpZGxpbmsgICAgICAgID0gJycuICR3ZWJhZG1pbmxpbmsgLidbdV0vcGxheWVyL1svdV0nIC4gJHJvd1sndGFyZ2V0X2lkJ107Wy9jb2RlXVJlY29tbWVuZGVkIHNlY3VyaXR5IGNvbmZpZzogKElmIGEgZ2xvYmFsIG9uZSBpcyBub3Qgc2V0KQoKLmh0YWNjZXNzIChJZiBMaW51eCkKQ29kZTogW2NvZGU9bm9jb2RlOjBdPEZpbGVzIGNvbmZpZy5waHA+Cm9yZGVyIGRlbnksYWxsb3cKZGVueSBmcm9tIGFsbAo8L0ZpbGVzPlsvY29kZV0=

* Restored post. It could be that the author is no longer active.
Link to comment
  • 3 months later...

Archived

This topic is now archived and is closed to further replies.



  • Our picks

    • Game Server Hosting:

      We're happy to announce that EZRCON will branch out into the game server provider scene. This is a big step for us so please having patience if something doesn't go right in this area. Now, what makes us different compared to other providers? Well, we're going with the idea of having a scaleable server hosting and providing more control in how you set up your server. For example, in Minecraft, you have the ability to control how many CPU cores you wish your server to have access to, how much RAM you want to use, how much disk space you want to use. This type of control can't be offered in a single service package so you're able to configure a custom package the way you want it.

      You can see all the available games here. Currently, we have the following games available.

      Valheim (From $1.50 USD)


      Rust (From $3.20 USD)


      Minecraft (Basic) (From $4.00 USD)


      Call of Duty 4X (From $7.00 USD)


      OpenTTD (From $4.00 USD)


      Squad (From $9.00 USD)


      Insurgency: Sandstorm (From $6.40 USD)


      Changes to US-East:

      Starting in January 2022, we will be moving to a different provider that has better support, better infrastructure, and better connectivity. We've noticed that the connection/routes to this location are not ideal and it's been hard getting support to correct this. Our contract for our two servers ends in March/April respectively. If you currently have servers in this location you will be migrated over to the new provider. We'll have more details when the time comes closer to January. The new location for this change will be based out of Atlanta, GA. If you have any questions/concerns please open a ticket and we'll do our best to answer them.
      • 5 replies
    • Hello All,

      I wanted to give an update to how EZRCON is doing. As of today we have 56 active customers using the services offered. I'm glad its doing so well and it hasn't been 1 year yet. To those that have services with EZRCON, I hope the service is doing well and if not please let us know so that we can improve it where possible. We've done quite a few changes behind the scenes to improve the performance hopefully. 

      We'll be launching a new location for hosting procon layers in either Los Angeles, USA or Chicago, IL. Still being decided on where the placement should be but these two locations are not set in stone yet. We would like to get feedback on where we should have a new location for hosting the Procon Layers, which you can do by replying to this topic. A poll will be created where people can vote on which location they would like to see.

      We're also looking for some suggestions on what else you would like to see for hosting provider options. So please let us know your thoughts on this matter.
      • 4 replies
    • Added ability to disable the new API check for player country info


      Updated GeoIP database file


      Removed usage sending stats


      Added EZRCON ad banner



      If you are upgrading then you may need to add these two lines to your existing installation in the file procon.cfg. To enable these options just change False to True.

      procon.private.options.UseGeoIpFileOnly False
      procon.private.options.BlockRssFeedNews False



       
      • 2 replies
    • I wanted I let you know that I am starting to build out the foundation for the hosting services that I talked about here. The pricing model I was originally going for wasn't going to be suitable for how I want to build it. So instead I decided to offer each service as it's own product instead of a package deal. In the future, hopefully, I will be able to do this and offer discounts to those that choose it.

      Here is how the pricing is laid out for each service as well as information about each. This is as of 7/12/2020.

      Single MySQL database (up to 30 GB) is $10 USD per month.



      If you go over the 30 GB usage for the database then each additional gigabyte is charged at $0.10 USD each billing cycle. If you're under 30GB you don't need to worry about this.


      Databases are replicated across 3 zones (regions) for redundancy. One (1) on the east coast of the USA, One (1) in Frankfurt, and One (1) in Singapore. Depending on the demand, this would grow to more regions.


      Databases will also be backed up daily and retained for 7 days.




      Procon Layer will be $2 USD per month.


      Each layer will only allow one (1) game server connection. The reason behind this is for performance.


      Each layer will also come with all available plugins installed by default. This is to help facilitate faster deployments and get you up and running quickly.


      Each layer will automatically restart if Procon crashes. 


      Each layer will also automatically restart daily at midnight to make sure it stays in tip-top shape.


      Custom plugins can be installed by submitting a support ticket.




      Battlefield Admin Control Panel (BFACP) will be $5 USD per month


      As I am still working on building version 3 of the software, I will be installing the last version I did. Once I complete version 3 it will automatically be upgraded for you.





      All these services will be managed by me so you don't have to worry about the technical side of things to get up and going.

      If you would like to see how much it would cost for the services, I made a calculator that you can use. It can be found here https://ezrcon.com/calculator.html

       
      • 11 replies
    • I have pushed out a new minor release which updates the geodata pull (flags in the playerlisting). This should be way more accurate now. As always, please let me know if any problems show up.

       
      • 9 replies
×
×
  • Create New...

Important Information

Please review our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.