|
pipes! posted:What does your viewport tag look like? <meta name="viewport" content="width=device-width,max-scale=1,user-scalable=0"> We want something where you click on an image and then can zoom, not the whole time. I tried temporarily removing/editing the tag via JavaScript but it had no effect.
|
# ? Oct 10, 2013 15:25 |
|
|
# ? May 8, 2024 04:25 |
|
The Merkinman posted:<meta name="viewport" content="width=device-width,max-scale=1,user-scalable=0"> We want something where you click on an image and then can zoom, not the whole time. I tried temporarily removing/editing the tag via JavaScript but it had no effect. I'd say that unless there's some nuanced technical criteria preventing it, always use <meta name="viewport" content="width=device-width, initial-scale=1">. Restricting pinch to zoom is a major accessibility no-no, and it'll allow you to have sitewide, content and device-independent zooming without any JS dependency. pipes! fucked around with this message at 21:32 on Oct 10, 2013 |
# ? Oct 10, 2013 16:32 |
|
fidel sarcastro posted:You could pretty easily make a PHP (or whatever language your host supports, really) template that loops through your array and creates the html for each item. You probably don't even need to write a function, honestly. How are you getting the data into the array in the first place? Basically I have a page full of these code:
code:
Oh My Science posted:You could skip all the PHP and use http://jekyllrb.com/
|
# ? Oct 10, 2013 23:28 |
|
Ghostlight posted:They're static, so I was just passing them as an array to the function and then thought I should ask if performance-wise that's going to be an issue down the road. I doubt if you'd have any issues, that page sounds simple enough that performance isn't going to be a problem. Bias up-front: I really don't like echoing HTML out from PHP, so if you're going to stick with PHP I'd be more inclined to do something like this: (Syntax might be off, but you should get the general idea). php:<?php $publications = array( 1 => array( 'img'=>'', 'link'=>'URL', 'title'=>'PUBLICATION', 'blurb'=>'DESCRIPTION', 'author'=>'AUTHOR', 'date'=>'PUBLISHED') ), 2 => array( etc. etc. etc. ); ?> php:<?php foreach ($publications as $publication) : ?> <div class="publicationscontainer"> <div class="drip"><img src="/images/publications/<?= $publication['img']; ?>"></div> <div class="pubtext"> <?php if ($publication['link'] !== '') : ?> <h2><a href="<?= $publication['link']; ?>"><?= $publication['title']; ?></a></h2> <?php else : ?> <h2><?= $publication['title']; ?></h2> <?php endif; ?> <p><?= $publication['blurb']; ?></p> etc. etc. etc. </div> </div> <?php endforeach; ?> That being said, Jekyll is ideal for this sort of thing and you should definitely consider it if your system can run Ruby scripts. It generates a static website, so you don't need to worry about your host having Ruby available, and it means you can write your publication entires in Markdown instead of wrestling with PHP arrays. There's a pretty in-depth tutorial on it here. jony neuemonic fucked around with this message at 00:52 on Oct 11, 2013 |
# ? Oct 11, 2013 00:49 |
|
Having some problems with a div on a webpage. In chrome when the browser page is re-sized the div overlaps others and par of it is hidden. In IE the height:auto works as I would expect it and nothing gets overlapped. Currently I have tried; height: auto *causes div to overlap below height: 510px *does not seem to re-size the div code:
But as you can see the div with ID of List is the one which is overlapping the below div. This behavior does not happen in IE but only in chrome and firefox. http://jsfiddle.net/MF6fR/1/ Long story short, I need the div with ID of list to not overlapp the below div
|
# ? Oct 11, 2013 18:35 |
|
Alright I'm being forced to dive into a little more backend work than I've done previously, so I'm looking for some recommendations. I have a restaurant client who has a catering request form on their site. Previously it was just dumping everything into an email and sending it off, but now the client would like it to dump into a database instead (they're getting more requests than they can keep up with w/ email). The form itself is designed to be super-pretty and interactive, so using something like Formstack or Wufoo is unfortunately not an option because they cannot be customized as much as we'd like. Any suggestions? Site is built on WordPress, but I don't really care about using a plugin. I feel like what I'm looking for is more or less a pretty simple PHP widget with a nice gui that ties into an SQL database (or something), but I'm not entirely sure where to start. A secure login, ability to sort entries, export a CVS, etc. would all be nice options. Ideas? e: Also, I should say that an easy to use gui is pretty important – the client isn't the sort who'll want to muck around with some really developerly, confusing interface. kedo fucked around with this message at 22:41 on Oct 11, 2013 |
# ? Oct 11, 2013 22:34 |
|
Build the form in Gravity Forms. Saves to the WP back-end, can be exported to CSV, can render the form fields without any styling so you can do whatever you want, conditional logic in response to field selection, etc. It's a great little plugin.
|
# ? Oct 11, 2013 22:49 |
|
Looks like that might do the trick! Thanks! And for my own edification, I'd also be interested in any non-WP solutions for future projects.
|
# ? Oct 11, 2013 22:54 |
|
kedo posted:Looks like that might do the trick! Thanks! Well, it's a very simple thing to whip up in any of the popular web frameworks out there (Rails, Flask, Django, etc)...but you have to know the framework to do it. It's worth the effort to learn any of them...IIRC, Flask has the simplest getting started tutorial.
|
# ? Oct 11, 2013 23:04 |
|
I'm trying to find a way, using just CSS, to do a layout like this with a video element. The black box represents the containing element, not necessarily the viewport. The little red box is an overlay that scales to the video's size while maintaining position relative to the edges, so I'm assuming I need a wrapper div for the video that sticks to the edges of the video but somehow still allows the video to expand to fill just the narrowest axis in order to maintain the aspect ratio. In order to do that I guess I'd need some spacer elements? Hell, is this even possible without biting the bullet and doing the layout in JS? Of note, only browsers that support video are of concern, so fun stuff like transforms are possible, but I've only figured out how to center it vertically by abusing transforms only to watch it get cut off at the top and bottom as soon as I make the container too small vertically. Sorry I don't have any code because I've just been loving around in Chrome all day because making a clean repro of the original layout in jsfiddle is a pain in the dick.
|
# ? Oct 11, 2013 23:40 |
This is amazing: http://baconipsum.com/
|
|
# ? Oct 12, 2013 01:44 |
|
fletcher posted:This is amazing: http://baconipsum.com/ In that same vein http://dummyimage.com/ or http://lorempixel.com/.
|
# ? Oct 12, 2013 03:47 |
|
fletcher posted:This is amazing: http://baconipsum.com/ I'm partial to this one: http://slipsum.com/
|
# ? Oct 12, 2013 05:12 |
|
http://placekitten.com/ and http://http://bullshitipsum.com/ motherfuckers.
|
# ? Oct 12, 2013 05:32 |
|
Munkeymon posted:I'm trying to find a way, using just CSS, to do a layout like this with a video element. Would something like this work?
|
# ? Oct 12, 2013 05:58 |
|
So, i'm trying to build a simple site for an RPG that some friends and I play, and my coding skills aren't good enough for me to get everything they want in one package that i've done myself, so i'm trying to cobble together something from a bunch of different, ready-made frameworks. First, some sort of blog thing on the front page, so a CMS for that. A forum, i've gone with phpBB because I know that best, and then a character database on the backend that can be managed. Ideally, I would like a single logon to manage it all, and I can tie my character database into the phpBB stuff without much problem probably, but I was wondering if there's some sort of php based blogging tool/cms webpage thing that's easy to play around with? Or am I going about this all wrong, and there's actually an incredibly simple way to do it all in one package? (tell me this is true)
|
# ? Oct 12, 2013 14:31 |
|
Maybe I'm overthinking this, but when making an SEO friendly URL how do you distinguish between a two word phrase and a list of two separate things? For example: "kitchen utensils" and "pots, pans, & appliances". If the former converted to /kitchen-utensils and the latter /pots-pans-and-appliances; how does Google know the first is two words that go together where as the second is a list?
|
# ? Oct 12, 2013 18:39 |
|
Cthulhuite posted:Or am I going about this all wrong, and there's actually an incredibly simple way to do it all in one package? (tell me this is true) Would Obsidial Portal fit the bill?
|
# ? Oct 12, 2013 18:58 |
|
Blinkz0rz posted:I'm partial to this one: http://www.boganipsum.com is not bad either if you want an Aussie slant.
|
# ? Oct 13, 2013 02:24 |
|
It drives me crazy how often I get confused by the same loving issue: how to centre content. I never know if I'm doing it right. If I want to centre a row of list items, is this enough? code:
|
# ? Oct 13, 2013 13:48 |
|
The Merkinman posted:Maybe I'm overthinking this, but when making an SEO friendly URL how do you distinguish between a two word phrase and a list of two separate things? I don't think Google cares whether the words are a list or a phrase, since they both "go together". In either case, you're targeting a keyword phrase.
|
# ? Oct 13, 2013 14:38 |
|
Having some problems with a div on a webpage. In chrome when the browser page is re-sized the div overlaps others and par of it is hidden. In IE the height:auto works as I would expect it and nothing gets overlapped. Currently I have tried; height: auto *causes div to overlap below height: 510px *does not seem to re-size the div code:
But as you can see the div with ID of List is the one which is overlapping the below div. This behavior does not happen in IE but only in chrome and firefox. http://jsfiddle.net/MF6fR/3/ Long story short, I need the div with ID of list to not overlapp the below div DholmbladRU fucked around with this message at 15:37 on Oct 14, 2013 |
# ? Oct 14, 2013 14:19 |
|
DholmbladRU posted:Having some problems with a div on a webpage. In chrome when the browser page is re-sized the div overlaps others and par of it is hidden. In IE the height:auto works as I would expect it and nothing gets overlapped. Currently I have tried; Look for set heights. On <div id="accordion_AccordionTabManagerStyle"> you have a height that looks like it's being set dynamically somehow of 798.2727279663086px. This makes it overlap the content. Maybe try setting heights to auto, or using a clearfix after the content? I'd bet you have other heights set elsewhere that are making the parent container smaller than the child content, but honestly I'm not going to dig through all that code to find it. At least clean it up and remove broken images and unnecessary stuff, no one is going to wade through all that unless they're just really, really bored.
|
# ? Oct 14, 2013 14:26 |
|
I apologize let me clean that up.
|
# ? Oct 14, 2013 15:19 |
|
DholmbladRU posted:I apologize let me clean that up. Basically just get rid of all the defined heights (easier said then done since it looks like it's calculated elsewhere to come up with those values) and remove the position absolute on the bottom links.
|
# ? Oct 14, 2013 15:32 |
|
Cleaned it up. Yeah I think when some of the divs are set to auto, there is javascript which alters the height value which is why you see 677.777777777777777777777777777777 Would something like this help if placed in-between the divs? code:
code:
DholmbladRU fucked around with this message at 15:50 on Oct 14, 2013 |
# ? Oct 14, 2013 15:38 |
|
I sort of guessed those heights were being added by JS due to the crazy numbers. Putting a clear div in there probably won't do anything because it's not a clearing issue, it's a height issue. Your height: auto !important; may or may not work, but that's a sort of nasty solution anyways. The cleaner way of doing it would be to stop the JS from setting heights.
|
# ? Oct 14, 2013 15:59 |
|
Yeah I guess that will work. I just need to figure out how o resize #list based on window height because its getting overlapped when I make the browser window much smaller.
|
# ? Oct 14, 2013 16:00 |
|
Depressing Box posted:Would something like this work? That does what I have now (repro: http://jsfiddle.net/TGg94/), which works great until I want to overlay something over a specific part of the video that's not right in the center using just CSS which I want because I want it to continue to resize nicely without writing a bunch of JS. Plus, users would have to know to tell it to redraw when they resize its container and, in general, I'd rather not rely on other people to remember to do something.
|
# ? Oct 14, 2013 17:48 |
|
Munkeymon posted:That does what I have now (repro: http://jsfiddle.net/TGg94/), which works great until I want to overlay something over a specific part of the video that's not right in the center using just CSS which I want because I want it to continue to resize nicely without writing a bunch of JS. Plus, users would have to know to tell it to redraw when they resize its container and, in general, I'd rather not rely on other people to remember to do something. http://jsfiddle.net/dEcZ7/ Ka-pow. e: You don't even need to use the table-cell trick if you don't want for vertically centering. Point is just wrap the video and the overlaid element in an additional container, set position: relative; on the container, then absolutely position the overlay. kedo fucked around with this message at 18:15 on Oct 14, 2013 |
# ? Oct 14, 2013 18:11 |
|
kedo posted:I sort of guessed those heights were being added by JS due to the crazy numbers. Putting a clear div in there probably won't do anything because it's not a clearing issue, it's a height issue. Your height: auto !important; may or may not work, but that's a sort of nasty solution anyways. The cleaner way of doing it would be to stop the JS from setting heights. unfortunately finding that piece of code would be like looking through 1000 js files with non descript variables.... Maybe I can employ some sort of jquery function which will auto resize this div by changing the attr('style') parameter value and set the height through that.
|
# ? Oct 14, 2013 19:30 |
|
kedo posted:http://jsfiddle.net/dEcZ7/ Ka-pow. Thanks - that's much closer than I got using table layout trickery, but I was lazy about getting my repro right and it doesn't represent the behavior I need for when the container is vertically smaller than the video element. It's fixed here: http://jsfiddle.net/TGg94/1/ I'll try to get yours working from here http://jsfiddle.net/dEcZ7/2/ but I just had another idea that would require some JS setup, but there's a bunch of that going on anyway in the real thing, so it wouldn't be a huge deal.
|
# ? Oct 14, 2013 20:46 |
|
I'm trying to get a Bootstrap 3 fixed footer to work using this code: http://pastebin.com/7rs6PEmZ However, if there is a large amount of content, and you change the browser window size, the footer covers up some of the page content. The author of the tutorial made this video (https://www.youtube.com/watch?v=KxmLNctBi10) and someone noticed that and commented, and they said it would be fixed soon. How would I go about fixing it now? Uziel fucked around with this message at 14:02 on Oct 15, 2013 |
# ? Oct 15, 2013 13:58 |
|
Uziel posted:I'm trying to get a Bootstrap 3 sticky footer to work using this code: Did you add padding to the bottom of <body>? From the bootstrap docs: quote:The fixed navbar will overlay your other content, unless you add padding to the bottom of the <body>. Try out your own values or use our snippet below. Tip: By default, the navbar is 50px high.
|
# ? Oct 15, 2013 14:04 |
|
fuf posted:Did you add padding to the bottom of <body>?
|
# ? Oct 15, 2013 14:25 |
|
I hope this isn't the wrong thread - I didn't see any sort of Web Programming thread specifically, and this isn't language specific. I've worked at a web design company doing custom coded websites for over a decade. We do WordPress, but for anything custom that doesn't fit that box, we do ColdFusion and MS SQL. It's a hold-over from the employee that started things in the 90's, and there's just hundreds of legacy sites at this point. The whole business is wrapped around it - maintaining these poorly written top-to-bottom evaluating ColdFusion pages; running our own servers because no one in their right mind does ColdFusion hosting, finding and training the small handful of programmers throughout the years to help out. Enough is enough and I've finally convinced my boss to split from it all. WordPress has been good, but he doesn't want to lose the custom-coded stuff we do for many clients, so he wants to transition to a new language. The requirements are mostly to be the opposite of ColdFusion - ease of finding people that know the language, resources available online, decent frameworks, and ease of hosting elsewhere if we trash our servers. He's settled on PHP. Fine. I know some C# (worked in some ASP.NET MVC), a small smattering of PHP from working with WordPress and custom plugins, so I set about working on learning some more PHP. Except I'm seeing a lot of people in threads like the Horrors of Coding deriding PHP as a choice. I get that there's no one true language, but it seems pretty universally looked down on. If not PHP, what meets his requirements? He certainly isn't wanting to be locked into another language where it's hard to find people to bring in-house to pick up the ball. PHP is plentiful, but plentiful doesn't mean good. Why is PHP so looked down on, and is the next alternative down the line ASP.NET? The type of projects we're talking about aren't always simple CRUD sites, but a wide variety of fairly complex business logic to sometimes integrating with off site systems and the like. Flexible and varied. I've been stuck on ColdFusion so long that I have no idea why something like PHP wouldn't be a good alternative I guess, considering how miserable CF has been to live with.
|
# ? Oct 16, 2013 00:34 |
|
Mortanis posted:Except I'm seeing a lot of people in threads like the Horrors of Coding deriding PHP as a choice. I get that there's no one true language, but it seems pretty universally looked down on. If not PHP, what meets his requirements? He certainly isn't wanting to be locked into another language where it's hard to find people to bring in-house to pick up the ball. PHP is plentiful, but plentiful doesn't mean good. Why is PHP so looked down on, and is the next alternative down the line ASP.NET? The type of projects we're talking about aren't always simple CRUD sites, but a wide variety of fairly complex business logic to sometimes integrating with off site systems and the like. Flexible and varied. .NET is very expensive. Thus, most people prefer Ruby (Rails) / Python (Django / Flask), etc.
|
# ? Oct 16, 2013 00:40 |
|
jusion posted:PHP is "fine." It just has a ton of cruft, and it is very, very easy to craft dangerous code. It's also very fashionable to beat up on PHP. Compared to ColdFusion, PHP is a godsend. PHP developers are a dime a dozen, so finding the good coders are what you need to watch out for.
|
# ? Oct 16, 2013 00:53 |
|
I think this quote is relevant:Sandi Metz posted:And so, in order for my data to live into the next generation of technology, what I want to do is have most of my business logic not be wrapped up in a framework... at first, all I needed to do was put up a web app. But then as the business logic became a bigger and bigger part of that app, it was important for me to preserve my investment in that business logic by having it be independent of framework. This podcast episode was really interesting and I encourage everyone to listen. It doesn't really help you choose a framework (rails is awesome) but it will make you think.
|
# ? Oct 16, 2013 01:02 |
|
|
# ? May 8, 2024 04:25 |
|
As I've posted in this thread many times, you can write fine code in PHP. It's just that there's no reason to pick PHP outside of external factors like it's what your boss wants, your infrastructure only supports it, you want to write WP plugins, etc.
|
# ? Oct 16, 2013 01:33 |