Page 5 of 15

Re: First post on every page

Posted: Tue Feb 19, 2008 1:03 pm
by rxu
You haven't executed SQL queries from the MOD installation instruction.

Re: First post on every page

Posted: Wed Feb 20, 2008 11:01 am
by justnicky
rxu wrote:You haven't executed SQL queries from the MOD installation instruction.
:shock: errm... what does that mean? :oops:

Re: First post on every page

Posted: Wed Feb 20, 2008 11:16 am
by rxu

Code: Select all

ALTER TABLE phpbb_topics ADD topic_first_post_show TINYINT(1) UNSIGNED DEFAULT '0' NOT NULL;
http://www.phpbb.com/community/viewtopi ... 9&t=724145
See "EXECUTING SQL" chapter.

Re: First post on every page

Posted: Wed Feb 20, 2008 11:53 am
by justnicky
Thankyou but Php totally confuses me :? :oops:

Re: First post on every page

Posted: Wed Feb 20, 2008 4:08 pm
by vinamarine
You can use phpMyAdmin to execute this query.

Re: First post on every page

Posted: Sat Feb 23, 2008 1:32 pm
by issjut
Hi rxu,
just a question or request ;)
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 ]
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 ;-)

Maybe, one of the two things is easy to implement?

Re: First post on every page

Posted: Sat Feb 23, 2008 10:42 pm
by Renodil
rxu wrote:Could you tell me please what did you do, step by step, detailed? :)
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.

Re: First post on every page

Posted: Sun Feb 24, 2008 2:30 am
by rxu
Renodil
So, is there a checkbox named "Show on top of every page" when you edit any first post of any topic or posting new topic?

Re: First post on every page

Posted: Sun Feb 24, 2008 2:41 am
by Renodil
I don't know. I didn't know to look for that. I'll put it back in my test board and find out. Thanks.

Re: First post on every page

Posted: Sun Feb 24, 2008 3:06 am
by rxu
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
Try the following code:

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 
But I guess this is suitable for default posts sorting option only.

Re: First post on every page

Posted: Sun Feb 24, 2008 3:52 am
by Renodil
rxu wrote:
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
Try the following code:

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 
But I guess this is suitable for default posts sorting option only.
I don't see how that makes the first post stand out on every page.

Re: First post on every page

Posted: Sun Feb 24, 2008 4:14 am
by rxu
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?

Re: First post on every page

Posted: Sun Feb 24, 2008 6:24 am
by Renodil
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?
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.

Re: First post on every page

Posted: Sun Feb 24, 2008 10:55 pm
by issjut
Thank U! Everything works perfect!

Re: First post on every page

Posted: Sat Mar 01, 2008 9:58 pm
by AHTEPO
Renodil wrote:I don't see how that makes the first post stand out on every page.
You mean that? ;)

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 -->
rxu, many thanks for you, man!!! But i have one question - how can i set "First post on every page" enabled/disabled for definite topics in ACP? ;)