Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-28-2003, 12:20 AM
Ninth Dimension's Avatar
Ninth Dimension Ninth Dimension is offline
 
Join Date: Oct 2001
Location: London, England.
Posts: 739
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 06-29-2003, 03:26 PM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 06-29-2003, 03:36 PM
Ninth Dimension's Avatar
Ninth Dimension Ninth Dimension is offline
 
Join Date: Oct 2001
Location: London, England.
Posts: 739
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 06-29-2003, 03:42 PM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually it's rather easy, since i've just done it
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.
Reply With Quote
  #5  
Old 06-29-2003, 03:47 PM
Ninth Dimension's Avatar
Ninth Dimension Ninth Dimension is offline
 
Join Date: Oct 2001
Location: London, England.
Posts: 739
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 06-29-2003, 03:48 PM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hehe, it's no problem at all.

I may release it
Reply With Quote
  #7  
Old 06-29-2003, 05:05 PM
squawell's Avatar
squawell squawell is offline
 
Join Date: Oct 2001
Posts: 681
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #8  
Old 06-29-2003, 05:08 PM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think I understand you, let me try it in a few minutes.
Reply With Quote
  #9  
Old 06-29-2003, 08:47 PM
Oblivion Knight's Avatar
Oblivion Knight Oblivion Knight is offline
 
Join Date: May 2002
Location: Sheffield, UK
Posts: 1,757
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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..
Reply With Quote
  #10  
Old 06-29-2003, 08:53 PM
Ninth Dimension's Avatar
Ninth Dimension Ninth Dimension is offline
 
Join Date: Oct 2001
Location: London, England.
Posts: 739
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?)
Attached Images
File Type: jpg theice.jpg (247.0 KB, 0 views)
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:50 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.04968 seconds
  • Memory Usage 2,283KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (2)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete