vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Seperate Announcments & Stickies from regular threads (https://vborg.vbsupport.ru/showthread.php?t=54930)

assassingod 06-30-2003 10:00 PM

Seperate Announcments & Stickies from regular threads
 
[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!

assassingod 07-01-2003 08:48 PM

Screenshot:

Oblivion Knight 07-01-2003 09:02 PM

I don't suppose there's a way to make the announcements go back above the sticky topics is there? Don't worry if not, it's not often I post announcements anyway.. ;)

assassingod 07-01-2003 09:04 PM

There is a way, and I had it figured out earlier, IIRC its just messing around with the arrangment of the variables. I'll have another attempt at it later:)

[Fx]AssAssiN 07-01-2003 10:16 PM

nice hack!
/me installs

assassingod 07-02-2003 06:21 AM

Thank you:)

shorty 07-02-2003 06:28 AM

This rules. :rambo:

If you manage to find out how to get announcements above (for us slightly n00bie PHP/VB-ers). That would be top :D

[high]* shorty hits install button[/high]

Oblivion Knight 07-02-2003 09:39 AM

This mod also seems to be seperating any new threads that are moved and have the "Moved: " prefix.. :ermm:

Screenshot attached.

Note: I haven't moved the $announcement variable to forumdisplay_sepsai yet since I wanted the announcement to stay on top of my stickies.. Though this doesn't make a difference to this problem anyway.

assassingod 07-02-2003 06:07 PM

Ah right, I thought something like this might happen, never looked into it though.

I'll have a play with it later and see if i can fix it:)

shorty 07-02-2003 06:11 PM

Thanks Assassin ;)

What variable did you move? Im lost :confused:

assassingod 07-02-2003 06:15 PM

shorty;
I will take a look at moving announcements to the top later on tonight, if that's alright with you:)

shorty 07-02-2003 06:18 PM

Fine with me ;) Im just curious as Im in the n00b phase with PHP. Hacks I can install and generally nudge around if they aren't quite right but when it gets to this.. Im teh n00bness :alien:

alkatraz 07-03-2003 06:48 AM

awesome hack, saw this on someones board the other day and wanted it.. a few days later it apears! thx!!!





I modified mine a little bit because the seperator line colour was a bit too harsh.



For those who want this change but don't know how to do it:

Here's how to make it match your table header BG colour:
Quote:

$announcement
<tr valign="top" bgcolor=#1D6AA0>
<td colspan="10"><img src="https://vborg.vbsupport.ru/images/clear.gif" alt="" width="1" height="1"></td>
</tr>

AXH 07-03-2003 05:58 PM

Quote:

Yesterday at 12:39 PM Oblivion Knight said this in Post #8
This mod also seems to be seperating any new threads that are moved and have the "Moved: " prefix.. :ermm:
open forumdisplay.php
cut:
PHP Code:

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

paste the code above:
PHP Code:

if ($thread[open]==10) { 


assassingod 07-03-2003 06:08 PM

Quote:

Yesterday at 11:39 AM Oblivion Knight said this in Post #8
This mod also seems to be seperating any new threads that are moved and have the "Moved: " prefix.. :ermm:

I just tested this out, and it didn't move 'moved' threads to the top.:confused:

Also, AXH, that wont work. Ive tried it and got a parse error (since you didnt mention you need a '}' after
PHP Code:

  $sepsai '';


)

And after I sorted that it stopped my hack from working.

shorty 07-03-2003 06:09 PM

Any luck on annoucements above mate *hint hint* :laugh:

Oblivion Knight 07-03-2003 06:10 PM

Quote:

Today at 08:08 PM assassingod said this in Post #15
I just tested this out, and it didn't move 'moved' threads to the top.:confused:
It doesn't move previously moved threads above the seperator, it's after you install it and move a new thread, things seem to go weird..

Any chance it's conflicting with this hack by Xenon?
https://vborg.vbsupport.ru/showthrea...threadid=40604

assassingod 07-03-2003 06:13 PM

shorty;
Still working on it;)

Oblivion Knight;
Yes, I know, I installed my hack then moved a thread and it didnt move it to the top, strange:confused:
Xenon's hack may be conflicting with mine, I havent used his but I will test it out later tonight.

assassingod 07-03-2003 06:22 PM

shorty;
To make announcements appear at the top, open up template 'forumdisplay_sepsai' and remove
Quote:

$announcement
then add
Quote:

$announcement
above

Quote:

$forumdisplaybits
in template, 'forumdisplay_threadslist'

I'll be adding this to the instructions:)

AXH 07-03-2003 07:35 PM

Quote:

Today at 09:08 PM assassingod said this in Post #15
I just tested this out, and it didn't move 'moved' threads to the top.:confused:

Also, AXH, that wont work. Ive tried it and got a parse error

works fine for me

gldtn 07-03-2003 07:43 PM

