اعضای گرامی
از عکس پیوست مشاهده می فرمایید که در هنگام نمایش فایل پیوست مشکل به ریختن نوشته وجود دارد که گمان می کنم به خاطر وجود علامت پرانتز باشد
خواهشمند است که در صورت امکان راهنمایی کنید که چگونه می توان آنرا درست کرد و یا علامت پرانتز را از کدام فایل می توان حذف کرد.
عکس :
هرچند نباید اینجوری باشه ولی به گمانم مشکل در راست چین نبودن این قسمت هستش. قبل از هر کاری بک آپ بگیر چون تست نکردم و نتیجه ش به عهده خودتونه. امیدوارم جواب بده. کد زیر رو تو فایل Display.template.php قالب پیدا کن:
// Assuming there are attachments...
if (!empty($message['attachment']))
{
echo '
<div id="msg_', $message['id'], '_footer" class="attachments smalltext">
<div style="overflow: ', $context['browser']['is_firefox'] ? 'visible' : 'auto', ';">';
$last_approved_state = 1;
foreach ($message['attachment'] as $attachment)
{
// Show a special box for unapproved attachments...
if ($attachment['is_approved'] != $last_approved_state)
{
$last_approved_state = 0;
echo '
<fieldset>
<legend>', $txt['attach_awaiting_approve'];
if ($context['can_approve'])
echo ' [<a href="', $scripturl, '?action=attachapprove;sa=all;mid=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve_all'], '</a>]';
echo '</legend>';
}
if ($attachment['is_image'])
{
if ($attachment['thumbnail']['has_thumb'])
echo '
<a href="', $attachment['href'], ';image" id="link_', $attachment['id'], '" onclick="', $attachment['thumbnail']['javascript'], '"><img src="', $attachment['thumbnail']['href'], '" alt="" id="thumb_', $attachment['id'], '" /></a><br />';
else
echo '
<img src="' . $attachment['href'] . ';image" alt="" width="' . $attachment['width'] . '" height="' . $attachment['height'] . '"/><br />';
}
echo '
<a href="' . $attachment['href'] . '"><img src="' . $settings['images_url'] . '/icons/clip.gif" align="middle" alt="*" /> ' . $attachment['name'] . '</a> ';
if (!$attachment['is_approved'] && $context['can_approve'])
echo '
[<a href="', $scripturl, '?action=attachapprove;sa=approve;aid=', $attachment['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve'], '</a>] | [<a href="', $scripturl, '?action=attachapprove;sa=reject;aid=', $attachment['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['delete'], '</a>] ';
echo '
(', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['real_width'] . 'x' . $attachment['real_height'] . ' - ' . $txt['attach_viewed'] : ' - ' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '.)<br />';
}
اینو جایگزین کن:
// Assuming there are attachments...
if (!empty($message['attachment']))
{
echo '
<div id="msg_', $message['id'], '_footer" class="attachments smalltext">
<div style="overflow: ', $context['browser']['is_firefox'] ? 'visible' : 'auto', ';">';
$last_approved_state = 1;
foreach ($message['attachment'] as $attachment)
{
// Show a special box for unapproved attachments...
if ($attachment['is_approved'] != $last_approved_state)
{
$last_approved_state = 0;
echo '
<fieldset>
<legend>', $txt['attach_awaiting_approve'];
if ($context['can_approve'])
echo ' [<a href="', $scripturl, '?action=attachapprove;sa=all;mid=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve_all'], '</a>]';
echo '</legend>';
}
if ($attachment['is_image'])
{
if ($attachment['thumbnail']['has_thumb'])
echo '
<a href="', $attachment['href'], ';image" id="link_', $attachment['id'], '" onclick="', $attachment['thumbnail']['javascript'], '"><img src="', $attachment['thumbnail']['href'], '" alt="" id="thumb_', $attachment['id'], '" /></a><br />';
else
echo '
<img src="' . $attachment['href'] . ';image" alt="" width="' . $attachment['width'] . '" height="' . $attachment['height'] . '"/><br />';
}
echo '
<a href="' . $attachment['href'] . '"><img src="' . $settings['images_url'] . '/icons/clip.gif" align="middle" alt="*" /> ' . $attachment['name'] . '</a> ';
if (!$attachment['is_approved'] && $context['can_approve'])
echo '
[<a href="', $scripturl, '?action=attachapprove;sa=approve;aid=', $attachment['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve'], '</a>] | [<a href="', $scripturl, '?action=attachapprove;sa=reject;aid=', $attachment['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['delete'], '</a>] ';
echo '<div dir=rtl>
(', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['real_width'] . 'x' . $attachment['real_height'] . ' - ' . $txt['attach_viewed'] : ' - ' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '.)</div><br />';
}
از اینکه بررسی کردید، سپاسگذارم.
کد پیشنهادی شما تست شما اما مشکل برطرف نشد و هیچ تغییری نکرد.
همانطور که حدس می زنم این موضوع مربوط به کاراکترهایی است که در متن وجود دارد و البته در دروپال نیز این موضوع پیش آمده بود که همه چیز درست بود اما هنگام رندر کردن صفحه توسط مرور گر کد خراب می شد
ممنون می شوم که اگر راه کار دیگری مخصوصا با رویکرد تغییر کاراکتر ها پرانتز به علامت
«»
را پیشنهاد فرمایید
با تست هایی که انجام شد مطمئن هستم که علامت پرانتز اولی تمامی مشکلات را ایجاد می کند.
ممنون می شوم که بفرمایید که کجا می توان این پرانتز را تغییر داد یا حذف کرد
پس این کد رو جایگزینش کن:
// Assuming there are attachments...
if (!empty($message['attachment']))
{
echo '
<div id="msg_', $message['id'], '_footer" class="attachments smalltext">
<div style="overflow: ', $context['browser']['is_firefox'] ? 'visible' : 'auto', ';">';
$last_approved_state = 1;
foreach ($message['attachment'] as $attachment)
{
// Show a special box for unapproved attachments...
if ($attachment['is_approved'] != $last_approved_state)
{
$last_approved_state = 0;
echo '
<fieldset>
<legend>', $txt['attach_awaiting_approve'];
if ($context['can_approve'])
echo ' [<a href="', $scripturl, '?action=attachapprove;sa=all;mid=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve_all'], '</a>]';
echo '</legend>';
}
if ($attachment['is_image'])
{
if ($attachment['thumbnail']['has_thumb'])
echo '
<a href="', $attachment['href'], ';image" id="link_', $attachment['id'], '" onclick="', $attachment['thumbnail']['javascript'], '"><img src="', $attachment['thumbnail']['href'], '" alt="" id="thumb_', $attachment['id'], '" /></a><br />';
else
echo '
<img src="' . $attachment['href'] . ';image" alt="" width="' . $attachment['width'] . '" height="' . $attachment['height'] . '"/><br />';
}
echo '
<a href="' . $attachment['href'] . '"><img src="' . $settings['images_url'] . '/icons/clip.gif" align="middle" alt="*" /> ' . $attachment['name'] . '</a> ';
if (!$attachment['is_approved'] && $context['can_approve'])
echo '
[<a href="', $scripturl, '?action=attachapprove;sa=approve;aid=', $attachment['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve'], '</a>] | [<a href="', $scripturl, '?action=attachapprove;sa=reject;aid=', $attachment['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['delete'], '</a>] ';
echo '
(', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['real_width'] . 'x' . $attachment['real_height'] . ' - ' . $txt['attach_viewed'] : ' - ' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '.)<br />';
}
آخرین خط این کد قبل از تگ <br /> یه پرانتز بسته هست که همون پرانتز بسته ای که دنبالشی! :D
اول همون خط بعد از echo ' یه پرانتز باز هست که همون پرانتز بازی هست که دنبالشی.
من این پرانتز ها رو با پرانتز فارسی عوض کردم. این کد رو تست کن ببین درست میشه. اگه هم خواستی فقط دستی خودت اینکارو کن.