Add a Global Message (Template Editing ONLY)

Post new topic   Reply to topic

View previous topic View next topic Go down

Add a Global Message (Template Editing ONLY)

Post by Jalokim on August 5th 2009, 10:56 am

This Applies ONLY to forums with Template Editing!
currently only phpbb2 and punBB




Remember only sites with template editing may do this!
First I'll show the punBB tutorial. My second post will have the phpbb2 tutorial


Step 1: locating the correct template:
:

You need to direct yourself to :
Admin panel-> Display -> template Editing -> general -> topic_list_box
and click the yellow edit button.

At the top you should see a function script,
WARNING watch out for this script or your forum will stop counting its posts!
the script ends like this:
Code:
      </script>
   <!-- END multi_selection -->


and this is where we start.

PUNBB CODE
As mentioned above you should see where the script ends.

all you do is hit enter after the script and paste this code:
Code:
<div class="main-head">

<h1 class="page-title">Global Announcement</h1>
   </div>
   <div class="main-content">
   <table cellspacing="0" class="table">
      <tbody class="statused">
Global Message must be inserted here
      </tbody>
   </table>
   </div>


wow wasn't that simple
here is a detailed explaination.

the first part defines your global announcement header
<h1 class="page-title">Global Announcement</h1>

^^ that is the header title. You can change the name if you wish, to "Message", or "Warning" or anything that meets your fancy.
the next part is a simple message within the table.
<table cellspacing="0" class="table">
<tbody class="statused">
Global Message must be inserted here
</tbody>
</table>


^^ this is the actual message. Anytime you wish to change it you'll have to open this template and edit it.
This message will be shown on top of all topic lists. If you have a forum in yout topic list this global message will be shown under the forum.

The global message will be styled just like your forum bars and category bars.


<-- Message for HTML pros below-->
If you are someone talented in HTML you can create your own global message block, as I have.

For this you need to build an outer div ... inside that define 2 new divs... one that will hold the header and the content... if you are even more stylish add another div for the footer.
If you know how to build divs you know how to add the above content.

<--message for pro's ended-->


I am not held responsible for any template editing disasters, you have to be careful with the coding or your forum may get screwed.


tutorial written by jalokim


Last edited by Jalokim on August 5th 2009, 10:57 am; edited 1 time in total

_________________

Jalokim
Global Moderator
Global Moderator

Male
Posts: 5946
Age: 20
Language: English,Polish,CSS,HTML
Location: Poland
Country:
Join date: 2007-08-04

http://tealeafgraphics.7forum.net/index.htm

Back to top Go down

Re: Add a Global Message (Template Editing ONLY)

Post by Jalokim on August 5th 2009, 10:56 am

PHPBB2 CODE

I was very surprised when editing the phpbb2 code. And by very surprised I mean totally disappointed.
What I did in punBB took me 10 minutes... it took me an hour to get the same effect on phpbb2...

anyway

you follow the above steps pretty much identically:

Admin panel-> display-> template editing -> general -> topic_list_box

then again the same as last time the you paste the following code under the end script
Code:
</script>
<!-- END multi_selection -->

-------------------------------------------------------

press enter after that end script and paste this code:

Code:

<table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="0">
<tr><th colspan="{topics_list_box.row.header_table.COLSPAN}" align="center" nowrap="nowrap">Global Announcement</th></tr>
<tr><td>Global Message must be inserted here</td></tr>
   
   </table>


In phpbb2 there is no styling codes so you may need to style the inside message manually

here is an explanation of the above code:
The header is defined by 2 classes:
class="forumline"
colspan="{topics_list_box.row.header_table.COLSPAN}"


those 2 codes will style the header to look like the original headers that you have on your forum. Oh and this will chagne along with any settings in the CSS.

the message is found here:
<tr><td>Global Message must be inserted here</td></tr>

A keen html eye will see the table format.

AS mentioned above the code is not customized by itself... so you will have to edit the code by yourself adding either <span> <div> or <p> tags.
I'll show you an example so you don't cry Razz

To format your text I recommend <span> tags, but all 3 are welcome.

here is a demonstration code:
<span style="font-size: 12px;font-family: verdana;color:#333333;padding-left: 10px;">Global message insert here</span>

color = changes the color of your font
padding = moves the text away from the side you define (left/right/top/bottom)

hopefully I explained it all and well.



I am not held responsible for any template editing disasters, you have to be careful with the coding or your forum may get screwed.


tutorial written by jalokim

_________________

Jalokim
Global Moderator
Global Moderator

Male
Posts: 5946
Age: 20
Language: English,Polish,CSS,HTML
Location: Poland
Country:
Join date: 2007-08-04

http://tealeafgraphics.7forum.net/index.htm

Back to top Go down

View previous topic View next topic Back to top


Permissions of this forum:
You cannot reply to topics in this forum