Ir para conteúdo
  • 0

[Pedido] Alguem pode ajudar a resolver esse bug na aba guilds?


LeoTK

Pergunta

Eae galera tava editando meu site e fiz tudo certo ai criei uma guilda pra testar a aba e ver se tem bugs ... ela estava sem logo ai peguei um logo qualquer ... quando eu fui ver a aba com o logo ficou desse jeito

 

print:

 

Bi4mPKD.jpg

 

Aba

 

<?php
$ide = new IDE;
try { $ide->loadInjections('guild_view'); } catch(Exception $e) { error($e->getMessage()); }
$logo = (file_exists("public/guild_logos/".$guild->getId().".gif")) ? "<img src='".WEBSITE."/public/guild_logos/".$guild->getId().".gif' width='64' height='64' " : "<img src='".WEBSITE."/public/guild_logos/default.gif'>";
echo "<div style='float: left; padding-right: 10px; PADDING-LEFT: 50px;'>$logo</div>";
echo "<h1 style='PADDING-LEFT: 50px;'>".$guild->getName()."</h1>";
echo $guild->getCustomField("motd");
echo "<br /><br />Guild owner: <b><a  href='".WEBSITE."/index.php/character/view/".$guild->getOwner()."'>".$guild->getOwner()."</a></b><br /><br />";


$rank_list = $guild->getGuildRanksList();
$rank_list->orderBy('level', POT::ORDER_DESC);
$showed_players = 1;
if($ide->isLogged()) {
$ots = POT::getInstance();
$ots->connect(POT::DB_MYSQL, connection());
$account_logged = new OTS_Account();
$account_logged->load($_SESSION['account_id']);
$account_players = $account_logged->getPlayers();
}
echo "<table width='100%' style='PADDING-LEFT: 50px;'>";
foreach($rank_list as $rank)
{
$players_with_rank = $rank->getPlayersList();
$players_with_rank->orderBy('name');
$players_with_rank_number = count($players_with_rank);
if($players_with_rank_number > 0)
{
echo "<tr class='rankBar'><td><b>".$rank->getName()."</b></td></tr>";
foreach($players_with_rank as $player)
{
$guild_nick = $player->getGuildNick();
if(!empty($guild_nick)) $guild_nick = "($guild_nick)"; else $guild_nick = "";
if($ide->isLogged()) {$leave = (in_array($player->getName(), $account_players)) ? "<a href='#' onClick='if(confirm(\"Are you sure you want to leave ".$guild->getName()." with a ".$player->getName()." ?\")) window.location.href=\"".WEBSITE."/index.php/guilds/leave/".$guild->getId()."/".$player->getId()."\"'><img src='".WEBSITE."/public/images/false.gif'/></a>" : ""; }
echo @"<tr class='playerGuildBar'><td>$leave<a href=\"".WEBSITE."/index.php/character/view/".$player->getName()."\">".$player->getName()."</a> $guild_nick</td></tr>";
}
}
}
echo "</table>";


if(!$ide->isLogged()) {
alert("You need to be logged in to access any options.");
}
else {


require_once('system/application/libraries/POT/InvitesDriver.php');
new InvitesDriver($guild);
$invited_list = $guild->listInvites();
if(count($invited_list) == 0)
echo "<center><b>This guild did not invite anyone.</b></center>";
else {
echo "<table width='100%'>";
echo "<tr><td><center><b>Name</b></center></td><td><center><b>Join</b></center></td></tr>";
$characters = array();
if($ide->isLogged()) {
foreach($account_players as $player_from_acc) {
$characters[] = $player_from_acc->getName();
}
}


foreach($invited_list as $invited_player)
{






if($ide->isLogged() && in_array($invited_player->getName(), $characters)) {
echo "<tr><td><center><a href=\"".WEBSITE."/index.php/character/view/".$invited_player->getName()."\">".$invited_player->getName()."</a></center></td><td><center><a href='".WEBSITE."/index.php/guilds/join/".$guild->getId()."/".$invited_player->getId()."'>Join</a></center></td></tr>";


}
else {
echo "<tr><td><center><a href=\"".WEBSITE."/index.php/character/view/".$invited_player->getName()."\">".$invited_player->getName()."</a></center></td><td><center>Cannot join</center></td></tr>";


}




}
echo "</table>";
}


}
if($ide->isLogged() && in_array($guild->getOwner(), $account_players) || $leaders) {
echo "<table style='text-align: center; margin-top: 10px; margin-left: 50px;'><tr class='first'><td>Guild Management</td></tr><tr><td>";
echo "<a href='".WEBSITE."/index.php/guilds/management/".$guild->getId()."'>Guild Management</a>"; 
echo "</td></tr></table>";
}


