Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Seperate Announcments & Stickies from regular threads Details »»
Seperate Announcments & Stickies from regular threads
Version: 1.00, by assassingod assassingod is offline
Developer Last Online: Jan 2023 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 06-30-2003 Last Update: Never Installs: 84
 
No support by the author.

[HIGH]Seperate Announcments & Stickies from regular threads[/HIGH]

Author: assassingod

Description: This will seperate all announcments and stickies in all forums from regular threads.

Screenshots:
https://vborg.vbsupport.ru/attachmen...&postid=414561

[IMG]images/attach/txt.gif[/IMG]Download:
https://vborg.vbsupport.ru/attachmen...&postid=425778

Tested on vB version:
2.3.0

[HIGH]Update 13/08/2003[/HIGH]
Fixed most bugs - Check download link


[hr=red][/hr]
Add-ons -
How to add images to the divider
Quote:
(Author bitg)
Code:
$announcement
<tr valign="top">
 <td colspan="10"><img src="{imagesfolder}/clear.gif" alt="" width="1" height="1" /></td>
</tr>
Just change the "clear.gif" reference to the image you want to use. You must change the height and width settings to the height and width of the new image though. If you do not know what that is, just remove it. You would then use a line simular to the following:
Code:
<img src="{imagesfolder}/InsertYourFileNameHere.gif" alt="">
How to change the divider to a random image
Quote:
(Author bitg)

If you want to know how to do this, follow these instructions.

[high]Note:[/high] Do this only after you have successfully installed this hack.

Make a directory under your {imagesfolder} directory called "divider" or whatever you want to call it and put all your images that you wish to pull from in there. Name them "1.gif", "2.gif", etc...

Edit your "phpinclude" template and add the following to the bottom of it:

PHP Code:
$dividerimagenumber=rand(1,6);
$dividerimage="/divider/$dividerimagenumber.gif"
[high]Note:[/high] Modify the "divider" to be the name of the directory you created under {imagesfolder}.

[high]Note:[/high] Change the (1,6) to 1,the number of images in your "divider" directory). If you 25 images in your divider directory, it would says (1,25);

Save the "phpinclude" template.

edit your "forumdisplay_sepsai" template.

Replace the default values from the hack in this template with the following:

Code:
$announcement
<tr valign="top">
 <td colspan="10" bgcolor="#000000" align="center"><img src="{imagesfolder}/$dividerimage" alt=""></td>
</tr>
[high]Note:[/high] Change the bgcolor="#000000" to any color you like. You can type in a 6-digit hex code (if you know it) or just replace the "#000000" with "black" or "red" or whatever.

If you use this hack please click the INSTALL button - thank you!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #132  
Old 02-13-2004, 04:08 PM
xlguy's Avatar
xlguy xlguy is offline
 
Join Date: Feb 2004
Location: UK
Posts: 168
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this hack actually work? I would like to try it on 2.3.3 board but I don't want to start installation if it doesn work. How serious is this issue and is this hack still supported? Cheers.
Reply With Quote
  #133  
Old 02-13-2004, 04:27 PM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

They hack does work almost-perfectly. The only problem I can remember around is taht moved threads also get seperated.
Reply With Quote
  #134  
Old 02-13-2004, 04:51 PM
xlguy's Avatar
xlguy xlguy is offline
 
Join Date: Feb 2004
Location: UK
Posts: 168
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok thanks for the reply assassingod - this looks like a great hack

I'm assuming you are pretty much stuck on fixing this move problem? Any ideas? I'm more than happy to try and help you fix it... in fact I'm playing around with it at the moment, so any advice on what you've tried already would be helpful.
Reply With Quote
  #135  
Old 02-13-2004, 04:56 PM
xlguy's Avatar
xlguy xlguy is offline
 
