Jump to content


How to separate pinned topics from the others...


14 replies to this topic

#1 Broni

    Malware Annihilator

  • 24,878 posts
  • Joined: October 04, 2004
  • 1,858 topics
  • Age: 57
  • Skin: IPBoard wide
  • Local time: 11:04 AM
  • Zodiac:Virgo
  • Gender:Male
  • Location:Daly City, CA
  • OS:Windows Vista
  • Country:
Offline
  • Time Online: 57d 7h 43m 39s

Posted 30 October 2009 - 06:33 AM

Go...
ACP> Look & Feel>your_skin>Templates tab>Forum View>forumindexTemplate


Find:

<!-- BEGIN TOPICS -->
 <if test="hastopics:|:is_array( $topic_data ) AND count( $topic_data )">
 {parse striping="forumTable" classes="row1,row2"}
 <foreach loop="topics:$topic_data as $tid => $data">

and add this below:

<if test="$data['pinned']">
 <if test="$this->hasPinned=1"></if>
<else />
 <if test="$this->hasPinned">
 <if test="$this->hasPinned=0"></if>
 <tr class='subhead altbar'>
 <if test="$this->memberData['is_mod'] == 1">
 <th scope='col' colspan='6'>
 <else />
 <th scope='col' colspan='5'>
 </if>
 </th>
 </tr>
 </if>
</if>
Go...
ACP> Look & Feel>your_skin>CSS tab>ipb_styles.css

Find and change the padding px to whatever you want (changes the bar height )

table.ipb_table tr.subhead th {
 font-weight: bold;
 font-size: 1.1em;
 padding: 8px; 
 }

I changed mine to 3px:

Posted Image


Credit: Robert Busby - http://forums.invisi...ned-topics/page

#2 wimg Re: How to separate pinned topics from the others...

    Member

  • 2 posts
  • Joined: June 16, 2010
  • 0 topics
  • Skin: IP.Board
  • Local time: 08:04 PM
  • OS:Windows 7
  • Country:
Offline
  • :

Posted 19 June 2010 - 07:34 PM

I'd like to make an sddition as a contribution towards the knowledge I gained here.

In older skins of versions prior to IPB 3, the headers were repeated as well for pinned and other topics. That is still possible with a little extra code, IOW, to go from this:

Posted Image

to this:

Posted Image

You need to do soem further tweaking, as follows:

Posted Image

You can achieve this as follows:

In ACP go to Look & Feel -> Manage Skin Sets & Templates > IP.Board, or a copy thereof if you like.

In Templates, open the Forum View and click on forumIndexTemplate.

In the editing window for the template, find:

 <table class='ipb_table topic_list' summary='{$this->lang->words['forum_topic_list']} "{$forum_data['name']}"' id='forum_table'>


Remove the following lines after the [code</caption][/code] statement, just thereafter actually (select and cut, because you need them further down):

            <tr class='header'>
                <th scope='col' class='col_f_icon'>&nbsp;</th>
                <th scope='col' class='col_f_topic'>{$this->lang->words['forum_topic']}</th>
                <th scope='col' class='col_f_starter short'>{$this->lang->words['forum_started_by']}</th>
                <th scope='col' class='col_f_views stats'>{$this->lang->words['forum_stats']}</th>
                <th scope='col' class='col_f_post'>{$this->lang->words['forum_last_post_info']}</th>
                <if test="topicsismod:|:$this->memberData['is_mod'] == 1">
                    <th scope='col' class='col_f_mod short'> <input type='checkbox' id='tmod_all' class='input_check' title='{$this->lang->words['topic_select_all']}' value='1' /> </th>
                </if>
            </tr>    

Now find
 <!-- BEGIN TOPICS --> 
And just nefore the end if statement insert the code you just cut from higher up:
                <!-- Addition for pinned topics separator; Wim G 2010-02-13; BEGIN -->
                <tr class='header'>
                    <th scope='col' class='col_f_icon'>&nbsp;</th>
                    <th scope='col' class='col_f_topic'>{$this->lang->words['forum_topic']}</th>
                    <th scope='col' class='col_f_starter short'>{$this->lang->words['forum_started_by']}</th>
                    <th scope='col' class='col_f_views stats'>{$this->lang->words['forum_stats']}</th>
                    <th scope='col' class='col_f_post'>{$this->lang->words['forum_last_post_info']}</th>
                    <if test="topicsismod:|:$this->memberData['is_mod'] == 1">
                        <th scope='col' class='col_f_mod short'> <input type='checkbox' id='tmod_all' class='input_check' title='{$this->lang->words['topic_select_all']}' value='1' /> </th>
                    </if>
                </tr>    

