Announcement

Collapse
No announcement yet.

RBTTNews v1.1 [Pics][Final]

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    RBTTNews v1.1 [Pics][Final]

    Name: RBTTnews
    Version: v1.1
    Compatibility: 2.1
    Description:
    A mutator that presents players with news that is loaded from the internet. It can display multiple pages, but you need some kind of script that's on the web page to present the mutator the right news.
    The mutator sends a request for URL?page=[pagenum] you can use PHP to parse what page should be shown then.
    You can even make it read from RSS or WHATEVER! As long as you have some script behind it that parses it for the mutator

    The mutator will look for some tags in the page it downloads:
    Code:
    <lastnews>		If this tag is found, the 'Older' button is disabled
    <page>[pagenum]</page>	This is used to synch up with the page it downloaded
    <title>[title]</title>	Whatever is between these two tags is displayed above the news in bigger letters
    To configure this mutator, you must open up UTRBTTNews.ini
    Code:
    [RBTTNews.MutNews]
    ;The server TargetFile is on
    Server=www.rbthinktank.com
    ;The complete URL to the file you need to load
    TargetFile=http://www.rbthinktank.com/RBUT3ServerNews/readnews.php
    You can have news as big as you want (a scrollbar will pop up), AFAIK there's no limit, nor is there a limit to how many news articles/pages you have.

    Here's a little PHP script to get you goin'
    readnews.php
    PHP Code:
    <?
    //=================\\
    //  READNEWS.PHP   \\
    //=================\\
    $newsfolder = "news/";        // Change this to where you put the news

    if(!isset($_GET['page']))    // If it can't find the page variable
    {
        $page = 0;            // Set page to 0
    }
    else
    {
        $page = $_GET['page'];    // Set page to the requested page number
    }

    if ($handle = opendir($newsfolder)) {                    // Open a directory for reading
        while (false !== ($file = readdir($handle))) {            // Loop through all files
            if($file!=".." AND $file!="." AND $file!=".htaccess"){    // Only add the files we need
                $filelist[] = $file; 
            }
        }
    }

    sort($filelist);     // sort the array by their values (the filenames)
                // can sort by date by using $uts=filemtime($file).md5($file);  
                // filemtime(); grabs creation date

    $newscount = Count($filelist)-1;    // Get the array length

    if($page > $newscount)
    {
        $page = $newscount;        // Set page to highest newscount
                            // I do this, so we will not request pages that aren't there!
    }

    if($newscount == $page)
    {
        echo "<lastnews>";        // The mutator will parse the received page, and look for <lastnews> tags
                            // When this tag is found, the 'Older' button will be disabled
    }
    echo "<page>".$page."</page>";    // The mutator will also look for the page number, so it can be synched

    // Use include, so we can also use PHP in the news files
    include($newsfolder.$filelist[$newscount-$page]);
    ?>
    Comments:
    You MAY edit this mutator, but all I ask for is that you LEAVE the copyright intact AND the link to rbthinktank.com INTACT on the menu! That's ALL I ask for. If you do not go with these rules, we will flame you to death, so be warned

    Screenshot:


    Credits:
    Me and the rest of RBTT

    Homepage:
    http://www.rbthinktank.com/

    Download:
    http://rbthinktank.com/rbthinktank/i...ownload&cid=25
    Mirrors:
    http://ut3.ut-files.com/index.php?di...TTNewsV1.1.zip
    http://www.strategyinformer.com/pc/u...mod/34167.html
    http://wickedhq.com/index.php?option...ileinfo&id=104

    This server's running it, if you want to see it in action first:

    #2
    Sweet i am so getting this.
    Good work fake

    Comment


      #3
      Thanks, appreciate it

      Comment


        #4
        BUMP

        I'd actually like some more feedback on this!

        Also, I tried cooking this for PS3, but it doesn't show up in the mutator list when installed on the PS3, what am I doing wrong?

        Comment


          #5
          Only just got it up and running m8- thanks for the help with my stupid questions

          so tonight is the first night we will have it up and running on all our UT3 servers.

          Great mod just to folk now whats going on on the servers we have, ty

          Comment


            #6
            Well after one nights use we at «ne» are very happy with this great little mod. Does away with the 'progressive server adverts mutator' we use to use, which folk use to complain about as they found the popup adverts annoying in game.

            Also love the the way you can change the News without messing with any of the UT3 files , just a quick upload to a server (which you have setup for RBTTnews to look for). So when we have an event going on we just make the lastest news whats going on on that server and hay 'presso' anyone joining any off our UT3 servers gets that News as they join and if they r already on the server they get it at the next map change.

            I cant see why anyone running a server wouldn't want this great little program. Top marks

            Comment


              #7
              Nice work. Any way I can convince you to morph this into a player agreement with server rules? With a "accept" button and a "disconnect" button. Maybe the news feature could be optional after the player accepts the rules. Or the player agreement could be optional to the news feature.

              Comment


                #8
                I really like the way this mutator is setup, it's kinda like the way TF2 does it, which I think is pretty sweet. Good work!

                Comment


                  #9
                  Bah im messing something up. My screen just keeps saying

                  Downloading news title..
                  contacting news server....

                  im first trying to get this running on a temp testing server i use before i install it on the clan server.
                  The wep page is http://24.31.188.173/readnews.php

                  [MutNews UTUIDataProvider_Mutator]
                  ClassName=RBTTNews.MutNews
                  FriendlyName=RBTTNews v1.1
                  Description=News application
                  GroupNames=
                  UIConfigScene=
                  bStandaloneOnly=False
                  BitValue=0
                  bRemoveOn360=False
                  bRemoveOnPC=False
                  bRemoveOnPS3=False

                  [RBTTNews.MutNews]
                  ;The server TargetFile is on
                  Server=http://24.31.188.173
                  ;The complete URL to the file you need to load
                  TargetFile=http://24.31.188.173/readnews.php
                  i just have some jibberish in my text file with no tags for now.I am using the script FakeTruth provided for my .php. I can see my jibberish in a browser but cant get anything to load in game. I would certainly appreciate any help.

                  Comment


                    #10
                    Use
                    Server=24.31.188.173
                    instead of
                    Server=http://24.31.188.173

                    Comment


                      #11
                      Sweet! Thank you FakeTruth, that did the trick. Love the mutator,great work.

                      Comment


                        #12
                        It works great IMO

                        Comment


                          #13
                          It works great IMO
                          I agree, im an instant fan of it.

                          Comment


                            #14
                            Well, I'm glad you all like it so much!

                            Comment


                              #15
                              Nice work man, this owns. Thanks for your help it works now

                              Comment

                              Working...
                              X