dswp.de
http://www.dswp.de/old/

what is this?
http://www.dswp.de/old/forum-gameserver-support/what-is-this-t797.html
Page 1 of 2

Author:  SteveMcqueen [ 06.25.09 ]
Post subject:  what is this?

Attachment:
1mapcyle.jpg
1mapcyle.jpg [ 4.4 KiB | Viewed 6763 times ]

Author:  wurst [ 06.25.09 ]
Post subject:  Re: what is this?

ah good that u ask, i normally wanted to ask that blinky just but when u ask ok:

theres a green and a red dot.
if user has voted there should be shown green, else red.
yesterday ana told me: wow i have there a green AND a red button.

hm?
but the script was like "!= 1" and "= 1" for the one or the other image.
a look in the database showed me that the values are stored as binary, the table cells contain "0x30" or "0x31"
so i started to monitor the output of the php by calling the same again, just writing "echo" in front of it.

so the secret is: its debuging.

btw:
oki np i thought: php bindec() will translate me that.
hah! it gives me 49! (whatever 49 may mean now)

the value btw get called through the phpbb as allways in phpbb, the data is a column in phpbb_users table.
i must look what the phpbb does there with the database query since in plain sql i can say him "where user_voted = '0x31'

Author:  SteveMcqueen [ 06.25.09 ]
Post subject:  Re: what is this?

now i have a blinking red dot in front of a "1"....


OFFTOPIC: ich bin noch orange weil mit rechte = 100 gamemode wechseln geht und ich so sehen kann wie train in den modes mit der flagge läuft. und in CAH ists mal wirklich ultra gut geworden....... tobi war mit aufm server, so wie unser lieblingsfranzose svarox. zu CTF kann ich noch nicht soo viel sagen.

Author:  SteveMcqueen [ 06.25.09 ]
Post subject:  Re: what is this?

flashing red 00

Author:  wurst [ 06.25.09 ]
Post subject:  Re: what is this?

hehe.

oki for reminding:
Code:
        <!-- PHP -->
  $voted = ((int)$user->data&#91;'voted_for_maps'&#93;);
  //debug :)
  //echo $voted;
        if ($voted > "0" ) echo "<img border="0" src="./images/icons/user_voted.gif" ></font>";
  if ($voted < "1" ) echo "<img border="0" src="./images/icons/user_not_voted.gif" ></font>";
  //mit != / = funktionierts komischerweise trotzdem nicht...
        <!-- ENDPHP -->
 


the funny thing is that i get with that an output of 1/0 for voted/not voted but i cant work with = and !=
greater then works, so we have "bigger then 0" for voted and "smaller then 1" for non- voters...

Author:  AimMe [ 06.25.09 ]
Post subject:  Re: what is this?

I've got only green dot.

Author:  wurst [ 06.25.09 ]
Post subject:  Re: what is this?

did u mapvote allready?

if yes, it should be Image
if no, it should be Image

btw im looking forward to mark important things with this flashing dots, anyone got an opinion on that?

---------edit---------
i included little map images with the check boxes, im sry u cant test it till friday, hope you enjoy...

Attachment:
mapcycle_design.jpg
mapcycle_design.jpg [ 26.94 KiB | Viewed 8094 times ]

Author:  XTJ7 [ 06.25.09 ]
Post subject:  Re: what is this?

Why don't you just work with if and else? If you are able to make only the green dot appear, why not work with else instead? :D

Author:  AimMe [ 06.25.09 ]
Post subject:  Re: what is this?

I did vote and it is OK.

Author:  wurst [ 06.25.09 ]
Post subject:  Re: what is this?

hm cause there could be another state in future i thought.
dunno its blinkys moped i wanna just not to cross his plans...

btw. if/else didnt workout too.
now where i call (int) of that value i get a 0/1 result.
if = 1 bring me both, if = 0 too, else just bring me the first one cause allways valid somehow...

whatever, if u like look it, id like to understand what goes on with the bin value.
to define 1 as > 0 is ok but i think to say 1=1 is no basically new thing...

Page 1 of 2 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/