First post on every page

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
Locked
rxu
Extensions Development Team
Posts: 3431
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: First post on every page

Post by rxu »

You haven't executed SQL queries from the MOD installation instruction.
User avatar
justnicky
Registered User
Posts: 22
Joined: Tue Jan 22, 2008 1:58 pm

Re: First post on every page

Post by justnicky »

rxu wrote:You haven't executed SQL queries from the MOD installation instruction.
:shock: errm... what does that mean? :oops:
rxu
Extensions Development Team
Posts: 3431
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: First post on every page

Post 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.
User avatar
justnicky
Registered User
Posts: 22
Joined: Tue Jan 22, 2008 1:58 pm

Re: First post on every page

Post by justnicky »

Thankyou but Php totally confuses me :? :oops:
vinamarine
Registered User
Posts: 49
Joined: Wed Feb 14, 2007 12:43 pm
Location: Vietnam
Contact:

Re: First post on every page

Post by vinamarine »

You can use phpMyAdmin to execute this query.
issjut
Registered User
Posts: 113
Joined: Tue Oct 09, 2007 5:02 am
Location: Berlin, Germany

Re: First post on every page

Post 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?
sorry for my bad English ;-)
User avatar
Renodil
Registered User
Posts: 668
Joined: Mon Nov 14, 2005 8:48 am
Contact:

Re: First post on every page

Post 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.
rxu
Extensions Development Team
Posts: 3431
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: First post on every page

Post 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?
User avatar
Renodil
Registered User
Posts: 668
Joined: Mon Nov 14, 2005 8:48 am
Contact:

Re: First post on every page

Post 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.
rxu
Extensions Development Team
Posts: 3431
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: First post on every page

Post 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.
User avatar
Renodil
Registered User
Posts: 668
Joined: Mon Nov 14, 2005 8:48 am
Contact:

Re: First post on every page

Post 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.
rxu
Extensions Development Team
Posts: 3431
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: First post on every page

Post 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?
User avatar
Renodil
Registered User
Posts: 668
Joined: Mon Nov 14, 2005 8:48 am
Contact:

Re: First post on every page

Post 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.
issjut
Registered User
Posts: 113
Joined: Tue Oct 09, 2007 5:02 am
Location: Berlin, Germany

Re: First post on every page

Post by issjut »

Thank U! Everything works perfect!
sorry for my bad English ;-)
User avatar
AHTEPO
Registered User
Posts: 37
Joined: Fri Feb 08, 2008 7:00 pm
Location: Russia, KRD

Re: First post on every page

Post 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? ;)
Last edited by AHTEPO on Sun Mar 02, 2008 3:23 pm, edited 3 times in total.
Locked

Return to “[3.0.x] MOD Database Releases”