Author |
Message |
TheShniz
Regular
![Regular Regular](modules/Forums/images/ranks/2stars.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Jan 27, 2004
Posts: 65
|
Posted:
Sun Feb 20, 2005 10:28 pm |
|
As the subject says, is there a way I can modify the standard Downloads module to allow for mms:// as it C'ms 2 B getting hung up in passing it when a user goes to d/l it? I'm getting the Xpected "Can't find server" @ the link: /modules.php?name=Downloads&d_op=getit&lid=1
P.S.
I really don't need the added capability of other download modules on this site, but would it work? I haven't got 1x handy 2 install but will try 2 2morrow.
Any help is always appreciated, thanx!
- J |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hitwalker
Sells PC To Pay For Divorce
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined:
Posts: 5661
|
Posted:
Mon Feb 21, 2005 8:18 pm |
|
any chance you can translate it to normal english...... ![Confused](modules/Forums/images/smiles/icon_confused.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
TheShniz
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Feb 22, 2005 10:18 am |
|
MMS is a protocol (much like http, ftp, etc.) that signals the windows client (not sure if Linux supports) 2 do a progressive download of the link (Either audio or video) rather than the normal Open/Save/Cancel where it actually has 2 Xfer the entire file B4 opening. Progressive Downloading is poor man's streaming in that it doesn't require server software as it's B'ing handled @ the client w/ use of a buffer.
SOoooooooooo, if I've got say a 100MB audio or video file, it won't wait 2 d/l the entire file B4 it opens... instead it will create a buffer & play as it d/l's. The end result is U will also have the file available 4 playback offline, as opposed 2 a true streaming (no file 2 save, constant).
In the case of phpNuke, it C'ms 2 B hiding the URL that the user is B'ing Xfer'd. I've noticed this is also true w/ the Web Linx also. The "hiding" of the URL in its passing 2 the user is causing the "server not found." Looking 4 a way around this.
- J |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
sixonetonoffun
Spouse Contemplates Divorce
![](modules/Forums/images/avatars/d1ecfa674c890aee2698b.jpg)
Joined: Jan 02, 2003
Posts: 2496
|
Posted:
Tue Feb 22, 2005 11:25 am |
|
Quick and dirty force all urls to mms
In the index.php
find function getit
$url = ereg_replace("http://","mms://",$url); //new line
Header("Location: $url");
Urls would still be added using http but it will convert them to mms when grabbing the file. |
_________________ [b][size=5]openSUSE 11.4-x86 | Linux 2.6.37.1-1.2desktop i686 | KDE: 4.6.41>=4.7 | XFCE 4.8 | AMD Athlon(tm) XP 3000+ | MSI K7N2 Delta-L | 3GB Black Diamond DDR
| GeForce 6200@433Mhz 512MB | Xorg 1.9.3 | NVIDIA 270.30[/size:2b8 |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
sixonetonoffun
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Feb 22, 2005 12:15 pm |
|
This might be a little nicer
Code:
function getit($lid) {
global $prefix, $db;
$lid = intval($lid);
$db->sql_query("update ".$prefix."_downloads_downloads set hits=hits+1 WHERE lid='$lid'");
update_points(17);
$result = $db->sql_query("SELECT url FROM ".$prefix."_downloads_downloads WHERE lid='$lid'");
list($url) = $db->sql_fetchrow($result);
// in_array won't work on older php versions this way
// Add media extensions to this array
$allowed_ext = array(
"wav",
"mp3",
"avi");
$ext = substr(strrchr($url, "."), 1);
if(in_array($ext, $allowed_ext, true)){
$url = ereg_replace("http://","mms://",$url);}
Header("Location: $url");
}
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
TheShniz
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Feb 22, 2005 2:22 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
sixonetonoffun
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Feb 22, 2005 2:35 pm |
|
Hmn didn't think to try it with IE only tested it in FireFox.
Try it with
Header("Refresh: 0; url=
in place of
Header("Location: |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
sixonetonoffun
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Feb 22, 2005 2:45 pm |
|
Ok I added one more note and changed it to handle upper case issues.
Code:
function getit($lid) {
global $prefix, $db;
$lid = intval($lid);
$db->sql_query("update ".$prefix."_downloads_downloads set hits=hits+1 WHERE lid='$lid'");
update_points(17);
$result = $db->sql_query("SELECT url FROM ".$prefix."_downloads_downloads WHERE lid='$lid'");
list($url) = $db->sql_fetchrow($result);
// in_array won't work on older php versions this way
// Add media extensions to this array lower case only!
$allowed_ext = array(
"wav",
"mp3",
"avi");
$ext = substr(strrchr(strtolower($url), "."), 1);
if(in_array($ext, $allowed_ext, true)){
$url = ereg_replace("http://","mms://",$url);}
Header("Refresh: 0; url=$url");
}
|
There would be a ton more things that could be done with a little more work smoother. Loading media player in compact mode is one that tops my list if this was something I used everyday. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
TheShniz
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Feb 22, 2005 9:30 pm |
|
Kudos 2 U dear sir 4 your most appreciated help! The refresh definately did the trick, and the lowercase is something I'd not thought of. Not sure if I'd ever run in2 the prob as I do everything in lowercase 2 keep consistency, but would def confuz the crap out of me if I did. I'm actually suprised no1's come up w/ a module specifically 4 streaming from a library (as opposed 2 "radio" stations). U've saved me SOoooooooooooo much time & have been a great help!
P.S.
I remember the days of having 2 develop pages many diff ways & having 2 test in Netscape Communicator 4 & 6 and Internet Explorer 4 & 5 (& 5.5) (ignored Opera). While I appreciate FireFox, I definately like having my audience only having 1x browser... makes life, simpler
Thanx as always!
- J |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
sixonetonoffun
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Feb 22, 2005 9:55 pm |
|
There are a few efforts out there. But your right about this being about as simple to use and flexible enough to create a really nice area for a media library. Throw in a nice wysiwyg editor for album covers ect... and little makeover wallah! |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
TheShniz
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Feb 22, 2005 11:41 pm |
|
Very true, plenty of online databases 4 album covers (imdb, etc.). This particular application is B'ing used 4 simple archiving of recorded services @ a church. B'ing how any given service will run just over an hour, that equates 2 just under 30MB @ good quality per file (10MB 4 crap quality). Can't assume 30MB Xfer's 2 B okay 4 a less technologically advanced general public, streaming (progressive d/l'ing) is a neccessity.
- J ![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
TheShniz
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Feb 23, 2005 10:46 pm |
|
Here's a quick (stupid) question...
I'm toying around w/ this a lil bit & decided it needed to display a 'pleaz wait while U connect' message (since it really does take a bit 2 connect), load the file, then go history.back(1) so the user isn't left staring @ a big white, blank screen. The prob I'm having is that it's going back much 2 quick & isn't even giving the player time 2 load. What's a better way of doing this?
P.S.
This is my 3rd attempt @ posting a reply as Sentinel keeps saying I'm attempting a Script Attack, grrrrrrrrrrrr........
Thanx as always!
- J
Code:
echo "Please wait a moment as you connect to the server...";
global $prefix, $db;
$lid = intval($lid);
$db->sql_query("update ".$prefix."_downloads_downloads set hits=hits+1 WHERE lid='$lid'");
update_points(17);
$result = $db->sql_query("SELECT url FROM ".$prefix."_downloads_downloads WHERE lid='$lid'");
list($url) = $db->sql_fetchrow($result);
// in_array won't work on older php versions this way
// Add media extensions to this array lower case only!
$allowed_ext = array(
"wav",
"mp3",
"avi");
$ext = substr(strrchr(strtolower($url), "."), 1);
if(in_array($ext, $allowed_ext, true)){
$url = ereg_replace("http://","mms://",$url);}
Header("Refresh: 0; url=$url");
echo "<scr*pt>history.back(1)</scr*pt>";
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
sixonetonoffun
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Feb 24, 2005 6:49 am |
|
You'll have to put a page into the function and use a <meta refresh in this new "loader page" to grab the $url (the file). Replace the line Header("Refresh: 0; url=$url"); with something like this.
Code:
@include("header.php");
echo "<META HTTP-EQUIV=\"refresh\" content=\"2;URL=$url\">";
OpenTable();
// html message here
CloseTable();
@include("footer.php");
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
sixonetonoffun
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Feb 24, 2005 7:38 am |
|
I was looking at your java button that was the problem I think mainly. Try this one.
Code:
echo "<tr align=\"right\"><td><form><input type=\"submit\" value=\"Go Back\" onclick=\"javascript:history.back(1);return false;\"</form></td></tr>";
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
sixonetonoffun
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Feb 24, 2005 7:47 am |
|
With just a little more work you could setup the page with embedded media players and handle all types of browsers, players and media. Package it up and charge $5.00 a download lol! ![Bang Head](modules/Forums/images/smiles/banghead.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
TheShniz
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Feb 24, 2005 10:16 am |
|
Pulling in the header & footer is definately much more elegant, thanx 4 that, but I was trying 2 do it a lil different on the button.
Lemme ask a different way...
I'm trying 2 make it idiot proof so the user doesn't have to click back, so no button to push. The quickie script to do the history.back took place instantly. In a perfect world, the player would also load instantly, but that's obviously not the case . I was trying 2 avoid a timed function using a refresh, but now that I think of it is prob the only way since the browser only "calls" the player & doesn't really know its status. HMmmmmmm, no such thing as a "smart browser"..... guess the timed refresh is the only way 2 do it (like the "view your post" message & refresh after submitting in2 the forum).
I think I may have answered my own Q
Tell U what, I'll keep asking U how 2 do stuff, copy & paste everything U say in2 a nice script, put in 4 a new domain buymyscript.com, say it's mine & yell @ any1 who says otherwise, mayB give away an older revision 4 free, & then charge $5 for "special" access 2 the latest script. Rather than maintaining current code, I'll just keep adding more bloat, cause huge security gaps, & beg Chatserv 2 fix 'em all. Of course I wouldn't include his fixes in later releases & would make peeps install them manually.
:: sigh ::
Sorry 4 the rant, LMAO... while I may keep "toying" w/ this 2 eventual continued development (if the need Xists), I just couldn't see myself charging anything for it, especially when peeps like U R so helpful (Seems like taking advantage). 1 of my pet pieves (w/ 2x communities in particular: phpNuke & PocketPC) R peeps who really do develop stupid lil progs, modules, or themes & then try 2 make a quick buck off not much. I think it largely turns OpenSource "communities" in2 a mob of "nickle & diming" leaches, @least @ the worst case scenario where every1 charges 4 everything.
I dunno, I suppose there's a fine line Btween "should be" freeware & "should be" payware. I figure if developers really do require tons of time & $ to develop something every1 wants, it should B payware. Difference Btween a "script" & a program I guess.
Sorry 4 the rant (de ja vu), & I really do appreciate U helping me out... thanx again!!!
- J |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
sixonetonoffun
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Feb 24, 2005 10:57 am |
|
I don't begrudge anyone for charging a reasonable fee for a quality script. But as soon as you charge a fee you ought to be willing and able to provide support for it. If you charge too much it gets stolen and shared and peddled all over the web for the price of a few nasty cookies or other evil things.
But yeah as time allows we could work on some browser/os detection and matchup some embedded code where its available. The mms urls are a great way of getting around that though for the most part.
The button/forms are really the best way to deal with getting back to somewhere. It might be back -2 is a better option then -1 puttinf the user back at the category they came from and then maybe a second button "Home" to get them out to a familar place. Then a third button for "close window"?
Now is this going to work on my aunts P1 WFWG3.11 IMB laptop? lol or is it time to send her something a little less dated? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
TheShniz
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Feb 24, 2005 12:35 pm |
|
I think U nailed it right w/ "quality"... aka something worth its value, and "reasonable fee" aka charging based on that value. So much piddly stuff flying around, it's difficult 2 C the good from the crap sometimes... hence the nickle & diming. I'd prob say that PocketPC developers R a lil worse @ this than phpNuke, but still C'ms prolific (sp?). Takes 4ever 2 find good freeware 2 do even the most basic things on a PPC. Lastly, if U have the ballz 2 think your ummmm "stuff" (lol) is worth charging $, U should provide support @ the very least.
I agree w/ U on the detection & such. I must admit though, I'm a lil bit new 2 mms URL's myself, as my knowledge on it is the result of my quickly searching 4 a solution. Do U know if the mms protocol is universal, or if it is just recognized by Microsoft aka IE? I know that it's Microsoft's baby, just don't know if Netscape/Firefox/Opera/etc. recognize & process it. I'd assume so since U use FireFox
As far as embedding, U'd have 2 decide how media is delivered 2 a user. If it's actual source (URL) is "hidden" aka harder 2 leech, or opened in a player straight out. I prefer to not embed in webpages, I like the option of easily "saving" something locally, and I like the control of how it's played 2 me. But that's just my preference. w/ progressive d/l'ing, the source IS already saved 2 the user's PC in cache, just not easily accessible, but again can B offered via direct link in the same webpage.
The more I think of this, the more I think of an end solution like Coppermine (may it R.I.P.). If U were 2 increase complexity 2 a larger scale, it would definately need 2 B database driven (not just URL linx) 2 also provide content in multiple 4mats. Xample: Standard Mp3/mpg, RA, WMP, etc. in various compressions aka granny's dialup, broadband, T1, etc. Again, my preferences R 4 Mp3/mpg @ a set compression, but those R just preferences. You could also have an option defined 4 opening in an embed'd player or by user's default. Also not 4getting the admin cp :s
There's definately a "product life cycle" 2 this kind of app.
If U're strapped on updating the proverbial "granny" (your aunt), I've got about 150 PC's I'm tearing through that got donated 2 this same church. They're Dell Optiplex GX110 733MHz PIII w/ 256MB, 10GB HDD, & 17" monitors. LMAO. Taking me 4ever 2 go through (Updating their school's computer lab of 333MHz Slot1 Celery's =Þ). UGH!
P.S.
I think I'm gonna start by changing all references from the 'Downloads' module 2 a renamed 'Media_Library' module. Gonna also use another module (4get which) as reference 4 having its langauge files self contained, vs using phpNuke's main filez (as I'm assuming they R, could B wrong tho).
- J
:: edited ::
I'm not sure a pda can handle a progressive d/l & may require streaming, but another potential app could B making it standalone 4 wifi viewing @ 320x240. I'd love that ability (just bought my 1st PPC a coup months ago after years of Palm... a Dell Axim).
Y 'o Y R my replies getting longer & longer & longer?!?!?!?!? Humbly appologize 4 the novel ![Smack](modules/Forums/images/smiles/smack.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
sixonetonoffun
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Feb 24, 2005 12:56 pm |
|
If at all in Opera and Netscape it would be the newest versions or with a thrid party pluggin most likely. (Yes I still believe Opera is the worlds fastest lol!)
But yeah it seems peaches and cream for the latest IE and FireFox browsers. Pretty much take care of their own buffering as intended. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
TheShniz
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Feb 24, 2005 2:08 pm |
|
I didn't think the Downloads module would B as connected 2 the database as it is and 4got about the voting, etc. Do U think it is worth the time in creating an sql install script and modifying the module itself (versus just saying here's a modified version & overwrite)?
I'm not sure, I could definately C a site not wanting 2 give up having a d/l's section in favor of a media library per se'. Could either keep its ability 2 Xfer exe, zip, etc. (jack of all trades, not specialized) or continue conversion as a seperate module (time).
Ah the joys of a short(er) post
- J |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
sixonetonoffun
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Feb 24, 2005 3:09 pm |
|
At this point I don't see the need to be seperated but it could be done using a search and replace pretty easily. Just adding a mm or something to the table names and giving it a new directory of its own would be a good start. Its a pretty safe bet your not the only one out there who would like to have seperate areas. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
TheShniz
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Feb 24, 2005 4:11 pm |
|
I've actually already created the sql script as nuke_media_library_TABLENAME as well as converted the main index.php, all up & running . I'm currently in the process of going through all the other lil filez as well as spending time updating the (english) language filez "here & there" 4 content purposes. I'll also prob design a new title image 2 get it out of the way (quick).
P.S.
Some background: I'm an old VB/Oracle/WebDeveloper w/ strengths in design & scalable user interfaces. I've very lightly dabled in php 4 a good many years now, but nothing really intense. I've still got a good bit of n00bism to go through w/ php. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
sixonetonoffun
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Feb 24, 2005 5:06 pm |
|
Geez we need to keep you active sounds like. We could use someone to fill the MultiMedia guru role. PHP is great because it offers something for all skill levels. If it wasn't for echo "Hello World!"; I might have never gotten interested in it. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
TheShniz
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Feb 25, 2005 10:59 am |
|
lol, well if/when U find a multimedia guru, lemme know... I could use his help 2! LMAO! I may not B a guru, but I do learn quickly & tend 2 accel @ anything I put a solid effort in2. Prob 1x of the few programmers who also enjoys replacing head gaskets & timing belts, cooks, and large home construction projects. (Willingness 2 learn can B prompted by the general lack of funds, or "frugalness" - NoT cheapness ) I'm young, poor (relatively, not 4 my age), & Blieve blood, sweat, & tears R free!
I've already updated all the 'lil' filez & created a new title, but am STILL converting the admin/index.php!!! Frigg'n taking me 4ever! I'm not so sure I like how how this module administration is setup. There's no class type structure & U obviously can't have 2x functions w/ the same name! SOooooooooooooo, instead of taking advantage of it's prebuilt structure, I'm having 2 rename EVERY function & reference used in this thing! GRrrrrrrrrrrrr.......
It's working, does that count?
- J |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
TheShniz
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Feb 25, 2005 11:50 am |
|
Alright, now I'm confuz'd...
I've finished converting all that I know 2 convert 4 the admin filez. Here's what I did:
1.) added define("_MEDIA_LIBRARY","Media Library"); to root/admin/language/lang-english.php
2.) renamed all DownloadsFUNCTION as Media_Library_FUNCTION (in the module/admin/index.php)
3.) rewrote ALL references IN those functions to their correct Media_Library_FUNCTION (in the module/admin/index.php)
4.) rewrote the modules/Media_Library/language/lang-english.php
Outside of the 1x added entry 2 the /admin/language/lang-xxxxx.php filez, all changes C'm 2 B contained w/in the /modules/xxxxxx/admin folder, a good thing.
Now, Y I'm confuz'd...
I've got a new entry in the modules administration w/ my new logo & new label. When I click on it, it says there R '0' downloads which is correct. When I click on the standard 'Downloads' module admin, it says there R '1' downloads which is correct. Now, even though I've updated the module's language file... it's STILL calling everything a 'Download' instead of 'Media' which I entered. Appears it hasn't taken affect. Also, whenever I click on the linx which R correctly entered, I'm just sent 2 a blank page. I say the linx R correct cause they R showing in its shortcut. Gonna check my database table names real quick 2 make sure it's not blanking out on me cause I referenced the tables incorrectly. Still wouldn't Xplain Y the updated language file hasn't take effect tho...
Just kinda 'roaming' around 2 C if I can find Y this is
- J
:: UPDATED! ::
Am I correct in assuming the "prefix" is nuke & NOT nuke_? This is what I'm using, Example: blah blah blah from " . $prefix . "_media_library_categories blah blah blah.
If I'm incorrect, it would be trying 2 access nuke__media_library_categories, if I'm correct it'd B nuke_media_library_categories |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|