if(($ide->isLogged() && $viceleaders)) {
echo "<table style='text-align: center; margin-top: 10px; margin-left: 50px;'><tr class='first'><td>Guild Management</td></tr><tr><td>";
echo "<a href='".WEBSITE."/index.php/guilds/management/".$guild->getId()."'>Guild Management</a>"; 
echo "</td></tr></table>";
}



?>

 

PROBLEMA RESOLVIDO ABA SEM BUGS

 

 

 

<?php
$ide = new IDE;
try { $ide->loadInjections('guild_view'); } catch(Exception $e) { error($e->getMessage()); }
$logo = (file_exists("public/guild_logos/".$guild->getId().".gif")) ? "<img src='".WEBSITE."/public/guild_logos/".$guild->getId().".gif' width='64' height='64'>" : "<img src='".WEBSITE."/public/guild_logos/default.gif'>";
echo "<div style='float: left; padding-right: 10px;'>$logo</div>";
echo "<h1>".$guild->getName()."</h1>";
echo $guild->getCustomField("motd");
echo "<br /><br />Guild owner: <b><a href='".WEBSITE."/index.php/character/view/".$guild->getOwner()."'>".$guild->getOwner()."</a></b><br /><br />";


$rank_list = $guild->getGuildRanksList();
$rank_list->orderBy('level', POT::ORDER_DESC);
$showed_players = 1;
if($ide->isLogged()) {
$ots = POT::getInstance();
$ots->connect(POT::DB_MYSQL, connection());
$account_logged = new OTS_Account();
$account_logged->load($_SESSION['account_id']);
$account_players = $account_logged->getPlayers();
}
echo "<table width='100%'>";
foreach($rank_list as $rank)
{
$players_with_rank = $rank->getPlayersList();
$players_with_rank->orderBy('name');
$players_with_rank_number = count($players_with_rank);
if($players_with_rank_number > 0)
{
echo "<tr class='rankBar'><td><b>".$rank->getName()."</b></td></tr>";
foreach($players_with_rank as $player)
{
$guild_nick = $player->getGuildNick();
if(!empty($guild_nick)) $guild_nick = "($guild_nick)"; else $guild_nick = "";
if($ide->isLogged()) {$leave = (in_array($player->getName(), $account_players)) ? "<a href='#' onClick='if(confirm(\"Are you sure you want to leave ".$guild->getName()." with a ".$player->getName()." ?\")) window.location.href=\"".WEBSITE."/index.php/guilds/leave/".$guild->getId()."/".$player->getId()."\"'><img src='".WEBSITE."/public/images/false.gif'/></a>" : ""; }
echo @"<tr class='playerGuildBar'><td>$leave<a href=\"".WEBSITE."/index.php/character/view/".$player->getName()."\">".$player->getName()."</a> $guild_nick</td></tr>";
}
}
}
echo "</table>";