Be careful, it should be between the end tr and end if statements to lign up properly. I edited one too many at first, so I had to add it again.

Now I also want th eheaders filled in properly. In order to do that, first scroll down a little further, to the BEGIN TOPICS segment, and just after the start of the first "for each" loop there, just before the first start "if", add the following code:
          <if test="!$this->subHeadShow">
                    <tr class='subhead altbar'>
                    <th scope='col' colspan='<if test="endannouncements:|:$this->memberData['is_mod'] == 1">6<else />5</if>'>
                    <if test="$data['pinned']">
                     Important Topics
                    <else />
                     Forum Topics
                    </if>
                    </th>
                    </tr>
                    <tr class='header2'>
                    <th scope='col' class='col_f_icon'>&nbsp;</th>
                    <th scope='col' class='col_f_topic'>{$this->lang->words['forum_topic']}</th>
                    <th scope='col' class='col_f_starter short'>{$this->lang->words['forum_started_by']}</th>
                    <th scope='col' class='col_f_views stats'>{$this->lang->words['forum_stats']}</th>
                    <th scope='col' class='col_f_post'>{$this->lang->words['forum_last_post_info']}</th>
                    <if test="topicsismod:|:$this->memberData['is_mod'] == 1">
                    <th scope='col' class='col_f_mod short'> <input type='checkbox' id='tmod_all' class='input_check' title='{$this->lang->words['topic_select_all']}' value='1' /> </th>
                    </if>
                    </tr>
                    <if test="$this->subHeadShow=1"> </if>
                    </if>
                    <if test="$data['pinned']">
                    <if test="$this->hasPinned=1"> </if>
                    <else />
                    <if test="$this->hasPinned">
                    <if test="$this->hasPinned=0"> </if>
                    <tr class='subhead altbar'>
                    <if test="$this->memberData['is_mod'] == 1">
                    <th scope='col' colspan='6'>
                    <else />
                    <th scope='col' colspan='5'>
                    </if>
                     Forum Topics
                    </th>
                    </tr>
                    <tr class='header2'>
                    <th scope='col' class='col_f_icon'>&nbsp;</th>
                    <th scope='col' class='col_f_topic'>{$this->lang->words['forum_topic']}</th>
                    <th scope='col' class='col_f_starter short'>{$this->lang->words['forum_started_by']}</th>
                    <th scope='col' class='col_f_views stats'>{$this->lang->words['forum_stats']}</th>
                    <th scope='col' class='col_f_post'>{$this->lang->words['forum_last_post_info']}</th>
                    <if test="topicsismod:|:$this->memberData['is_mod'] == 1">
                    <th scope='col' class='col_f_mod short'> <input type='checkbox' id='tmod_all' class='input_check' title='{$this->lang->words['topic_select_all']}' value='1' /> </th>
                    </if>
                    </tr>
                    </if>
                </if>

Note that I called pinned topics "Important Topics, and other topics "Forum Topics". You can name those whatever you like, just that "Forum Topics" in this instance occurs twice, and has to be edited twice too.

Ok, save and recache, and off you go.

I hope you find this a worthwhile tweak.

Kindest regards, Wim

#3 Broni Re: How to separate pinned topics from the others...

    Malware Annihilator

  • 24,878 posts
  • Joined: October 04, 2004
  • 1,858 topics
  • Age: 57
  • Skin: IPBoard wide
  • Local time: 11:04 AM
  • Zodiac:Virgo
  • Gender:Male
  • Location:Daly City, CA
  • OS:Windows Vista
  • Country:
Offline
  • Time Online: 57d 7h 43m 39s

Posted 19 June 2010 - 08:28 PM

Thank you :)

