Jump to content

dzhax

Members
  • Content Count

    363
  • Joined

  • Last visited

Everything posted by dzhax

  1. 5mb per user makes you wonder how livestream does it.
  2. I was approached about a project that would be a site that streams live content to its users and also allows a Video On Demand like streaming (Pre-Recorded).The maximum resolution of the videos will be 1080i for the live stream and the same for the VOD.Any suggestions for ISPs/speeds I should be looking for?Currently have a 22Mbps/2Mbps connection from Comcast Cable, i will be upgrading to at least 22/5 soon because business class internet does not have a bandwidth limit.the fastest speeds they offer are 50/10 and 100/10.Now the site has not been made yet, as it is still in brainstorming stages. So I have no idea if streaming currently works well with what I have now.
  3. also if you want it to do it for any pageput this at the top of all pages. <? $urlPrefix = substr($_SERVER['SERVER_NAME'], 0, 4); if($urlPrefix != 'www.') header('Location: http://www.' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']);?> also you might want to look into .htaccessI am no help on that though I have a couple threads open on that.
  4. put this at the top of index.php<? if($_SERVER['SERVER_NAME'] == "example.com") header('Location: http://www.example.com');?>
  5. I have changed my page so that it will write the followinghttp://www.example.com/browse/?action=doth...ion2=dothisalsoinstead of browse?action...
  6. Where is 404 error mentioned in the above post? What KSHawkEye is talking about is when the index file is non existent and shows a listing of what files/folders are in the particular folder@KSHawkEye - There are ways to make an index file that you can customize to show the folder contents minus the index file. But that would require putting this particular index file in each directory or redirecting to a single index file if the index in a folder does not exist (I think htaccess would do this, not sure though).
  7. I have the following .htaccess Options +FollowSymLinks RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^(.*)$ index.php?str=$1 [L] It works wonders for urls likehttp://www.example.com/browseworks finebut when I dohttp://www.example.com/browse?action=dothisI am unable to get the ?action=dothis...All that gets passed is browsehow can i make the following url returnex. http://www.example.com/index.php?str=browse&vars=action=dothis ex. http://www.example.com/index.php?str=browse&vars=action=dothis&action2=dothisalso
  8. Took my first class in HTML my freshman year in high school. The same year I also took 2 VB classes and that really caught my attention. Got into a vo-tech program for the last 3 years of high school that taught BASIC, VB6, COBOL, C, C++ ,HTML, Server 2003, and typing. Graduated high school in 2008 and started at a technical school's 2 year program for Computer Networking Systems. Graduated there a quarter early and now working as a help desk for Comcast Cable. Currently working on multiple projects on the side both for work and other "clients" all of which are web based. I don't really program desktop applications anymore. I figured eventually everything will be in the cloud anyway so why not dive into it now so I don't get left behind.
  9. Hello All,I am working on a project and would like to have simple links to users profilesThe best explanation I can think of is how MySpace does thisex. http://www.myspace.com/tomthe above url would link directly to toms profile where his actual profile is elsewhere likeex. http://www.myspace.com/pages/profile.php?getuser=tombut http://www.myspace.com/tom stays in the address barI am unable to find any info on how to do this, mainly because I don't know what this method of redirection is called.Any help would be greatly appreciated.
  10. that did the trick. i knew a new set of eyes would work.
  11. I am working on CMS and need to create a query depending on the data sent to the page.Parse error: syntax error, unexpected '=' in lib/admin/dataUpdater.php on line 22 $query = "UPDATE global_settings SET ';foreach($vars as $eachValue){ $parsedValue = explode('=',$eachValue); $query += $parsedValue[0] . "='" . $parsedValue[1] . "', ";}$query += "WHERE id=0"; Line 22: $query += $parsedValue[0] . "='" . $parsedValue[1] . "', ";I have even tried: $query += $parsedValue[0] . "\='" . $parsedValue[1] . "', "; and i getWarning: Unexpected character in input: '\' (ASCII=92) state=1 in lib/admin/dataUpdater.php on line 22Parse error: syntax error, unexpected '=' in lib/admin/dataUpdater.php on line 22Any idea because im stumped
  12. Im working on an intranet site for work and i am limited to html, css, and js.I would like to be able to do somthing similar to this: <html> <head> <title>Untitled</title> </head> <body> <div> Blah... blah... <? if(action=='login'){ ?> <div> User: <input type="text" /><br/> Pass: <input type="password" /> </div> <? } else { ?> <div> Logged In stuff.... </div> <? } ?> </div> </body></html> but with only js?I want to make custom pages according to nt login and I already have the code to throw the nt user into a js variable.
  13. i fixed the line 83 error there wasnt a div called chatlog anyore. so nowthere are no errors showing on the page at all. my suspisions were right about what the problem really is. the message is showing up like its supposed to it just below livestream. i haveshortened the width ofthe stream and you can see the box show below it
  14. That is all the code in general.jsAnd to my knowledge the line counts are exact. And according to the error it kind of makes sense that it thinks object is null.@scientist I will try that when I get home from work. Coding on a android tablet would be a nightmare!
  15. The errors IE is showing: Webpage error detailsUser Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.2; .NET4.0E)Timestamp: Fri, 18 Mar 2011 17:19:12 UTCMessage: 'null' is null or not an objectLine: 83Char: 2Code: 0URI: http://www.standthemup.org/tv/lib/js/general.js general.js function changeNavButton(selectedNavId){ window.GET(); if (selectedNavId == 'tvNav'){ if (_GET.admin){ processAjaxVariable('contentBody','lib/addon/tv.php?admin=1'); }else{ processAjaxVariable('contentBody','lib/addon/tv.php'); } document.getElementById('tvNav').className='selectedTab'; document.getElementById('tvBlog').className='unselectedTab'; document.getElementById('tvForum').className='unselectedTab'; document.getElementById('tvStore').className='unselectedTab'; document.getElementById('tvFacebook').className='unselectedTab'; document.getElementById('tvTwitter').className='unselectedTab'; } if (selectedNavId == 'tvBlog'){ processAjaxVariable('contentBody','lib/addon/external.php?src=http://www.standthemup.org/dr'); document.getElementById('tvNav').className='unselectedTab'; document.getElementById('tvBlog').className='selectedTab'; document.getElementById('tvForum').className='unselectedTab'; document.getElementById('tvStore').className='unselectedTab'; document.getElementById('tvFacebook').className='unselectedTab'; document.getElementById('tvTwitter').className='unselectedTab'; } if (selectedNavId == 'tvForum'){ processAjaxVariable('contentBody','lib/addon/external.php?src=https://www.standthemup.org/dr/forum/5'); document.getElementById('tvNav').className='unselectedTab'; document.getElementById('tvBlog').className='unselectedTab'; document.getElementById('tvForum').className='selectedTab'; document.getElementById('tvStore').className='unselectedTab'; document.getElementById('tvFacebook').className='unselectedTab'; document.getElementById('tvTwitter').className='unselectedTab'; } if (selectedNavId == 'tvStore'){ processAjaxVariable('contentBody','lib/addon/external.php?src=https://www.standthemup.org/dr/catalog/10'); document.getElementById('tvNav').className='unselectedTab'; document.getElementById('tvBlog').className='unselectedTab'; document.getElementById('tvForum').className='unselectedTab'; document.getElementById('tvStore').className='selectedTab'; document.getElementById('tvFacebook').className='unselectedTab'; document.getElementById('tvTwitter').className='unselectedTab'; } if (selectedNavId == 'tvFacebook'){ processAjaxVariable('contentBody','lib/addon/external.php?src=http://www.facebook.com/standthemup'); document.getElementById('tvNav').className='unselectedTab'; document.getElementById('tvBlog').className='unselectedTab'; document.getElementById('tvForum').className='unselectedTab'; document.getElementById('tvStore').className='unselectedTab'; document.getElementById('tvFacebook').className='selectedTab'; document.getElementById('tvTwitter').className='unselectedTab'; } if (selectedNavId == 'tvTwitter'){ processAjaxVariable('contentBody','lib/addon/external.php?src=http://twitter.com/standemup'); document.getElementById('tvNav').className='unselectedTab'; document.getElementById('tvBlog').className='unselectedTab'; document.getElementById('tvForum').className='unselectedTab'; document.getElementById('tvStore').className='unselectedTab'; document.getElementById('tvFacebook').className='unselectedTab'; document.getElementById('tvTwitter').className='selectedTab'; }}window.GET = function(){ var url = window.location.href; var array = url.indexOf('#') == -1 ? url.substring(url.indexOf('?') + 1).split(/&;/): url.substring(url.indexOf('?') + 1, url.indexOf('#')).split(/&;/); //URLs can be like either "sample.html?test1=hi&test2=bye" or //"sample.html?test1=hi;test2=bye" window._GET = {}; for(var i = 0; i < array.length; i++){ var assign = array[i].indexOf('='); if(assign == -1){ _GET[array[i]] = true;//if no value, treat as boolean }else{ _GET[array[i].substring(0, assign)] = array[i].substring(assign + 1); } }}function scroll2Bottom() { var objDiv = document.getElementById("chatLog"); objDiv.scrollTop = objDiv.scrollHeight; return false;}function sendChat(newChat){ processAjax('lib/sql/sendChat.php?message='+newChat+'&user='+getCookie('username')+'&important=0'); scroll2Bottom(); document.chatSubmit.reset();}function processAjax(url) { req = window.XMLHttpRequest ? new XMLHttpRequest() : window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : null; req.onreadystatechange = function () { if (req.readyState == 4) { // Complete if (req.status == 200) { // OK response refreshChat(); } else { alert("Problem: " + req.statusText); } } } req.open("GET", url, true); req.send();}function showLoginPage(){ titleLogin = "Login:"; messageLogin = "<form method='post' id='chatroomLogin' name='drupalLogin'>Username: <input type='text' name='username' style='background:gray; color:black; border:0px transparent solid;' onkeydown='return disableEnterKey(event)' /><br/><br/><input name='loginSubmit' type='button' style='background:gray; color:black; border: 0px transparent solid;' value='Login' onclick='setUsername(document.drupalLogin.username.value)' /></form>"; document.getElementById('loginTitle').innerHTML = titleLogin; document.getElementById('loginBody').innerHTML = messageLogin; document.drupalLogin.username.value=""; scroll(0,0); obj = document.body; obj.style.overflow = "hidden"; //hidden obj2 = document.getElementById("loginContainer"); obj2.style.visibility = "visible";}function removeLoginPage(){ scroll(0,0); obj3 = document.body; obj3.style.overflow = "auto"; obj4 = document.getElementById("loginContainer"); obj4.style.visibility = "hidden";}function showAlert(titleAlert,messageAlert){ document.getElementById('alertTitle').innerHTML = titleAlert; document.getElementById('alertBody').innerHTML = messageAlert; scroll(0,0); obj5 = document.body; obj5.style.overflow = "hidden"; //hidden obj6 = document.getElementById("alertContainer"); obj6.style.visibility = "visible";}function closeAlert(){ scroll(0,0); obj7 = document.body; obj7.style.overflow = "auto"; obj8 = document.getElementById("alertContainer"); obj8.style.visibility = "hidden";}function refreshChat(){ processAjaxVariable('chattingWindow','lib/sql/getChat.php'); setTimeout('refreshChat()',3000);}function processAjaxVariable(divId,url) { req = window.XMLHttpRequest ? new XMLHttpRequest() : window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : null; req.onreadystatechange = function () { if (req.readyState == 4) { // Complete if (req.status == 200) { // OK response document.getElementById(divId).innerHTML = req.responseText; scroll2Bottom(); } else { alert("Problem: " + req.statusText); } } } req.open("GET", url, true); req.send();}function checkCookie(){ if (getCookie("username")!=null && getCookie("username")!=""){ document.getElementById('loginStatus').innerHTML = 'Welcome, '+getCookie('username')+' ( <span onclick="signUserOut()" style="cursor:pointer; text-decoration: underline; font-size:11px;">Sign Out</span> )'; } else { document.getElementById('loginStatus').innerHTML = '<span onclick="showLoginPage()" style="cursor:pointer;">Sign In</span>'; } refreshChat(); changeNavButton('tvNav');}function alertCookie(message){ var username=getCookie("username"); if (username!=null && username!=""){ sendChat(message); document.chatSubmit.addText.value = ""; document.chatSubmit.addText.focus(); } else { document.getElementById('loginStatus').innerHTML = '<span onclick="showLoginPage()" style="cursor:pointer;">Sign In</span>'; showAlert("Login:","Not Logged In! Please sign in before chatting (It's Free)","Ok"); }}function destroyCookie(name) { var expdate = new Date(); expdate.setTime(expdate.getTime() - 1); document.cookie = name += "=; expires=" + expdate.toGMTString();}function signUserOut() { destroyCookie('username'); checkCookie();}function setCookie(c_name,value,exdays){ var exdate=new Date(); exdate.setDate(exdate.getDate() + exdays); var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString()); document.cookie=c_name + "=" + c_value;}function getCookie(c_name){ var i,x,y,ARRcookies=document.cookie.split(";"); for (i=0;i<ARRcookies.length;i++){ x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("=")); y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1); x=x.replace(/^\s+|\s+$/g,""); if (x==c_name){ return unescape(y); } }}function setUsername(username,pass){ processAjax('lib/sql/chatLogin.php?user='+username+'&pass='+pass); setCookie("username",username,2); checkCookie(); removeLoginPage();}function disableEnterKey(e){ var key; if(window.event) key = window.event.keyCode; //IE else key = e.which; //firefox if(key == 13) return false; else return true;}function clearChat(){ closeAlert(); processAjaxVariable('chattingWindow','lib/sql/clearChat.php'); processAjax('lib/sql/sendChat.php?message=Chat cleared...&user=Mod Function&important=1'); scroll2Bottom();}function deleteChat(rowId){ closeAlert(); processAjaxVariable('chattingWindow','lib/sql/deleteChat.php?id='+rowId); processAjax('lib/sql/sendChat.php?message=Chat cleared...&user=Mod Function&important=1'); scroll2Bottom();} I know some of the functions are not the most efficient, but im worried about getting it to work then I will rewrite some of them.
  16. dzhax

    text in margins

    what exactly do you mean by the 10px margin? the spacing between the 4 squares? If so try adding a div with height 10px and then writing in it.like so: <html><head><style type="text/css">div.ex{width:730px;height:1005px;margin:0px 0px 0px 16px;margin-left:16px;padding:0px;border:5px solid gray;}div.twoup_left{float:left;width:344px;height:149px;margin:0px 0px 0px 10px;border:3px solid gray;}div.twoup_right{float:right;width:344px;height:149px;margin: 0px 10px 0px 0px;border:3px solid gray;}div .margin_text{ height:10px !important; font-size: 9px; vertical-align: middle; text-align:center;}</style></head><body><div class="ex"> <div class="margin_text"> </div> <div class="twoup_left" > </div> <div class="twoup_right" > </div> <div class="margin_text">Text Here....</div> <div class="twoup_left" > </div> <div class="twoup_right" > </div></div></body></html>
  17. dzhax

    just wondering

    try adding a space to the div??? that might do it and also give !important a try at the end of the height value
  18. those errors are the ones posted above...I think it has something to do with the z-index of the livestream, but i tried z-indexing the iframe and its not doing anything.
  19. dzhax

    Dealing with IE8

    compatibility mode on???
  20. And yes i have tried this on multiple computers.Are you using ie9??? because i only have ie7 and ie8.
  21. thats the thing. there are no errors that show it just simply dosent show. Are you using IE??? it works in firefox and chrome. Let me see if i can screenshot what it does for me...On IE before clicking the send button:On IE after clicking the send button:On Firefox after clicking the send button:
  22. This is what IE tells me.... i cant find the issues mentioned Webpage error detailsUser Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.2; .NET4.0E)Timestamp: Wed, 16 Mar 2011 17:35:41 UTCMessage: 'document.getElementById(...)' is null or not an objectLine: 7Char: 3Code: 0URI: http://www.standthemup.org/tv/lib/js/general.jsMessage: 'null' is null or not an objectLine: 61Char: 2Code: 0URI: http://www.standthemup.org/tv/lib/js/general.js If you go to the site and click on send it should show a message in the middle of the screen please login...What happens is the background darkens (except around the video) and no message shows anywhere...I think its a z-index problem but its weird that everthing is fine in Firefox and chrome.
  23. anyone have any ideas?
  24. So I am working on a project and basically finish it. I show it to the client and say Its not working why did you say it was done.I am using hidden divs as custom message boxes instead of using js alerts. They work fine in Firefox and chrome. But when you load the page in ie8 they dont show up.this is the code for one of my divs: <div id="loginContainer" style="font-family:Century Gothic; visibility:hidden; position:absolute; top:0px; left:0px; background: url('http://www.standthemup.org/tvdemo/img/adminPanelShadowBG.png') transparent repeat scroll center center; width:101%; height:101%; overflow:hidden; vertical-align: middle;" > <div style="margin:auto; width:300px !important; padding:0px; background:#313131; border: 1px gray solid; text-align: center; position:relative; margin: 200px auto;"> <div style="background:#262626; color:gray; font-size: 11px; padding:1px;"> <table> <tr> <td id="loginTitle" style="width: 290px; text-align:left;">Test Title...</td> <td style="width:10px; cursor:pointer;" onclick="removeLoginPage()">x</td> </tr> </table> </div> <div id="loginBody" style="text-align:center; font-size: 13px; padding-top:10px; padding-bottom:10px; color:white;"> Test Body... </div> </div></div> And the js functions i was using: function showAlert(titleAlert,messageAlert){ document.getElementById('alertTitle').innerHTML = titleAlert; document.getElementById('alertBody').innerHTML = messageAlert; scroll(0,0); obj5 = document.body; obj5.style.overflow = "hidden"; //hidden obj6 = document.getElementById("alertContainer"); obj6.style.visibility = "visible";}function closeAlert(){ scroll(0,0); obj7 = document.body; obj7.style.overflow = "auto"; obj8 = document.getElementById("alertContainer"); obj8.style.visibility = "hidden";} And then i call it: showAlert("Login:","Not Logged In! Please sign in before chatting (It's Free)"); So you can what I am talking about. http://www.standthemup.org/tv/index2.phpThe error message is generated when you click on send for the chat and your not logged in. Also a similar message is generated when you click on sign in at the top right of the page
×
×
  • Create New...