We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
[ C ] Notice alerts
Topic Started: Aug 24 2012, 10:31 PM (454 Views)
Leon.
Member Avatar
Member
[ *  *  *  * ]
Board Address: http://telelit.com
Board Software: ZB
Description: Basically, you know how you can set 'notices' or 'error' messages and such? I'd like to have a code where I can have a notice message, determined by the forum. For example... Introduction forum would have a specific 'notice', 'announcements' would have a specific one, ect ect. I don't know if this is possible or not, but hey. Who knows. ???
Offline Profile Goto Top
 
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
Okay this is easy but what do you mean for certain forums? For when the forum loads, when you click something in the forum description, when you click the forum name?

Or you can even set up the rules feature when you edit a forum to 'show all rules' and do it that way.
Edited by Ferby, Aug 25 2012, 10:40 AM.
Offline Profile Goto Top
 
Leon.
Member Avatar
Member
[ *  *  *  * ]
I don't want it to be forum rules. I want it to be as the notice bar.

For example, if you go to the Introduction forum on TL, then the 'notice' bar will be there, with a message. If you go to the Announcements, another notice will be there. Ect.
Offline Profile Goto Top
 
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
Yeah, I'm new to Javascript so it'll probably be easier if Cory did this code
Offline Profile Goto Top
 
Leon.
Member Avatar
Member
[ *  *  *  * ]
Alright. :) Thanks anyways.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Admin CP Posted Image Themes Posted Image Board Template Posted Image Below the Board
Code:
 
<script type="text/javascript">
function addNotice(forumID, description) {
if (location.href.indexOf('/forum/' + forumID + '') !== -1) $('#main').prepend('<dl class="notice info"><dt>Notice</dt><dd>' + description + '</dd></dl>');
}

addNotice('FORUM_ID', 'NOTICE_DESCRIPTION');
</script>
Edit the capitalized text and you can repeat that line to add notices to more forums.
Offline Profile Goto Top
 
Leon.
Member Avatar
Member
[ *  *  *  * ]
It works perfectly :) Thanks a bunch, Cory! :wub:
Offline Profile Goto Top
 
Steve
Member Avatar
patriot
[ *  *  *  *  *  *  *  *  *  * ]
Completed!

Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic