عبدالله
عدد الرسائل : 603 تاريخ التسجيل : 14/09/2006
| موضوع: توحيد مقاسات المواضيع ::. الخميس 29 مارس - 13:15 | |
| يوجد هذا الهاك وهو يساعد على منع طوول السطر وتقسيمه واسمه : Force Word Wrapping - الكود:
-
################################################################# ## Mod Title: Force Word Wrapping ## Mod Author: TerraFrost (http://www.frostjedi.com/phpbb) ## Mod Version: 1.01 ## Mod Releasedate: Mar. 30, 2004 ## Mod Description: Word Wrapping is normally something that is transparant, ## and goes on, unnoticed, all the time. As text approaches ## the scroll bar, or whatever, word wrapping is what stops ## it from going past it. In short, word wrapping creates ## new lines whenever not having a new line would mess things ## up. ## ## However, traditional word wrapping algorithims rely on ## spaces to determine when the new line should occur. If you ## have a string of characters that has no spaces yet still ## approaches the scroll bar, you may have a problem. Indeed, ## you may find yourself with everything stretched, horizontoly. ## This script attempts to remedy this. ## ## For support / comments / whatever, visit here: ## http://www.frostjedi.com/phpbb/viewforum.php?f=6 ## ## Mod Changelog: x.xx: - add ability in admin control panel to alter number of ## chars it takes before a space is added. ## 1.01: - the '\n' character no longer counts towards the eighty ## characters that are required before a space is inserted. ## 1.00: - initial release ## ## Installation Level: Easy ## Installation Time: 1 Minutes ## New Features: ## Force Word Wrapping ## ## Files To Edit: 5 ## includes/bbcode.php ## includes/topic_review.php ## privmsg.php ## viewtopic.php ## posting.php ## ################################################################# #
# #-----[ OPEN ]------------------------------------------ # includes/bbcode.php
# #-----[ FIND ]------------------------------------------ # ?>
# #-----[ BEFORE, ADD ]----------------------------------- # // Force Word Wrapping (by TerraFrost) function word_wrap_pass($message) { $maxChars = 70; $curCount = 0; $tempText = ""; $finalText = ""; $inTag = false;
for ($num=0;$num<strlen($message);$num++) { $curChar = $message{$num}; if ($curChar == "<") { $tempText .= "<"; $inTag = true; } elseif ($inTag && $curChar == ">") { $tempText .= ">"; $inTag = false; } elseif ($inTag) $tempText .= $curChar; elseif ($curChar == " " || $curChar == "\n") { // at this point, !$inTag is assumed. $finalText .= $tempText . " "; $tempText = ""; $curCount = 0; } elseif ($curCount >= $maxChars) { $finalText .= $tempText . $curChar . " "; $tempText = ""; $curCount = 0; } else { $tempText .= $curChar; $curCount++; } }
return $finalText . $tempText; }
# #-----[ OPEN ]------------------------------------------ # includes/topic_review.php
# #-----[ FIND ]------------------------------------------ # if ( $board_config['allow_smilies'] && $row['enable_smilies'] ) { $message = smilies_pass($message); }
# #-----[ AFTER, ADD ]------------------------------------ # $message = word_wrap_pass($message);
# #-----[ OPEN ]------------------------------------------ # viewtopic.php
# #-----[ FIND ]------------------------------------------ # $message = str_replace("\n", "\n<br />\n", $message);
# #-----[ AFTER, ADD ]------------------------------------ # $message = word_wrap_pass($message);
# #-----[ OPEN ]------------------------------------------ # privmsg.php
# #-----[ FIND ]------------------------------------------ # if ( $board_config['allow_smilies'] && $privmsg['privmsgs_enable_smilies'] ) { $private_message = smilies_pass($private_message); }
# #-----[ AFTER, ADD ]------------------------------------ # $private_message = word_wrap_pass($private_message);
# #-----[ FIND ]------------------------------------------ # if ( $smilies_on ) { $preview_message = smilies_pass($preview_message); }
# #-----[ AFTER, ADD ]------------------------------------ # $preview_message = word_wrap_pass($preview_message);
# #-----[ OPEN ]------------------------------------------ # posting.php
# #-----[ FIND ]------------------------------------------ # $preview_message = str_replace("\n", '<br />', $preview_message);
# #-----[ AFTER, ADD ]------------------------------------ # $preview_message = word_wrap_pass($preview_message);
# #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM
| |
|
عبدالله
عدد الرسائل : 603 تاريخ التسجيل : 14/09/2006
| موضوع: رد: توحيد مقاسات المواضيع ::. الخميس 29 مارس - 13:18 | |
| السلام عليكم ورحمه الله وبركاته قد يواجه بعضكم مشكله في مقاسات المواضيع والردود وذلك بسبب بعض الصور الكبيره سواء كانت موجوده في تواقيع الاعضاء او داخل الموضوع نفسه وايضا احياننا بسبب طول سطور الموضوع مما يجعل شكل الموضوع عريض جدا بصراحه انا من النوع اللي مايواطن السكرول بار ابد اخيرا لقد وجدت حل لهذه المشكله في احد المواقع الاجنبية وحبيت انقله لكم لتعم الفائده ---------------- افتح الملف التالي ------------------------- templates/SubSilver/Viewtopic_body.tpl -------------------- ابحث عن ------------------------------ - الكود:
-
<tr> <td width="100%"><a href="{postrow.U_MINI_POST}"><img src="{postrow.MINI_POST_IMG}" width="12" height="9" alt="{postrow.L_MINI_POST_ALT}" title="{postrow.L_MINI_POST_ALT}" border="0" /></a><span class="postdetails">{L_POSTED}: {postrow.POST_DATE}<span class="gen"> </span> {L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td> <td valign="top" align="right" nowrap="nowrap">{postrow.QUOTE_IMG} {postrow.EDIT_IMG} {postrow.DELETE_IMG} {postrow.IP_IMG}</td> </tr> -------------------- اضف قبله ----------------------------- - الكود:
-
<tr> <td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> ----------- بعد اول </tr> يقابلك اضف ------------------ - الكود:
-
</table> </td> </tr> ----------- احفظ الملف وارفعه الى مكانه الصحيح ----------- الآن يمكنك الاستمتاع بمشاهده جميع المواضيع بمقاسات موحده ومنسقه مهما كانت تحياتي للجميع .. | |
|