Join Date: Feb 2004
Location: UK
Posts: 168
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
if(!$addedRow and $stickyids and $thread[sticky] == and $addedRow true){ 
Can you explain what it's testing $addedRow for? I know it's not the key to fixing this, but I just wanted to check my knowledge of the existing hack. Cheers.
Reply With Quote
  #136  
Old 02-13-2004, 10:17 PM
xlguy's Avatar
xlguy xlguy is offline
 
Join Date: Feb 2004
Location: UK
Posts: 168
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm really confused now. Having assumed this hack wasn't going to work due to the 'moving thread' issue it appears to work fine on my 2.3.3 board... how is that possible?! lol
Reply With Quote
  #137  
Old 02-14-2004, 09:12 AM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by xlguy
I'm really confused now. Having assumed this hack wasn't going to work due to the 'moving thread' issue it appears to work fine on my 2.3.3 board... how is that possible?! lol
Well that's good
Reply With Quote
  #138  
Old 02-16-2004, 12:59 AM
xlguy's Avatar
xlguy xlguy is offline
 
Join Date: Feb 2004
Location: UK
Posts: 168
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Isn't it a little confusing though? I thought there was meant to be a bug when you moved threads but I can't seem to recreate it. I'm too nervous to put this on my live site in case it reappears...
Reply With Quote
  #139  
Old 02-16-2004, 06:02 AM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well i'm not sure to be honest. Maybe 2.3.2+ versions have the code changed a little, i have no idea. I will test out on a 2.3.4 board and see what happens.
Reply With Quote
  #140  
Old 10-21-2004, 04:27 AM
Alexia Alexia is offline
 
Join Date: May 2004
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here as an interesting variation of the Moved problem. Initially, after installing it, it put Moved's in the separated section.

Now, if the Moved is one below the current post, it puts the current post into another separated section. Of course, since the Moved can't "move" back up towards the top, it is only a problem until another post becomes the current one. This was after I installed Xenon's multiple announcement hack.
https://vborg.vbsupport.ru/showthrea...threadid=40604

http://www.experimentalinsanity.com/...s/difmoved.png
http://www.experimentalinsanity.com/.../difmoved2.png

Hopefully this provides some insight to solving the problem.

PHP Code:
$announcementbit="";
$announcements=$DB_site->query("SELECT announcementid,startdate,title,user.username,user.userid,user.usertitle,user.customtitle
                                         FROM announcement
                                         LEFT JOIN user
                                           ON user.userid=announcement.userid
                                         WHERE startdate<=
$datenow AND enddate>=$datenow
                                           AND 
$forumlist
                                         ORDER BY startdate DESC"
);
   eval(
"\$announcementbit .= \"".gettemplate('forumdisplay_announcement_header')."\";"); // Header for all announcements - Alexia Smith
while($announcement=$DB_site->fetch_array($announcements)) {
    if (
$foruminfo[allowratings]) {
      
$thread[rating]='clear.gif';
      eval(
"\$threadrating = \"".gettemplate('forumdisplaybit_threadrate')."\";");
      
$backcolor '{secondaltcolor}';
          
$bgclass "alt2";
    } else {
            unset(
$threadrating);
      
$backcolor '{firstaltcolor}';
          
$bgclass "alt1";
    }

     if (
$announcement[customtitle]==2) {
       
$announcement[usertitle] = htmlspecialchars($announcement[usertitle]);
         }
        
$announcement[postdate]=vbdate($dateformat,$announcement[startdate]);

  if (
$announcement[startdate]>$bbuserinfo[lastvisit]) {
      
$announcement[icon]='newannounce.gif';
  } else {
      
$announcement[icon]='announce.gif';
  }
  eval(
"\$announcementbit .= \"".gettemplate('forumdisplay_announcement')."\";");
  eval(
"\$sepsai = \"".gettemplate('forumdisplay_sepsai')."\";");
  
$doneannouncements 1;
}
$announcement=$announcementbit
Reply With Quote
  #141  
Old 11-16-2005, 04:50 AM
Michael L. Michael L. is offline
 
Join Date: Feb 2005
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok im having troubles with this hack. I know it works because i used it on my other version but now I have 2.3.7 and i dont get any errors its just that nothing happens like i look at the forum display and no separation.
Reply With Quote
Reply

Thread Tools

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 03:14 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04698 seconds
  • Memory Usage 2,331KB
  • Queries Executed 25 (?)
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
  • (3)bbcode_code
  • (3)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete