vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Seperating important & stick threads from the rest (https://vborg.vbsupport.ru/showthread.php?t=54825)

Ninth Dimension 06-28-2003 12:20 AM

Seperating important & stick threads from the rest
 
Hi all, i think the subject pritty much explains what i'm after, but i'll go into some detail.

How would I go about setting up the thread display to seperate the Important and Sticky from the rest of the thread listing?

I'm talking about some physical divide on the page so that people can tell the diffrence between announcements and things that need to be noted (like rules for a specific forum).

if no one can help then i'll look into doing it myself.

thanx

assassingod 06-29-2003 03:26 PM

Well for seperating announcments, without hacking, would easy enough;

Open up the forumdisplay_threadslist template, find:

Quote:

$announcement
Underneath add;
Code:

<tr valign="top">
 <td colspan="10"><img src="{ imagesfolder}/clear.gif" alt="" width="1" height="1" /></td>
</tr>

For stickies, i'll look into it.

Ninth Dimension 06-29-2003 03:36 PM

You star, that's just what I needed :)

Quote:

Today at 05:26 PM assassingod said this in Post #2
For stickies, i'll look into it.
I'm fairly sure that it does 2 queries, one listing the stickies, then a 2nd listing the rest of the threads, if this is the case then all we need to do add an extra line of code getting it to add a line.

But i fear it's a bit more complex than that (everything is OK in theory, but never in pratice :)

assassingod 06-29-2003 03:42 PM

Actually it's rather easy, since i've just done it:D
Open up forumdisplay.php and find:

PHP Code:

    if ($thread[sticky] == 1) {
         
$thread[typeprefix]=$stickythreadprefix.$thread[typeprefix];
      } 

Underneath add;

PHP Code:

    if(!$addedRow and $stickyids and $thread[sticky] == and $addedRow true){
    eval(
"\$sepsai = \"".gettemplate('forumdisplay_sepsai')."\";");
    } else {
    
$sepsai '';
    } 

Then open up forumdisplaybit template, and at the top add

Quote:

$sepsai
Add a new template forumdisplay_sepsai ;
Code:

<tr valign="top">
 <td colspan="10"><img src="{imagesfolder}/clear.gif" alt="" width="1" height="1" /></td>
</tr>

This makes all announcments & stickies above the line. If you used my other way without hacking, you'll have to uninstall it.

Ninth Dimension 06-29-2003 03:47 PM

You are a star, you saved me a lot of faffing about (i'm sure i would have found the answer, but i'm too lazy :))

you should release this officially as a tweak :)

thanking ye kindly good sir.

assassingod 06-29-2003 03:48 PM

Hehe, it's no problem at all.

I may release it:);)

squawell 06-29-2003 05:05 PM

other question...if i want it look like below:

stick thread<==this is title

all stick threads here

thread starter replies views

thread list here

how to do that?thankz

assassingod 06-29-2003 05:08 PM

I think I understand you, let me try it in a few minutes.

Oblivion Knight 06-29-2003 08:47 PM

Wouldn't the announcement seperator be better at the very bottom of the forumdisplay_announcement template? Otherwise as it is, if there are no announcements, the seperator is still shown, this way it's only shown if there is an announcement present.. :)

Ninth Dimension 06-29-2003 08:53 PM

1 Attachment(s)
this hack works well if you have some stickies on your forum (as shown in the attachment on my forum) but if you don't have any, it don't work (i.e. you have an announcement that you want seperated off.)

I did see another template edit on this forum to give the announcements there own feel, i might do this, but would prefer to keep it as it where, but with the line showing up

(i hope you understood all that?)


All times are GMT. The time now is 08:43 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03227 seconds
  • Memory Usage 1,736KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete