Everything posted by Adam Dynamic
-
Web app - bootstrap toggle buttons to filter mysql/php query
I'm hoping someone here can help me? I'm trying to create a simple web app for my own local use (i.e. not necessarily to publish to the web) that contains: - A table of data populated by a php query to a mysql database - Some bootstrap toggle buttons along the top that when pressed, filter the table contents At the moment I'm working on the assumption that I will use the toggle buttons to change the WHERE clause in the mysql query and then refresh the page automatically so that only relevant records are returned from the database. My problem is that I have absolutely no idea how to achieve this, to the point where my google searching isn't helping because I'm not sure what to look for. Can anyone point me in the right direction as to how I might approach this? Are there certain tools/languages that I should be looking for? I can make basic HTML pages and program in python so I have some technical skills, it's been many years since I looked at any web development though Any help would be appreciated!
-
Sending a short message into space
Hey, Not sure if this sort of thing gets posted here? I'm involved a project to launch a mission to space so wanted to give it a quick (shameless ) plug. The first mission will launch 100 short messages into the upper stratosphere (~100,000ft) so we're asking for people to contribute a short message to the project. If you want to contribute a message you can do it via twitter (@e3SpaceProgram) and you can find more about the project here. Thanks! Adam
-
d3.js and Twitter Bootstrap framework - how to include a graph?
Hi, I'm still re-learning web design having done some a couple of years ago (and even then, not much) so if the following sounds like an obvious question, please forgive me! I'm building a very simple website using the Twitter Bootstrap framework. I need to include some graphs built using the d3.js framework but every time I try to paste some sample code into the page, the graph appears but stuck to the bottom of the page, when what I want is to have it in the same column as the text. I've tried including the code in different places in my page, creating a new <div> wrapper to try and move it etc, and nothing seems to work (which makes me think I may be misunderstanding something about javascript?) I've included the code below, can anyone tell me what I'm doing wrong? Any help on this would be appreciated! <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <title>Name of the page</title> <!-- Reset CSS --> <link href="css/reset.css" rel="stylesheet" /> <!-- Bootstrap core CSS --> <link href="bootstrap/css/bootstrap.css" rel="stylesheet" /> <!-- Custom styles for this template --> <link href="css/sticky-footer-navbar.css" rel="stylesheet" /> <!-- Styles for the graphs --> <link href="css/d3js-graphs.css" rel="stylesheet" /> </head> <body> <!-- Wrap all page content here --> <div id="wrap"> <!-- Fixed navbar --> <div class="navbar navbar-fixed-top"> <div class="container"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="#">Project Name</a> <div class="nav-collapse collapse"> <ul class="nav navbar-nav"> <li class="active"><a href="#">Home</a></li> <li><a href="#about">About</a></li> <li><a href="#contact">Contact</a></li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="#">Action</a></li> <li><a href="#">Another action</a></li> <li><a href="#">Something else here</a></li> <li class="divider"></li> <li class="dropdown-header">Nav header</li> <li><a href="#">Separated link</a></li> <li><a href="#">One more separated link</a></li> </ul> </li> </ul> </div><!--/.nav-collapse --> </div> </div> <!-- Begin page content --> <div class="container"> <div class="page-header"> <h1>Page Title</h1> </div> <!-- END page-header --> <p class="lead">The lead paragraph text</p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla in nisi ante. Etiam molestie tempor fermentum. Fusce molestie dolor lacus, quis semper massa ultrices sit amet. Nam molestie consequat fringilla. Nullam sagittis eleifend neque at tincidunt. Donec in dui fermentum, porta est vitae, sodales magna. Suspendisse vehicula mi at diam ornare lacinia. Pellentesque libero leo, pharetra non sapien at, mattis semper ipsum. Fusce accumsan laoreet enim et iaculis. Nam tincidunt vulputate velit id tincidunt. Curabitur et est nec nisi elementum dictum. Duis fringilla turpis nisi, eu ornare arcu pellentesque in. Vestibulum vulputate lacus sit amet velit rhoncus, ut iaculis mauris auctor. Nam consectetur dolor neque, et lacinia odio tincidunt eu.</p> <script src="http://d3js.org/d3.v3.js"></script> <script> // From http://mkweb.bcgsc.ca/circos/guide/tables/ var matrix = [ [11975, 5871, 8916, 2868], [ 1951, 10048, 2060, 6171], [ 8010, 16145, 8090, 8045], [ 1013, 990, 940, 6907] ]; var chord = d3.layout.chord() .padding(.05) .sortSubgroups(d3.descending) .matrix(matrix); var width = 960, height = 500, innerRadius = Math.min(width, height) * .41, outerRadius = innerRadius * 1.1; var fill = d3.scale.ordinal() .domain(d3.range(4)) .range(["#000000", "#FFDD89", "#957244", "#F26223"]); var svg = d3.select("body").append("svg") .attr("width", width) .attr("height", height) .append("g") .attr("transform", "translate(" + width / 2 + "," + height / 2 + ")"); svg.append("g").selectAll("path") .data(chord.groups) .enter().append("path") .style("fill", function(d) { return fill(d.index); }) .style("stroke", function(d) { return fill(d.index); }) .attr("d", d3.svg.arc().innerRadius(innerRadius).outerRadius(outerRadius)) .on("mouseover", fade(.1)) .on("mouseout", fade(1)); var ticks = svg.append("g").selectAll("g") .data(chord.groups) .enter().append("g").selectAll("g") .data(groupTicks) .enter().append("g") .attr("transform", function(d) { return "rotate(" + (d.angle * 180 / Math.PI - 90) + ")" + "translate(" + outerRadius + ",0)"; }); ticks.append("line") .attr("x1", 1) .attr("y1", 0) .attr("x2", 5) .attr("y2", 0) .style("stroke", "#000"); ticks.append("text") .attr("x", .attr("dy", ".35em") .attr("transform", function(d) { return d.angle > Math.PI ? "rotate(180)translate(-16)" : null; }) .style("text-anchor", function(d) { return d.angle > Math.PI ? "end" : null; }) .text(function(d) { return d.label; }); svg.append("g") .attr("class", "chord") .selectAll("path") .data(chord.chords) .enter().append("path") .attr("d", d3.svg.chord().radius(innerRadius)) .style("fill", function(d) { return fill(d.target.index); }) .style("opacity", 1); // Returns an array of tick angles and labels, given a group. function groupTicks(d) { var k = (d.endAngle - d.startAngle) / d.value; return d3.range(0, d.value, 1000).map(function(v, i) { return { angle: v * k + d.startAngle, label: i % 5 ? null : v / 1000 + "k" }; }); } // Returns an event handler for fading a given chord group. function fade(opacity) { return function(g, i) { svg.selectAll(".chord path") .filter(function(d) { return d.source.index != i && d.target.index != i; }) .transition() .style("opacity", opacity); }; } </script> </div> <!-- END container --> </div> <div id="footer"> <div class="container"> <p class="text-muted credit">Example courtesy <a href="http://martinbean.co.uk">Martin Bean</a> and <a href="http://ryanfait.com/sticky-footer/">Ryan Fait</a>.</p> </div> </div> <!-- Bootstrap core JavaScript ================================================== --> <script src="js/jquery.js"></script> <script src="bootstrap/js/bootstrap.min.js"></script> </body> </html>
-
Python + cron jobs + multiple domains on the same hosting account
Hey, I've used 34sp.com for hosting websites (hobby sites mainly, almost zero traffic) for a long time now and never really questioned it or looked around. I've started doing some development in Python and developing a few ideas for different sites, 34sp recently discontinued their reseller hosting option though (and I don't want to sign up to new hosting account every time I create a new site). Basically, I need a hosting account where I can: - Host multiple domains on the same hosting account - Automatically run python scripts as cron jobs periodically (as in 'every 10 mins') without breaking the service agreement or getting kicked out - Be able to set up mysql databases for the python scripts to populate UK-based would be preferable though not super-essential. I don't know a great deal about the technical side of things, good customer support (to compensate for my lack of knowledge) and/or a forum with some regular traffic would also be a bonus. Appreciate this may be something of a vague/open-ended question, any suggestions/advice would be appreciated! Thanks, Adam
-
Web-based app / PhoneGap / Socialize alternative?
I'm not sure this question belongs here, I can't see a better place though so hopefully someone here can help me? I am in the process of building a mobile website that I intend to turn into an app using PhoneGap (or a similar service). I came across Socialize as a 'one stop shop' solution for connecting native apps to various social media sites and allowing users to share/tweet etc about their use of the app. Does anyone know of any similar solutions that I would be able to drop into a 'web-site based app' that would have the same level of automation with facebook, twitter etc? Socialize doesn't yet appear to have a HTML5 option and I'd rather not build something if a better solution is already out there? Any help on this would be appreciated, if you need any more info or if my question isn't clear, please let me know. Thanks, Adam
-
Registering a .el domain name - where's reputable?
Hey, I've been searching the internet for places to buy a 'overseas' domain name. There seems to be enough companies offering services, does anyone have any recommendations of services they've used before/where's reputable etc? (Specifically I would hope to register a .el domain). Also, if there's anything I need to know about if owning/running an 'overseas' domain name is different from a vanilla '.com' would be appreciated! Thanks, Adam
-
Header that's on top and above the content?
Hey, Thanks for the replies! I've tried removing the transparency from the reset.css file but it doesn't seem to have worked, I've been playing around with the z-index values of the wrapper for each part of the page, my most recent attempt it below but the problem still persists. Any further advice on this would be appreciated, I don't seem to be getting very far... Thanks again for the suggestions! Adam. #header_wrapper { z-index: 10; top: 0; position: fixed; background-image: url('../images/diy/whitesquare.png'); background-repeat: repeat; } #diy_center_wrapper { width: 1000px; margin-top: 140px; margin-right: auto; margin-left: auto; z-index:0; }
-
Header that's on top and above the content?
Hey, I've hit a bit of a road-block and internet research is getting me nowhere so I'm hoping someone here can help me? Test Page This is the test page (ignore the mess, I've been trying to get this sorted before I lined everything up etc). Basically I want it so that when you scroll down, the header stays at the top of the page but the content disappears underneath it. At the moment, you can see the content 'through' the header, I want the header to have a 'solid white' background and I've no idea how to solve the problem? There seems to be a few javascript-based solutions online but I'm loathed to use something that some browsers won't recognise and I feel that there must be a CSS solution somewhere? I've tried a bunch of different ways but nothing is working, is there a simple solution I've overlooked? Any help on this would be much appreciated! Thanks, Adam.
-
Detecting location and displaying a different price?
Hey, I've been scouring the internet and getting nowhere fast for more than an hour so I'm hoping someone here can help me out! I have a website that sells musical equipment, Google Analytics tells me a lot of my traffic is coming from the USA and I'm wondering whether there is an easy way to display my site with different currencies depending on who's viewing it and from where? i.e. USA visitors would see the price of the item in dollars and UK visitors would see the (equivalent monetary value but different numerical value and currency sign) price in sterling. Any advice on this would be appreciated! Thanks, Adam.
-
Review request for my latest site development
Thanks for the feedback! Let me know if there's anything big/small that you can think of that would benefit the site. Also, in terms of the CSS, can anyone recommend a tool to do it or am I going to have to go through the style sheet manually? Any info would be appreciated! Adam.
-
Review request for my latest site development
www.superkingpedals.com Hey, I posted some questions about this a while ago, many thanks to all the helpful suggestions! I've tried to incorporate as many as I could. The current site is 'live', I'd be interested to hear on any comments or suggestions on ways to improve it/make the visitor experience better etc. I've been staring at it for so long now that some external perspective would be valuable! Also, can anyone recommend an online tool for cleaning up my stylesheet? I've no doubt there's styles on there that I've added, used and then deleted the tag without deleting the style (bad management, I know . A few sites talk about 'dust-me' for Firefox but it won't run on my version and a few other sites seem to want my email address before they'll send me results? It can't be that hard, can it? Any help on either of the above would be much appreciated! Thanks, Adam.
-
Visual Communication Consultancy - North East of England?
Hey, I was wondering whether anyone knows/could recommend/has insightful opinions on visual communication specialists in terms of helping determine how the front end of a website is laid out? We're in the process of setting up a site for a charity we've started (more information can be found here, even if you can't help a quick 'like' would be enormously appreciated The back-end donation handling code had been written but the front end is pretty undeveloped. We've recently won some awards (and a small amount of money) for the project and we're keen to use the services of a specialist who can say why buttons need to be a certain colour, why it's a good idea to put links in certain places etc etc, in addition to a developer who can actually write the code. Our UK operation is based in Durham in the North East, it sounds stupid but google searching appears to be getting me nowhere in terms of finding what I'm looking for (do people like this have a title that I don't know?) so any assistance here would be appreciated. Thanks in advance for any help! Adam.
-
Website review request - first site in a long time!
Hey, Thanks for the feedback! I haven't considered code validation yet, I've been trying to keep it as 'compliant' as possible as I went along, there's every chance I'll need to go back and tidy it up though. In terms of the design, 'simple' is what I was going for - with my lack of experience I didn't want to be 'too ambitious', I just want to make sure that the site is easy to use, has a logical layout etc?... Anyway, thanks again for your feedback! Adam.
-
Website review request - first site in a long time!
Hey, Thanks for everyone's tips and advice, I've re-jigged the website around everyone's suggestions, if anyone could give me feedback on 'mark II' it would be much appreciated! SuperKing Guitar Pedals - Mark II Thanks again! Adam
-
Website review request - first site in a long time!
Hey, Many thanks for your feedback, it was exactly the sort of info I was looking for! I've made some changes to the community page as you described, in terms of the cart it's provided by fatfreecart and there doesn't appear to be anything you can do to change it's appearance - I agree that everything seems a bit close to the edges, there doesn't seem to be anything I can do to change it though. In terms of getting rid of the 'extra click' on the pedals page, how would you recommend I lay out the page info? I chose that layout as it would mean the user would see all of the products available on the first page and gave it a nice clean look, if you have all the product images + info + prices etc on the same page some of them would fall 'below the fold' which I was keen to avoid? Any suggestions on how to address this would be appreciated! Again, many thanks for your help, really appreciate it. Adam.
-
Website review request - first site in a long time!
That's because I'm only using one place-holder image, more down to time efficiency (read 'laziness') than anything else. Hey, I wanted to make it look good at a 'reasonable' screen resolution, my biggest concern is that it shrinks and expands 'gracefully' for people viewing the site on widescreen or very small monitors. I'm not sure I've cracked it yet, I'll use 960px as a benchmark though, thanks for the tip! Thanks for the tip, I'll find out why the scrollbar is there and get rid of it. Thanks again for all your suggestions, they're much appreciated! Adam.
-
Website review request - first site in a long time!
Hey, I haven't 'gone live' with it yet so I can't say what it's like on a day-to-day basis, it's simple to install though (cut and paste code) and looks a lot better/more integrated design-wise than the PayPal cart certainly. I tried the googlecart also but there doesn't seem to be much flexibility in terms of the position and behaviour of the cart. If you have few enough products that you don't mind manually generating each 'add to cart' button and don't need things like inventory control etc then I'd certainly suggest you give it a look. The only thing I've found with it so far is that it when you test it on your desktop the cart doesn't retain anything you put in it (i.e. you 'add to cart' and when you go back to view the cart it's empty) but it seems to work fine once it's uploaded. There's no technical support for it from e-junkie either as they have another 'pro' version that they charge for. How the page looks when the page is re-sized is something that needs addressing, I'm not quite sure of the best way to fix it though (for instance, if you open the page and then shrink your window horizontally the navigation links 'stack up' which I don't like). Any suggestions on how to fix this would be appreciated... Thanks again for everyone's feedback! Adam.
-
Website review request - first site in a long time!
Hey, Thanks a lot for the feedback. Can you tell me which bits you found to be broken? I've tested it in various browsers, I downloaded IE9 for the first time yesterday and found (to my utter frustration) that quite a few things didn't work there that worked fine in every other browser, so potentially there's quite a bit to do. Any faults you could bring to my attention would be appreciated! Thanks again, Adam.
-
Website review request - first site in a long time!
Hey, I've uploaded the test version of my latest site design, I'd appreciate any feedback in terms of user ability. SuperKing Guitar Pedals Test Site Any comments are welcome, i.e. any features that you think would be useful but are missing, confusing path to check-out etc. Note: most of the images and most of the text are still place-holders - I wanted to get some feedback on the layout before I started to populate the content. Thanks a lot in advance! Adam
-
Fat Free Cart - am I missing something obvious?
Never mind, it seems it doesn't work when you test inside MS expression but works fine once it's uploaded, thanks for everyone's help anyway... Adam.
-
Fat Free Cart - am I missing something obvious?
...anyone?
-
Fat Free Cart - am I missing something obvious?
Hey, Thanks for the responses. I only have ~10 different (very uncomplicated) products so rather than rebuilding my site around a fully-integrated shopping cart solution I don't know, I thought it would be best to use a simple 'add to cart' solution instead (providing I can integrate the design of the cart into my website), hence why I'm trying fatfreecart. I can't seem to get the simple cut-and-paste buttons to work and I'm wondering what (no doubt, obvious) mistake I'm making? Any help would be appreciated! Thanks, Adam.
-
Fat Free Cart - am I missing something obvious?
Hey, Having looked around for a good, free shopping cart for my site (see here) I've settled for the time-being on fat free cart. My problem, I can't for the life of me get the cart to retain anything I put in it. I.e., I add an item, click 'continue shopping' and then click 'view cart' and the cart is empty? Part of the 'free-ness' is that ejunkie provide no support for the 'fat free' version of their product, if anyone could point out what I'm missing it would be appreciated! Thanks, Adam. <!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 content="text/html; charset=utf-8" http-equiv="Content-Type" /> <title>Test Cart</title> </head> <body> <!-- FatFreeCart.com AddToCart Snippet @version: 0.1 @date: 07/30/2007 @author: Ropu (rovagnati at gmail) //--> <table cellspacing="2" cellpadding="2" bgcolor="#ffffff" style="border: thin solid rgb(100,100,100);font-family: Verdana; font-size: 11px; color: rgb(0, 0, 0);"> <tr align="center"> <th bgcolor="#dddddd" style="color: rgb(0, 0, 0);">Item_1</th> </tr> <tr> <td align="center"> <!-- ADD TO CART button code. --> <form target="ej_ejc" action="https://www.e-junkie.com/ecom/fgb.php?c=cart&cl=1&ejc=2" method="post"> <!-- google merchant id (remove if not using Google Checkout) --> <input type="hidden" name="merchant_id" value="googleid"/> <!-- paypal email(remove if not using PayPal) --> <input type="hidden" name="business" value="paypal@yahoo.com"/> <!-- site url --> <input type="hidden" name="site_url" value="http://www.siteurl.com"/> <!-- contact email (where we can notify of the updates) --> <input type="hidden" name="contact_email" value="contact@contact.com"/> <!-- you thank you page --> <input type="hidden" name="return_url" value="http://www.continueshopping.com"/> <!-- any custom info you want to pass --> <input type="hidden" name="custom" value=""/> <!-- currency (USD for Google Checkout USA, GBP for Google Checkout UK. For PayPal: any currency that PayPal supports --> <input type="hidden" name="currency_code" value="GBP"/> <!-- shipping cost --> <input type="hidden" name="shipping" value="2.99"/> <!-- shipping cost of each additional unit --> <input type="hidden" name="shipping2" value="1"/> <!--handling cost --> <input type="hidden" name="handling" value=""/> <!-- tax (flat amount, NOT percentage)--> <input type="hidden" name="tax" value="0"/> <!-- item name --> <input type="hidden" name="item_name" value="SuperKing Guitar Pedals - S-6"/> <!-- item number (should be different for each product)--> <input type="hidden" name="item_number" value="001"/> <!-- item price --> <input type="hidden" name="amount" value="24.99"/> <!-- initial quantity --> <input type="hidden" name="quantity" value="1"/> <!-- item options (can be removed if not required) --> <input type="image" src="https://www.e-junkie.com/ej/ej_add_to_cart.gif" border="0" onClick="javascript:return EJEJC_frm(this.parentNode);" /> </form> </td> </tr> </table> <!-- VIEW CART button code. --> <a href="https://www.e-junkie.com/ecom/fgb.php?c=cart&cl=1&ejc=2&merchant_id=google&business=paypal@paypal.com" target="ej_ejc" class="ec_ejc_thkbx" onClick="javascript:return EJEJC_lc(this);"> <img src="https://www.e-junkie.com/ej/ej_view_cart.gif" border="0" /> </a> <script language="javascript" type="text/javascript"> <!-- function EJEJC_lc(th) { return false; } // --> </script> <script type="text/javascript" src="http://www.e-junkie.com/ecom/box.js"></script> <!-- End FatFreeCart.com AddToCart Snippet v0.1 --> </body> </html>
-
Shopping cart without 'full integration'?
Hey, This looks good, though I'd rather have a 'one-off' payment (or, ideally, a free solution) than have to pay an annual subscription. My requirements are very small, I don't need 'order tracking' or anything like that, just a cart that integrates into the look of my site where users can pay with paypal or googlecart. Thanks again for everyone's suggestions so far! Adam.
-
Shopping cart without 'full integration'?
Hey, phpcart looks like it might be ok, my only concern about it is the same as my concern with fatfreecart - that is the sites don't look like they've been updated since 2008 and I'm not sure to what extent they are still supported? Also, phpcart seems to provide the ability to check out with a credit card but doesn't seem to give any indication how (and with what processing fees?) that money would arrive in my bank account? Are shopping carts a dead technology? Does everyone just use zencart etc now? Thanks again for your help... Adam