if(!$ide->isLogged()) {
alert("You need to be logged in to access any options.");
}
else {


require_once('system/application/libraries/POT/InvitesDriver.php');
new InvitesDriver($guild);
$invited_list = $guild->listInvites();
if(count($invited_list) == 0)
echo "<center><b>This guild did not invite anyone.</b></center>";
else {
echo "<table width='100%'>";
echo "<tr><td><center><b>Name</b></center></td><td><center><b>Join</b></center></td></tr>";
$characters = array();
if($ide->isLogged()) {
foreach($account_players as $player_from_acc) {
$characters[] = $player_from_acc->getName();
}
}


foreach($invited_list as $invited_player)
{






if($ide->isLogged() && in_array($invited_player->getName(), $characters)) {
echo "<tr><td><center><a href=\"".WEBSITE."/index.php/character/view/".$invited_player->getName()."\">".$invited_player->getName()."</a></center></td><td><center><a href='".WEBSITE."/index.php/guilds/join/".$guild->getId()."/".$invited_player->getId()."'>Join</a></center></td></tr>";


}
else {
echo "<tr><td><center><a href=\"".WEBSITE."/index.php/character/view/".$invited_player->getName()."\">".$invited_player->getName()."</a></center></td><td><center>Cannot join</center></td></tr>";


}




}
echo "</table>";
}


}
if($ide->isLogged() && in_array($guild->getOwner(), $account_players) || $leaders) {
echo "<table style='text-align: center; margin-top: 10px;'><tr class='first'><td>Guild Management</td></tr><tr><td>";
echo "<a href='".WEBSITE."/index.php/guilds/management/".$guild->getId()."'>Guild Management</a>";
echo "</td></tr></table>";
}


if(($ide->isLogged() && $viceleaders)) {
echo "<table style='text-align: center; margin-top: 10px;'><tr class='first'><td>Guild Management</td></tr><tr><td>";
echo "<a href='".WEBSITE."/index.php/guilds/management/".$guild->getId()."'>Guild Management</a>";
echo "</td></tr></table>";
}




?>

 

 

 

CREDITOS PELA ABA AO JUNIOR SILVA

 

E AO ERRO

 

 

 

cLMMbLX.jpg

 

 

 

RESOLVIDO COM AJUDA DO UNKNOWED

 

COM A TAG

 

<center> </center>

Editado por Brunds
Link para o comentário
Compartilhar em outros sites

14 respostass a esta questão

Posts Recomendados

  • 0

não possuo skype amigo e não da para encontrar o problema com o código que está no tópico?

 

aguardo respostas ainda

Editado por Brunds
Link para o comentário
Compartilhar em outros sites

  • 0

Você pode mandar para mim a pasta do site? Me adiciona no Skype: laug@outlook.com.br . Acho que posso te ajudar.

 

Ajude-o por aqui, pois talves a duvida dele pode ser de outros. obrigado!

 

 

Eae galera tava editando meu site e fiz tudo certo ai criei uma guilda pra testar a aba e ver se tem bugs ... ela estava sem logo ai peguei um logo qualquer ... quando eu fui ver a aba com o logo ficou desse jeito

 

print:

 

Bi4mPKD.jpg

 

Aba

 

<?php
$ide = new IDE;
try { $ide->loadInjections('guild_view'); } catch(Exception $e) { error($e->getMessage()); }
$logo = (file_exists("public/guild_logos/".$guild->getId().".gif")) ? "<img src='".WEBSITE."/public/guild_logos/".$guild->getId().".gif' width='64' height='64' " : "<img src='".WEBSITE."/public/guild_logos/default.gif'>";
echo "<div style='float: left; padding-right: 10px; PADDING-LEFT: 50px;'>$logo</div>";
echo "<h1 style='PADDING-LEFT: 50px;'>".$guild->getName()."</h1>";
echo $guild->getCustomField("motd");
echo "<br /><br />Guild owner: <b><a  href='".WEBSITE."/index.php/character/view/".$guild->getOwner()."'>".$guild->getOwner()."</a></b><br /><br />";


