PDA

View Full Version : Forum Display Enhancements - Sorky - Customize Announcements


Sorky
01-27-2009, 10:00 PM
Purpose
This plugin dramatically improves the ways in which announcements can be displayed.

Separates the announcements from the threads and puts them in their own table
Allows the location of the announcement to be changed
Makes it possible to have announcements show up in "Categories"
Collapse the announcement table
Show the announcement message content!
Collapse the announcement message content
Own formatting for the Announcement table heading, the announcement title and the announcement message
Limit the number of announcements displayed
plus more!


Installation
Import XML file (as product): AdminCP > Plugin System > Manage Products > [Add/Import Product]

Options
To set this plugin's options go to: AdminCP > vBulletin Options > Sorky18 - Customize Announcements

Versions
v1.0.0 - 24th of December, 2008 = Launch (click here (https://vborg.vbsupport.ru/showthread.php?t=199675))
v1.0.1 - 28th of January, 2009 = official release for 3.8.x (click here (https://vborg.vbsupport.ru/showthread.php?p=1692542#post1692542))
v1.0.2 - 29th of January, 2009 = Minor improvement (click here (https://vborg.vbsupport.ru/showthread.php?p=1727993#post1727993))
v1.1.0 - 13th of April, 2009 = Remember show/hide state (click here (https://vborg.vbsupport.ru/showthread.php?p=1789989#post1789989))
v1.1.1 - 23rd of May, 2009 = alt text for show/hide image + more (click here (https://vborg.vbsupport.ru/showthread.php?p=1815724#post1815724))
v1.1.2 - 3rd of June, 2009 = limiting the number of announcements fixed (click here (https://vborg.vbsupport.ru/showthread.php?p=1822644#post1822644))
v1.1.3 - 7th of September, 2009 = minor script bug removed (click here (https://vborg.vbsupport.ru/showthread.php?p=1880947#post1880947))

Settings & Demonstration Screenshots
See v1.0.0 post (click here (https://vborg.vbsupport.ru/showthread.php?p=1727045#post1727045))

If you like this Mod please click INSTALL (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=203359).

Sorky
01-28-2009, 09:59 AM
V1.0.0 Features

Separates the announcements from the threads and puts them in their own table
Allows the location of the announcement to be changed
Makes it possible to have announcements show up in "Categories"
Collapse the announcement table
Show the announcement message content!
Collapse the announcement message content
Own formatting for the Announcement table heading, the announcement title and the announcement message
Limit the number of announcements displayedTips

If the following templates have been modified from their original, either "revert" them or test this Mod carefully before use:

FORUMDISPLAY
header (append only)
NOTE : This plugin ignores the "Forum Display Options (forumdisplay)" / "Group Announcements" setting)

WishList - Other Ideas

Remember collapse state [eg : cookie] (high)
Collapse if already viewed (med)
Do not inherit parent forum announcements (med)
Hide threads until announcements have been read (med)
Special announcement for Forum Home-page (med)
Duration of announcements to display (low)
Change icon
Settings & Demonstration Screenshots

Options1: First part of the available options
Options2: Second part of the available options
Example1: All options with messages / not collapsable
Example2: All options (normal) / table collapsable
Example3: All options (normal) / table collapsable / limited to first option with link to more
Example4: Announcement table collapsed
Example5: All options with messages / table & message collapsable / messages initially collapsed
Example6: All options with messages / table & message collapsable / one message expanded
Example7: Announcement table in a different location

Leo Brazil
01-28-2009, 10:07 AM
When I saw this I couldn't resist. Installing right now, I was in need for this for so long...

Thanks for sharing.

Edited: Installed, changes some colors on CSS to match my board and it's perfect.

digicom
01-28-2009, 11:14 AM
Thanks installed :up:

Sorky
01-29-2009, 09:44 AM
V1.0.2 Features

Improved the style options for the Announcement Table heading
Added extra default style information to use the corrected style

ShawneyJ
01-29-2009, 11:40 AM
looks much better than default thanks.

momo2
02-01-2009, 01:33 PM
Nice job. Been looking for a new look.. Thanks.

RustedBucket
02-02-2009, 04:31 PM
Got this error on vb 3.8.1
Warning: Invalid argument supplied for foreach() in [path]/includes/class_postbit.php(294) : eval()'d code on line 26

Sorky
02-03-2009, 08:03 AM
Got this error on vb 3.8.1

I've tested on 3.8.1 with no issues... Can you give me any more information? Is it reproducible? Is it in all forums? If you disable my Plug-In, what happens? If you disable all other plug-ins, what happens?

PM me a URL and I can half a look at what is happening.

Sunka
02-04-2009, 07:22 AM
Installed...looking very nice

mark370
02-23-2009, 05:19 PM
Hi Sorky, is there any way for me to edit a template to change just the colour of the tital text of the announcment ?
Reason i ask within your mod i can change everything else except this and the dilema i have is on our site we use a dark & light skin and i cant get the background colour right for them both, as soon as i get the light skin looking ok [which is our main default skin] the tital text in the dark skin is same colour as background colour and carnt be seen.

Oh and we running (vBulletin 3.8.1https://vborg.vbsupport.ru/external/2009/02/26.jpg)

Example-Dark Skin:

https://vborg.vbsupport.ru/external/2009/02/27.jpg


Example-Light Skin:

https://vborg.vbsupport.ru/external/2009/02/28.jpg

Sorky
02-25-2009, 09:20 AM
Hi Sorky, is there any way for me to edit a template to change just the colour of the tital text of the announcment ?

Check these options...

"Cell (td) Formatting for the Announcement title"... class="MyAnnouncementTitleStyle"
"Enter your CSS here"... .MyAnnouncementTitleStyle{...}

mark370
02-26-2009, 04:06 PM
Check these options...
"Cell (td) Formatting for the Announcement title"... class="MyAnnouncementTitleStyle"
"Enter your CSS here"... .MyAnnouncementTitleStyle{...}Thanks for your reply but i proberly didnt explain myself proper ?
Ive already played with those settings youve suggested in vb options but the trouble is i cant set the announcments tital colour on a skin by skin basis unless ime missing something ? [plz see below pic]

https://vborg.vbsupport.ru/external/2009/02/10.jpg

Sorry for being a nuisance :)

Sorky
02-26-2009, 08:14 PM
Sorry for being a nuisance :)

No probs... I'm no expert on "skins" - are they the same as "styles"?

You still use this...
"Cell (td) Formatting for the Announcement title"... class="MyAnnouncementTitleStyle"

But you put the CSS in the "Skin/Style", so that the CSS changes based on the "Skin/Style" ;-)

mark370
02-27-2009, 08:55 AM
Thanks for your help so far, and yea "skins" / "styles" meen the same its just a differant way of pronouncing it and my spelling aint that good :)

Blackheart_72
02-27-2009, 09:27 AM
Just what i need, thanks.

aengus
03-09-2009, 10:58 AM
Sorry if I missed it, but is there a way to force announcements to display on index.php as well?

Thank you, enjoying this mod already.

Sorky
03-11-2009, 09:15 AM
Sorry if I missed it, but is there a way to force announcements to display on index.php as well?

It isn't there because there is no capability for this currently in vBulletin...

It is in my Wish List (Special announcement for Forum Home-page (med)) which contains things I may do if I get time (or if it gets a lot of requests and I can set aside the time)

Sorky
04-13-2009, 04:11 AM
Change Log

1. Added the 'None' selection for greater clarity
2. The long awaited, often requested, cookie to remember the collapsed state
3. Other minor coding and commenting adjustments

Change 1
"None" is the same as using "Selected" with no forums in the following list
"All" is the same as using "UnSelected" with no forums in the following list.
"Selected" allows you to choose which forums the option applies to
"UnSelected" allows you to choose which forums the option DOES NOT apply to

Change 2
Six new options...
vBulletin Options / Sorky19 - Customize Announcements - V1.1.0 / Announcement Table formatting options...Expanded by default for
Selected/UnSelected Forums (comma separated ForumID list)
If no cookie exists show as...

vBulletin Options / Sorky19 - Customize Announcements - V1.1.0 / Announcement formatting options...Expanded by default for
Selected/UnSelected Forums (comma separated ForumID list)
If no cookie exists show as...



If the existing (Collapsed by default) option is "None"and the new (Expanded by default) option is "None", then the Expand/Collapse will remember the previous state using a cookie. If the cookie does not exist, you can choose the default.

AteNa
04-14-2009, 01:31 PM
Thanks ....

xtronic
04-14-2009, 02:05 PM
great :)

installed here

forums (http://www.vb.foxarab.com)

amjadz4
04-16-2009, 02:06 PM
nice mod! thanks!
installed! :)

Sorky
05-23-2009, 12:20 PM
<u>Change Log</u>

1. Added 'alt' text for the show/hide images
2. Changes to ensure that the modification is valid XHTML
3. Filled the debug section with the option settings
4. Other minor coding and commenting adjustments

Sorky
06-03-2009, 09:40 AM
<u>Change Log</u>

1. Fixed the "more" text if limiting the number of announcements displayed
2. Other minor coding and commenting adjustments

Xencored
06-04-2009, 04:38 PM
Sup Sorky

I updated and they dont show anymore mate and its all on
Please help bro love this mod ^^ :up:

Sorky
06-05-2009, 11:19 PM
Sup Sorky

I updated and they dont show anymore mate and its all on
Please help bro love this mod ^^ :up:

I had a look... The two announcements you have configured, both have expired... Quite a coincidence that the expiry date is the same as the date you update ;)

Edit the announcements and change the expiry date and let me know if there is anything else strange/missing.

testbot
09-05-2009, 03:15 PM
there seems to be some caching issues and too many queries.

There's only a few ppl on right now but doing the week we getin 100x the traffic so this would be a significant hit.

Installed:
Browser generated page in 1.783 seconds
Server generated page in 0.21779 seconds with 30 queries (5 queries for uncached templates) [Server Loads: 0.22 0.12 : 0.04]
Uncached templates: panic_button_postbit (1)
Uncached templates: postbit (1)
Uncached templates: postbit_onlinestatus (1)
Uncached templates: postbit_reputation (1)
Uncached templates: postbit_wrapper (1)

Not Installed (everything is cached fine):
Browser generated page in 1.202 seconds
Server generated page in 0.16792 seconds with 19 queries [Server Loads: 0.04 0.08 : 0.03]

Also noticed this:
Error: syntax error
Line: 490, Column: 26
Source Code:
Sorky19_ShowOrHide("_9",2,);

mattwmc2001
09-06-2009, 09:52 PM
Looks great!

Like how easy it is to change the css and don't have to go into the style templates etc!

Thanks!

Sorky
09-07-2009, 06:42 AM
Error: syntax error...
Found the error - Occurs when not using the collapse options, but the collapse script remains (doh) - Fixed in next version.

there seems to be some caching issues and too many queries
Can't understand that - Only one query and that is only ever called once (at the end of the forum display). The templates you mention I do not even touch - Do you have some other PlugIn that is doing that or conflicting?

Did you (or can you) test on a "clean" system (NO other PlugIns and the standard style with no manual edits)?

Looks great!

Like how easy it is to change the css and don't have to go into the style templates etc!

Thanks!

Glad you like it :)

Sorky
09-07-2009, 06:44 AM
<u>Change Log</u>

1. Fixed the little script bug
2. Other minor coding and commenting adjustments

Xencored
09-27-2009, 09:08 PM
Hmm no matter what i do mate i cant get it to stay "collapsed" any ideas?

Thanks

chick
09-28-2009, 07:14 PM
Nice one, thank you very much. Clicked install.

Sorky
10-01-2009, 07:09 AM
Hmm no matter what i do mate i cant get it to stay "collapsed" any ideas?

Can you give me any more info... Link? Screen-shot?

Xencored
10-02-2009, 03:59 PM
Can you give me any more info... Link? Screen-shot?

No link mate as the mod is off
as you can see its allways down :erm:
but here is some shots

105014105015

Sorky
10-04-2009, 02:33 AM
as you can see its allways down :erm:

When it is running, set debug on and let me know so I can check the settings

ctlatino
11-04-2009, 02:44 PM
how post a messages in the announcements?

Sorky
11-04-2009, 07:28 PM
how post a messages in the announcements?

A question like that applies to vbulletin in general and should really be asked in the appropriate place - however - i will answer anyway.

Need to be logged in with the appropriate privilege and is done through the "forum tools" menu or through the AdminCp.

ctlatino
11-05-2009, 08:06 PM
A question like that applies to vbulletin in general and should really be asked in the appropriate place - however - i will answer anyway.

Need to be logged in with the appropriate priviledge and is done through the "forum tooms" menu or through the admincp.

where exactly?

Sorky
11-07-2009, 06:40 AM
where exactly?

Posting an announcement is standard vBulletin functionality - read the manual or search the .com website.

Satviewers
11-12-2009, 11:41 PM
Hi,

I have posted the announcement as a Global one.
And have 'Location of the Announcements' = 'Above the Thread list (If shown)'.

If there are Sub-forums it placing it between the Sub-forum and the Threads.

Is there any way to get it to be above the Sub-forums if they are there.

Thanks.

Sorky
11-14-2009, 10:28 AM
Is there any way to get it to be above the Sub-forums if they are there

Ummm... Use "Above the Forum List (If shown)"???

Assuming you tried that and it isn't working for you... Your pic does look like the "FORUMDISPLAY" template may have been modified, so first of all, check how the options work with the default style. This will let you get acquainted with all the settings. Then check your modified "FORUMDISPLAY" template to make sure that "<!-- sub-forum list -->" comment is still in it before the SubForum table display section. When the "Above the Forum List (If shown)" option is chosen, the PlugIn insert the new announcement display right before that comment.

Satviewers
11-14-2009, 01:29 PM
Sorry, thought I had tried "Above the Forum List (If shown)".

That worked.
Thanks.

mikes04537
11-14-2009, 06:41 PM
uhh yea it screwed up my board un installed

Sorky
11-16-2009, 01:50 AM
uhh yea it screwed up my board un installed

Sorry to hear that - Did you check it with the default style? Do you have a test site I can look at to see why?

Satviewers
11-27-2009, 12:30 AM
Hi,

When you click on a new post from the main forum,

e.g. http://www.satviewers.com/showthread.php?p=478#post478

Internet Explorer 8 gives error on page.

Webpage error details

Message: 'null' is null or not an object
Line: 592
Char: 128
Code: 0
URI: http://www.satviewers.com/showthread.php?p=478#post478

Where as if you go into the subforum and click the post there is no error given.
e.g. http://www.satviewers.com/showthread.php?t=476

Hope there is enough info here to reproduce the error and fix the bug.

Sorky
11-27-2009, 04:07 AM
Hope there is enough info here to reproduce the error and fix the bug.

I see the error on your site in IE7, but I do not see how it relates to my PlugIn - Are you saying that with my PlugIn diasabled, the error does not happen, but when enabled it does?

Edit: Re-checked your site and see the error is gone so it must have been something else as I suspected.

TWTCommish
06-05-2010, 03:53 PM
Got this error on vb 3.8.1
The foreach() error, I believe, is a conflict with the passiveVid mod. You'll want to find this in the "passiveVid - Showthread Replacement" plugin at hook location "postbit_display_complete":

foreach ($passiveVid as $k => $v) {
if ( $this->registry->options['passiveVid_sites'] & $v['id'] ) {
$this->post['message'] = preg_replace_callback($v['string'],create_function('$matches',$v['replacement']),$this->post['message']);

}
}
And replace it with this:

if (is_array($passiveVid)) {
foreach ($passiveVid as $k => $v) {
if ( $this->registry->options['passiveVid_sites'] & $v['id'] ) {
$this->post['message'] = preg_replace_callback($v['string'],create_function('$matches',$v['replacement']),$this->post['message']);
}
}
}

stb74
08-10-2010, 06:46 PM
I have two global announcements but cannot get them to display at the same time, is this possible

washingtonboise
08-11-2010, 02:43 AM
I have two global announcements but cannot get them to display at the same time, is this possible

Yes, that's totally possible. You just need to go into your configuration for displaying threads and announcements. Make sure that announcements are not displayed 'in line'

The default display is just a horrible decision by vbulletin, but not their first. Flip that switch and you'll be able to display more than one announcement.

stb74
08-11-2010, 05:40 PM
Yes, that's totally possible. You just need to go into your configuration for displaying threads and announcements. Make sure that announcements are not displayed 'in line'

The default display is just a horrible decision by vbulletin, but not their first. Flip that switch and you'll be able to display more than one announcement.

Thanks

Not sure whether this is it but works

Forum Display Options - Group Announcements

Change to No