#4 wimg Re: How to separate pinned topics from the others...

    Member

  • 2 posts
  • Joined: June 16, 2010
  • 0 topics
  • Skin: IP.Board
  • Local time: 08:04 PM
  • OS:Windows 7
  • Country:
Offline
  • :

Posted 19 June 2010 - 10:09 PM

The pleasure is mine! I found very useful information here, and thought it no more than fair to contribute as well.

Kindest regards, Wim

#5 Cjoki Re: How to separate pinned topics from the others...

    Member

  • 16 posts
  • Joined: April 30, 2010
  • 2 topics
  • Skin: IP.Board
  • Local time: 10:04 AM
  • OS:Windows XP
  • Country:
Offline
  • :

Posted 01 August 2010 - 04:42 PM

Just upgrade to 3.1.2 on Friday and this was so helpful!!!! THANKS

#6 Broni Re: How to separate pinned topics from the others...

    Malware Annihilator

  • 24,878 posts
  • Joined: October 04, 2004
  • 1,858 topics
  • Age: 57
  • Skin: IPBoard wide
  • Local time: 11:04 AM
  • Zodiac:Virgo
  • Gender:Male
  • Location:Daly City, CA
  • OS:Windows Vista
  • Country:
Offline
  • Time Online: 57d 7h 43m 39s

Posted 01 August 2010 - 05:35 PM

You're very welcome Posted Image

#7 dmacleo Re: How to separate pinned topics from the others...

    Member

  • 82 posts
  • Joined: March 14, 2011
  • 12 topics
  • Skin: Delicate Blue
  • Local time: 02:04 PM
  • Zodiac:Taurus
  • OS:Windows 7
  • Country:
Offline
  • Time Online: 17h 24m 12s

Posted 17 March 2011 - 07:36 PM

Quote

Be careful, it should be between the end tr and end if statements to lign up properly. I edited one too many at first, so I had to add it again.

this is my issue, so many ending if statements I am unsure. can anyone show me where, on stock template, the ending statements in question are?
thanks.
Dave Macleod
www.davemacleod.net
Conservative Postings.

#8 zero462usa Re: How to separate pinned topics from the others...

    Member

  • 17 posts
  • Joined: May 06, 2011
  • 3 topics
  • Skin: IP.Board
  • Local time: 01:04 PM
  • Zodiac:Aries
  • OS:Mac
  • Country:
Offline
  • :

Posted 08 May 2011 - 08:00 PM

View Postwimg, on 19 June 2010 - 07:34 PM, said:

I'd like to make an sddition as a contribution towards the knowledge I gained here.

In older skins of versions prior to IPB 3, the headers were repeated as well for pinned and other topics. That is still possible with a little extra code, IOW, to go from this:

Posted Image

to this:

Posted Image

You need to do soem further tweaking, as follows:

Posted Image

You can achieve this as follows:

In ACP go to Look & Feel -> Manage Skin Sets & Templates > IP.Board, or a copy thereof if you like.

In Templates, open the Forum View and click on forumIndexTemplate.

In the editing window for the template, find:

 <table class='ipb_table topic_list' summary='{$this->lang->words['forum_topic_list']} "{$forum_data['name']}"' id='forum_table'>


Remove the following lines after the [code</caption][/code] statement, just thereafter actually (select and cut, because you need them further down):

            <tr class='header'>
                <th scope='col' class='col_f_icon'>&nbsp;</th>
                <th scope='col' class='col_f_topic'>{$this->lang->words['forum_topic']}</th>
                <th scope='col' class='col_f_starter short'>{$this->lang->words['forum_started_by']}</th>
                <th scope='col' class='col_f_views stats'>{$this->lang->words['forum_stats']}</th>
                <th scope='col' class='col_f_post'>{$this->lang->words['forum_last_post_info']}</th>
                <if test="topicsismod:|:$this->memberData['is_mod'] == 1">
                    <th scope='col' class='col_f_mod short'> <input type='checkbox' id='tmod_all' class='input_check' title='{$this->lang->words['topic_select_all']}' value='1' /> </th>
                </if>
            </tr>    

Now find
 <!-- BEGIN TOPICS --> 
