Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
PHP-based File Browser

 
Post new topic   Reply to topic Printable version
 View previous topic  Writing a Windows Service Post :: Post Eject and Closing CD/DVD tray. (C++)  View next topic  
Author Message
Cerium
Server Help Squatter


Age:36
Gender:Gender:Male
Joined: Mar 05 2005
Posts: 807
Location: I will stab you.
Offline

PostPosted: Sun Mar 26, 2006 12:48 pm    Post subject: PHP-based File Browser Reply to topic Reply with quote

Ok, Ive competely ripped this apart and recoded it...

The new script is a fully customizable file browser. It can do everything it did before, except the protocol can now be changed, and the portion of the script which builds content based on user selection is now done through plugins.
The html is virtually the same, so its still 100% valid xhtml strict. The javascript has been touched up so it works in FF as well as IE and Opera.
The display framework can now be easily modified to embed the script into existing pages by changing the write_html_header and write_html_footer functions.
A fully functional version is up at http://hybrid.shanky.com/misc/cfb for those of you who want to see what it looks like now, which isnt that much different.

The only 'issue' I have yet to resolve is with the file images. I didnt change out the windows media circle image for files, so it may look a bit odd when you have html files with that icon. The 'img/file.png' image can be swapped out for a more generic 16x16px icon if desired.

As of right now I dont have any plugins completed, but I will upload those as I get around to finishing the mms and zip plugins. Others I will leave up to you guys.


Also, BDAltWins: I still hate you and I still want you to die.
_________________
There are 7 user(s) ignoring me right now.




cfb v1.01.00

cfb110.zip - 10.66 KB
File downloaded or viewed 7 time(s)


Last edited by Cerium on Tue Mar 28, 2006 2:18 pm, edited 3 times in total
Back to top
View users profile Send private message Add User to Ignore List AIM Address
D1st0rt
Miss Directed Wannabe


Age:30
Gender:Gender:Male
Joined: Aug 31 2003
Posts: 2247
Location: Blacksburg, VA
Offline

PostPosted: Sun Mar 26, 2006 2:46 pm    Post subject: Reply to topic Reply with quote

You don't have any Armin Van Buuren or Toby Emerson? Should probably get on that.
_________________

Back to top
View users profile Send private message Add User to Ignore List Visit posters website
BDwinsAlt
Agurus's Posse


Age:28
Gender:Gender:Male
Joined: Jun 16 2003
Posts: 1145
Location: Alabama
Offline

PostPosted: Sun Mar 26, 2006 5:51 pm    Post subject: Reply to topic Reply with quote

When i click a link it takes me to a lan ip. Might wanna fix that.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Cerium
Server Help Squatter


Age:36
Gender:Gender:Male
Joined: Mar 05 2005
Posts: 807
Location: I will stab you.
Offline

PostPosted: Sun Mar 26, 2006 8:41 pm    Post subject: Reply to topic Reply with quote

...

Are you sure? Really?
Back to top
View users profile Send private message Add User to Ignore List AIM Address
BDwinsAlt
Agurus's Posse


Age:28
Gender:Gender:Male
Joined: Jun 16 2003
Posts: 1145
Location: Alabama
Offline

PostPosted: Mon Mar 27, 2006 5:21 pm    Post subject: Reply to topic Reply with quote

On your site it shows this link for mp3s.
"mms://192.168.0.1/music/mp3s"

On the download it shows the same, so I know it can be configured.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Cyan~Fire
I'll count you!
I'll count you!


Age:30
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Mon Mar 27, 2006 5:45 pm    Post subject: Reply to topic Reply with quote

Well, just look at the header:
Code: Show/Hide
<span class="header">mms://192.168.0.1/</span>

_________________
This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Cerium
Server Help Squatter


Age:36
Gender:Gender:Male
Joined: Mar 05 2005
Posts: 807
Location: I will stab you.
Offline

PostPosted: Mon Mar 27, 2006 6:02 pm    Post subject: Reply to topic Reply with quote

I was being sarcastic in my last post. Im well aware it points to a lan IP -- ITS A DEMO!

I understand hes trying to be all helpful and accepted and what not, but for christs sake, theres a goddamn red and white banner explaining that none of the links will work.