Everything seems to be working fine for me.. The annoucements are placed at the top and so forth.. My only problem is that it only separate the stuff from other topics if I have an Annoucement and a FIXED(sticky) thread together. If I only have an Annoucement it does not separate the annoucement alone.

Here is the annoucement on top w/ stickys'..:
http://www.shroomsinbrazil.org/forum...php?forumid=11

Here is just the annoucement:
http://www.shroomsinbrazil.org/forum...php?forumid=12

Great little hack by the way.

assassingod 07-03-2003 07:48 PM

AXH;
Well I got a parse error...

gldtn;
Hmmm, I just tested this locally, and my announcement disappeared. Very strange. I'll sort this out, among other problems later tonight. Thanks for bringing this to my attention:)

gldtn 07-03-2003 07:51 PM

Quote:

Today at 03:48 AM alkatraz said this in Post #13
awesome hack, saw this on someones board the other day and wanted it.. a few days later it apears! thx!!!





I modified mine a little bit because the seperator line colour was a bit too harsh.



For those who want this change but don't know how to do it:

Here's how to make it match your table header BG colour:


Just to help those that didn't quite understand what they had to do with that code in oder to get it to mach your vB board..

On step 2 onto installing your SEPSAI hack change the following line:

Quote:

<img src="https://vborg.vbsupport.ru/vbimages/clear.gif" alt="" width="1" height="1">
To:
Quote:

<img src="/images/clear.gif" alt="" width="1" height="1">
..and that should use the clear.gif image in your's forum image dir . :banana:

assassingod

No problem..

assassingod 07-03-2003 08:13 PM

Thanks gltdn, I thought I changed that because I was using {imagesfolder} but vB converted it to vB.orgs images folder & clear.gif.

I will work on the problems tomorrow night.

Ninth Dimension 07-03-2003 08:13 PM

i'm using my own verson of his hack, and it's working a charm :)

Floris 07-03-2003 09:34 PM

Good work assassingod !! :-d

Kars10 07-04-2003 03:06 PM

Thanks Assassin!!
Very cool hack.
Installed without any Problems on my 2.3.0!!

[high]* Kars10 licks install! :)
[/high]

Kars

shorty 07-04-2003 03:10 PM

Quote:

Yesterday at 08:22 PM assassingod said this in Post #19
shorty;
To make announcements appear at the top, open up template 'forumdisplay_sepsai' and remove


then add


above



in template, 'forumdisplay_threadslist'

I'll be adding this to the instructions:)

You are a star mate! EXCELLENT WORK! :D

Hope you can track the final parts :)

assassingod 07-04-2003 03:30 PM

Thanks all:) I'll be sorting out the other problems later tonight

David Bott 07-05-2003 06:06 PM

Looking forward to this hack being sorted out. :) Ready to install when ready on AVSFORUM.COM .

ImportPassion 07-05-2003 11:14 PM

and I as well.

D

Aaron1 07-07-2003 10:53 AM

Cool hack Assasingod!
Let's hope you can make the announcement threads to go with it aswell!

Freezerator 07-07-2003 07:39 PM

Hi,

have you fixed the moved threads issue?

Because i have the same problem now, and it looks horrible...

http://forum.scooterforum.net/vbport...?s=&forumid=34

assassingod 07-07-2003 07:42 PM

I've had a look into it, but I can't find any obvious reason why it's doing that. I am sure a little more hackin' is required so I will have another go later.

David Bott 07-10-2003 06:11 PM

Any word? Nice hack, but at this point not 100% as it needs to be. :)

ff8_bomb 07-10-2003 09:38 PM

Quote:

07-03-03 at 03:43 PM gldtn said this in Post #21
Everything seems to be working fine for me.. The annoucements are placed at the top and so forth.. My only problem is that it only separate the stuff from other topics if I have an Annoucement and a FIXED(sticky) thread together. If I only have an Annoucement it does not separate the annoucement alone.

Here is the annoucement on top w/ stickys'..:
http://www.shroomsinbrazil.org/forum...php?forumid=11

Here is just the annoucement:
http://www.shroomsinbrazil.org/forum...php?forumid=12

Great little hack by the way.


Im also having this problem.. Stickies move up, and as long as they are there, announcements are up too. But when they arnt, announcements go back to being regular

proxyMX 07-12-2003 02:49 AM

hey, its not working for me

proxyMX 07-12-2003 02:54 AM

is now, template problem :P

Hostc 07-13-2003 03:17 AM

Why does this need file edits? Wouldn't it just require a template edit?

assassingod 07-13-2003 06:16 AM

How so Hostc? In vB3 it can be done via template edits, not vB2 though.


All times are GMT. The time now is 04: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.01692 seconds
  • Memory Usage 1,839KB
  • 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
  • (3)bbcode_code_printable
  • (4)bbcode_php_printable
  • (15)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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