And just nefore the end if statement insert the code you just cut from higher up:
                <!-- Addition for pinned topics separator; Wim G 2010-02-13; BEGIN -->
                <tr class='header'>
                    <th scope='col' class='col_f_icon'>&nbsp;</th>
                    <th scope='col' class='col_f_topic'>{$this->lang->words['forum_topic']}</th>
                    <th scope='col' class='col_f_starter short'>{$this->lang->words['forum_started_by']}</th>
                    <th scope='col' class='col_f_views stats'>{$this->lang->words['forum_stats']}</th>
                    <th scope='col' class='col_f_post'>{$this->lang->words['forum_last_post_info']}</th>
                    <if test="topicsismod:|:$this->memberData['is_mod'] == 1">
                        <th scope='col' class='col_f_mod short'> <input type='checkbox' id='tmod_all' class='input_check' title='{$this->lang->words['topic_select_all']}' value='1' /> </th>
                    </if>
                </tr>    

Be careful, it should be between the end tr and end if statements to lign up properly. I edited one too many at first, so I had to add it again.

Now I also want th eheaders filled in properly. In order to do that, first scroll down a little further, to the BEGIN TOPICS segment, and just after the start of the first "for each" loop there, just before the first start "if", add the following code:
          <if test="!$this->subHeadShow">
                    <tr class='subhead altbar'>
                    <th scope='col' colspan='<if test="endannouncements:|:$this->memberData['is_mod'] == 1">6<else />5</if>'>
                    <if test="$data['pinned']">
                     Important Topics
                    <else />
                     Forum Topics
                    </if>
                    </th>
                    </tr>
                    <tr class='header2'>
                    <th scope='col' class='col_f_icon'>&nbsp;</th>
                    <th scope='col' class='col_f_topic'>{$this->lang->words['forum_topic']}</th>
                    <th scope='col' class='col_f_starter short'>{$this->lang->words['forum_started_by']}</th>
                    <th scope='col' class='col_f_views stats'>{$this->lang->words['forum_stats']}</th>
                    <th scope='col' class='col_f_post'>{$this->lang->words['forum_last_post_info']}</th>
                    <if test="topicsismod:|:$this->memberData['is_mod'] == 1">
                    <th scope='col' class='col_f_mod short'> <input type='checkbox' id='tmod_all' class='input_check' title='{$this->lang->words['topic_select_all']}' value='1' /> </th>
                    </if>
                    </tr>
                    <if test="$this->subHeadShow=1"> </if>
                    </if>
                    <if test="$data['pinned']">
                    <if test="$this->hasPinned=1"> </if>
                    <else />
                    <if test="$this->hasPinned">
                    <if test="$this->hasPinned=0"> </if>
                    <tr class='subhead altbar'>
                    <if test="$this->memberData['is_mod'] == 1">
                    <th scope='col' colspan='6'>
                    <else />
                    <th scope='col' colspan='5'>
                    </if>
                     Forum Topics
                    </th>
                    </tr>
                    <tr class='header2'>
                    <th scope='col' class='col_f_icon'>&nbsp;</th>
                    <th scope='col' class='col_f_topic'>{$this->lang->words['forum_topic']}</th>
                    <th scope='col' class='col_f_starter short'>{$this->lang->words['forum_started_by']}</th>
                    <th scope='col' class='col_f_views stats'>{$this->lang->words['forum_stats']}</th>
                    <th scope='col' class='col_f_post'>{$this->lang->words['forum_last_post_info']}</th>
                    <if test="topicsismod:|:$this->memberData['is_mod'] == 1">
                    <th scope='col' class='col_f_mod short'> <input type='checkbox' id='tmod_all' class='input_check' title='{$this->lang->words['topic_select_all']}' value='1' /> </th>
                    </if>
                    </tr>
                    </if>
                </if>

Note that I called pinned topics "Important Topics, and other topics "Forum Topics". You can name those whatever you like, just that "Forum Topics" in this instance occurs twice, and has to be edited twice too.

Ok, save and recache, and off you go.

I hope you find this a worthwhile tweak.

Kindest regards, Wim




Sorry to quote his whole post but i have a question regarding this...I have succeeded in adding this to my forum but it's transparent for some reason...interesting. I am wondering how I give it a fill?

if you need to look at please head over to gw2beast.com thanks broni

