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.

atomiku

Members
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Creating feed tables for each user would be very bad as you are duplicating a lot of content in your database (i.e., if one user adds a new post this would need to be written to the feeds of each user who should see this post).
     
    You would also not query all the tables together in one query unless these tables represent entities which are linked (such as a Post and a User). Joining tables which are not linked in this way creates a Cartesian product of all these tables (i.e., combining all elements from one table with all elements from another table) which leads to huge results with lots of duplicate content.
     
    You would need to write separate queries for each type of content to be included in the feed, i.e., "SELECT * from `articles` where `articles`.`category` in (
    );", "SELECT * from `posts` where `post`.`userID` in ();" etc.  
    You then use whatever scripting language you use to present the results from these different queries in whatever way you see fit.
  2. Like
    If the boxes are not a pre defined width yes you will have to use JQuery but even then if they are all different widths it will be very hard to get them to align
     
    if you did know the widths you could use
    <!doctype html> <html> <head> <meta charset="UTF-8"> <title>Untitled Document</title> <style> .hiddenNewLine { display:none; } @media screen and (max-width: 660px) { .hiddenNewLine.half { display: block; height:4px; } .hiddenNewLine.third { display: none; } } @media screen and (max-width: 335px) { .hiddenNewLine.third { display: block; height:4px; } .hiddenNewLine.half { display: none; } } </style> </head> <body> <div class="container" style="width:100%;"> <div style="display:inline-block;width:100px;height:100px;border:2px red solid;">One</div> <div style="display:inline-block;width:100px;height:100px;border:2px red solid;">Two</div> <div class="hiddenNewLine third"></div> <div style="display:inline-block;width:100px;height:100px;border:2px red solid;">Three</div> <div class="hiddenNewLine half"></div> <div style="display:inline-block;width:100px;height:100px;border:2px red solid;">Four</div> <div class="hiddenNewLine third"></div> <div style="display:inline-block;width:100px;height:100px;border:2px red solid;">Five</div> <div style="display:inline-block;width:100px;height:100px;border:2px red solid;">Six</div> </div> </body> </html>
  3. Like
    im guessing you are using javascript if so this will do, to convert it to another language shouldn't be too hard
    function rangePerc(min, max, perc) {
    var diff = max - min;
    return max - ((diff/100)*perc)
    }
  4. Like
    atomiku got a reaction from Akshita Sharma in Change in URL Structure   
    Jack, it's possible you could do something like /latest-news/ to /news/2013/... but I might need an example of your URLs.
     
    /latest-news/news-post-title/
    /latest-news/first-post-hello-world/
     
    If you wanted to forward those to /news/2013/post-title/ instead, you could use the following rewrite rule:
     
    RewriteEngine On RewriteRule ^latest-news/(.*)(/|)$ http://foo.com/news/2013/$1/ [R=301,L,NC] Now, the (/|) after the (.*) will optionally match a trailing slash at the end. http://foo.com/latest-news/post-title would now redirect to http://foo.com/news/2013/post-title/ --- This is assuming all your new post URLs are to have 2013 in them, and not 2012 or 2011!
     
    If this won't work for you, there is the option of forwarding latest-news/(.*)/ to a PHP script, which would look up the post and then redirect to the correct URL via a 301 redirect. Below is a quick example:
     
    RewriteEngine On RewriteRule ^latest-news/(.*)(/|)$ http://foo.com/redirect.php?post=$1 [R=301,L,NC] ~atomiku
  5. Like
    That sounds like a very "organisation-centric" approach, rather than what's best for the customer, no wonder you have a dilemma!
     
    My advice would be to tell your client that their approach isn't the right way to go. Instead you only need to list your services once then provide contact info for each office separately. If needs be you could related services to offices from the service data, eg "This service is available from offices in: London and Scotland", or on the office data page reverse related service data, eg "Our London office provides these services: Service a, Service b"
     
    Yes, use of canonical may work but think of the porr customer who could easily get confused with all thsoe duplicate pages!

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.