Witajcie. Zwracałem się już do Was z problemem zakładki - mam taki oto kod:
<?php
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.<br />Author: Neproify <a href='http://www.farmclimate.pl'><strong>FarmClimate.pl</strong></a>";
exit();
}
class profile_kartaGracza extends profile_plugin_parent
{
/**
* Zwraca kod HTML
*
* @param array $member Informacje o użytkowniku
* @return string
*/
public function return_html_block($member=array())
{
//zwracamy kod HTML
$this->DB->query("SELECT id FROM lss_users WHERE g_account=".$this->memberData['member_id']."");
$this->DB->execute();
$id = $this->DB->fetch();
$this->DB->query("SELECT * FROM lss_characters WHERE userid=".$id['id']."");
$this->DB->execute();
while($row = $this->DB->fetch())
{
$row['name'] = $row['imie']." ".$row['nazwisko'];
$chars[] = $row;
}
return $this->registry->getClass('output')->getTemplate('game')->kartagracza($chars);
}
}
?>
I mianowicie. Co by się nie działo zawsze wyskakuje mi że nie mam żadnych postaci - kod bitu:
<script type="text/javascript">
function ShowChar( e )
{
var _url = 'index.php?app=isantos&module=ajax§ion=character&md5check=' + ipb.vars['secure_hash'];
new ipb.Popup( 'rep', {type: 'pane', modal: true, w: '700px', h: '500px', ajaxURL: _url, hideAtStart: false, close: '.cancel' } );
};
</script>
<div style="position: static; top: 134px; left: 10px; height: auto;">
<style tyle="text/css">
.gameCard {line-height: 12px !important;text-align:center;height:auto;width:auto;min-width:100px;padding:5px;margin-bottom:10px !important;}
.gameCard.inactive {opacity:0.3}
.gameCard.inactive:hover {opacity:0.7}
.gameCard span{font-size: 0.85em}
.gameCard .seen{display:none}
.gameCard .time{display:inline}
.gameCard:hover .seen{display:inline}
.gameCard:hover .time{display:none}
</style>
<div class="bar">Postacie</div>
<div class="ipsPad">
<if test="count($chars)">
<ul class="ipsList_inline">
<foreach loop="$chars as $row">
<li class="ipsButton_secondary gameCard" <if test="$row['logged']">style="border-color: green;"</if>><img src=" <if test="$row['hide'] == 1 && $this->memberData['member_group_id'] != 4 && $this->memberData['member_group_id'] != 7">/public/style_images/isantos/row.png<else />/skin/Skin_{$row['skin']}.png</if>" alt="{$row['name']}"><br><span class="hnick">{$row['name']}</span></li>
</foreach>
</ul>
<else />
<div class="message unspecific">Nie masz żadnych postaci!</div>
<if />
</div>
<!-- <div class="bar">Logi kar</div>
<div class="ipsPad">
<br />
<if test="count($logs)">
<table class="ipb_table" summary="Logi">
<tbody>
<tr class="header">
<th scope="col">Nadano</th>
<th scope="col">Postać</th>
<th scope="col">Powód</th>
<th scope="col"></th>
</tr>
<foreach loop="$logs as $row">
<php>
$this->DB->query('SELECT * FROM `fc_players` WHERE `player_uid` = '.$row['player_uid'].'');
$char = $this->DB->fetch();
$char['name'] = str_replace("_", " ", $char['name']);
$this->DB->query('SELECT * FROM `members` WHERE `member_id` = '.$row['issuedby'].'');
$iss = $this->DB->fetch();
</php>
<tr class="row1">
<td> {parse date="$row['dateline']" format="short"} <br /> <span class="desc">przez <if test="$row['issuedby'] == -1">System<else />{$iss['members_display_name']}</if> </span> </td>
<td> {$char['name']} <br /> <span class="desc">{$row['type']}</span> </td>
<td> {$row['notes']} <br/> <span class="desc"> {$row['expire']} </span> </td>
</tr>
</foreach>
</tbody>
</table>
<else />
<div class="message unspecific">Nie znaleziono żadnych logów.</div>
</if>
</div>-->
Mam to zrobione w taki sposób, że w lss_users mam konta do gry - z zapisem kar, itd. Mam tam również kolumne g_account która wskazuje na konto globalne na forum. lss_characters zawiera postacie - przez kolumnę userid jest podpisane pod konto w lss_users.