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.

snick

Members
  • Joined

  • Last visited

Reputation Activity

  1. Like
    snick reacted to Leonvv in Merging Grid Columns & Rows   
    Result after I removed the 'clear:both;' and added a 'bigger' class.
    You can add some extra styling to the 'bigger' class to make it look better.
     
    Léon
  2. Like
    snick reacted to Jock in Correct PHP Formatting   
    Yeah, I agree with rallport, you should use MVC to separate the business logic from the display, it makes it a lot easier to read.
     
    EDIT: Just realised this ****ty editor doesn't work so ignore what i said about using PEAR style
  3. Like
    snick reacted to evu in Media Query Alteration   
    Try adding:

    @media only screen and (min-width: 992px) { .desc { display: none; } #home-portfolio li.last, #home-blog li.last { display: block; } #home-portfolio ul, #home-blog ul { margin: 0; } #home-portfolio li, #home-blog li { width: 225px; } } @media only screen and (max-width: 991px) { .desc { display: none; } #home-portfolio li.last, #home-blog li.last { display: none; } #home-portfolio ul, #home-blog ul { margin: 0; } #home-portfolio li, #home-blog li { width: 245px; margin-right: 11px; } .overlay { width: 245px; } }
    To the bottom of your responsive.css. You should be able to work it out from there.
     
    Goodluck,
    ~evu.
  4. Like
    snick reacted to mteam in z-index   
    Where are you using the id dark
  5. Like
    snick reacted to mteam in z-index   
    The easiest way would be to put the a #dark inside your #wrapper not sure if thats an option in your case?
  6. Like
    snick reacted to lloydsolutions in <h1> tag question </h1>   
    Its alot better to have the complete phrase 'painting ideas' for search engines but better for people if you only use ideas once!
  7. Like
    snick reacted to mrsminkie in <h1> tag question </h1>   
    I think you'd probably have a better chance if painting and ideas were in your page title, and also within the text on the site. Then you can add "painting ideas" as one of your keywords.
     
    Regarding the negative text-indent: it's generally what I do.
     
    Read this: http://www.seomoz.org/ugc/cloaking-vs-image-replacement-hiding-text-is-not-a-bad-thing
     
    Might give you some insight.
     
    Here's an alternative: http://www.drunkenfist.com/304/2007/03/19/an-alernative-to-negative-text-indent-for-image-replacement-css/
     
    And here's something else: http://css-tricks.com/css-image-replacement/
     
    Generally - if there's anything you're not sure of, googling it will give you answers pretty quickly. With most things there's usually a side for, and a side against.
  8. Like
    snick reacted to webdeveloper93 in End session   
    Yes u could do something like this
     

    <a href="index.php?end=yes">Main screen</a> <?php if(isset($_GET['end']) && $_GET['end'] == "yes"){ session_destroy(); } ?>
  9. Like
    snick reacted to Jock in End session   
    don't destroy the session then. Instead of destroying it, set it to switch off the counter. e.g
     

    <?php session_start(); if (isset($_GET['beginCount'])) { $_SESSION['countView'] = true; } if ($_SESSION['countView']) { $_SESSION['count']++; } if (($_SESSION['count'] % 5 == 0) && ($_SESSION['countView'])) { echo "test"; } ?> <?php if((isset($_GET['end'])) && ($_GET['end'] == "yes")) { //session_destroy(); $_SESSION['countView'] = false; } ?>
  10. Like
    snick reacted to chrissyg in Multiple of 5   
    I didn't get my +1
     
    Not sure if there is any way in PHP that lets you determine clicks from F5s. Maybe try JavaScript?
  11. Like
    snick reacted to Rob G in Multiple of 5   
    Hi!
    There are a few reasons it isn't working. It's worth turning on display of E_NOTICE errors in php.ini for your local dev environment as it helps spot some issues.
     
    OK so firstly, the ternary operator isn't usually used like that, though it will work. What you're after there is either:
     

    if (isset($_SESSION['count'])) { $_SESSION['count']++; } else { $_SESSION['count'] = 1; }
    or if you really wanted to use the ternary operator, it's usually used like:
     

    $_SESSION['count'] = (isset($_SESSION['count']) ? $_SESSION['count'] + 1 : 1);
    In this case, the if structure is much clearer so I'd suggest using that. The isset() is the proper way of checking if it exists, and not using it will generate a E_NOTICE error.
     
    The other issue is in PHP, all variables begin with a dollar sign so your second if statement should read:
     

    if (!($_SESSION['count'] % 5)) { echo "hello"; }
    Notice also that the brackets after the negative ! surround the entire calculation. This is important because otherwise you are applying the ! to only the first 5 (which evaluates to false as ints greater than 0 are converted to true) so you actually get 'false % 5', which after some int casting behind the scenes leaves you with (int) 0, always.
    It might actually be clearer to use the full expression

    if ($_SESSION['count'] % 5 === 0) { echo "hello"; }
    You could also, as Zed suggests, put the session variable in a local variable just to save you some typing each time such as:

    if (isset($_SESSION['count'])) { $count = $_SESSION['count']++; } else { $count = $_SESSION['count'] = 1; }
    And then use $count in your second if. Up to you, but hopefully all that helps you out a bit Good luck!
  12. Like
    snick reacted to zed in Multiple of 5   
    I'm no PHP expert but was just trying to apply some logic that you were comparing something that was not a variable.
     
    Should you be storing your %_session into a variable like $count and then checking that with your if statement?
  13. Like
    snick reacted to chrissyg in Multiple of 5   
    I think he means...
     

    if (!(count) % 5 == 0) { echo "hello"; }
  14. Like
    snick reacted to zed in Multiple of 5   
    can you use 'count' like that. ie. you have 'count' in your session statements and count in your modulus check.
    I'm a relative newbie so ignore anything stupid lol
     
    Or maybe create a variable and check that not to be 0 from the modulus.

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.