Community AlphaAlpha MUADMINS
RUРусский
Войти
На MuADMINSConfig ScannerЗагрузите zip своих файлов: рейты, дропы, споты, лимитыОткрытьНа MuADMINSПрисоединяйтесь к нам в DiscordПросите помощи, показывайте свои проекты и общайтесь о MU с другими владельцами серверов.Открыть
← Все решения

How do I show the guild logo (G_Mark) of a guild, for example the Castle Siege owner, on a PHP website with MSSQL?

✓ Подтверждено автором темы
  1. G_Mark in the Guild table is binary: turn it into text with bin2hex(). You get 64 hex digits, one per cell of an 8x8 grid.
  2. Map each digit to a color: 0 transparent, 1 #000000, 2 #8c8a8d, 3 #ffffff, 4 #fe0000, 5 #ff8a00, 6 #ffff00, 7 #8cff01, 8 #00ff00, 9 #01ff8d, a #00ffff, b #008aff, c #0000fe, d #8c00ff, e #ff00fe, f #ff008c.
  3. Draw the 64 cells as colored <div> or table cells (not <img> tags), inside a function such as guildlogo($guildmark, $size) where the second value is the cell size, so you can change the logo size.
  4. Declare that function only once per page; if another block (for example a TOP 5 guild box) already defines one, reuse it or rename one of them.
  5. On current PHP use the SQL Server PDO driver and <?php tags instead of the old mssql_query and <?.

Автор темы подтвердил, что это сработало.

Оригинальный текст (английский)

“wow! ... it works”

Автор темы, 2020-07-01 (дословно)
RaGEZONE · 2020-07-01
Это помогло?

Всё ещё не получается? Поиск в MuGPS Спросить Помощника MU

MuADMINS Community Alpha: бесплатно, создаётся сообществом, в активной разработке.