$rank_list = $guild->getGuildRanksList();
$rank_list->orderBy('level', POT::ORDER_DESC);
$showed_players = 1;
if($ide->isLogged()) {
$ots = POT::getInstance();
$ots->connect(POT::DB_MYSQL, connection());
$account_logged = new OTS_Account();
$account_logged->load($_SESSION['account_id']);
$account_players = $account_logged->getPlayers();
}
echo "<table width='100%' style='PADDING-LEFT: 50px;'>";
foreach($rank_list as $rank)
{
$players_with_rank = $rank->getPlayersList();
$players_with_rank->orderBy('name');
$players_with_rank_number = count($players_with_rank);
if($players_with_rank_number > 0)
{
echo "<tr class='rankBar'><td><b>".$rank->getName()."</b></td></tr>";
foreach($players_with_rank as $player)
{
$guild_nick = $player->getGuildNick();
if(!empty($guild_nick)) $guild_nick = "($guild_nick)"; else $guild_nick = "";
if($ide->isLogged()) {$leave = (in_array($player->getName(), $account_players)) ? "<a href='#' onClick='if(confirm(\"Are you sure you want to leave ".$guild->getName()." with a ".$player->getName()." ?\")) window.location.href=\"".WEBSITE."/index.php/guilds/leave/".$guild->getId()."/".$player->getId()."\"'><img src='".WEBSITE."/public/images/false.gif'/></a>" : ""; }
echo @"<tr class='playerGuildBar'><td>$leave<a href=\"".WEBSITE."/index.php/character/view/".$player->getName()."\">".$player->getName()."</a> $guild_nick</td></tr>";
}
}
}
echo "</table>";


if(!$ide->isLogged()) {
alert("You need to be logged in to access any options.");
}
else {


require_once('system/application/libraries/POT/InvitesDriver.php');
new InvitesDriver($guild);
$invited_list = $guild->listInvites();
if(count($invited_list) == 0)
echo "<center><b>This guild did not invite anyone.</b></center>";
else {
echo "<table width='100%'>";
echo "<tr><td><center><b>Name</b></center></td><td><center><b>Join</b></center></td></tr>";
$characters = array();
if($ide->isLogged()) {
foreach($account_players as $player_from_acc) {
$characters[] = $player_from_acc->getName();
}
}


foreach($invited_list as $invited_player)
{






if($ide->isLogged() && in_array($invited_player->getName(), $characters)) {
echo "<tr><td><center><a href=\"".WEBSITE."/index.php/character/view/".$invited_player->getName()."\">".$invited_player->getName()."</a></center></td><td><center><a href='".WEBSITE."/index.php/guilds/join/".$guild->getId()."/".$invited_player->getId()."'>Join</a></center></td></tr>";


}
else {
echo "<tr><td><center><a href=\"".WEBSITE."/index.php/character/view/".$invited_player->getName()."\">".$invited_player->getName()."</a></center></td><td><center>Cannot join</center></td></tr>";


}




}
echo "</table>";
}


}
if($ide->isLogged() && in_array($guild->getOwner(), $account_players) || $leaders) {
echo "<table style='text-align: center; margin-top: 10px; margin-left: 50px;'><tr class='first'><td>Guild Management</td></tr><tr><td>";
echo "<a href='".WEBSITE."/index.php/guilds/management/".$guild->getId()."'>Guild Management</a>"; 
echo "</td></tr></table>";
}


if(($ide->isLogged() && $viceleaders)) {
echo "<table style='text-align: center; margin-top: 10px; margin-left: 50px;'><tr class='first'><td>Guild Management</td></tr><tr><td>";
echo "<a href='".WEBSITE."/index.php/guilds/management/".$guild->getId()."'>Guild Management</a>"; 
echo "</td></tr></table>";
}



?>

 

alguem pode me ajudar a arrumar isso?

 

Aguardo resposta +rep pra quem ajudar

 

Agradeço desde já

 

xD

 

como assim nao possuia logo ?

Link para o comentário
Compartilhar em outros sites

  • 0

sim a estrutura da aba guilds sem o logo fica normal ai quando eu coloquei o logo na guilda a estrutura da aba ficou desse jeito da print a estrutura do top 10 e os demais saiu fora do lugar ...

Link para o comentário
Compartilhar em outros sites

  • 0

sim a estrutura da aba guilds sem o logo fica normal ai quando eu coloquei o logo na guilda a estrutura da aba ficou desse jeito da print a estrutura do top 10 e os demais saiu fora do lugar ...

 

 

