1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Team CFC Turnlogger App - "TheFastWorker"

Discussion in 'Team CivFanatics' started by tobiasn, Jul 16, 2012.

  1. tobiasn

    tobiasn Warlord

    Joined:
    Nov 24, 2003
    Messages:
    265
    Location:
    Norway
    This is a follow-up to this development thread.

    App is ready, tested and live at http://tfw.tobiasn.net/tfw/
    You need to log in with:
    Username: cfc
    Password: ftw

    What's this then?

    We've created a turnlogger system based on Dropbox and a simple web-application programmed by me, with functions suggested by a lot of people in here.

    Hosting is sponsored by my company Expoder and will remain free and unlimited for the duration of the ISDG, and we'll probably find a vault for it in the future too. It's hosted at Rackspace, so we can hammer :hammer: it all we want.. :D

    It works like this:

    0. Get access to our shared Dropbox folder.
    1. Take screenshot from the game.
    2. Save the screenshot in "TheFastWorker", in a folder that corresponds to the current turn. 001 for turn 1; 002, for turn two; etc.
    2a: If it's a informational screenshot, save in the "turns" subfolder
    2b: If it's a demographics screenhot, save in the "demographics" subfolder

    That's about it. :)

    Now several things happen:
    - Your screenshots gets uploaded to all other team members that shares the "TheFastWorker" folder in their Dropbox. Instant win.
    - Your screenshots gets uploaded to the server at http://tfw.tobiasn.net/tfw/, u/p: cfc/ftw
    -- Here you can find BBCODE IMG-tags underneath your pictures, so you can easily embed them in a forum post.
    - A number of forum posts will get automatically updated with your new pictures. We have some static links for the newest images and newest demographics:
    Newest image: http://tfw.tobiasn.net/tfw/image.php?turn=0&pic=0
    Newest demographic: http://tfw.tobiasn.net/tfw/image_demo.php?turn=0&pic=0

    You don't have access to the Dropbox folder? Send a PM with the e-mail address you use on Dropbox, or better yet leave it in here, and I or someone else with access will hook you up!

    Everything should work now -- do tell me if something's not functioning normally. :)
     
  2. Caledorn

    Caledorn Emperor

    Joined:
    Dec 3, 2005
    Messages:
    1,884
    Location:
    Arendal, Norway
    Great! As it seems I am allowed to continue to play, I will start using this to upload the screenshots instead of imageshack. :)

    Probably asking about the obvious, but I should manually create a folder corresponding to the current turn inside the turn and demographics folders, yes?
     
  3. tobiasn

    tobiasn Warlord

    Joined:
    Nov 24, 2003
    Messages:
    265
    Location:
    Norway
    Yes, do create new folders for each turn manually. The program will scan for new folders with images, so they should pop up in the app automatically when there's new pix uploaded.
    Dropbox has versioning built in, so don't be afraid to test things out, we can always roll back. But I can't really see what can go wrong :)
     
  4. DaveShack

    DaveShack Inventor Retired Moderator

    Joined:
    Feb 2, 2003
    Messages:
    13,108
    Location:
    Arizona, USA (it's a dry heat)
    How does the tfw site know I'm supposed to have access? It loaded up images without asking who I was, etc.
     
  5. tobiasn

    tobiasn Warlord

    Joined:
    Nov 24, 2003
    Messages:
    265
    Location:
    Norway
    Dave, I figured - app is not indexed by google, has very little text, and is only identified and linked to through this subforum. So in reality, the only way you'd have access is if you read this forum. I could add a htpasswd to the app front-end, if that feels safer, but I don't think it makes a huge difference - someone with access here will still gain access.
    Anyhow it's safety well on par with, if not better than, stuff like imageshack already.
    But if you want me to, I'll lock down the front end a little bit, so it becomes impossible to stumble upon.
     
  6. tobiasn

    tobiasn Warlord

    Joined:
    Nov 24, 2003
    Messages:
    265
    Location:
    Norway
    Although I find it hard to believe that anyone should stumble upon TFW, it would be crap if someone did.

    So I went ahead and requred a login for the front-end.

    User: cfc
    Pass: ftw

    Will update opening post shortly.
     
  7. Caledorn

    Caledorn Emperor

    Joined:
    Dec 3, 2005
    Messages:
    1,884
    Location:
    Arendal, Norway
    I uploaded the screenshots from Turn 2 to the shared dropbox folder, and they more or less immediately appeared in your app, Tobias. Great work! :goodjob:

    I will continue to use the app for the screenshots from now on :)
     
  8. Caledorn

    Caledorn Emperor

    Joined:
    Dec 3, 2005
    Messages:
    1,884
    Location:
    Arendal, Norway
    Oh, Tobias!

    The IMG tag at the bottom reads this:

    {IMG}undefined/tfw-pics/turns/002/Civ4ScreenShot0031.JPG{/IMG} (replaced the [ with { for readability)

    Edit: and it is slightly too small css-wise, because when I try to mark the text it moves slightly out of sight, so perhaps increase the height of the box with 5-10 pixels? (Using Firefox on W7)
     
  9. tobiasn

    tobiasn Warlord

    Joined:
    Nov 24, 2003
    Messages:
    265
    Location:
    Norway
    Undefined, eh? DOH! I'm probably using some unsupported window property. Sorry about that, will fix it in a jiffy!

    Edit: Bug found (window.location.origin unsuppored in some browsers...), squashed (i just hard coded the root address.. :)) and uploaded (via EDGE.... meh)..

    Test now? It should work.
     
  10. Caledorn

    Caledorn Emperor

    Joined:
    Dec 3, 2005
    Messages:
    1,884
    Location:
    Arendal, Norway
    Funny to receive an update from dropbox about the scriptupdate before you post about it :D Thank you for fixing it that quickly! :)
     
  11. tobiasn

    tobiasn Warlord

    Joined:
    Nov 24, 2003
    Messages:
    265
    Location:
    Norway
    Hehehe :) Developing and deploying with Dropbox is actually pretty sweet!
     
  12. Caledorn

    Caledorn Emperor

    Joined:
    Dec 3, 2005
    Messages:
    1,884
    Location:
    Arendal, Norway
    Dropbox is ingenious. And I love HTC for sponsoring me with 25 GB space there for 2 years because of this phone :)

    Sent from my HTC One X using Tapatalk 2
     
  13. 2metraninja

    2metraninja Defender of Nabaxica

    Joined:
    Sep 19, 2007
    Messages:
    5,663
    Location:
    Plovdiv, BG
    Yeah, mille grazie Tobias for putting this all this work which will make all our lives easier for the whole game :)
     
  14. tobiasn

    tobiasn Warlord

    Joined:
    Nov 24, 2003
    Messages:
    265
    Location:
    Norway
    I made the IMG tag (the <input> element) bigger on :hover and :focus, see if that makes a difference?
     
  15. Caledorn

    Caledorn Emperor

    Joined:
    Dec 3, 2005
    Messages:
    1,884
    Location:
    Arendal, Norway
    Excellent! :goodjob:

    I probably could have done it myself, but I haven't had time to look through all the code yet, and as long as it's working as well as it is I'm not sure if there is any point to me "messing up" your code?
     
  16. socralynnek

    socralynnek Civ & Hattrick addict

    Joined:
    Sep 1, 2003
    Messages:
    1,477
    Location:
    Northern Germany
  17. tobiasn

    tobiasn Warlord

    Joined:
    Nov 24, 2003
    Messages:
    265
    Location:
    Norway
    No, that's very much intended - if those links were behind password, they couldn't easily be embedded in the forum.. So that goes for all the images.

    But stumbling upon the images would mean that you'd have to suss out that we have an app, where it's at, what folder structure we've chosen and finally the file names.. I'm not a big fan of security by obscurity, but tbh I'm not very worried that someone will see the pix. It's vastly more likely that someone gains access to our subforum, if we're thinking foul play.

    However, out of professional curiosity more than anything else, I've looked into a way where the images can ONLY be viewed (hotlinked/embedded) in this particular subforum and in the app frontend. But that seems less than feasible.. Cross browser issues, cross-domain issues, and HTTP headers are screwing with my brain. :D
     
  18. Bowsling

    Bowsling Deity

    Joined:
    Nov 14, 2008
    Messages:
    5,000
    Location:
    Ontario, Canada
    Added the links to the Team Information thread and the recent screenshots to the State of the Empire thread. :)
     
  19. tobiasn

    tobiasn Warlord

    Joined:
    Nov 24, 2003
    Messages:
    265
    Location:
    Norway
    I'm gonna have some free time next weekend, so I was just wondering how this little app of ours is working out.. Does it work OK for you guys? Is it anything missing? I was thinking of adding a strategy folder or something, for dotmaps.. would that help us in any way?

    Anyway, I'm all ears, and if you guys have some suggestions I'll see what I can do this weekend.
     
  20. 2metraninja

    2metraninja Defender of Nabaxica

    Joined:
    Sep 19, 2007
    Messages:
    5,663
    Location:
    Plovdiv, BG
    Yep, we will need that soon. (The general in me speaks - "Give me those wartime tactical screenies!!!")

    As far as I can tell, the app is working great, so great job, Tobias :)
     

Share This Page