In Which I Let On That I Don't Understand Joins
#41
Posted 09 February 2012 - 10:24 PM
I put it in the only place that made it work, which was before doctype, but then firefox ignores the height stuff again.
sum day ill eat ur cat ricko...
#42
Posted 09 February 2012 - 10:41 PM
#43
Posted 09 February 2012 - 11:16 PM
Overflow-y definitely works in Firefox.
I think that leaves this as the problem...: I have two divs, content and chat. Content is 60% and chat is 40%. Chat has three divs. The first and the third are display:table-rows and the second is height:100%, which should stretch to take up all available vertical space, which it does.
The problem is that when the content of this div exceeds the space available, the div stretches, and the entire document gets a scrollbar so that you have to scroll down the whole page to see the lines of chat which have run off the bottom edge, and beyond that for the shunted chat input field.
I've tried max-height:100%, that doesn't work.
sum day ill eat ur cat ricko...
#44
Posted 10 February 2012 - 11:42 PM
#45
Posted 11 February 2012 - 12:03 AM
Okay, like this: http://caseyweederma...date=2012-01-30
Only without the stuff spilling out the bottom.
100% window{ 60% top{ n pixels : menu bar at the top expand to fill the remaining of the 60% but not exceed it : everything else going on there } 40% bottom{ n pixels : bar at the top for channel tabs expand to fill the remaining of the 40% but not exceed it and especially not push the bottom textarea off the page causing ugly scrolling : div for lines of chat n pixels (always on the bottom edge of the page) : textarea for chat input } }
I had display:table and table-row so that these things will line up. I had a bugger of a time trying to make that chat input bar hug the bottom edge of the screen.
sum day ill eat ur cat ricko...
#46
Posted 12 February 2012 - 04:47 PM
<!DOCTYPE html> <html> <head> <title>Test</title> <style type="text/css"> html, body {width:100%; height:100%; margin:0; padding:0; } #top,#bottom { margin:0; overflow:hidden; position:relative; } #top { height:60%; background:red; } #bottom { height:40%; background:blue; } #topmenu { position:absolute; top:0; left:0; height:40px; width:100%; background:green; } #topcontent { position:absolute; top:40px;/* Height of menu bar */ left:0; right:0; bottom:0; background:yellow; overflow-x:hidden; overflow-y:auto; } #bottopmenu { height:30px; width:100%; position:absolute; top:0; background:orange; } #botcontainer { position:absolute; top:30px;/* Height of top menu bar */ left:0; right:0; bottom:0; } #botcontent { position:absolute; top:0; left:0; right:0; bottom:20px;/* Height of bottom bar */ background:teal; overflow-x:hidden; overflow-y:auto; } #botchat { position:absolute; bottom:0; width:100%; height:20px; } #botchat input { width:100%; height:20px; border:0; } </style> </head> <body> <div id="top"> <div id="topmenu">[ Item 1 ] | [ Item 2 ] | [ Item 3 ]</div> <div id="topcontent">daa<br />dab<br />dac<br />dad<br />dae<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da</div> </div> <div id="bottom"> <div id="bottopmenu">[ Item 1 ] | [ Item 2 ] | [ Item 3 ]</div> <div id="botcontainer"> <div id="botcontent">daa<br />dab<br />dac<br />dad<br />dae<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da<br />da</div> <div id="botchat"><input type="text" /></div> </div> </div> </body> </html>
#47
Posted 12 February 2012 - 08:08 PM
Thanks!
sum day ill eat ur cat ricko...
#48
Posted 12 February 2012 - 09:42 PM
#49
Posted 12 February 2012 - 10:57 PM
Oh, and what was that thing you said about changing the mail icon by swapping styles? Is there a style for image source?
sum day ill eat ur cat ricko...
#50
Posted 14 February 2012 - 12:23 PM
top:10px; left:10px;then bottom and right must be zero or it breaks (at least it did in my tests).
Regarding the icon, this is how I would do it:
- Get both of your icons in the same image. It should be like this: |inactive |active | (Note that the individual images should be equally sized.)
- Give an ID to your icon div/span.
- Using the ID in your CSS, set it to display:block (important if you want it not to ignore the width and height) and set the width and height to the width and height of an icon (not the full image with both icons, just the size of one icon).
- Set the background CSS style like so: background:url('path/to/image.png') 0 0 no-repeat; (0 0 means at position (0,0), this basically shows the first icon)
- Add a new CSS class called something like .mailhighlight and only set this CSS property: background-position:100% 0; (Note: it may be -100%, I don't remember exactly)
- Now, when you want to highlight it, just give the div that class!
Also, this is how you use "sprites" in CSS. You can chock a single image full of all the little icons and then just use background positioning and CSS classes to apply them at different spots on the site. This means that, rather than requesting and loading many small images, you just load one.
#51
Posted 16 February 2012 - 11:57 PM
I'm very confused now, though, because chat will sometimes duplicate lines a whole bunch on the client side, and every time I think I've fixed it it pops up from another direction. Confusing!
ALSO WHAT THE HECK TRIPLE ESCAPING
sum day ill eat ur cat ricko...
#52
Posted 23 February 2012 - 11:55 PM
Now, when you put stuff into the database, you also have to escape it to prevent SQL injection type attacks.
Let's say you have string: $temp = "this \"is\" a test";
Now, that already has its double quotes escaped, but what if you escape it again? It will become: $temp = "this \\\"is\\\" a test";
Oops, now you've double escaped it. Now, php has a built in feature called magic quotes that automatically escapes strings for you. It may or may not be enabled in some servers so you have to make sure that, before you escape your sql strings, you ensure that they haven't already been escaped or you'll be double escaping them.
Check out this link to see how to check whether magic quotes is turned on.
If it is and you're using $_POST variables without stripping the slashes, you'll be finding you have escaped strings in the database, which you don't want.
#53
Posted 19 March 2012 - 06:40 PM
Thanks for the advice on escaping. I haven't gotten around to it yet but that doesn't mean I don't appreciate it. It means I'm scatterbrained and very susceptible to distraction.
Ooh! Rewrite combat! Yeah!
sum day ill eat ur cat ricko...
#54
Posted 04 April 2012 - 10:06 AM
I have a question!
My model is to write to a file and upload that to the server, which probably isn't running Mercurial.
If the server isn't running Mercurial, how do I merge the projects?
I guess, is there a way to track all commits since the last... I dunno, upload? The changelog isn't showing me individual files, but I assume what I'd do is look at a list of files changed and just upload those.
It's a workflow question then!
Oh. Or, can I 'push' all the changes to the server? Can I set that up to upload via ftp?
Or! Or can Mercurial just be installed on the server?
Okay, I think I've got it. I'll wait to commit until I've successfully uploaded all of the files shown in an hg diff. Then I'll commit so that the next time I run a diff it'll only show the changes made since the last upload.
Hm, that's not so satisfying for local version control. I can't just revert back a couple changes if it's been two weeks since I've committed anything.
Oh! Clones! I can have a stable build and a development build and wait, wouldn't a merge just... No, that might work, I think.
sum day ill eat ur cat ricko...
#55
Posted 05 April 2012 - 03:01 PM
- I have my development directory in, say, webroot/site1
- This maps to http://localhost/site1
- I do my development there -- Editing. Testing. Committing as much as necessary.
- When I'm ready to post the changes, I:
- Commit everything that's changed.
- Run a handy script I made which copies the files to the live website folder (which is a mapped drive).
- The script updates all files in the folder with the latest files I have in my repo.
- Commit everything that's changed.
- That's it!
The contents of the script (in batch format, you'll have to convert it to bash and add the ftp bit):
hg archive W:\site1\ del W:\site1\.hg_archival.txt pause
The first line uses the mercurial "archive" command to create a version of the repo at it's current state but without the extra mercurial files/folders.
That was a bit of a lie, it creates one file called .hg_archival.txt. The second line removes this.
The third line just holds the window for input so I can see that everything went well.
So, what I think you should do is use this process and modify the script to:
- Archive to a temp directory
- FTP the files to the site while overwriting
- Delete the temp directory or its contents
#56
Posted 10 June 2012 - 10:40 PM
Now I'm finally getting to the double- and triple-escaping bit, and dang, do I ever resent magic_quotes.
I tried disabling it in .htaccess, but that just took the whole site down (500 Server Error), and using stripslashes while pulling things out of the database just isn't working for some reason.
I guess there's no way to change that from this end, eh?
Edit: I wrestled it into submission and now it is stripping slashes as things are pulled out of the database. Magic quotes are laaaame.
Second edit: Wait, why should I even need to do this if I'm using prepared statements? Do magic quotes affect prepared statements too? Blah.
The project is coming along really well. Kickpuncher is finally feeling more and more like a game and less like an abstract non-sequence of concepts. It feels really good. Thanks for all your help.
sum day ill eat ur cat ricko...
#57
Posted 13 June 2012 - 02:30 PM
With the double escaping, keep in mind that using prepared statements escapes things for you so if magic quotes works on something going INTO the db in a prepared statement, it's going to escape the quotes put in by magic quotes. Then, when you pull them out, you'll get the magic quotes quotes in your string. It's really unclear and frustrating, I know.
If you want to skype while your deving just send me a message. I'm usually on at least to text chat.
#58
Posted 11 January 2013 - 12:22 PM
Help heeeeelp.
I forget my password. >.<
sum day ill eat ur cat ricko...
#59
Posted 16 January 2013 - 11:50 PM
For what? Message me on skype or email me or something.
#60
Posted 23 January 2013 - 02:35 PM
For punchlands!
Also I need to fix Skype.
sum day ill eat ur cat ricko...
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users