Hell, the only reason I even provided the demo is because I dont expect a lot of people to know what MMS is, or what a publishing point is. In reality, this is nothing more than a glorified file-browser aimed for use with a specific server application. I figured maybe some people on here would be interested in the script so they could employ/improve similar features on their own websites. In no way did I intend people to think I was providing a streaming media service with MGBs/Shankys bandwidth.


Last edited by Cerium on Tue Mar 28, 2006 2:05 pm, edited 1 time in total
Back to top
View users profile Send private message Add User to Ignore List AIM Address
BDwinsAlt
Agurus's Posse


Age:28
Gender:Gender:Male
Joined: Jun 16 2003
Posts: 1145
Location: Alabama
Offline

PostPosted: Mon Mar 27, 2006 8:27 pm    Post subject: Reply to topic Reply with quote

Since when do people take time to read the directions? We click and go. You could show a demo that works :lol:
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Cerium
Server Help Squatter


Age:36
Gender:Gender:Male
Joined: Mar 05 2005
Posts: 807
Location: I will stab you.
Offline

PostPosted: Mon Mar 27, 2006 10:20 pm    Post subject: Reply to topic Reply with quote

And you could step infront of a moving truck, ass.

MGB, I would appreciate it if you deleted all of the posts after distorts, please and thank you.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:35
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3603
Location: Las Vegas
Offline

PostPosted: Mon Mar 27, 2006 11:36 pm    Post subject: Reply to topic Reply with quote

Cerium wrote:
In no way did I intend people to think I was providing a streaming media service with MGBs/Shankys bandwidth.

Actually, for the domain shanky.com for the month of march, we only use 16% of the allowed bandwidth. We still have around 90 gig worth of bandwidth if you'd like to host a couple of small media files.

Cerium wrote:
MGB, I would appreciate it if you deleted all of the posts after distorts, please and thank you.

Sad part is, I did the same thing. People do just randomly click on things without reading. I at least looked at the link's URLs and knew it wasn't going to work, and figured it was intentional.
Back to top
View users profile Send private message Add User to Ignore List Send email
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:35
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3603
Location: Las Vegas
Offline

PostPosted: Mon Mar 27, 2006 11:40 pm    Post subject: Reply to topic Reply with quote

Play Selected goes to misc/cpl/index.php which doesn't exist on the demo. Clear selected doesn't do anything. This was all testing on an old version of Firefox. Build ID: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 ID:2005051112
Back to top
View users profile Send private message Add User to Ignore List Send email
Maverick
broken record


Age:34
Gender:Gender:Male
Joined: Feb 26 2005
Posts: 1521
Location: The Netherlands
Offline

PostPosted: Tue Mar 28, 2006 1:18 am    Post subject: Reply to topic Reply with quote

BDWinsAlt you are a moron.

Cerium, can you explain what MMS exactly is, what its purpose is (etc etc) and how this neat looking script fits in? icon_smile.gif
Oh it can also be used for file browsing (should have read that before icon_redface.gif) but that is neat biggrin.gif
_________________
Nickname: Maverick (I changed my name!)
TWCore developer | Subspace statistics
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Cerium
Server Help Squatter


Age:36
Gender:Gender:Male
Joined: Mar 05 2005
Posts: 807
Location: I will stab you.
Offline

PostPosted: Tue Mar 28, 2006 9:59 am    Post subject: Reply to topic Reply with quote

Well in short, MMS is a protocol for on-demand streaming audio. I dont know the exact details on how the backend works, but in WMP you can fast forward/rewind/etc as if all of the media files are on your machine. The only downside is that in WMP it displays the entire playlist as a single entry, and the name of that entry changes when you press forward/back -- hence the need for this script.

The script is simply a file browser that has the default (hard coded, in this case) protocol set to 'mms'. If someone wanted, you could easily modify it to use http or ftp, and then change the ext filter to something like .exe|.html and youd have yourself a standard file browser. Infact, Ill add the protocol and form action params to the config.php file so you can use it as a file browser without having to modify the script.

MGB, even though youve given the goahead on the media, youd need an mms server to actually serve the content. If youre running on a win 2k3 server you can install Windows Media Services, but thats entirely up to you if you want to do that -- I simply dont have the bandwidth to do so myself.
Also, Ill download FF later today and check what part of the JS it doesnt like.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Cerium
Server Help Squatter


Age:36
Gender:Gender:Male
Joined: Mar 05 2005
Posts: 807
Location: I will stab you.
Offline

PostPosted: Tue Mar 28, 2006 2:10 pm    Post subject: Reply to topic Reply with quote

