Jump to content
  • 0

Форматирование текста в строке таблицы


okaton
 Share

Question

Добрый день, люди добрые!

Помогите решить проблему.

Нужно в таблице объединить два столбца в один, как здесь "ИМЯ ПОЛЬЗОВАТЕЛЯ" и "ЗВАНИЕ"

Нужно объединить эту строку

<th nowrap="nowrap" width="25%" align="{S_CONTENT_FLOW_BEGIN}"><a href="{U_SORT_USERNAME}">{L_USERNAME}</a></th>

с вот этой

<th nowrap="nowrap" width="15%"><a href="{U_SORT_RANK}">{L_RANK}</a></th>

и

вот эту

<td class="genmed row" align="{S_CONTENT_FLOW_BEGIN}">{memberrow.USERNAME_FULL}<!-- IF S_SELECT_SINGLE --> [ <a href="#" onclick="insert_single('{memberrow.A_USERNAME}'); return false;">{L_SELECT}</a> ]<!-- ENDIF --></td>

с этой

		<td class="gen row" align="center"><!-- IF memberrow.RANK_IMG -->{memberrow.RANK_IMG}<!-- ELSE -->{memberrow.RANK_TITLE}<!-- ENDIF --></td>

Link to comment
Share on other sites

17 answers to this question

Recommended Posts

  • 0

Проблема в ДНК :)

Шапка слитно написана

<th nowrap="nowrap" width="25%" align="{S_CONTENT_FLOW_BEGIN}"><a href="{U_SORT_USERNAME}">{L_USERNAME}</a><a href="{U_SORT_RANK}">{L_RANK}</a></th>

В значении текст через пробел

<td class="genmed row" align="{S_CONTENT_FLOW_BEGIN}">{memberrow.USERNAME_FULL}<!-- IF S_SELECT_SINGLE --> [ <a href="#" onclick="insert_single('{memberrow.A_USERNAME}'); return false;">{L_SELECT}</a> ]<!-- ENDIF -->  <a align="right"><!-- IF memberrow.RANK_IMG -->{memberrow.RANK_IMG}<!-- ELSE -->{memberrow.RANK_TITLE}<!-- ENDIF --></a></td>  	

Нужно отформатировать первый блок (L_USERNAME) слева, второй (L_RANK) справа, как по ссылке выше

Edited by okaton
Link to comment
Share on other sites

  • 0

Сейчас вот так

Нужно так

Шапка слитно написана

<th nowrap="nowrap" width="25%" align="{S_CONTENT_FLOW_BEGIN}"><a href="{U_SORT_USERNAME}">{L_USERNAME}</a><a href="{U_SORT_RANK}">{L_RANK}</a></th>

В значении текст через пробел

<td class="genmed row" align="{S_CONTENT_FLOW_BEGIN}">{memberrow.USERNAME_FULL}<!-- IF S_SELECT_SINGLE --> [ <a href="#" onclick="insert_single('{memberrow.A_USERNAME}'); return false;">{L_SELECT}</a> ]<!-- ENDIF -->  <a align="right"><!-- IF memberrow.RANK_IMG -->{memberrow.RANK_IMG}<!-- ELSE -->{memberrow.RANK_TITLE}<!-- ENDIF --></a></td>  	

Нужно отформатировать первый блок (L_USERNAME) слева, второй (L_RANK) справа, как по ссылке выше

sorry, за настырность

Edited by okaton
Link to comment
Share on other sites

  • 0

Спасибо за помощь, видимо это то, что мне нужно.