tenta assim

 

 

 

DESCONSIDERE

Editado por Junior Silva
Link para o comentário
Compartilhar em outros sites

  • 0

 

 

 

tenta assim

 

 

 

<?php
require_once("system/application/config/create_character.php");
/*Setting global to alllow plugins to access guild list.*/
$GLOBALS['guilds'] = $guilds;
$ide = new IDE;
try { $ide->loadInjections("guilds_index"); }
catch(Exception $e) { error($e->getMessage());}
if(!$ide->isLogged()){alert("You need to be logged in to create guild.");} else {
echo "<a class='createGuildLink' href='guilds/create'>Create Guild</a>";
}
if(count($config['worlds'] > 1)) {
echo form_open("guilds", array('method'=>'post'));
echo "<label>World:</label>";
echo "<select name='world_id'>";
foreach($config['worlds'] as $id=>$world) {
echo "<option value='$id'>$world</option>";
}
echo "</select>";
echo "<input type='submit' value='Sort'>";
echo "</form>";
}
if(count($guilds) == 0)
alert("There is no guilds.");
else {
echo "<table width='100%'>";
echo "<tr><td width='15%'><center><b>Logo</b></center></td><td><center><b>Name</b></center></td><td width='15%'><center><b>World</b></center></td></tr>";
foreach($guilds as $guild) {
$logo = (file_exists("public/guild_logos/".$guild['id'].".gif")) ? "<img src='".WEBSITE."/public/guild_logos/".$guild['id'].".gif' width='64' height='64'>" : "<img src='".WEBSITE."/public/guild_logos/default.gif'>";
echo "<tr><td width='15%'><center>$logo</center></td><td><center><a href='guilds/view/".$guild['id']."'>".$guild['name']."</a><br><i>".$guild['motd']."</i></center></td><td width='15%'><center>".$config['worlds'][$guild['world_id']]."</center></td></tr>";
}
echo "</table>";
}
?>

 

 

 

e pra eu coloca isso aonde? no lugar da aba que eu disponibilizei ou eu coloco em alguma parte dela?

Obs: esse código php é de create guild o problema que eu to tendo é no view_guilds .... pode ser um equivoco meu mais pode ser que não xD

Link para o comentário
Compartilhar em outros sites

  • 0

 

 

e pra eu coloca isso aonde? no lugar da aba que eu disponibilizei ou eu coloco em alguma parte dela?

Obs: esse código php é de create guild o problema que eu to tendo é no view_guilds .... pode ser um equivoco meu mais pode ser que não xD

 

 

aew mals perdao mandei arquivo errado é esse aqui

 

 

 

