Jump to content
php.lv forumi

BBCodes, Read More


!shine!

Recommended Posts

Lūk mans jaunumu skripts http://paste.php.lv/c05ca5870fa9f47b247c022a8c6e0295?lang=php

Man ir divas problēmas lūk skriptā jau var redzēt:

$sParsed = str_replace( array( "<!-- TITLE -->",
"<!-- POST -->",
"<!-- TIME -->",
"<!-- AUTHOR -->",
"<!-- REPLIES -->",
"<!-- FORUM -->",
"<!-- TOPIC -->",
"style_emoticons/<#EMO_DIR#>", //SMILEY FIX
"<!-- USER -->",
"
[indent]",
"[/indent]
",
"class='quotetop'",
"class='quotemain'",
"class='codetop'",
"class='codemain'",
"[b]",
"[/b]",
"[img=", "]",
"[u]", "[/u]",
"[i]", "[/i]",
"
[center]", "[/center]
",
'[url=]', '[/url]'),
array( $row[1],
$row[9],
//date( "l, F j, Y h:i A", $row[5] ),
date( "Y-m-d, Y H:i", $row[5] ),
$row[8],
$row[10],
$patch,
$row[0],
$nejas ."style_emoticons/default",
$row[7],
"<blockquote>",
"</blockquote>",
"style='background: #E4EAF2; border: 1px dotted #000; border-bottom: 0; border-left: 4px solid #8394B2; color: #000; font-weight: bold; font-size: 10px; margin: 8px auto 0 auto; padding: 3px;'",
"style='background: #FAFCFE; border: 1px dotted #000; border-left: 4px solid #8394B2; border-top: 0; color: #465584; padding: 4px; margin: 0 auto 8px auto;'",
"style='background: #FDDBCC; color: #000; font-weight: bold; margin: 0 auto 0 auto; padding: 3px; width: 98%;'",
"style='background: #FAFCFE; border: 1px dotted #000; color: #465584; font-family: Courier, Courier New, Verdana, Arial; margin: 0 auto 0 auto; padding: 2px; width: 98%;'",
"<b>",
"</b>",
"<br /><img src=\"", "\">",
"<u>", "</u>",
"<i>", "</i>",
"<center>", "</center>",
'<a href=>', '</a>'),
$sTemplate );

 

,ka esmu centies ielikt lai bbcodus pārveido par html, uz vienkāršākajiem man tas sancāca, taču url es nemāku uztaisīt, skatijos jau šeit forumā, bet neviens tā arī īsti nestrādāja.

 

2. Lasīt tālāk, zinu, jā te ir daudz topiku par to visu, taču neizprotu to visu kur viņu precīzi kodā, meiģinaju zem

 

$sTemplate = <<<EOT
<div id="jaunumi">
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<div id='jaunumutitle'><!-- TITLE --></div>
</tr>
<tr>
<div id="autorslaiks">
pievienojis <a href="<!-- FORUM -->/index.php?showuser=<!-- USER -->" title="Click Here For <!-- AUTHOR -->'s Profile!"><B><!-- AUTHOR --></B></a> <!-- TIME -->
</div>
<div align="left"><!-- POST --></div>
<span class="gensmall">
<div class="hrr"></div><div style="background-color: #fff;"><font size="1px">
<IMG src="img/icn_doc.gif" valign="top" border="0" /> <a href="<!-- FORUM -->/index.php?showtopic=<!-- TOPIC -->" title="View This Topic">Lasit visu rakstu</a> <div id="komentarupiev"><IMG src="img/icn_comment.gif" valign="top" border="0" /> <a href="<!-- FORUM -->/index.php?app=forums&module=post&section=post&do=reply_post&f=2&t=<!-- TOPIC -->" title="Add A Reply To: <!-- TITLE -->" >Pievienot komentaru</a></div>
</div></font>
</span>
</td>
</tr>
</table>
</div>
<BR />


EOT;

 

,taču vienīgais kas notika bija tas ka virs jaunuma un zem parādijās read more. Gribētos tā smuki lai sākumlapā piemēram parāda tādu kā ievadu, bet pārējo, ja grib var izlasīt forumā no kurienes arī jaunums tika izvadīts.

 

Varētu būt ka esmu kādam jau apnicis,

šis laikam ir pēdējo dienu laikā 3 bezjēdzīgais topiks, bet tā jau cenšos visu darīt pats, bet ir pāris lietas kuras neizprotu.

Edited by !shine!
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.

Guest
Reply to this topic...

×   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.

Loading...
×
×
  • Create New...