Ranga w liście użytkowników
Wchodzisz w szablon odpowiadający za wyświetlanie info w poście (bodajże postbit) , wyciągasz zmienną która odpowiada za wyświetlanie rangi graficznej i zmienną pakujesz tam gdzie chcesz..
na wszelki wypadek: https://webboard.pl/thread-45824.html
@upss
kolega wyżej szybszy
na wszelki wypadek: https://webboard.pl/thread-45824.html
@upss
kolega wyżej szybszy
<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->member_list}</title>
{$headerinclude}
</head>
<body>
{$header}
{$multipage}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="{$colspan}">
<div class="float_right">
<a href="memberlist.php?username_match=begins&username={$lang->a}" style="padding: 5px;">{$lang->a}</a>
<a href="memberlist.php?username_match=begins&username={$lang->b}" style="padding: 5px;">{$lang->b}</a>
<a href="memberlist.php?username_match=begins&username={$lang->c}" style="padding: 5px;">{$lang->c}</a>
<a href="memberlist.php?username_match=begins&username={$lang->d}" style="padding: 5px;">{$lang->d}</a>
<a href="memberlist.php?username_match=begins&username={$lang->e}" style="padding: 5px;">{$lang->e}</a>
<a href="memberlist.php?username_match=begins&username={$lang->f}" style="padding: 5px;">{$lang->f}</a>
<a href="memberlist.php?username_match=begins&username={$lang->g}" style="padding: 5px;">{$lang->g}</a>
<a href="memberlist.php?username_match=begins&username={$lang->h}" style="padding: 5px;">{$lang->h}</a>
<a href="memberlist.php?username_match=begins&username={$lang->i}" style="padding: 5px;">{$lang->i}</a>
<a href="memberlist.php?username_match=begins&username={$lang->j}" style="padding: 5px;">{$lang->j}</a>
<a href="memberlist.php?username_match=begins&username={$lang->k}" style="padding: 5px;">{$lang->k}</a>
<a href="memberlist.php?username_match=begins&username={$lang->l}" style="padding: 5px;">{$lang->l}</a>
<a href="memberlist.php?username_match=begins&username={$lang->m}" style="padding: 5px;">{$lang->m}</a>
<a href="memberlist.php?username_match=begins&username={$lang->n}" style="padding: 5px;">{$lang->n}</a>
<a href="memberlist.php?username_match=begins&username={$lang->o}" style="padding: 5px;">{$lang->o}</a>
<a href="memberlist.php?username_match=begins&username={$lang->p}" style="padding: 5px;">{$lang->p}</a>
<a href="memberlist.php?username_match=begins&username={$lang->q}" style="padding: 5px;">{$lang->q}</a>
<a href="memberlist.php?username_match=begins&username={$lang->r}" style="padding: 5px;">{$lang->r}</a>
<a href="memberlist.php?username_match=begins&username={$lang->s}" style="padding: 5px;">{$lang->s}</a>
<a href="memberlist.php?username_match=begins&username={$lang->t}" style="padding: 5px;">{$lang->t}</a>
<a href="memberlist.php?username_match=begins&username={$lang->u}" style="padding: 5px;">{$lang->u}</a>
<a href="memberlist.php?username_match=begins&username={$lang->v}" style="padding: 5px;">{$lang->v}</a>
<a href="memberlist.php?username_match=begins&username={$lang->w}" style="padding: 5px;">{$lang->w}</a>
<a href="memberlist.php?username_match=begins&username={$lang->x}" style="padding: 5px;">{$lang->x}</a>
<a href="memberlist.php?username_match=begins&username={$lang->y}" style="padding: 5px;">{$lang->y}</a>
<a href="memberlist.php?username_match=begins&username={$lang->z}" style="padding: 5px;">{$lang->z}</a>
</div>
<div><strong>{$lang->member_list}</strong></div></td>
</tr>
<tr>
<td class="tcat" width="1%"><span class="smalltext"><strong>{$lang->avatar}</strong></span></td>
<td class="tcat"><span class="smalltext"><a href="{$sorturl}&sort=username&order=ascending"><strong>{$lang->username}</strong></a> {$orderarrow['username']}</span></td>
<td class="tcat" width="15%" align="center"><span class="smalltext"><a href="{$sorturl}&sort=regdate&order=ascending"><strong>{$lang->joined}</strong></a> {$orderarrow['regdate']}</span></td>
<td class="tcat" width="15%" align="center"><span class="smalltext"><a href="{$sorturl}&sort=lastvisit&order=descending"><strong>{$lang->lastvisit}</strong></a> {$orderarrow['lastvisit']}</span></td>
<td class="tcat" width="10%" align="center"><span class="smalltext"><a href="{$sorturl}&sort=postnum&order=descending"><strong>{$lang->posts}</strong></a> {$orderarrow['postnum']}</span></td>
<td class="tcat" width="10%" align="center"><span class="smalltext"><a href="{$sorturl}&sort=threadnum&order=descending"><strong>{$lang->threads}</strong></a> {$orderarrow['threadnum']}</span></td>
{$referral_header}
</tr>
{$users}
</table>
<div class="float_right" style="padding-top: 4px;">
<a href="showteam.php"><strong>{$lang->forumteam}</strong></a>
</div>
{$multipage}
<br class="clear" />
<br />
<form method="post" action="memberlist.php">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="3">
<div class="float_right">
<strong><a href="memberlist.php?action=search">{$lang->advanced_search}</a></strong>
</div>
<div><strong>{$lang->search_members}</strong></div>
</td>
</tr>
<tr>
<td class="tcat"><strong><label for="username">{$lang->username}</label></strong></td>
<td class="tcat"><strong><label for="website">{$lang->website}</label></strong></td>
<td class="tcat"><strong><label for="sort">{$lang->sort_by}</label></strong></td>
</tr>
<tr>
<td class="trow1" width="33%" style="vertical-align: top;">
{$lang->contains}<br />
<input type="text" class="textbox" name="username" id="username" style="width: 99%; margin-top: 4px;" value="{$search_username}" />
</td>
<td class="trow1" width="33%" style="vertical-align: top;">
{$lang->contains}<br />
<input type="text" class="textbox" name="website" id="website" style="width: 99%; margin-top: 4px;" value="{$search_website}" />
</td>
<td class="trow1" width="33%">
<div class="smalltext" style="margin-bottom: 3px;">
<input type="radio" class="radio" name="order" id="order_asc" value="ascending"{$order_check['ascending']} /> <label for="order_asc">{$lang->order_asc}</label>
<input type="radio" class="radio" name="order" id="order_desc" value="descending"{$order_check['descending']} /> <label for="order_desc">{$lang->order_desc}</label>
</div>
<select name="sort" id="sort" style="width: 99%;">
<option value="username"{$sort_selected['username']}>{$lang->sort_by_username}</option>
<option value="regdate"{$sort_selected['regdate']}>{$lang->sort_by_regdate}</option>
<option value="lastvisit"{$sort_selected['lastvisit']}>{$lang->sort_by_lastvisit}</option>
<option value="postnum"{$sort_selected['postnum']}>{$lang->sort_by_posts}</option>
<option value="threadnum"{$sort_selected['threadnum']}>{$lang->sort_by_threads}</option>
<option value="referrals"{$sort_selected['referrals']}>{$lang->sort_by_referrals}</option>
</select>
</td>
</tr>
</table>
<div align="center"><br /><input type="submit" class="button" name="submit" value="{$lang->search}" /></div>
</form>
{$footer}
<link rel="stylesheet" href="{$mybb->asset_url}/jscripts/select2/select2.css?ver=1807">
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/select2/select2.min.js?ver=1806"></script>
<script type="text/javascript">
<!--
if(use_xmlhttprequest == "1")
{
MyBB.select2();
$("#username").select2({
placeholder: "{$lang->search_user}",
minimumInputLength: 2,
multiple: false,
ajax: { // instead of writing the function to execute the request we use Select2's convenient helper
url: "xmlhttp.php?action=get_users",
dataType: 'json',
data: function (term, page) {
return {
query: term, // search term
};
},
results: function (data, page) { // parse the results into the format expected by Select2.
// since we are using custom formatting functions we do not need to alter remote JSON data
return {results: data};
}
},
initSelection: function(element, callback) {
var value = $(element).val();
if (value !== "") {
callback({
id: value,
text: value
});
}
},
// Allow the user entered text to be selected as well
createSearchChoice:function(term, data) {
if ( $(data).filter( function() {
return this.text.localeCompare(term)===0;
}).length===0) {
return {id:term, text:term};
}
},
});
$('[for=username]').click(function(){
$("#username").select2('open');
return false;
});
}
// -->
</script>
</body>
</html>
muszę wstawić
{$post['groupimage']}
Dokładnie, teraz opcją "zbadaj element" dowied sie gdzie występuje w liscie uzytkowników ranga (pisemna) i przejdz do tego szablonu , wklej zmienną którą podałeś wyżej pod nią i wystylizuj wedlug siebie poleceniami <br> naprzykład.
a nie mógłby mi ktoś dać kodu z wklejonym poprawnie tym kodem, gdyż nie wyświetla mi gdy ja wkleiłem...
(30.12.2017, 00:32)Haker napisał(a):Jak już, to<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->member_list}</title>
{$headerinclude}
</head>
<body>
{$header}
{$multipage}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="{$colspan}">
<div class="float_right">
<a href="memberlist.php?username_match=begins&username={$lang->a}" style="padding: 5px;">{$lang->a}</a>
<a href="memberlist.php?username_match=begins&username={$lang->b}" style="padding: 5px;">{$lang->b}</a>
<a href="memberlist.php?username_match=begins&username={$lang->c}" style="padding: 5px;">{$lang->c}</a>
<a href="memberlist.php?username_match=begins&username={$lang->d}" style="padding: 5px;">{$lang->d}</a>
<a href="memberlist.php?username_match=begins&username={$lang->e}" style="padding: 5px;">{$lang->e}</a>
<a href="memberlist.php?username_match=begins&username={$lang->f}" style="padding: 5px;">{$lang->f}</a>
<a href="memberlist.php?username_match=begins&username={$lang->g}" style="padding: 5px;">{$lang->g}</a>
<a href="memberlist.php?username_match=begins&username={$lang->h}" style="padding: 5px;">{$lang->h}</a>
<a href="memberlist.php?username_match=begins&username={$lang->i}" style="padding: 5px;">{$lang->i}</a>
<a href="memberlist.php?username_match=begins&username={$lang->j}" style="padding: 5px;">{$lang->j}</a>
<a href="memberlist.php?username_match=begins&username={$lang->k}" style="padding: 5px;">{$lang->k}</a>
<a href="memberlist.php?username_match=begins&username={$lang->l}" style="padding: 5px;">{$lang->l}</a>
<a href="memberlist.php?username_match=begins&username={$lang->m}" style="padding: 5px;">{$lang->m}</a>
<a href="memberlist.php?username_match=begins&username={$lang->n}" style="padding: 5px;">{$lang->n}</a>
<a href="memberlist.php?username_match=begins&username={$lang->o}" style="padding: 5px;">{$lang->o}</a>
<a href="memberlist.php?username_match=begins&username={$lang->p}" style="padding: 5px;">{$lang->p}</a>
<a href="memberlist.php?username_match=begins&username={$lang->q}" style="padding: 5px;">{$lang->q}</a>
<a href="memberlist.php?username_match=begins&username={$lang->r}" style="padding: 5px;">{$lang->r}</a>
<a href="memberlist.php?username_match=begins&username={$lang->s}" style="padding: 5px;">{$lang->s}</a>
<a href="memberlist.php?username_match=begins&username={$lang->t}" style="padding: 5px;">{$lang->t}</a>
<a href="memberlist.php?username_match=begins&username={$lang->u}" style="padding: 5px;">{$lang->u}</a>
<a href="memberlist.php?username_match=begins&username={$lang->v}" style="padding: 5px;">{$lang->v}</a>
<a href="memberlist.php?username_match=begins&username={$lang->w}" style="padding: 5px;">{$lang->w}</a>
<a href="memberlist.php?username_match=begins&username={$lang->x}" style="padding: 5px;">{$lang->x}</a>
<a href="memberlist.php?username_match=begins&username={$lang->y}" style="padding: 5px;">{$lang->y}</a>
<a href="memberlist.php?username_match=begins&username={$lang->z}" style="padding: 5px;">{$lang->z}</a>
</div>
<div><strong>{$lang->member_list}</strong></div></td>
</tr>
<tr>
<td class="tcat" width="1%"><span class="smalltext"><strong>{$lang->avatar}</strong></span></td>
<td class="tcat"><span class="smalltext"><a href="{$sorturl}&sort=username&order=ascending"><strong>{$lang->username}</strong></a> {$orderarrow['username']}</span></td>
<td class="tcat" width="15%" align="center"><span class="smalltext"><a href="{$sorturl}&sort=regdate&order=ascending"><strong>{$lang->joined}</strong></a> {$orderarrow['regdate']}</span></td>
<td class="tcat" width="15%" align="center"><span class="smalltext"><a href="{$sorturl}&sort=lastvisit&order=descending"><strong>{$lang->lastvisit}</strong></a> {$orderarrow['lastvisit']}</span></td>
<td class="tcat" width="10%" align="center"><span class="smalltext"><a href="{$sorturl}&sort=postnum&order=descending"><strong>{$lang->posts}</strong></a> {$orderarrow['postnum']}</span></td>
<td class="tcat" width="10%" align="center"><span class="smalltext"><a href="{$sorturl}&sort=threadnum&order=descending"><strong>{$lang->threads}</strong></a> {$orderarrow['threadnum']}</span></td>
{$referral_header}
</tr>
{$users}
</table>
<div class="float_right" style="padding-top: 4px;">
<a href="showteam.php"><strong>{$lang->forumteam}</strong></a>
</div>
{$multipage}
<br class="clear" />
<br />
<form method="post" action="memberlist.php">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="3">
<div class="float_right">
<strong><a href="memberlist.php?action=search">{$lang->advanced_search}</a></strong>
</div>
<div><strong>{$lang->search_members}</strong></div>
</td>
</tr>
<tr>
<td class="tcat"><strong><label for="username">{$lang->username}</label></strong></td>
<td class="tcat"><strong><label for="website">{$lang->website}</label></strong></td>
<td class="tcat"><strong><label for="sort">{$lang->sort_by}</label></strong></td>
</tr>
<tr>
<td class="trow1" width="33%" style="vertical-align: top;">
{$lang->contains}<br />
<input type="text" class="textbox" name="username" id="username" style="width: 99%; margin-top: 4px;" value="{$search_username}" />
</td>
<td class="trow1" width="33%" style="vertical-align: top;">
{$lang->contains}<br />
<input type="text" class="textbox" name="website" id="website" style="width: 99%; margin-top: 4px;" value="{$search_website}" />
</td>
<td class="trow1" width="33%">
<div class="smalltext" style="margin-bottom: 3px;">
<input type="radio" class="radio" name="order" id="order_asc" value="ascending"{$order_check['ascending']} /> <label for="order_asc">{$lang->order_asc}</label>
<input type="radio" class="radio" name="order" id="order_desc" value="descending"{$order_check['descending']} /> <label for="order_desc">{$lang->order_desc}</label>
</div>
<select name="sort" id="sort" style="width: 99%;">
<option value="username"{$sort_selected['username']}>{$lang->sort_by_username}</option>
<option value="regdate"{$sort_selected['regdate']}>{$lang->sort_by_regdate}</option>
<option value="lastvisit"{$sort_selected['lastvisit']}>{$lang->sort_by_lastvisit}</option>
<option value="postnum"{$sort_selected['postnum']}>{$lang->sort_by_posts}</option>
<option value="threadnum"{$sort_selected['threadnum']}>{$lang->sort_by_threads}</option>
<option value="referrals"{$sort_selected['referrals']}>{$lang->sort_by_referrals}</option>
</select>
</td>
</tr>
</table>
<div align="center"><br /><input type="submit" class="button" name="submit" value="{$lang->search}" /></div>
</form>
{$footer}
<link rel="stylesheet" href="{$mybb->asset_url}/jscripts/select2/select2.css?ver=1807">
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/select2/select2.min.js?ver=1806"></script>
<script type="text/javascript">
<!--
if(use_xmlhttprequest == "1")
{
MyBB.select2();
$("#username").select2({
placeholder: "{$lang->search_user}",
minimumInputLength: 2,
multiple: false,
ajax: { // instead of writing the function to execute the request we use Select2's convenient helper
url: "xmlhttp.php?action=get_users",
dataType: 'json',
data: function (term, page) {
return {
query: term, // search term
};
},
results: function (data, page) { // parse the results into the format expected by Select2.
// since we are using custom formatting functions we do not need to alter remote JSON data
return {results: data};
}
},
initSelection: function(element, callback) {
var value = $(element).val();
if (value !== "") {
callback({
id: value,
text: value
});
}
},
// Allow the user entered text to be selected as well
createSearchChoice:function(term, data) {
if ( $(data).filter( function() {
return this.text.localeCompare(term)===0;
}).length===0) {
return {id:term, text:term};
}
},
});
$('[for=username]').click(function(){
$("#username").select2('open');
return false;
});
}
// -->
</script>
</body>
</html>
muszę wstawić
{$post['groupimage']}
Prośby na PW dotyczące wsparcia z problemami będą ignorowane. Pomoc poza forum - odpłatna; kontakt: snakemybboard@gmail.com.
Użytkownicy przeglądający ten wątek:
1 gości