Jump to content

iPixel

Members
  • Posts

    496
  • Joined

  • Last visited

Everything posted by iPixel

  1. I've looked at a few responsive grid frameworks. However, their samples and how they work dont exactly seem to allow me to do what i ideally need. I know they can allow me to do my 3 column layout easily... But will these still work while being nested within other divs. The above example was a very stripped down version.
  2. Ok it helps, but i cant for the life of me get any padding on the left and right side. I need a container thats 1010px wide and the columns should be like so: (including 10px margins). 10px 190px 10px 570px 10px 190px 10px. Any ideas?
  3. Hmm found this... should help. http://www.cutcodedown.com/for_others/enormousRodent/template.html
  4. I'm trying to figure this out... i have a 3 column layout and i need the center column to resize automatically as the browser shrinks. The idea here is to NOT use @media queries and pixel breakpoints. Which is why the #wrapper & #mid divs are set to 100% width. However the issue is that instead of the center column getting thinner, all the columns just pop down. My CSS bl0wz, so any help would be appreciated. Below is what i have so far. <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Some title</title> </head> <style type="text/css"> html, body { padding:0px; margin:0px; } #wrapper { max-width:1024px; width:100%; padding:0px; margin:0 auto; background:#CCC; } #left { float:left; max-width:190px; min-width:190px; width:190px; height:500px; background:#9CF; } #mid { float:left; max-width:644px; min-width:190px; width:100%; height:500px; background:#9C6; } #right { float:left; max-width:190px; min-width:190px; width:190px; height:500px; background:#CC6; } </style> <body> <div id="wrapper"> <div id="contentpad"> <div id="left">Left</div> <div id="mid">Middle</div> <div id="right">Right</div> </div> </div> </body> </html>
  5. I was unable to replicate this effect on any browser (ie/chrome/ff). However, i did see it on the iPhone 4s iOS6. Have you considered maybe using css media queries and simply removing the position:fixed from the container only if device-width is smaller that ###px. That way when you're on a small device such as an iPhone or Android phone, you'll loose the ability to have it follow you as you scroll down, but at least it wont overflow onto the regular content. Media Queries Info : http://www.w3.org/TR/css3-mediaqueries/ Update: Ok i got the effect on ie/chrome/ff... i had to resize the window scroll right, than continue to scroll down before it popped into view. My idea for the solution still applies. Good Luck
  6. Hey guys, so i'm not terrible at CSS however my biggest hardship is setting up layouts. Positions - margins - padding - top/left/etc... mess with my head. And i rarely get what i want. Here's the code i have, so you can kind of get a clue of what i'm trying to accomplish. Also attached is a photo of what i want the end result to look like. Basically, i need a header, on the left side i need 2 divs and 1 div on the right side. The aqua background however is the background for all, and the right side needs to be moved down a little. I hope i'm being clear, as i suck at explaining things. Also, they key part is that the bottom left and right columns fill 100% of the remaining space. Seeing my code should help explain further what I was trying to accomplish. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>test</title> <style type="text/css"> * { padding:0px; margin:0px; } html, body { width:100%; height:100%; max-height:100%; min-height:100%; } #wrapper { width:100%; max-width:100%; height:100%; min-height:100%; max-height:100%; background:#e7e7e7; } #header { position:relative; width:100%; height:50px; background:#515757; } #subwrapper { position:relative; width:100%; height:100%; background:#0CC; } #leftTop { width:225px; height:85px; } #leftBottom { width:225px; height:100%; background:#CCC; } #rightSide { position:absolute; float:right; width:1280px; height:100%; background:#e7e7e7; } </style> </head> <body> <div id="wrapper"> <div id="header"> header </div><!-- //header --> <div id="subwrapper"> <div id="leftTop"> id </div><!-- //leftTop --> <div id="leftBottom"--> nav </div><!-- //leftBottom --> <div style="clear:left;"></div> <div id="rightSide"> content </div><!-- //rightSide --> </div><!-- //subwrapper --> </div><!-- //wrapper --> </body> </html> Thanks VERY much!
  7. Hah!, that actually makes sense. Sucks but makes sense. Thanks!
  8. Im aware of it's existence. However, parsing is not my issue. I can read the INI file just fine. My issue is with updating specific variables within the INI file. Thanks!
  9. So i'm trying to learn how to use INI files for config purposes. I created a config.ini file that looks like so ;setup super admin variables [superadmin] adm_user = super adm_pass = admin ;setup database variables [database] driver = mysql db = myDB user = root pass = pass And what I ultimately want to do, is present the user with a form asking for the values for these variables. Once the user fills it out, I want to use php to update the above variables with the new data provided. Here's what i have so far. <?php function updateINIfile($Setting, $replace, $INI_PATH) { $ini = fopen($INI_PATH,"r+"); while($Content = fgets($ini)) { if(preg_match("/".$Setting."/", $Content)) { fwrite($ini, $Setting." = ".$replace."\n"); } } fclose($ini); } updateINIfile("driver","oracle","config.ini"); ?> The problems I'm having are: [*]Instead of updating, it writes a new line. Correctly but still a new line instead of updating the current one. [*]For whatever reason, it also overwrites the line directly below driver = mysql with the new line of driver = oracle [*]It also, eats a part of adm_user = super I've looked through the php manual under parse_ini_file but those samples create new INI files from scratch. I cant find a solid script that just updates a preexisting INI file. Any help and/or pointers would be much appreciated.
  10. Doh! I guess i misunderstood it. I just figured that if strpo($value,"MC#") returned anything the if statement would go through. I guess 0 is a no no . Thanks very much for the explanation.
  11. I've got a field, it get's passed to this php page. That field passes data that looks like so: MC#1. This is some regular text, no big deal. MA#2. Some more text, again no big deal Here's my script: <?php $test_data = explode("\n\n", $test_data); foreach($test_data as $text=> $value) { if(strpos($value,'MC#')) { echo $value; //Note: $values echoed value = "MC#1. This is some regular test, no big deal." } else { echo "<br />Did not find MC#<br />"; } } ?> My Issue, is that the "IF" always fails. Clearly $value has MC# in the string but still doesn't find it. I've also tried if(strpos($value,'MC#') === true) and other variations of the two. But no luck, for each $test_data it never finds MC#. I'm sure i'm missing something. However, i have no clue what. Thanks!
  12. What xyph did, is mostly how i envisioned it. It's about 98% solid... this gives me a great start. Thanks for that. @ManiacDan: I hope i'm not frustrating you, I just don't see a need to use a database. I'll still have to parse the questions either before data entry or after data entry. This seems like an extra step to me. To see the formatting i need done, please go to File Structure here... http://library.blackboard.com/ref/e0bedf24-6f8f-48b8-98ec-8ee774e4efde/upload_questions.htm Xyphs script is working well, i just need to work it out so it figures out the type of question it is. "MC" "MA" "ESS" etc... Thanks very much for all the help guys!
  13. The formatting part is where my issue lies.
  14. Yes, unfortunately i would have to turn the questions above into a delimited file structured like so... http://library.blackboard.com/ref/e0bedf24-6f8f-48b8-98ec-8ee774e4efde/upload_questions.htm SO a question like this.... 1. This is a question, with some answers below? answerA *answerB answerC answerD Needs to get formated like so.... MC TAB This is a question, with some answers below? TAB answerA TAB incorrect TAB answerB TAB correct TAB answerC TAB incorrect TAB answerD TAB incorrect
  15. 1. Gotcha. 2. I cannot use a database. People will be pasting word file text into it whether i like it or not. -- I get why i would use base64_encode, but how will that help me with tabbing and avoid loosing \n\n's
  16. I need some help. I'm a little lost with something. I'm trying to create a Tab Delimited file from a word file for a Blackboard upload form. Basically it allows you to load a test via tab delimited instead of creating the form by hand each time. On my form post page, i have a <textarea> which basically houses some questions which are posted from a word file. For example... 1. This is question one, below you can answer blah blah? 2. This is another question blah blah blah? 3. This is a multiple choice question answer A *answer B answer C answer D 4. This is a true & false question *True False ======================== My Questions. 1. How can i create a new file? I looked up fputcsv on php.net but they always show examples of already existing csv files. 2. My idea was to str_replace all the \n's with \t's. But I figure that will mess with \n\n between questions where i need to retain a \n. So how do i convert the above info to tab delimited. I'll probably have more questions later, regarding the *'s but this should get me going. Thanks!
  17. Hmm, go figure. That will work just fine. Thank YOU!
  18. Hey Guys! I have an odd issue, I have a soap script that works fine, however if the wsdl file fails the whole page goes blank. Why doesn't this work, or rather how can I accomplish this a working way. <?php if($client = new SoapClient("https://www._____.com/services/RegistrationServiceImpl?wsdl",array("trace"=> 1, "exceptions" => 0))) { echo "Ok!"; } else { echo "Failed to load WSDL file"; } ?> Thanks!
  19. Hah! That worked... thank you!
  20. Ok this is driving me NUTS! After using SoapClient() this is the response i get back... <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soap:Body> <ns1:GetRegistrationURLResponse xmlns:ns1="http://impl.service.tempuri.com"> <ns1:out> <errorCode xmlns="http://model.tempuri.com">0</errorCode> <errorMessage xmlns="http://model.tempuri.com" xsi:nil="true" /> <registrationURL xmlns="http://model.tempuri.com"> https://www.tempuri.com/external/authenticate?org=orgname&token=uXiqcPV4%2FuEifbaR80PVBTxH4Oqd3tF%2BiEYaz%2F1OHJG7b5oxN7Bi8AIulmtbwATnjri2P1vCNy%2Fu77OzQEV2lQ%3D%3D </registrationURL> </ns1:out> </ns1:GetRegistrationURLResponse> </soap:Body> </soap:Envelope> So all i really need to pull out of there is the <registrationURL> I assign the response to a variable <?php $xml_response = $client->__getLastResponse(); ?> use SimpleXML <?php $xml = simplexml_load_string($xml_response,NULL,NULL,"http://schemas.xmlsoap.org/soap/envelope/"); ?> Using the code print_r($xml); displays this --> SimpleXMLElement Object ( [body] => SimpleXMLElement Object ( ) ) I have tried many ways, what i have now is this: <?php $xml->registerXPathNamespace('soap', 'http://schemas.xmlsoap.org/soap/envelope/'); $xml->registerXPathNamespace('ns1', 'http://impl.service.tempuri.com'); #$xml->registerXPathNamespace('registrationURL', 'http://model.tempuri.com'); foreach ($xml->xpath('//ns1:GetRegistrationURLResponse/ns1:out') as $item) { echo $item->asXML(); } ?> but the result of that is 0https://www.tempuri.com/external/authenticate?org=nyit&token=uXiqcPV4%2FuEifbaR80PVBTxH4Oqd3tF%2BiEYaz%2F1OHJG7b5oxN7Bi8AIulmtbwATn3QmJanSYWqzS%2FgZM4eR%2Fcg%3D%3D parsed by browser... actual source XML is <ns1:out><errorCode xmlns="http://model.tempuri.com">0</errorCode><errorMessage xmlns="http://model.tempuri.com" xsi:nil="true"/><registrationURL xmlns="http://model.tempuri.com">https://www.tempuri.com/external/authenticate?org=orgname&token=uXiqcPV4%2FuEifbaR80PVBTxH4Oqd3tF%2BiEYaz%2F1OHJG7b5oxN7Bi8AIulmtbwATn3QmJanSYWqzS%2FgZM4eR%2Fcg%3D%3D</registrationURL></ns1:out> but i cannot for the life of me just pull out registrationURL so that i can somehow turn it into a link. Any ideas?
  21. Hey ahs10, i was just on this forum doing the same thing, had some success thus far. Forum Post : http://www.phpfreaks.com/forums/index.php?topic=357135.0 Start here and learn what each function does, that way you can more or less figure what to do. http://php.net/manual/en/book.soap.php http://phpsoaptoolkit.sourceforge.net/phpsoap/ http://www.w3schools.com/soap/default.asp Best things to use i feel are soap clients so you can see how to structure your scripts request. SOAclient addon for Firefox or go to soapclient.com or download WebServices Studio. Here are some links i used to get me on my way. http://metrix.fcny.org/wiki/display/tips/How+to+Create+a+PHP+Client+for+a+.NET+and+SOAP-based+Web+Service+API http://www.vankouteren.eu/blog/2009/03/simple-php-soap-example/ Good Luck to you!
  22. Ok i managed to get the $parameters array working properly. It now creates a request soap call that looks just like the example they provided. At this point I'm getting a response of "logon denied" which most likely means the test account info they gave us is bogus... but take a look below to confirm. $client = new SoapClient("https://www.tempuri.com/webservices/RegistrationServiceImpl?wsdl",array("trace"=> 1, "exceptions" => 0)); $parameters = array('impl' => array('principal' => array('userName' => 'test@email.com', 'signupName' => 'org', 'password' => 'org123'), 'validationType' => 'email', 'validationId' => 'test@email.com')); $client->__soapCall("GetRegistrationURL", $parameters); Creates : <!-- THIS IS THE REQUEST SOAP CODE GENERATED VIA PHP SCRIPT --> <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://model.tempuri.com" xmlns:ns2="http://impl.tempuri.com"> <SOAP-ENV:Body> <ns2:GetRegistrationURL> <ns2:principal> <ns1:password>org123</ns1:password> <ns1:signupName>org</ns1:signupName> <ns1:userName>test@email.com</ns1:userName> </ns2:principal> <ns2:validationType>email</ns2:validationType> <ns2:validationId>test@email.com</ns2:validationId> </ns2:GetRegistrationURL> </SOAP-ENV:Body> </SOAP-ENV:Envelope> <!-- THIS IS THE RESPONSE SENT BACK --> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soap:Body> <soap:Fault> <faultcode>soap:Client</faultcode> <faultstring>Could not get JDBC Connection; nested exception is java.sql.SQLException: ORA-01017: invalid username/password; logon denied</faultstring> </soap:Fault> </soap:Body> </soap:Envelope> Thanks! - hopefully it's the logon info that's wrong. I'll post back if otherwise.
  23. Any idea how i could do that? I tried re-working the parameters array like so : <?php $principalParameters = array('impl'=>array('mod' => array('userName' => 'test@email.com', 'signupName' => 'org', 'password' => 'orgpass'), 'validationType' => 'email', 'validationId' => 'test@email.com')); ?> But no luck at all, it completely disregards the mod=>array() and only reads into the impl=>array(); So the result still looks like so: <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://impl.tempuri.com"> <SOAP-ENV:Body> <ns1:GetRegistrationURL> <ns1:principal xsi:nil="true"/> <ns1:validationType>email</ns1:validationType> <ns1:validationId>test@email.com</ns1:validationId> </ns1:GetRegistrationURL> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Sorry, this is my first SOAP-ing so I'm having difficulty figuring out how to tell the wsdl file what i want my request to look like.
  24. The initial request code I posted was given to us by the dev team of that company, as you can see they did not have any headers... so i would assume they know what they are doing.
  25. Could it be that it's because the generated request uses ns1 instead of impl like the actual request has? <ns1:principal xsi:nil="true"/> <ns1:validationType>email</ns1:validationType> <ns1:validationId>email@test.com</ns1:validationId> if so, how can i force it to use impl instead of ns1... i figured doing 'impl'=>$params would have dont that trick.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.