<?php
$ide = new IDE;
try { $ide->loadInjections('guild_view'); } catch(Exception $e) { error($e->getMessage()); }
$logo = (file_exists("public/guild_logos/".$guild->getId().".gif")) ? "<img src='".WEBSITE."/public/guild_logos/".$guild->getId().".gif' width='64' height='64'>" : "<img src='".WEBSITE."/public/guild_logos/default.gif'>";
echo "<div style='float: left; padding-right: 10px;'>$logo</div>";
echo "<h1>".$guild->getName()."</h1>";
echo $guild->getCustomField("motd");
echo "<br /><br />Guild owner: <b><a href='".WEBSITE."/index.php/character/view/".$guild->getOwner()."'>".$guild->getOwner()."</a></b><br /><br />";
$rank_list = $guild->getGuildRanksList();
$rank_list->orderBy('level', POT::ORDER_DESC);
$showed_players = 1;
if($ide->isLogged()) {
$ots = POT::getInstance();
$ots->connect(POT::DB_MYSQL, connection());
$account_logged = new OTS_Account();
$account_logged->load($_SESSION['account_id']);
$account_players = $account_logged->getPlayers();
}
echo "<table width='100%'>";
foreach($rank_list as $rank)
{
$players_with_rank = $rank->getPlayersList();
$players_with_rank->orderBy('name');
$players_with_rank_number = count($players_with_rank);
if($players_with_rank_number > 0)
{
echo "<tr class='rankBar'><td><b>".$rank->getName()."</b></td></tr>";
foreach($players_with_rank as $player)
{
$guild_nick = $player->getGuildNick();
if(!empty($guild_nick)) $guild_nick = "($guild_nick)"; else $guild_nick = "";
if($ide->isLogged()) {$leave = (in_array($player->getName(), $account_players)) ? "<a href='#' onClick='if(confirm(\"Are you sure you want to leave ".$guild->getName()." with a ".$player->getName()." ?\")) window.location.href=\"".WEBSITE."/index.php/guilds/leave/".$guild->getId()."/".$player->getId()."\"'><img src='".WEBSITE."/public/images/false.gif'/></a>" : ""; }
echo @"<tr class='playerGuildBar'><td>$leave<a href=\"".WEBSITE."/index.php/character/view/".$player->getName()."\">".$player->getName()."</a> $guild_nick</td></tr>";
}
}
}
echo "</table>";
if(!$ide->isLogged()) {
alert("You need to be logged in to access any options.");
}
else {
require_once('system/application/libraries/POT/InvitesDriver.php');
new InvitesDriver($guild);
$invited_list = $guild->listInvites();
if(count($invited_list) == 0)
echo "<center><b>This guild did not invite anyone.</b></center>";
else {
echo "<table width='100%'>";
echo "<tr><td><center><b>Name</b></center></td><td><center><b>Join</b></center></td></tr>";
$characters = array();
if($ide->isLogged()) {
foreach($account_players as $player_from_acc) {
$characters[] = $player_from_acc->getName();
}
}
foreach($invited_list as $invited_player)
{
if($ide->isLogged() && in_array($invited_player->getName(), $characters)) {
echo "<tr><td><center><a href=\"".WEBSITE."/index.php/character/view/".$invited_player->getName()."\">".$invited_player->getName()."</a></center></td><td><center><a href='".WEBSITE."/index.php/guilds/join/".$guild->getId()."/".$invited_player->getId()."'>Join</a></center></td></tr>";
}
else {
echo "<tr><td><center><a href=\"".WEBSITE."/index.php/character/view/".$invited_player->getName()."\">".$invited_player->getName()."</a></center></td><td><center>Cannot join</center></td></tr>";
}
}
echo "</table>";
}
}
if($ide->isLogged() && in_array($guild->getOwner(), $account_players) || $leaders) {
echo "<table style='text-align: center; margin-top: 10px;'><tr class='first'><td>Guild Management</td></tr><tr><td>";
echo "<a href='".WEBSITE."/index.php/guilds/management/".$guild->getId()."'>Guild Management</a>";
echo "</td></tr></table>";
}
if(($ide->isLogged() && $viceleaders)) {
echo "<table style='text-align: center; margin-top: 10px;'><tr class='first'><td>Guild Management</td></tr><tr><td>";
echo "<a href='".WEBSITE."/index.php/guilds/management/".$guild->getId()."'>Guild Management</a>";
echo "</td></tr></table>";
}
?>

Link para o comentário
Compartilhar em outros sites

  • 0

não faz diferenteça quero botar a propriedade nestá linha

echo "<br /><br / >Guild owner: <b><a href='".WEBSITE."/index.php/character/view/".$guild->getOwner()."'>".$guild->getOwner()."</a></b><br /><br />";

ja tentei de tudo mais não acontece nada entrou colocando a propriedade nestá parte

<br /><br / Nesta Parte>Guild owner: <b>

so que não acontece nada ;/

Link para o comentário
Compartilhar em outros sites

  • 0

padding-right? eu preciso jogar ele para a direita não para a esquerda xD se jogar mais para a esquerda vai fica em cima dos botões <<< kkk xD


#edit ta normal o change logo .... só to com problemas no guild owner ... que não ta centralizada

Editado por Brunds
Link para o comentário
Compartilhar em outros sites

  • 0

Valeu cara te amo


Explicado a solução do problema com ajuda dos membros e com os créditos ^^ espero que ajuda pessoas com a mesma dúvida

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...