Guild Wars 2 Fansite
www.GW2Beast.com
NEWS | FORUM | BLOG


#9 Broni Re: How to separate pinned topics from the others...

    Malware Annihilator

  • 24,878 posts
  • Joined: October 04, 2004
  • 1,858 topics
  • Age: 57
  • Skin: IPBoard wide
  • Local time: 11:04 AM
  • Zodiac:Virgo
  • Gender:Male
  • Location:Daly City, CA
  • OS:Windows Vista
  • Country:
Offline
  • Time Online: 57d 7h 43m 39s

Posted 08 May 2011 - 08:38 PM

At your place, I can't see any forum, where I can find 1 pinned topic and at least 1 not pinned, so I can see what's going on.

#10 zero462usa Re: How to separate pinned topics from the others...

    Member

  • 17 posts
  • Joined: May 06, 2011
  • 3 topics
  • Skin: IP.Board
  • Local time: 01:04 PM
  • Zodiac:Aries
  • OS:Mac
  • Country:
Offline
  • :

Posted 08 May 2011 - 10:49 PM

You should be able to see it.

http://www.gw2beast....-announcements/

Posted Image

Guild Wars 2 Fansite
www.GW2Beast.com
NEWS | FORUM | BLOG


#11 Broni Re: How to separate pinned topics from the others...

    Malware Annihilator

  • 24,878 posts
  • Joined: October 04, 2004
  • 1,858 topics
  • Age: 57
  • Skin: IPBoard wide
  • Local time: 11:04 AM
  • Zodiac:Virgo
  • Gender:Male
  • Location:Daly City, CA
  • OS:Windows Vista
  • Country:
Offline
  • Time Online: 57d 7h 43m 39s

Posted 09 May 2011 - 02:59 AM

Well, there is some mix up there.
What you're showing me in your screenshot is a forum maintitle, which lost its background for some reason.

My topic here is about creating a separation between pinned topics and not pinned topics.
That separation is BELOW pinned topics:

Attached Files



#12 zero462usa Re: How to separate pinned topics from the others...

    Member

  • 17 posts
  • Joined: May 06, 2011
  • 3 topics
  • Skin: IP.Board
  • Local time: 01:04 PM
  • Zodiac:Aries
  • OS:Mac
  • Country:
Offline
  • :

Posted 09 May 2011 - 03:14 AM

yea because I used the other guys suggestion in the post...but I'll just use yours and leave it at that. Thanks broni...did you ever visit my site?

Guild Wars 2 Fansite
www.GW2Beast.com
NEWS | FORUM | BLOG


#13 Broni Re: How to separate pinned topics from the others...

    Malware Annihilator

  • 24,878 posts
  • Joined: October 04, 2004
  • 1,858 topics
  • Age: 57
  • Skin: IPBoard wide
  • Local time: 11:04 AM
  • Zodiac:Virgo
  • Gender:Male
  • Location:Daly City, CA
  • OS:Windows Vista
  • Country:
Offline
  • Time Online: 57d 7h 43m 39s

Posted 09 May 2011 - 03:22 AM

Yes and I noticed, that the header (maintitle) background is messed up only in that one forum with pinned topic.

#14 ladybugz Re: How to separate pinned topics from the others...

    Member

  • 29 posts
  • Joined: April 27, 2011
  • 5 topics
  • Skin: Paradox
  • Local time: 02:04 PM
  • Zodiac:Capricorn
  • Gender:Female
  • OS:Windows XP
  • Country:
Offline
  • Time Online: 5h 58m 19s

Posted 25 November 2011 - 11:13 PM

Hi, is there an IPB 3.2 version of this? Thanks :)

#15 Broni Re: How to separate pinned topics from the others...

    Malware Annihilator

  • 24,878 posts
  • Joined: October 04, 2004
  • 1,858 topics
  • Age: 57
  • Skin: IPBoard wide
  • Local time: 11:04 AM
  • Zodiac:Virgo
  • Gender:Male
  • Location:Daly City, CA
  • OS:Windows Vista
  • Country:
Offline
  • Time Online: 57d 7h 43m 39s

Posted 26 November 2011 - 01:42 AM

Yes, here: http://www.smartestc...rom-the-others/





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users


This topic has been visited by 20 user(s)