vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Stick post so that it always appears in search! (https://vborg.vbsupport.ru/showthread.php?t=45153)

floridaideal 10-29-2002 12:05 PM

Stick post so that it always appears in search!
 
Hi all

Don't know if this has been done yet or not but is there a hack that lets you stick posts so each time a search is done by a member it always appears?

Thanks

Stu

Xenon 10-29-2002 01:10 PM

what an faszinating idea.....

no it has not been done yet, but it shouldn't be to hard to achieve it...

can you tell, a bit more on why you want such a feature?
i'm just intrested, nothing more ;)

floridaideal 10-29-2002 02:03 PM

Hey thanks for getting back to me

When I ment search I actually meant 'View New Posts' so whenever a user views new posts I can stick a post at the top to make sure everyone see's it.

Its ok using Annoucements and such but some users will just use 'View new posts' and nothing else.

Maybe a drop down box option at the bottom of each thread 'Stick Thead on new posts' ?

Could this be done?

Thanks

Stu

Xenon 10-29-2002 02:11 PM

ahh, you mean threads, not posts sticky on searches.

well is it ok, to show all threads which are normal sticky on view new posts?

if yes you can open search.php find this:
PHP Code:

    // get date:
    
$datesql=" AND thread.lastpost>=".$bbuserinfo[lastvisit];

    
$wheresql="1=1".$forumsql.$datesql;
    
$wheresql.=" AND thread.open<>10"

and change it to this:
PHP Code:

    // get date:
    
$datesql=" AND thread.lastpost>=".$bbuserinfo[lastvisit];

    
$wheresql="1=1".$forumsql.$datesql;
    
$wheresql.=" AND thread.open<>10";
   
$wheresql"(".$wheresql.") or (thread.sticky=1".$forumsql.")"


floridaideal 10-29-2002 02:25 PM

And will this make a thread go to the top of 'View New Posts' each time a users clicks it?

This won't make every sticky thread go to the top will it?

Thanks

Chris M 10-29-2002 02:42 PM

That would make every sticky thread goto the top yes...

Satan

Xenon 10-29-2002 02:42 PM

no, it just shows em where they would appear ordered by dateline

you have to change this in the showresults part:
PHP Code:

    if ($sortorder!="ascending") {
      
$orderbysql.=" DESC";
    }

    
$orderbysql.=",thread.lastpost DESC"

into this:
PHP Code:

    if ($sortorder!="ascending") {
      
$orderbysql.=" DESC";
    }

    
$orderbysql.=",thread.lastpost DESC";
    
$orderbysql="thread.sticky DESC,".$orderbysql

then it should show em on the first page always

floridaideal 10-29-2002 02:50 PM

OK thats cool

But the problem I have is I have about 30 sticky threads on my forum and I don't want all of them sticky at the top of the post list, I just want to make a couple of theads sticky now and again!

Does that make sense?

Thank you

Stuart

Chris M 10-29-2002 02:52 PM

Whoops...

I ignored the bit about the date;)

Thats cool Xenon:)

Satan

Chris M 10-29-2002 02:53 PM

Hmmmm...

Perhaps some kind of "Super-Sticky" or something?

Satan


All times are GMT. The time now is 10:42 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.01085 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
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete