ULX

Author Topic: Uban PHP Viewer  (Read 32548 times)

0 Members and 1 Guest are viewing this topic.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Uban PHP Viewer
« Reply #30 on: June 08, 2008, 10:25:27 AM »
Hmm, figured it was threaded because it says so on the release thread. :P
Experiencing God's grace one day at a time.

Offline spbogie

  • Ulysses Team Member
  • Sr. Member
  • *****
  • Posts: 456
  • Karma: 41
Re: Uban PHP Viewer
« Reply #31 on: June 08, 2008, 02:19:33 PM »
Ah, I get it now. If you call it with a noblock flag, then it spawns a thread and returns a refrence which you can use to check later to see if it completed and extract the information from it. It is still blocking by default though.
I have not failed. I've just found 10,000 ways that won't work. - Thomas A. Edison
I reject your reality and substitute my own. - Adam Savage

Offline Lt.Smith

  • Newbie
  • *
  • Posts: 32
  • Karma: 4
Re: Uban PHP Viewer
« Reply #32 on: June 09, 2008, 01:05:02 PM »
Ah, I get it now. If you call it with a noblock flag, then it spawns a thread and returns a refrence which you can use to check later to see if it completed and extract the information from it. It is still blocking by default though.

See, that just goes above my head somewhat, not sure how to do it. What I noticed when I used SQL for server logs, is it froze the entire game for as long as it took to establish a connection and execute the query. A combination of cheap hosting services and data having to go across the Atlantic led to an unplayable game, but 200ms of lag every 5-7 minutes goes unnoticed.

If you guys have info on how to use the gm_mysql module without it blocking, I'm all ears. For logs I wouldn't care about what the query (always an INSERT, obviously) returned anyway, except maybe to notify the server admin when a query failed.

Offline spbogie

  • Ulysses Team Member
  • Sr. Member
  • *****
  • Posts: 456
  • Karma: 41
Re: Uban PHP Viewer
« Reply #33 on: June 10, 2008, 07:33:05 PM »
See, that just goes above my head somewhat

Haha, don't worry about it. We tend to loose a lot of people when we go back and forth like that (Jam can attest to that one).

Basically, what it means is that the way UBan is written right now all calls to the database will block until they can return a result. Changing it over to use asynchronux (non-blocking) calls would require a bit of a re-think, but nothing overly complex.
I have not failed. I've just found 10,000 ways that won't work. - Thomas A. Edison
I reject your reality and substitute my own. - Adam Savage

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Uban PHP Viewer
« Reply #34 on: June 10, 2008, 08:42:22 PM »
Remember the guy in the movie "Office Space".. the one who's job is to talk to the engineers for the customer, that later gets fired because the Bob's think he's useless.
I'm pretty much that guy (but, fortunately, no one on this team is Bob-like)
I'm fortunate enough to be able to code a bit too. :D

:P

[EDIT] - By the way, we've derailed much of NinjaDude's release.
Anyone else care to find a good split point to DevCorner?
« Last Edit: June 10, 2008, 08:44:26 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Uban PHP Viewer
« Reply #35 on: June 11, 2008, 01:48:05 AM »
Sure, make mine banana.
Experiencing God's grace one day at a time.

Offline Ninjadude101

  • Newbie
  • *
  • Posts: 38
  • Karma: 4
Re: Uban PHP Viewer
« Reply #36 on: August 06, 2008, 07:21:56 PM »
I'm going to be working on a much nicer version if anyone is interested. If not i shan't bother releasing it :P

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Uban PHP Viewer
« Reply #37 on: August 06, 2008, 09:07:53 PM »
Though us ded server/php users are a small niche, I'm sure we're all interested.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline jamescorbett

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: Uban PHP Viewer
« Reply #38 on: August 09, 2008, 07:15:02 AM »
Simple but effective.

Offline Ninjadude101

  • Newbie
  • *
  • Posts: 38
  • Karma: 4
Re: Uban PHP Viewer
« Reply #39 on: August 10, 2008, 04:54:47 AM »
Actually saying that I'm not sure i will release the updated version as i have seen with big communites are using my script as a base to their viewer but had removed the link to my page, which was requested to be left in. In fact most of the places ive been looking through seem to have removed it, this angers me somewhat.

Anyway I'm still unsure, as I'd like to help the community but I would like to be able to have my link left on it as it helps me to generate more site members in return for my script. Oh well, I'm sure I'll still probably release it.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Uban PHP Viewer
« Reply #40 on: August 10, 2008, 06:56:24 AM »
Welcome to the sad, cruel world of open source development. :P
Experiencing God's grace one day at a time.

Offline thelord

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: Uban PHP Viewer
« Reply #41 on: August 11, 2008, 04:49:15 AM »
Heh, I ended up starting from scratch and writing my own page anyway.

You can take this and use it, modify it, whatever. Just remember to be nice and keep my name in the bottom or commented out in the page's source or something if you really find it ugly. Do whatever.

The coding is pretty sloppy, especially the pagination part, but I was too lazy to check where I'd mixed up ' and " quotes. I pulled the pagination part from a deceased script elsewhere, so it's a bit of a mess. If you want to cut down on the amount of queries you're executing, the thing you can remove is the permaban counter, it'll come out with no trouble at all. I tried to comment what I was doing as much as possible, so it shouldn't be too hard to follow.

The attached file is .txt by the way - just rename it to .php, fill in your database info and you're ready to roll! :)

Check out what she looks like here!





With my keen eye I fixed up your sexy script.

Here's the line that saves all the problems:
Code: [Select]
echo '<a href="?page=' . $i . '">' . $i . '</a> '; // echo a link to the page

Offline Killers2

  • Newbie
  • *
  • Posts: 33
  • Karma: 0
Re: Uban PHP Viewer
« Reply #42 on: August 19, 2008, 09:15:36 PM »
Cool script I use this. I removed the thing at the bottom but only because it ruined the feel to the viewer and looked out of place to me.   :(

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Uban PHP Viewer
« Reply #43 on: August 20, 2008, 03:37:02 PM »
Cool script I use this. I removed the thing at the bottom but only because it ruined the feel to the viewer and looked out of place to me.   :(
Then by all means, if you haven't already, find another way to show credit publicly. :)
A small text link somewhere can go a long way.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Ninjadude101

  • Newbie
  • *
  • Posts: 38
  • Karma: 4
Re: Uban PHP Viewer
« Reply #44 on: January 20, 2009, 06:50:55 PM »
I know it's been a long time for posting in this thread, but it seems stupid to make a new thread.
Was speaking with Meg earlier today in my server (testing stuff) and I mentioned that i am re-building my clans website, totally re-writing a new ban-page and layout, so when we are done and moved over to the new system, i will release our old files.

To see the current look of the page: http://www.aouv.co.uk/serverbans

I know, having no pagination is kinda sucky, but it has search which makes up for it.
If i feel good i might put pagination in it just for you guys, would be an excuse to actually teach myself how to do that.

Please keep in mind i started making this page around a year ago (ish) some code may be from other sources, but the most part is my own bits. Also try to remember that this was initially made just for us, so we didn't make it super-easy to configure and it isn't made with the guy setting it up in mind. That said, there is a file for storing the database config variables in there, which obviously is the most of the configuration. If you want to change anything like images or layout, you're on your own.

Thanks