Ok, updates for this stupid script:

1) I found and fixed the JS issues in FF. FF's version of the getElementsByTag function is rather retarded. On the bright side, the new method is probably faster anyway.

2) The script is no longer limited to the mms protocol. Infact, most of the configuration got changed, and this can now be used for virtually anything.

3) Any php5 specific code has been either removed, or isolated to a point where the basic functionality exists on any system running php4 or newer.

4) I removed the default 'playlist builder' and replaced it with a dynamic plugin system. User-defined plugins can be designed to build content based on the user selections. The plugins are php5 specific, and the feature is disabled on systems running older php versions.

5) The html has been broken up into 4 sections to make integrating this script into existing pages considerably easier.


Thats about it. Ill post examples and tutorials for the plugin system later.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Cyan~Fire
I'll count you!
I'll count you!


Age:30
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Tue Mar 28, 2006 3:43 pm    Post subject: Reply to topic Reply with quote

Can you make it space out the html a bit?
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Cerium
Server Help Squatter


Age:36
Gender:Gender:Male
Joined: Mar 05 2005
Posts: 807
Location: I will stab you.
Offline

PostPosted: Wed Mar 29, 2006 2:18 pm    Post subject: Reply to topic Reply with quote

Why?
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Cyan~Fire
I'll count you!
I'll count you!


Age:30
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Wed Mar 29, 2006 3:40 pm    Post subject: Reply to topic Reply with quote

So it's easier to read. Why obfuscate it?
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Cerium
Server Help Squatter


Age:36
Gender:Gender:Male
Joined: Mar 05 2005
Posts: 807
Location: I will stab you.
Offline

PostPosted: Wed Mar 29, 2006 3:48 pm    Post subject: Reply to topic Reply with quote

Because adding inline formation is an unecessary pain in the ass. The function that does the bulk of the work is called recursively, so to add any kind of proper tabbing would require another global variable, and a bit more code.

Realisticly, most people wont even look at that, so long as its functioning.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Cyan~Fire
I'll count you!
I'll count you!


Age:30
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Wed Mar 29, 2006 5:38 pm    Post subject: Reply to topic Reply with quote

What about just a newline after every tag? I'm not talking about tabbing.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Cerium
Server Help Squatter


Age:36
Gender:Gender:Male
Joined: Mar 05 2005
Posts: 807
Location: I will stab you.
Offline

PostPosted: Wed Mar 29, 2006 5:44 pm    Post subject: Reply to topic Reply with quote

I still dont really see the point.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Cyan~Fire
I'll count you!
I'll count you!


Age:30
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Thu Mar 30, 2006 4:40 pm    Post subject: Reply to topic Reply with quote

What's the point of open source? So people can see how you did something.

It's only a minor change, and it doesn't hurt anything.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Cerium
Server Help Squatter


Age:36
Gender:Gender:Male
Joined: Mar 05 2005
Posts: 807
Location: I will stab you.
Offline

PostPosted: Thu Mar 30, 2006 6:00 pm    Post subject: Reply to topic Reply with quote

Its not the same as byte code or asm. If someone wants to do what youre talking about, they can do a simple find and replace on the source. Replace all instances of '>' with '>\n'.
Its still open source. You can download the script as-is and see how I did everything. Infact, you can make the addition to the script the same way I described above.

As Ive said like three times now, I dont really see the point. HTML never feels obfuscated to me, and seeing large blocks of script-generated html spaning across a single line is not uncommon. Personally, I think you should get used to seeing it. Especially if you enjoy looking at the source of pages which are generated by one of the billions of CMSs out there.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
SamHughes
Server Help Squatter


Joined: Jun 30 2004
Posts: 249
Location: Greenwich
Offline

PostPosted: Fri Mar 31, 2006 12:19 pm    Post subject: Reply to topic Reply with quote

Cyan~Fire, just get HTML Tidy or any other decency program; problem solved.
Back to top
View users profile Send private message Add User to Ignore List
Cyan~Fire
I'll count you!
I'll count you!


Age:30
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Fri Mar 31, 2006 3:47 pm    Post subject: Reply to topic Reply with quote

Whatever. There's nothing I can do against plain stubbornness.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Non-Subspace Related Coding All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 192 page(s) served in previous 5 minutes.

phpBB Created this page in 0.111936 seconds : 50 queries executed (58.2%): GZIP compression disabled