I want a weird script for my site.

WillethWilleth Registered User regular
Okay, what I would love is something to stick on the bottom of my site that quotes the last forum post I made, whether it's on here or any other board. Ideally when someone loaded my site, it would run a search on here, GAF, whatever I designate it to search on, and pull up the most recent by date and time, display a preview and link to it.

I have absolutely no fucking idea how to implement something like this, or even if it would be feasible/resource-friendly. I don't expect my site to be highly-trafficked at all, but I really want to include something on the site that could showcase my personality without being meticulously engineered. I don't really have a problem with potential employers reading them - they're going to look for all my shit anyway, and it's not like I share anything online I'd not be comfortable with them seeing. I think.

So how would I go about setting something like this up?

@vgreminders - Don't miss out on timed events in gaming!
@gamefacts - Totally and utterly true gaming facts on the regular!
Willeth on

Posts

  • TL DRTL DR Not at all confident in his reflexive opinions of thingsRegistered User regular
    edited March 2009
    Sounds infeasible to search the forum every time someone logged onto your site, especially with the way the forum's search engine is set up. Might be easier to do it from the other end. That is, when you post find a way to send the post to the website, instead of the site finding the post.

    TL DR on
  • ArminasArminas Student of Life SF, CARegistered User regular
    edited March 2009
    Well, I thought I'd point out that search is the heaviest function on the forums and having some stranger search the entire forums for your latest post every once in a while would add some extra load that might not be taken too kindly from the forum administrators.

    Also, I think search is set to only allow registered users to perform a search. Unless every visitor to your site has their cookies stored to save their login credentials saved for the PA forums, they probably won't be able to do a search.

    Alternatively, you might be able to make your web server periodically search for your latest forum post by giving your server the appropriate set of credentials. This would have to be done in a server side application, typically when your page is rendered. If you're just doing plain ol' HTML sites, I don't think you can do this. I'm not too familiar with PHP, but I do doubt this would make it any easier, someone correct me if i'm wrong. I could see RoR being able to pull this off or just some sort of serve side script.

    Also, Timothy Leary Come Check Out This Theory suggested you could post your latest post to your site also. You could probably arrange for this to be done with some grease monkey.

    Have you considered using twitter to micro-blog or just status update for your site visitors? It's a whole lot easier, and do your forum posts really give a good snapshot of who you are as a person? My forum posts range from inane commentary in a TF2 thread to, what I hope are, helpful and thoughtful replies in the H/A or MTT forums.

    Arminas on
  • JobastionJobastion Registered User regular
    edited March 2009
    Willeth wrote: »
    Ideally when someone loaded my site, it would run a search on here, GAF, whatever I designate it to search on, and pull up the most recent by date and time, display a preview and link to it.
    That's funny. You're funny. And webmasters around the world would have your head if you successfully implement that.

    The greasemonkey idea to send your postings to your own webpage is a great idea.

    Jobastion on
    Recommended reading - Worm (Superhero Genre) & Pact (Modern Fantasy Thriller) |
    Backlog Wars - Sonic Generations | Steam!
    Viewing the forums through rose colored glasses... or Suriko's Ye Old Style and The PostCount/TimeStamp Restoral Device
  • WillethWilleth Registered User regular
    edited March 2009
    Jobastion wrote: »
    Willeth wrote: »
    Ideally when someone loaded my site, it would run a search on here, GAF, whatever I designate it to search on, and pull up the most recent by date and time, display a preview and link to it.
    That's funny. You're funny. And webmasters around the world would have your head if you successfully implement that.

    The greasemonkey idea to send your postings to your own webpage is a great idea.

    Well I'm not looking to destroy anyone's site, and presumably it would cache at my end to avoid querying every time. My site gets ridiculously few hits and if it was going to become popular I'd remove the thing.

    I'm thinking it might be able to work somewhat like the last.fm signatures or the mygamercard.net-generated PNGs. Feasible at all? No?

    Willeth on
    @vgreminders - Don't miss out on timed events in gaming!
    @gamefacts - Totally and utterly true gaming facts on the regular!
  • ArminasArminas Student of Life SF, CARegistered User regular
    edited March 2009
    Willeth wrote: »
    Jobastion wrote: »
    Willeth wrote: »
    Ideally when someone loaded my site, it would run a search on here, GAF, whatever I designate it to search on, and pull up the most recent by date and time, display a preview and link to it.
    That's funny. You're funny. And webmasters around the world would have your head if you successfully implement that.

    The greasemonkey idea to send your postings to your own webpage is a great idea.

    Well I'm not looking to destroy anyone's site, and presumably it would cache at my end to avoid querying every time. My site gets ridiculously few hits and if it was going to become popular I'd remove the thing.

    I'm thinking it might be able to work somewhat like the last.fm signatures or the mygamercard.net-generated PNGs. Feasible at all? No?

    The way a forum and the way user meta data gathering sites work are similar in that they both use a database-linked website. After that, they begin to diverge. Skip the spoiler if you don't care about the mechanics.
    Microsoft makes all of your xbox awards and achievements readily available and very easily searchable. Last.FM runs on a similar system (from a design standpoint, I have no idea if they're implemented the same). Both record interactions and data that users send to a database; these records were built with the intention of being easy to query or publish.

    A forum also records a lot of data on a website, but in a different way. User-generated data is sent to the server for record keeping, but upon reaching the server, the data is organized in a specific manner. They're organized based on time received and by inheritance (every thread has many posts, but posts do not have many threads). The web interface was only meant to show the data in that manner. Not in a way to query for specific users with great speed and few resources.

    Willeth, this can be done, but it's not going to be as easy as a gamercard. It's not impossible and there are a number of ways I can think of doing it.
    • A) You might be buddy-buddy with one of the forum administrators who would be happy to hook you up with your low-traffic occasional database query.
    • B) You could make a server-side script (this is probably not going to be JavaScript) to give your server the necessary data to login to the P-A forums, and then have it perform a search for your username, and then take the most recent post and then copy all of that to your website. I think this is sort of what the AlabasterSlim (Suds) Steam signatures do.
    • C) You could set up greasemonkey for your browser, so that whenever you make a post in P-A, it'll make a copy or your post and upload it to your website also. Unfortunately, it would only record postings you make from that profile of Firefox on that computer.

    If you're asking us, you probably aren't super awesome friends with a P-A forum admin, so A is unlikely. B is a pretty simple idea on paper but difficult to implement. C is probably your best choice if you're okay with the limitation of having to post from that computer's FireFox if you want it updated on your site.

    I hear greasemonkey is pretty easy to use, I haven't tried it myself in any serious effort. But there are loads of tutorials google can dump for you. you could also ask a friend or rent a programmer! Or hire JonXP to make it for you! :D

    Arminas on
  • WillethWilleth Registered User regular
    edited March 2009
    Okay now that I can see how that Greasemonkey script idea would work I actually really like it. Especially since I could include a toggle to disable it so I wouldn't upload any posts about poop or whatever. :)

    I'll look into it, thanks.

    Willeth on
    @vgreminders - Don't miss out on timed events in gaming!
    @gamefacts - Totally and utterly true gaming facts on the regular!
  • SeguerSeguer of the Void Sydney, AustraliaRegistered User regular
    edited March 2009
    Arminas wrote: »
    Willeth wrote: »
    Jobastion wrote: »
    Willeth wrote: »
    Ideally when someone loaded my site, it would run a search on here, GAF, whatever I designate it to search on, and pull up the most recent by date and time, display a preview and link to it.
    That's funny. You're funny. And webmasters around the world would have your head if you successfully implement that.

    The greasemonkey idea to send your postings to your own webpage is a great idea.

    Well I'm not looking to destroy anyone's site, and presumably it would cache at my end to avoid querying every time. My site gets ridiculously few hits and if it was going to become popular I'd remove the thing.

    I'm thinking it might be able to work somewhat like the last.fm signatures or the mygamercard.net-generated PNGs. Feasible at all? No?

    The way a forum and the way user meta data gathering sites work are similar in that they both use a database-linked website. After that, they begin to diverge. Skip the spoiler if you don't care about the mechanics.
    Microsoft makes all of your xbox awards and achievements readily available and very easily searchable. Last.FM runs on a similar system (from a design standpoint, I have no idea if they're implemented the same). Both record interactions and data that users send to a database; these records were built with the intention of being easy to query or publish.

    A forum also records a lot of data on a website, but in a different way. User-generated data is sent to the server for record keeping, but upon reaching the server, the data is organized in a specific manner. They're organized based on time received and by inheritance (every thread has many posts, but posts do not have many threads). The web interface was only meant to show the data in that manner. Not in a way to query for specific users with great speed and few resources.

    Willeth, this can be done, but it's not going to be as easy as a gamercard. It's not impossible and there are a number of ways I can think of doing it.
    • A) You might be buddy-buddy with one of the forum administrators who would be happy to hook you up with your low-traffic occasional database query.
    • B) You could make a server-side script (this is probably not going to be JavaScript) to give your server the necessary data to login to the P-A forums, and then have it perform a search for your username, and then take the most recent post and then copy all of that to your website. I think this is sort of what the AlabasterSlim (Suds) Steam signatures do.
    • C) You could set up greasemonkey for your browser, so that whenever you make a post in P-A, it'll make a copy or your post and upload it to your website also. Unfortunately, it would only record postings you make from that profile of Firefox on that computer.

    If you're asking us, you probably aren't super awesome friends with a P-A forum admin, so A is unlikely. B is a pretty simple idea on paper but difficult to implement. C is probably your best choice if you're okay with the limitation of having to post from that computer's FireFox if you want it updated on your site.

    I hear greasemonkey is pretty easy to use, I haven't tried it myself in any serious effort. But there are loads of tutorials google can dump for you. you could also ask a friend or rent a programmer! Or hire JonXP to make it for you! :D


    Option B can be done - the forums do provide a way to very quickly search for someone's latest posts (http://forums.penny-arcade.com/search.php?do=finduser&u=12203 will find Willeth's latest posts).

    As long as you cache this data (at some very reasonable length, so 1hr to 1 day), I don't see why (beyond the PA forum admins hating you :D) you couldn't simply parse this information for what you want. That page however does only give a very brief summary, and getting full info would require going to the actual post it seems.

    Note however that link actually redirects to a search result page (based on a search result ID), so the script would have to catch that.


    EDIT: If you do an advanced search, you can do the same thing but limit the depth of the search to the previous week (so as long as you post something every week... or make it extend the length if nothing is found). For my results this took a 2.6s or so query to 0.11s, so it's quite a marked improvement, and I assume a lot less heavy for the PA forum servers.

    Seguer on
  • bashbash Registered User regular
    edited March 2009
    Seguer wrote: »
    Option B can be done - the forums do provide a way to very quickly search for someone's latest posts (http://forums.penny-arcade.com/search.php?do=finduser&u=12203 will find Willeth's latest posts).

    As long as you cache this data (at some very reasonable length, so 1hr to 1 day), I don't see why (beyond the PA forum admins hating you :D) you couldn't simply parse this information for what you want. That page however does only give a very brief summary, and getting full info would require going to the actual post it seems.

    Note however that link actually redirects to a search result page (based on a search result ID), so the script would have to catch that.


    EDIT: If you do an advanced search, you can do the same thing but limit the depth of the search to the previous week (so as long as you post something every week... or make it extend the length if nothing is found). For my results this took a 2.6s or so query to 0.11s, so it's quite a marked improvement, and I assume a lot less heavy for the PA forum servers.

    Using a forum to be your personal signature is the height of assholery. It doesn't matter how infrequent the requests are, you're using someone else's infrastructure in a way they did not intend for it to be used. Forum searches are intensive operations and even a few extra cause undue load on the servers. Remember this is a forum you're being allowed to use for free, you do not get to decide how PA's resources get used. The Greasemonkey script is the only way to do what Willeth is asking without being a special olympics bronze medalist about it. All of the load is on the client end and therefore fair game as far as resource usage goes.

    bash on
    comi-sig1.jpg
  • ArminasArminas Student of Life SF, CARegistered User regular
    edited March 2009
    In response to Seguer, yes, I know that searching can be done, that's not the difficult part. The hard part will be maintaining site credentials to log in to the forums and do this search. Over, and over and over. Willeth wanted an automated way to do this. I don't think he wanted to search manually everyday and then upload the data himself because, well, then he wouldn't have asked, right?

    Arminas on
  • WillethWilleth Registered User regular
    edited March 2009
    I think we're done with the whole 'querying the forums' thing, guys. No matter how or why it's a bad idea, it's still a bad idea.

    The Greasemonkey thing is what I'll be looking into.

    Willeth on
    @vgreminders - Don't miss out on timed events in gaming!
    @gamefacts - Totally and utterly true gaming facts on the regular!
  • stigweardstigweard Registered User regular
    edited March 2009
    Arminas wrote: »
    [*]C) You could set up greasemonkey for your browser, so that whenever you make a post in P-A, it'll make a copy or your post and upload it to your website also. Unfortunately, it would only record postings you make from that profile of Firefox on that computer.

    This is probably the easiest and most polite / least intensive to the other sites. Send the copy with a link back to the thread or something.

    edit: late

    stigweard on
Sign In or Register to comment.