Только я не знаю, как этим пользоваться(

Я правильно понял, что код который я выложил не подправишь и нужно таблицу переделывать?

Edited by okaton
Link to comment
Share on other sites

  • 0

<td class="genmed row" align="{S_CONTENT_FLOW_BEGIN}">{memberrow.USERNAME_FULL}<!--
IF S_SELECT_SINGLE --> [ <a href="#" style="float: left" onclick="insert_single('{memberrow.A_USERNAME}'); return false;">{L_SELECT}</a> ]<!-- ENDIF --> <span style="float:right"><a align="right"><!-- IF memberrow.RANK_IMG -->{memberrow.RANK_IMG}<!-- ELSE -->{memberrow.RANK_TITLE}<!-- ENDIF --></a></span></td>

Так что-ли?

Link to comment
Share on other sites

  • 0

Друзья!

Спасибо большое за помощь, все получилось, кроме одного момента, т.к. шарю в html плохо, выкладываю весь код

<!-- IF S_IN_SEARCH_POPUP -->
<!-- INCLUDE simple_header.html -->
<!-- ELSE -->
<!-- INCLUDE overall_header.html -->
<!-- ENDIF -->

<!-- IF S_SEARCH_USER -->
<!-- INCLUDE memberlist_search.html -->
<!-- ENDIF -->

<!-- IF S_SHOW_GROUP --><!-- INCLUDE memberlist_group.html --><!-- ENDIF -->

<!-- IF not S_SHOW_GROUP -->
<form method="post" name="charsearch" action="{S_MODE_ACTION}">
<table width="100%" cellspacing="1">
<tr>
<td align="{S_CONTENT_FLOW_BEGIN}"><span class="genmed">{L_USERNAME_BEGINS_WITH}: </span><select name="first_char" onchange="this.form.submit();">{S_CHAR_OPTIONS}</select> <input type="submit" name="char" value="{L_DISPLAY}" class="btnlite" /></td>
<!-- IF U_FIND_MEMBER and not S_SEARCH_USER -->
<td class="genmed" align="{S_CONTENT_FLOW_END}"><a href="{U_FIND_MEMBER}">{L_FIND_USERNAME}</a></td>
<!-- ELSEIF S_SEARCH_USER and U_HIDE_FIND_MEMBER and not S_IN_SEARCH_POPUP -->
<td class="genmed" align="{S_CONTENT_FLOW_END}"><a href="{U_HIDE_FIND_MEMBER}">{L_HIDE_MEMBER_SEARCH}</a></td>
<!-- ENDIF -->
</tr>
</table>
{S_FORM_TOKEN}
</form>
<!-- ENDIF -->

<!-- IF S_IN_SEARCH_POPUP -->
<form method="post" name="results" action="{S_MODE_ACTION}" onsubmit="insert_marked(this.user);return false">
<!-- ELSE -->
<form method="post" action="{S_MODE_ACTION}">
<!-- ENDIF -->
{$CA_BLOCK_START}
{$CA_CAP2_START}{L_MEMBERLIST}{$CA_CAP2_END}
<table class="tablebg" width="100%" cellspacing="{$CA_SPACING}">
<tr>
<th nowrap="nowrap">#</th>
<th nowrap="nowrap" width="21%" align="{S_CONTENT_FLOW_BEGIN}"><a style="float: left" href="{U_SORT_USERNAME}">{L_USERNAME}</a><span style="float:right"><a href="{U_SORT_RANK}">{L_RANK}</a></span></th>
<th nowrap="nowrap" width="10%"><a href="{U_SORT_JOINED}">{L_JOINED}</a></th>
<th nowrap="nowrap" width="10%"><a href="{U_SORT_POSTS}">{L_POSTS}</a></th>
<th nowrap="nowrap" width="15%"><a href="{U_SORT_TEAM}">{L_TEAM}</a></th>
<th nowrap="nowrap" width="20%"><a href="{U_SORT_WEBSITE}#memberlist">{L_WEBSITE}</a>{L_COMMA_SEPARATOR}<a href="{U_SORT_LOCATION}">{L_LOCATION}</a></th>
<th nowrap="nowrap" width="11%">{L_SEND_MESSAGE}</th>
<th nowrap="nowrap" width="11%"><a href="{U_SORT_ACTIVE}">{L_LAST_ACTIVE}</a></th>

<!-- IF S_IN_SEARCH_POPUP and not S_SELECT_SINGLE --><th width="2%" nowrap="nowrap">{L_MARK}</th><!-- ENDIF -->
</tr>
<!-- BEGIN memberrow -->

<!-- IF S_SHOW_GROUP -->
<!-- IF memberrow.S_FIRST_ROW and memberrow.S_GROUP_LEADER -->
<tr>
<td class="row3" colspan="8"><b class="gensmall">{L_GROUP_LEADER}</b></td>
</tr>
<!-- ELSEIF not memberrow.S_GROUP_LEADER and not $S_MEMBER_HEADER -->
<tr>
<td class="row3" colspan="8"><b class="gensmall">{L_GROUP_MEMBERS}</b></td>
</tr>
<!-- DEFINE $S_MEMBER_HEADER = 1 -->
<!-- ENDIF -->
<!-- ENDIF -->

<!-- IF memberrow.S_ROW_COUNT is even --><tr class="row2"><!-- ELSE --> <tr class="row1"><!-- ENDIF -->

<td class="gen row" align="center"> {memberrow.ROW_NUMBER} </td>
<td class="genmed row" align="{S_CONTENT_FLOW_BEGIN}">{memberrow.USERNAME_FULL}<!-- IF S_SELECT_SINGLE --> [ <a href="#" style="float: left" onclick="insert_single('{memberrow.A_USERNAME}'); return false;">{L_SELECT}</a> ]<!-- ENDIF --> <span style="float:right"><a align="right"><!-- IF memberrow.RANK_IMG -->{memberrow.RANK_IMG}<!-- ELSE -->{memberrow.RANK_TITLE}<!-- ENDIF --></a></span></td>
<td class="genmed row" align="center" nowrap="nowrap"> {memberrow.JOINED} </td>
<td class="gen row" align="center">{memberrow.POSTS}</td>
<td class="gen row" align="center"> {memberrow.PROFILE_TEAM_VALUE}</td>
<td class="gen row" align="left"><!-- IF memberrow.U_WWW or memberrow.LOCATION --><!-- IF memberrow.U_WWW --><div><a href="{memberrow.U_WWW}" title="{L_VISIT_WEBSITE}: {memberrow.U_WWW}">{memberrow.U_SHORT_WWW}</a></div><!-- ENDIF --><!-- IF memberrow.LOCATION --><div>{memberrow.LOCATION}</div><!-- ENDIF --><!-- ELSE --> <!-- ENDIF --></td>
<td class="gen row" align="center"> <!-- IF memberrow.U_PM --><a href="{memberrow.U_PM}">{PM_IMG}</a><!-- ENDIF --> </td>
<td class="gen row" align="left">{memberrow.VISITED}</td>
<!-- IF memberrow.S_PROFILE_TEAM -->
<!-- Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. -->

<!-- ENDIF -->
<!-- IF S_IN_SEARCH_POPUP and not S_SELECT_SINGLE --><td align="center"><input type="checkbox" class="radio" name="user" value="{memberrow.USERNAME}" /></td><!-- ENDIF -->
</tr>

<!-- BEGINELSE -->

<tr>
<td class="row1" colspan="<!-- IF S_IN_SEARCH_POPUP -->9<!-- ELSE -->8<!-- ENDIF -->" align="center">
<span class="gen"><!-- IF S_SHOW_GROUP -->{L_NO_GROUP_MEMBERS}<!-- ELSE -->{L_NO_MEMBERS}<!-- ENDIF --></span>
</td>
</tr>

<!-- END memberrow -->

<tr>
<td class="cat" colspan="<!-- IF S_IN_SEARCH_POPUP -->9<!-- ELSE -->8<!-- ENDIF -->" align="center"><!-- IF S_IN_SEARCH_POPUP and not S_SELECT_SINGLE --><input class="btnlite" type="submit" value="{L_SELECT_MARKED}" /><!-- ELSE --><span class="gensmall">{L_SELECT_SORT_METHOD}:</span> <select name="sk">{S_MODE_SELECT}</select>  <span class="gensmall">{L_ORDER}</span> <select name="sd">{S_ORDER_SELECT}</select>  <input type="submit" name="submit" value="{L_SUBMIT}" class="btnlite" /><!-- ENDIF --></td>
</tr>
</table>
{$CA_BLOCK_END}
{S_FORM_TOKEN}
</form>

<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="pagination">{PAGE_NUMBER} [ {TOTAL_USERS} ]</td>
<td align="{S_CONTENT_FLOW_END}"><!-- IF S_IN_SEARCH_POPUP and not S_SELECT_SINGLE --><b class="nav"><a href="#" onclick="marklist('results', 'user', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('results', 'user', false); return false;">{L_UNMARK_ALL}</a></b><br /><!-- ENDIF --><span class="pagination"><!-- INCLUDE pagination.html --></span></td>
</tr>
</table>



<!-- IF S_IN_SEARCH_POPUP -->
<!-- INCLUDE simple_footer.html -->
<!-- ELSE -->
<br clear="all" />

<!-- INCLUDE breadcrumbs.html -->

<br clear="all" />

<div align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></div>
<br clear="all" />
<!-- INCLUDE overall_footer.html -->
<!-- ENDIF -->

Вот эта строка

	<th nowrap="nowrap" width="15%"><a href="{U_SORT_TEAM}">{L_TEAM}</a></th>

почему-то не работает сортировка(

Прошу помощи в этом вопросе.

Картинка

Edited by okaton
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy