PDA

View Full Version : Collapseable Announcements Below Navbar


evenmonkeys
23 Dec 2005, 07:22
I know there are a lot of announcement hacks, but I made this one especially for my forums. I want my announcements to be accessable at all times. However, I don't want to force users to have to read them more than once. I'd rather give them the option of having it open at all times, or closed.

Description
This will allow you to create announcements under your navbar that users may collapse after viewing it. If they want to read it again, they may uncollapse it. Otherwise, it collapses to a 25 pixel high box, much like the statistics at the bottom of the forumhome.

Templates to edit: 1 (navbar)
Files to Upload: 0

Instructions
1. In your AdminCP, go to Styles & Templates -> Style Manager -> Edit Templates -> navbar.

2. Find:<!-- / nav buttons bar -->
Add Below:<!-- Announcements -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr>
<td align="center" class="tcat" colspan="2">Announcements</td>
</tr>
</thead>
<!-- Example -->
<tbody>
<tr>
<td colspan="2" class="thead"><a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_ann1')"><img id="collapseimg_forumhome_ann1" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_ann1].gif" border="0" /></a>Title of Announcement</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_ann1" style="$vbcollapse[collapseobj_forumhome_ann1]">
<tr>
<td class="alt2"><img src="$stylevar[imgdir_misc]/whos_online.gif" border="0" /></td>
<td class="alt1" width="100%"><div class="smallfont">Put whatever you want in here.</div></td>
</tr>
</tbody>
<!-- // Example -->
<!-- Example 2 -->
<tbody>
<tr>
<td colspan="2" class="thead"><a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_ann2')"><img id="collapseimg_forumhome_ann2" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_ann2].gif" border="0" /></a>Title of Announcement</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_ann2" style="$vbcollapse[collapseobj_forumhome_ann2]">
<tr>
<td class="alt2"><img src="$stylevar[imgdir_misc]/whos_online.gif" border="0" /></td>
<td class="alt1" width="100%"><div class="smallfont">Put whatever you want in here.</div></td>
</tr>
</tbody>
<!-- // Example 2 -->
</table>
<!-- // Announcements -->

Notes
If you want more than one accouncement, Just copy the section between the <!-- Example --> part. Then you'll need to change all five of the forumhome_ann1 to fit each announcement. Example: forumhome_ann2, forumhome_ann3. There are five in each announcement. They must all match. Remember that each announcement has a title and a body.

More Notes
Unfortunately, this hack is not cooperating with additional hacks. If you are using the ibProArcade, they will not stay collapsed. However, they will stay collapsed on v3Arcade. If you're using the PhotoPlog, they will not stay collapsed. I have no idea how to fix this. If anyone can help, let me know. Also, if you are using the columns on either side of your forum within FireFox on a 100% wide board, this may also cause issues such as expanding passed the 100% mark. I have been unable to fix this at this point.

I know it's kind of choppy, but all of my users like it. I like it too.

Live Demo: http://forums.section02.com


01/13/2006- Tested on 3.5.3 and works perfectly.

croportal
23 Dec 2005, 07:50
screenshot

Zia
23 Dec 2005, 07:56
sound like a nice idea ..can u provide a bit more info with a screen shot...
any known bug?
On req. customization possible ?
Please thanks

Yorixz
23 Dec 2005, 17:33
I guess you can see an example at his forum; http://forums.section02.com/, looks like atleast.

evenmonkeys
23 Dec 2005, 19:47
I added some screenshots. Also note that when you go to other pages, they stay the way you left them. The only page that they don't stay the way you left them on is the arcade. I don't know why though...

apfparadise
23 Dec 2005, 23:25
Beautifully designed hack. Installed. Looks absolutely beautiful. I actually prefer it to the ones that pull Announcements from the forums. Very easy and flexible. Check it out on my site: http://aquatic-photography.com/forum/

Snake
25 Dec 2005, 11:57
Nice one!

bashy
26 Dec 2005, 17:44
Hi

In firefox this makes the width of the forum far too big...
I use a portal where that the forum shows within the portal
there when viewing the forum the portal blocks still show at the sides..
These blocks still show ok in IE 7 but in firefox i have to do a lot of scrolling o see the blocks....

Please see for yourself at www.bashys-place.com

Look foward to a resolution as i do like this mod and will have many uses for it :)

Also, would would i put if i want you insert a URL please?
I have tried the but no worked :(

Regards

Bashy

akanevsky
26 Dec 2005, 21:25
The 3rd and 4th screenshots are one and the same.

Tony G
27 Dec 2005, 12:34
No they're not. One is the announcements not-collapsed and the other one has one of the announcements collapsed.

evenmonkeys
28 Dec 2005, 06:13
Hi

In firefox this makes the width of the forum far too big...
I use a portal where that the forum shows within the portal
there when viewing the forum the portal blocks still show at the sides..
These blocks still show ok in IE 7 but in firefox i have to do a lot of scrolling o see the blocks....

Please see for yourself at www.bashys-place.com

Look foward to a resolution as i do like this mod and will have many uses for it :)

Also, would would i put if i want you insert a URL please?
I have tried the but no worked :(

Regards

Bashy

I'll have to toy with it. I think the reason it's happening because of the two sides.

bashy
28 Dec 2005, 09:29
Hi xYarub

Thanks for your response....will look forward to the outcome..

Happy New Year

Regards

Bashy

bashy
31 Dec 2005, 21:08
What would i use to put links in it please?

Regards

Bashy

evenmonkeys
31 Dec 2005, 22:53
I'm still workin on it. I'm having someone else take a look at it. I have no idea why it's not working for you. It honest doesn't make sense to me. It was designed using IE and that usually creates problems for FF users in the long run. You'll be the first person to know when I've resolved it.

bashy
02 Jan 2006, 10:18
Hi m8

Did you foind out how to put links into the announcements?

Bashy

evenmonkeys
04 Jan 2006, 03:47
Links are done just by putting:

<a href="http://site.com">Text People See</a>

evenmonkeys
13 Jan 2006, 08:44
I truly am unsure of the problem. I've noticed that FireFox makes boxes larger than Internet Explorer. I noticed it when editing input textboxes that FireFox makes them about 20 pixels wider. This may be happening for you and I am not sure how this modification is effecting it. I really don't know how to help.

01/13/2006- Tested on 3.5.3 and works perfectly.

kallelm
15 Jan 2006, 00:20
Thanks. It's just what I need for now.

*Installs*