Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Script©

Members
  • Joined

  • Last visited

  1.    jamesosix reacted to a post in a topic: wierdest email ever....
  2. Script© posted a topic in General Chat
    So, during the end of the first year of highschool I decided to drop out, I was doing a programming course that turned out to be really disappointing. We did Pascal when I was told explicitly we were doing C, as I had some experience in that and wanted more. Anyway, my old class is now finishing grade 12, and they know I've been doing sites for a while, and that's what year 12 is about, web languages, so I keep getting requests to do their work 24/7, I don't, I offer to help if they have particular questions, but they expect me to sit there and do it all(for free), not going to happen, lol. I was curious and took a look at their coding though, I was astonished, most of the HTML was deprecated tags, <font>, <center> things like that, lots of elements with the same id VS using a class. And the PHP and databases... passwords not hashed, using really old mysql_ functions, echoing HTML, using only $_REQUEST vs $_GET $_POST or $_COOKIE, everything is mysql injectable, always using include_once() when it's totally not necessary, simple scripts end up taking way longer to execute than they need, optimization is just awful as well as readability, I couldn't even help if I wanted to as they'd obviously notice someone else did it... what the hell? These kids are going to get a diploma that says they know what they're doing, they have absolutely no clue what's happening... how can this happen?
  3. <select id="select2"> <option value="5" >Some text</option> <option value="10" >Bla bla</option> </select> Errr, that can be tampered by the user with an inspect element. I always do something like: <select id="select2"> <option value="0" >Some text</option> <option value="1" >Bla bla</option> </select> And in the php/js bit I'd have an array with the values I really intend to use, I've managed to input arbitrary text into sites that didn't think <option> through.
  4. I was asked to do a web shop, I normally charge €120 per year for small scale shops, and the client inputs his own products. I was asked to create a pretty large shop, and the client wants me to insert over 1000 products instead of him doing it himself... it's a tedious and boring task... How much extra should I ask for having to input so many products?
  5. I don't think she actually works for a legit SEO company...
  6. The wording and English used is odd Proficient in PHP, CSS...
  7. Right now I need to money so I'm not saying no to anything I just choose whether or not it goes in the portfolio. And yes, I meant to say banner, it's just huge, on a 1024px screen it's nearly half the page in height... Nice white sites, but they all have a thing in common, they are minimalist and clean. This I'm doing is for an american styled restaurant, so they said to go with something "American" can't really present them 80% of the page in white, they'll think it's boring. I'm a fan of minimalist too however. No matter what I come up with the fairly large banner doesn't go with anything(except of course getting a completely white bg going...) Might just give it a go with light shades of grey.
  8. Has anyone really been far even as decided to use even go want to do look more like?
  9. Client wants a site, didn't explain at all what he's after, sent me the logo, which in my opinion is pretty bad, solid white background, 900x300px(he wants it to remain this big) Completely clueless, I just hate solid colour backgrounds, and solid white is just too empty. he just wants white + red + blue. Can this be done? or will a bad logo make a bad site?
  10. Most of the time I can manage on ONE 1280x800px, sometimes when I'm working on several projects at the same time I plug in a 1680x1050px.
  11. Hi, for the last year I have been expanding my personal projects that were once solely physical computing and robotics, however now I have a few other services to offer, web development, photography, among other web related things. Right, I was asked to(if possible) put everything into one website. I don't feel like it's right to have my more personal robotics projects in the same place as my web portfolio and the like... My idea would be to have a splash screen that gives the user the choice to visit physical computing/robotics side of the site, and the commercial side of the site... reckon this could work?
  12. I made a cms in OOP php with a single class, I now want to break up a huge class into smaller classes with more user friendly names. So I have a controller called kernel, it has an array called 'services' with all the model classes in it. $kernel->services['user'] contains methods regarding users... etc so $kernel->services['user']->new($params); creates a new user I have a few more classes, but these are giving me trouble: Problem is, two of the 'services' of the kernel are cms, and database, the database service handles database connections(who knew... ), the cms is supposed to handle errors and have settings(such as display language, footer display text, maximum blog posts per page, etc) that it fetches from a database using the database class. I'm having a lot of trouble using methods from one class inside other classes... Should ALL classes extend the kernel so they share the services array so I can call $kernel->services['database'] inside the user class for example? I don't know if I simply haven't gotten a grasp of what MVC really is, or my project has a sketchy architecture, making me really confused. Kernel class: <?php class kernel{ protected $mode; protected $queue; public $services; // array of all active services public $allServices = array('cms', 'db'); public function __construct($db, $services = '*', $bootMode = 'development', $debug = true){ $this->mode = $bootMode; switch($this->mode){ case 'production': error_reporting(0); break; case 'developement': error_reporting(E_STRICT); break; } include('includes/db.class.php'); $this->services['database'] = new db($db['host'], $db['database'], $db['username'], $db['password']); $this->queue = $services == '*' ? $this->allServices : $services; $this->launch($services); } public function launch($services){ $this->queue = $services; foreach($this->queue as $key => $_service){ if(file_exists('includes/'.$_service.'.class.php')){ include('includes/'.$_service.'.class.php'); } else { echo 'Cannot start requested process :: Class file ',$_service,' unexistent<br/>'; } if(class_exists($_service)){ $this->services[$_service] = new $_service; } } } } ?> (I realise some variables are unused, it's not finished)
  13. Why are we still going through learning PHP and Mysql when we have these? I just discovered this after years of learning PHP, I feel quite stupid right now... Sure, if a client needs a custom tool it's good to know php, but most clients just want simple sites, I'm definitely going to put down php and start using surrealcms... Sites are getting too cheap to have to dedicate hours and hours to making one, I don't feel like coding a whole site in 70 hours to get 100€, no thanks.
  14. So I'm making navigation that saves the state of a dropdown(click to toggle) menu, saves the state(open or closed) in a cookie. BUT, whenever I click the li element, it changes the state, even if I'm clicking an ul inside of that li, to fix this I crated a span inside the li so it only saves the state when I click the span inside of the li. problem is, it doesn't loop though the children of the ul as it's starting from the span. Menu: <ul id="admin_menu_nav" class='dropdown dropdown-vertical'> <li class='main' id='home'><span>Dashboard</span> <ul class='<?php echo isset($_COOKIE['home']) ? $_COOKIE['home'] : 'closed'; ?>'> <li><a href='./'>Home</a></li> <li><a href='stats.php'>Statistics</a></li> <li class='last'><a href='errors.php'>Error log</a></li> </ul> </li> </ul> jQuery: $('ul#admin_menu_nav li.main span').click(function() { var state = $.cookie($(this).attr('id')) == 'open' ? 'closed' : 'open'; $.cookie($(this).attr('id'), state, {expires: 7}); }); $('ul#admin_menu_nav li.main span').each(function(i) { var sub_ul = $(this).children().remove(); $(this).wrapInner('<a/>').find('a').click(function(e) { sub_ul.slideToggle('fast'); }); $(this).append(sub_ul); }); So my idea is before it gets to the wrapInner, I should go back to the span's parent, so I reach the li and then targets the ul child EDIT: fixed it... literally seconds after posting $('ul#admin_menu_nav li.main span').click(function() { var state = $.cookie($(this).closest('li').attr('id')) == 'open' ? 'closed' : 'open'; $.cookie($(this).closest('li').attr('id'), state, {expires: 7}); }); $('ul#admin_menu_nav li.main ').each(function(i) { var sub_ul = $(this).closest('li').children('ul').remove(); $(this).wrapInner('<a/>').find('a').click(function(e) { sub_ul.slideToggle('fast'); }); $(this).append(sub_ul); }); Is there a batter way of achieving the same result only more efficient?
  15. I know someone that started a web design service, all he did was build the sites on wix and yola and stuff like that and charge £25...
  16. The full page is: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Administração do site</title> <!-- CSS --> <!-- Reset Stylesheet --> <link rel="stylesheet" href="resources/css/reset.css" type="text/css" media="screen" /> <!-- Main Stylesheet --> <link rel="stylesheet" href="resources/css/style.css" type="text/css" media="screen" /> <!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid --> <link rel="stylesheet" href="resources/css/invalid.css" type="text/css" media="screen" /> <link rel='stylesheet' href='resources/css/bar_style.css' type="text/css" media="screen"/> <!-- Javascripts --> <!-- jQuery --> <script type="text/javascript" src="resources/scripts/jquery-1.3.2.min.js"></script> <!-- jQuery Configuration --> <script type="text/javascript" src="resources/scripts/simpla.jquery.configuration.js"></script> <!-- Facebox jQuery Plugin --> <script type="text/javascript" src="resources/scripts/facebox.js"></script> <!-- jQuery WYSIWYG Plugin --> <script type="text/javascript" src="resources/scripts/jquery.wysiwyg.js"></script> <script src="resources/scripts/jquery.js" type="text/javascript" language="javascript"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script> <script type="text/javascript"> // Developed by Roshan Bhattarai // Visit http://roshanbh.com.np for this script and more. // This notice MUST stay intact for legal use $(document).ready(function(){ $("#login_form").submit(function(){ //remove all the class add the messagebox classes and start fading $("#msgbox").removeClass().addClass('messagebox').text('A Autenticar...').fadeIn(1000); //check the username exists or not from ajax $.post("ajax_login.php",{ username:$('#username').attr("value"),password:$('#password').attr("value"),rand:Math.random() } ,function(data){ alert("User: "+$('#username').attr("value")+" password: "+$('#password').attr("value")); if(data == 'yes'){ //if correct login detail $("#msgbox").fadeTo(200,0.1,function(){ //start fading the messagebox $(this).html('A Carregar...').addClass('messageboxok').fadeTo(900,1, function(){ //redirect to secure page document.location='panel/index.php'; }); }); } else { $("#msgbox").fadeTo(200,0.1,function(){ //start fading the messagebox $(this).html('Username ou Password incorrecta!').addClass('messageboxerror').fadeTo(900,1); $(".button").fadeIn("fast"); $(".meter").hide(); }); } alert(data); }); return false; //not to post the form physically }); //now call the ajax also focus move from $("#password").blur(function() { $("#login_form").trigger('submit'); return false; }); $("#login_form").submit(function() { $(".meter").show(); $(".button").fadeOut("fast"); $(".meter > span").each(function() { $(this) .data("origWidth", $(this).width()) .width(0) .animate({ width: $(this).data("origWidth") }, 1200); }); return false; }); $(".meter").hide(); return false; }); </script> <?php if(isset($_POST["float_username"]) && isset($_POST["float_password"])){ ?> <script type="text/javascript"> $(document).ready(function(){ $("#login_form").trigger('submit'); return false; }); </script> <?php } ?> </head> <body id="login"> <div id="header"></div> <div id="login-wrapper" class="png_bg"> <div id="login-top"> <img id="logo" src="resources/images/dinamiccms.png" alt="Simpla Admin logo" /> </div> <div id="login-content"> <form method="post" action="ajax_login.php" id="login_form"> <p> <label></label> <input name="username" type="text" id="username" value="<?php if(isset($_POST["float_username"])){ print $_POST["float_username"]; } else { print "Username"; }?>" maxlength="20" onFocus="if(this.value==this.defaultValue){this.value='';}" onBlur="if(this.value==''){this.value=this.defaultValue;}"/> </p> <div class="clear"></div> <p> <label></label> <input name="password" type="text" id="password" value="<?php if(isset($_POST["float_password"])){ print $_POST["float_password"]; } else { print "Password"; }?>" maxlength="20" onFocus="if(this.value==this.defaultValue){this.value=''; this.type='password';}" onBlur="if(this.value==''){this.value=this.defaultValue;}"/> <a href="panel/pass_recovery.php">Esqueceu a sua password?</a> </p> <div class="clear"></div> <input class="button" type="submit" value="Entrar" /> <div class="blue meter animate"> <span style="width: 100%"></span> </div> <p> <div id="msgbox" style="display:none; text-align:center;"></div> </p> </form> </div> <!-- End #login-content --> </div> <!-- End #login-wrapper --> </body> </html> It worked flawlessly in another page that is exactly the same except for the loading bar. Forgot to mention, that php "if post'username' and password are set trigger submit" There is a small login form in the index page so the user can login through there too and to avoid having the same form with the jQuery twice I decided to make it post the data to this form, and this form then posts the data to ajax_login.php, and this way it works on IE! so I have no idea what's up, I set the value"" property with php if the login form in the index was the one to post the data

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.