rxu wrote:You haven't executed SQL queries from the MOD installation instruction.
Code: Select all
ALTER TABLE phpbb_topics ADD topic_first_post_show TINYINT(1) UNSIGNED DEFAULT '0' NOT NULL;
Do you see a simple way to realize it now? Currently it's really difficult to differ the first Post from the others.issjut wrote: It would be great if the first post could have a different color or maybe even just a little distance between first post and new posts. In fact, first post and the new posts could better be kept apart!
[ first post ]
A little distance
[ new post 3 ]
[ new post 2 ]
[ new post 1 ]
You mean me? Well, first I did as instructed by the xml files both the one in the root folder of the mod and the template folder for prosilver, then I cleared the cache, and finally I refreshed the Templates, Themes, and Image Sets.rxu wrote:Could you tell me please what did you do, step by step, detailed?
Try the following code:issjut wrote:Do you see a simple way to realize it now? Currently it's really difficult to differ the first Post from the others. This confused my users
Code: Select all
OPEN
viewtopic.php
FIND
'U_TOPIC' => "{$server_path}viewtopic.$phpEx?f=$forum_id&t=$topic_id",
AFTER, ADD
'S_TOPIC_FIRST_POST_SHOW' => ($topic_data['topic_first_post_show'] == 1) ? true : false,
OPEN
styles/prosilver/template/viewtopic_body.html
FIND
<div id="p{postrow.POST_ID}" class="post
IN-LINE FIND
<!-- IF postrow.S_ROW_COUNT is odd -->
IN_LINE REPLACE
<!-- IF S_TOPIC_FIRST_POST_SHOW and postrow.S_ROW_COUNT eq 0 -->bg3<!-- ELSEIF postrow.S_ROW_COUNT is odd -->
FIND
<hr class="divider" />
AFTER, ADD
<!-- IF S_TOPIC_FIRST_POST_SHOW and postrow.S_ROW_COUNT eq 0 --><br /><br /><!-- ENDIF -->
OPEN
styles/subsilver/template/viewtopic_body.html
FIND
<!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
REPLACE WITH
<!-- IF S_TOPIC_FIRST_POST_SHOW and postrow.S_ROW_COUNT eq 0 --><tr class="row3"><!-- ELSEIF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
FIND
<!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
REPLACE WITH
<!-- IF S_TOPIC_FIRST_POST_SHOW and postrow.S_ROW_COUNT eq 0 --><tr class="row3"><!-- ELSEIF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
FIND
<!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
REPLACE WITH
<!-- IF S_TOPIC_FIRST_POST_SHOW and postrow.S_ROW_COUNT eq 0 --><tr class="row3"><!-- ELSEIF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
FIND
<!-- END postrow -->
BEFORE, ADD
<!-- IF S_TOPIC_FIRST_POST_SHOW and postrow.S_ROW_COUNT eq 0 --><br /><br /><!-- ENDIF -->
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
I don't see how that makes the first post stand out on every page.rxu wrote:Try the following code:issjut wrote:Do you see a simple way to realize it now? Currently it's really difficult to differ the first Post from the others. This confused my usersBut I guess this is suitable for default posts sorting option only.Code: Select all
OPEN viewtopic.php FIND 'U_TOPIC' => "{$server_path}viewtopic.$phpEx?f=$forum_id&t=$topic_id", AFTER, ADD 'S_TOPIC_FIRST_POST_SHOW' => ($topic_data['topic_first_post_show'] == 1) ? true : false, OPEN styles/prosilver/template/viewtopic_body.html FIND <div id="p{postrow.POST_ID}" class="post IN-LINE FIND <!-- IF postrow.S_ROW_COUNT is odd --> IN_LINE REPLACE <!-- IF S_TOPIC_FIRST_POST_SHOW and postrow.S_ROW_COUNT eq 0 -->bg3<!-- ELSEIF postrow.S_ROW_COUNT is odd --> FIND <hr class="divider" /> AFTER, ADD <!-- IF S_TOPIC_FIRST_POST_SHOW and postrow.S_ROW_COUNT eq 0 --><br /><br /><!-- ENDIF --> OPEN styles/subsilver/template/viewtopic_body.html FIND <!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> REPLACE WITH <!-- IF S_TOPIC_FIRST_POST_SHOW and postrow.S_ROW_COUNT eq 0 --><tr class="row3"><!-- ELSEIF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> FIND <!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> REPLACE WITH <!-- IF S_TOPIC_FIRST_POST_SHOW and postrow.S_ROW_COUNT eq 0 --><tr class="row3"><!-- ELSEIF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> FIND <!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> REPLACE WITH <!-- IF S_TOPIC_FIRST_POST_SHOW and postrow.S_ROW_COUNT eq 0 --><tr class="row3"><!-- ELSEIF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> FIND <!-- END postrow --> BEFORE, ADD <!-- IF S_TOPIC_FIRST_POST_SHOW and postrow.S_ROW_COUNT eq 0 --><br /><br /><!-- ENDIF --> # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM
If you're talking to me I'm fine now. I didn't know there was a check box that is placed in the posting when starting a topic or editing the first post of it.rxu wrote:Do you mean the code itself is or do you mean you've applied it and it's not workable?![]()
If last case, didn't you forget to clear the cache?
You mean that?Renodil wrote:I don't see how that makes the first post stand out on every page.
Code: Select all
FIND
<hr class="divider" />
AFTER, ADD
<!-- IF S_TOPIC_FIRST_POST_SHOW and postrow.S_ROW_COUNT eq 0 --><br /><br /><!-- ENDIF -->