Welcome to Gaia! ::


Hygienic Swapper

Mwa
By the way, I wish to randomly introduce you to my 4-line PHP signature. surprised
<?php
$number_of_pictures = 7;
$number = (($temp = ( isset( $_COOKIE['mwarotate'] ) )?($_COOKIE['mwarotate']+1):1) && $temp == $number_of_pictures)?0:$temp;
setcookie("mwarotate", $number, time()+60*60*24*365, "/")
header("location: ./".(($number==0)?$number_of_pictures-1:$number-1).".png")
?>

I'm just going to set work into making into a one-liner. surprised
2 liner is all you can get, cuz you need to set the cookie and stuff surprised

$number = (($temp = ( isset( $_COOKIE['mwarotate'] ) ? ($_COOKIE['mwarotate']+1):1) && $temp == $number_of_pictures)?0:$temp;

$number's only switching between 1 or 0 because of the &&

Hygienic Swapper

if this post is formatted it means that now it's all set surprised
for this feature sweatdrop

edit: well duh! >.<
Choggo
Mwa
By the way, I wish to randomly introduce you to my 4-line PHP signature. surprised
<?php
$number_of_pictures = 7;
$number = (($temp = ( isset( $_COOKIE['mwarotate'] ) )?($_COOKIE['mwarotate']+1):1) && $temp == $number_of_pictures)?0:$temp;
setcookie("mwarotate", $number, time()+60*60*24*365, "/")
header("location: ./".(($number==0)?$number_of_pictures-1:$number-1).".png")
?>

I'm just going to set work into making into a one-liner. surprised
2 liner is all you can get, cuz you need to set the cookie and stuff surprised

$number = (($temp = ( isset( $_COOKIE['mwarotate'] ) ? ($_COOKIE['mwarotate']+1):1) && $temp == $number_of_pictures)?0:$temp;

$number's only switching between 1 or 0 because of the &&

Actually, you're completely wrong there. wink
I'm using tons of ()?:; statements, and
( setcookie("mwarotate", $number, time()+60*60*24*365, "/" ) || 1 )
is one of the clauses. wink
The only problem is, I've left a bracket hanging, and I can't find it.
Mwa
Choggo
Mwa
By the way, I wish to randomly introduce you to my 4-line PHP signature. surprised
<?php
$number_of_pictures = 7;
$number = (($temp = ( isset( $_COOKIE['mwarotate'] ) )?($_COOKIE['mwarotate']+1):1) && $temp == $number_of_pictures)?0:$temp;
setcookie("mwarotate", $number, time()+60*60*24*365, "/")
header("location: ./".(($number==0)?$number_of_pictures-1:$number-1).".png")
?>

I'm just going to set work into making into a one-liner. surprised
2 liner is all you can get, cuz you need to set the cookie and stuff surprised

$number = (($temp = ( isset( $_COOKIE['mwarotate'] ) ? ($_COOKIE['mwarotate']+1):1) && $temp == $number_of_pictures)?0:$temp;

$number's only switching between 1 or 0 because of the &&

Actually, you're completely wrong there. wink
I'm using tons of ()?:; statements, and
( setcookie("mwarotate", $number, time()+60*60*24*365, "/" ) || 1 )
is one of the clauses. wink
The only problem is, I've left a bracket hanging, and I can't find it.

ack right = missed that last parenthesis
You guys do know that shrinking everything down trying to optimize isn't /always/ a "Good Thing"? 3nodding

Hygienic Swapper

Chema
You guys do know that shrinking everything down trying to optimize isn't /always/ a "Good Thing"? 3nodding
it's funenr though 3nodding
Guys, see if you can spot the problem.
I've expanded out the single line of code into thirty.
I just cannot see the hanging (! gonk

-snip-

Got it! surprised

Hygienic Swapper

surprised ok you got it :p
This line is just sex. surprised
(Yes, it is one line. Gaia's linebreaked the whitespace. gonk )

<?php
header("location: ./".((($number = (($number_of_pictures = 7) && ($temp = (isset( $_COOKIE['mwarotate'] ))?( $_COOKIE['mwarotate']+1 ):1) && ($temp == $number_of_pictures))?0:$temp) && (setcookie( "mwarotate", $number, time()+60*60*24*365, "/" ) || 1 ))?( ($number==0)?$number_of_pictures-1:$number-1 ):"error").".png")
?>

Naughty Rabbit

wow choggo that's just blinking awesome. *downloads now* usually i just had all the shops in my book marks though, this'll be easier whee
Soooo it IS possible for it to be made for Maxthon?! ::falls over Aeon::
Wow, this is great. Now I have an exclusive reason to use Firefox all the time! xd

Hygienic Swapper

espy.ness
Soooo it IS possible for it to be made for Maxthon?! ::falls over Aeon::
it is surprised
just need time to do the coding sweatdrop
I don't know how much progress he has on that area atm surprised
Bleh...and I wasn't able to help at all.
xd NoRushButIJustNeedItRightNowOkay?

I've lived without it for this long xp

I'm proud of Chogster ninja

Quick Reply

Submit
Manage Your Items
Other Stuff
Get GCash
Offers
Get Items
More Items
Where Everyone Hangs Out
Other Community Areas
Virtual Spaces
Fun Stuff
Gaia's Games
Mini-Games
Play with GCash
Play with Platinum