Reputation Activity
-
snick reacted to Leonvv in Merging Grid Columns & RowsResult 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
-
snick reacted to Jock in Correct PHP FormattingYeah, 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
-
snick reacted to evu in Media Query AlterationTry 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.
-
-
-
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!
-
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.
-
snick reacted to webdeveloper93 in End sessionYes 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(); } ?>
-
snick reacted to Jock in End sessiondon'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; } ?>
-
snick reacted to chrissyg in Multiple of 5I didn't get my +1
Not sure if there is any way in PHP that lets you determine clicks from F5s. Maybe try JavaScript?
-
snick reacted to Rob G in Multiple of 5Hi!
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!
-
snick reacted to zed in Multiple of 5I'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?
-
snick reacted to chrissyg in Multiple of 5I think he means...
if (!(count) % 5 == 0) { echo "hello"; }
-
snick reacted to zed in Multiple of 5can 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.