Forum rules / pink box of this phpBB forum

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Scam Warning
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Jeroen B
Registered User
Posts: 1222
Joined: Wed Jul 02, 2008 6:23 pm
Location: The Netherlands
Name: Jeroen

Re: Forum rules / pink box of this phpBB forum

Post by Jeroen B »

JimA wrote:I'm not sure if this also works on custom pages, if not. Post it. But this is the code that is used in the viewforum_body.html. :)

Code: Select all

<!-- IF S_FORUM_RULES -->
	<div class="rules">
		<div class="inner"><span class="corners-top"><span></span></span>

		<!-- IF U_FORUM_RULES -->
			<a href="{U_FORUM_RULES}">{L_FORUM_RULES}</a>
		<!-- ELSE -->
			<strong>{L_FORUM_RULES}</strong><br />

			{FORUM_RULES}
		<!-- ENDIF -->

		<span class="corners-bottom"><span></span></span></div>
	</div>
<!-- ENDIF -->
Where should I place this code in my chat.php ?
(It's the chatbox which Handyman made ;) )
Jeroen • My modifications

Kim_Possible
Registered User
Posts: 1343
Joined: Sun Sep 21, 2008 3:57 pm

Re: Forum rules / pink box of this phpBB forum

Post by Kim_Possible »

No, it would go in the template (.html) file that displays the chat.

User avatar
Canis-Lupus
Registered User
Posts: 91
Joined: Wed May 21, 2008 4:49 pm

Re: Forum rules / pink box of this phpBB forum

Post by Canis-Lupus »

What about a code for a chat box that you can simply paste into the forum rules field in the ACP or is that a dumb idea?

Kim_Possible
Registered User
Posts: 1343
Joined: Sun Sep 21, 2008 3:57 pm

Re: Forum rules / pink box of this phpBB forum

Post by Kim_Possible »

Canis-Lupus wrote:What about a code for a chat box that you can simply paste into the forum rules field in the ACP or is that a dumb idea?
It wouldn't work because the forum rules field in the ACP doesn't parse html. You'll have to edit that code into your files manually.

Jeroen B
Registered User
Posts: 1222
Joined: Wed Jul 02, 2008 6:23 pm
Location: The Netherlands
Name: Jeroen

Re: Forum rules / pink box of this phpBB forum

Post by Jeroen B »

Kim_Possible wrote:No, it would go in the template (.html) file that displays the chat.
Ok, this is my chat_body.html.

Code: Select all

<!-- IF S_GET_CHAT -->
   <!-- IF S_READ or S_ADD -->
      <!-- BEGIN chatrow -->
         <div id="p{chatrow.MESSAGE_ID}" class="post 

bg{chatrow.CLASS}">
            <div class="inner"><span 

class="corners-top"><span></span></span>
               <div class="postbody">
                  <p class="author">{chatrow.TIME} 

</p>
                  
                  <div 

class="content">{chatrow.MESSAGE}</div>
               </div>
               <dl class="postprofile" 

id="profile{postrow.POST_ID}">
                  <dt>{chatrow.USERNAME_FULL}</dt>
               </dl>
                  <!-- IF U_ACP or U_MCP -->
                     <ul class="profile-icons 

postprofile">
                        <li 

class="delete-icon">
                           <a 

href="javascript:void({chatrow.MESSAGE_ID})" title="{L_DELETE_POST}" 

onclick="delete_post('{chatrow.MESSAGE_ID}')"><span>{L_DELETE_POST}</span></a>
                        </li>
                     </ul>
                  <!-- ENDIF -->
               <span 

class="corners-bottom"><span></span></span>
            </div>
         </div>
      <!-- END chatrow -->---{LAST_ID}
      <!-- IF S_WHOISONLINE -->---
         
            |
            <!-- BEGIN whoisrow -->
                  
                     <img 

src="{T_IMAGESET_PATH}/{whoisrow.USER_STATUS}.png" class="online_img" /> 

{whoisrow.USERNAME_FULL} | 
                     
               <!-- END whoisrow -->
         ---{LAST_TIME}---{DELAY}---{LAST_POST}
      <!-- ENDIF -->
   <!-- ENDIF -->
<!-- ELSE -->
   <!-- IF S_CHAT -->
      <!-- INCLUDE overall_header.html -->
   <!-- ENDIF -->
   <script type="text/javascript">
   <!--
   var fieldname = 'chat';
   var last_time = 0;
   var xmlHttp = http_object();
   var last_id = {LAST_ID};
   var type = 'receive';
   var post_time = {TIME};
   var read_interval = 15000;
   var interval = setInterval('handle_send("read", last_id);', read_interval);

   function handle_send(mode, f)
   {
      if (xmlHttp.readyState == 4 || xmlHttp.readyState == 0)
      {
         indicator_switch('on');
         type = 'receive';
         param = 'mode=' + mode;   
         param += '&last_id=' + last_id;
         param += '&last_time=' + last_time;         
         param += '&last_post=' + post_time;         
         param += '&read_interval=' + read_interval;         
   
         if (mode == 'add' && document.postform.message.value != '')
         {
            type = 'send';
            for(var i = 0; i < f.elements.length; i++)
            { 
               elem = f.elements[i]; 
               param += '&' + elem.name + '=' + 

encodeURIComponent(elem.value); 
            }
            document.postform.message.value = '';
         }
         else if (mode == 'delete')
         {
            type = 'delete';
            param += '&chat_id=' + f;
            
         }
         xmlHttp.open("POST", '{FILENAME}', true);
         xmlHttp.setRequestHeader('Content-Type', 

'application/x-www-form-urlencoded');
         xmlHttp.onreadystatechange = handle_return;
         xmlHttp.send(param);
      }
   }
   
   function handle_return()
   {
      if (xmlHttp.readyState == 4)
      {
         if (type != 'delete')
         {
            results = xmlHttp.responseText.split('---');
            if (results[1])
            {
               if (last_id == 0)
               {
                  

document.getElementById(fieldname).innerHTML = results[0];
               }
               else
               {
                  

document.getElementById(fieldname).innerHTML = results[0] + 

document.getElementById(fieldname).innerHTML;
               }
               last_id = results[1];
               if (results[2])
               {
                  

document.getElementById('whois_online').innerHTML = results[2];
                  last_time = results[3];
                  if (results[4] != read_interval * 

1000)
                  {
                     

window.clearInterval(interval);
                     read_interval = results[4] * 

1000;
                     interval = 

setInterval('handle_send("read", last_id);', read_interval);
                     

document.getElementById('update_seconds').innerHTML = results[4];
                  }
                  post_time = results[5];
               }
            }
         }
         indicator_switch('off');
      }
   }
   
   function delete_post(chatid)
   {
      document.getElementById('p' + chatid).style.display = 'none';
      handle_send('delete', chatid);
   }
   
   function indicator_switch(mode)
   {
      if(document.getElementById("act_indicator"))
      {
         var img = document.getElementById("act_indicator");   
         if(img.style.visibility == "hidden" && mode == 'on') 
         {
            img.style.visibility = "visible";
         }
         else if (mode == 'off')
         {
            img.style.visibility = "hidden"
         }   
      }
   }
   
   function http_object()
   {
      if (window.XMLHttpRequest)
      {
         return new XMLHttpRequest();
      }
      else if(window.ActiveXObject)
      {
         return new ActiveXObject("Microsoft.XMLHTTP");
      }
      else
      {
         document.getElementById('p_status').innerHTML = 'Status: 

Cound not create XmlHttpRequest Object.  Consider upgrading your browser.';
      }
   }
   -->
   </script>
   <style type="text/css">
   <!--
      #act_indicator {
         visibility:hidden;
      }
      .shouts {
         width: 85%;
         height:300px;
         overflow:auto;
         float:left;
      }
      #chat {
         width: 100%;
         text-align:left;
      }
      .postprofile {
         min-height: 5px !important;
      }
      .chatform {
         width: 90%;
         text-align:center;
      }
      .onlinelist {
         width: 15%;
         overflow:auto;
         height:300px;
      }
      .users {
         width: 90%;
         text-align: left;
         text-indent: 5px;
         margin-left:auto;
         margin-right:auto;
      }
      .user {
         width: 95%;
         font-size: 1.1em;
         font-family:Verdana, Arial, Helvetica, sans-serif;
         line-height: 1.4em;
      }
      #act_indicator {
         visibility: hidden;
      }
      .chatinput {width: 80% !important;}
      .online_img {
         vertical-align:middle;
      }
      .whoonlinelist {
         width: 100%;
         overflow:auto;
         height:auto;
         text-align:center;
      }
   -->
   </style>
   <!-- IF S_USER_LOGGED_IN -->
      <div class="forabg">
         <div class="inner">
            <span class="corners-top"><span></span></span>
            <div class="chatform" align="center">   
            
               <!-- INCLUDE posting_buttons.html -->   
               
            
               <form name="postform" id="postform" 

method="post" action="javascript:void(0);" onsubmit="handle_send('add', this)" 

autocomplete="off">
                  <strong style="color: 

white;">{L_MESSAGE}:</strong> <input type="text" tabindex="1" name="message" 

id="message"  class="inputbox chatinput" />
                  <input type="submit" class="button1" 

value="{L_SUBMIT}" name="submit" tabindex="6" accesskey="s"/><br />
               </form>
            </div>
            <span class="corners-bottom"><span></span></span>
         </div>
      </div>
   <!-- ENDIF -->
   <div class="forabg" align="left">
      <div class="inner">
         <span class="corners-top"><span></span></span>
         <div class="shouts">
            <div id="chat">
               <!-- BEGIN chatrow -->
                  <div id="p{chatrow.MESSAGE_ID}" 

class="post bg{chatrow.CLASS}">
                     <div class="inner"><span 

class="corners-top"><span></span></span>
                        <div 

class="postbody">
                           <p 

class="author">{chatrow.TIME} </p>
                           
                           <div 

class="content">{chatrow.MESSAGE}</div>
                        </div>
                        <dl 

class="postprofile" id="profile{postrow.POST_ID}">
                           

<dt>{chatrow.USERNAME_FULL}</dt>
                        </dl>
                           <!-- IF 

U_ACP or U_MCP -->
                              <ul 

class="profile-icons postprofile">
                                 

<li class="delete-icon">
                                 

   <a href="javascript:void({chatrow.MESSAGE_ID})" title="{L_DELETE_POST}" 

onclick="delete_post('{chatrow.MESSAGE_ID}')"><span>{L_DELETE_POST}</span></a>
                                 

</li>
                              

</ul>
                           <!-- ENDIF 

-->
                        <span 

class="corners-bottom"><span></span></span>
                     </div>
                  </div>
               <!-- END chatrow -->
            </div>
         </div>
         <div class="onlinelist bg1">
            <div class="users">
               
                  <div>
                     <div class="inner">
                        <div 

class="user"><!-- IF S_SMILIES_ALLOWED and .smiley -->
            <!-- BEGIN smiley -->
            <a href="#" 

onclick="insert_text('{smiley.A_SMILEY_CODE}', true); return false;"><img 

src="{smiley.SMILEY_IMG}" width="{smiley.SMILEY_WIDTH}" 

height="{smiley.SMILEY_HEIGHT}" alt="{smiley.SMILEY_CODE}" 

title="{smiley.SMILEY_DESC}" /></a>
         <!-- END smiley -->
      <!-- ENDIF -->
      <!-- IF S_SHOW_SMILEY_LINK and S_SMILIES_ALLOWED-->
         <br /><a href="{U_MORE_SMILIES}" 

onclick="window.open('{U_MORE_SMILIES}', '_phpbbsmilies', 

'HEIGHT=350,resizable=yes,scrollbars=yes,WIDTH=300'); return 

false;">{L_MORE_SMILIES}</a>
      <!-- ENDIF --><!-- IF BBCODE_STATUS -->
      <!-- IF .smiley --><hr /><!-- ENDIF -->
      {BBCODE_STATUS}<br />
      <!-- IF S_BBCODE_ALLOWED -->
         {IMG_STATUS}<br />
         {FLASH_STATUS}<br />
         {URL_STATUS}<br />         
      <!-- ENDIF -->
{SMILIES_STATUS}
      <!-- ENDIF --></div>
                     </div>
                  </div>
               
            </div>
         </div>
         <span class="corners-bottom"><span></span></span>
      </div>
   </div>
   <div class="forabg">
         <div class="inner">
            <span class="corners-top"><span></span></span>
            <div class="whoonlinelist bg1" id="whois_online">
                                 

|
            <!-- BEGIN whoisrow -->
                  
                     <img 

src="{T_IMAGESET_PATH}/{whoisrow.USER_STATUS}.png" class="online_img" /> 

{whoisrow.USERNAME_FULL} | 
                     
               <!-- END whoisrow -->
            </div>
            
            <span class="corners-bottom"><span></span></span>
         </div>
      </div>
   <div class="forabg" align="center">
      <div class="inner">
         <span class="corners-top"><span></span></span>
         <div class="post">
            <div id="author">{L_DETAILS}
               <img 

src="{T_IMAGESET_PATH}/act_indicator.gif" id="act_indicator" />
               <strong>• {L_UPDATES} <span 

id="update_seconds">{DELAY}</span> {L_UNIT}</strong>
            </div>
         </div>
         <span class="corners-bottom"><span></span></span>
      </div>
   </div>
   <!-- IF S_CHAT -->
      <!-- INCLUDE overall_footer.html -->
   <!-- ENDIF -->
<!-- ENDIF -->
Where should I put the forum rules box code? :)
Jeroen • My modifications

Kim_Possible
Registered User
Posts: 1343
Joined: Sun Sep 21, 2008 3:57 pm

Re: Forum rules / pink box of this phpBB forum

Post by Kim_Possible »

You can put the "forum rules" html in your chat_body.html above the chat code if your chat.php is a properly integrated phpbb page. Also, since chat.php isn't a "forum page," you will probably want to hard code the "rules." I.e. replace . . .

Code: Select all

{FORUM_RULES}
with the text of your actual rules.

Make sense?

Jeroen B
Registered User
Posts: 1222
Joined: Wed Jul 02, 2008 6:23 pm
Location: The Netherlands
Name: Jeroen

Re: Forum rules / pink box of this phpBB forum

Post by Jeroen B »

I already figured out how to do it :)

Thanks for your help :D
Jeroen • My modifications

PZRoses
Registered User
Posts: 28
Joined: Sat Nov 20, 2010 4:04 pm

Re: Forum rules / pink box of this phpBB forum

Post by PZRoses »

I tried changing the colors in the rules box at the top of each forum from pink via your instructions but nothing has happned. I edited both colors and commons.css. I can see where in viewbody there is spot for color changes. I'm using prosilver_se.

Thanks in advance.

XtremeD63
Registered User
Posts: 208
Joined: Tue Oct 04, 2005 3:52 pm
Contact:

Re: Forum rules / pink box of this phpBB forum

Post by XtremeD63 »

Hi there. I tried to create the pink rules box that I see right now here on this board. I went to the ACP>Manage Forums>Green Cog (Edit) - then I filled in the fields with the URL to the rules I have then the actual rules in the bottom field. I submitted it, but there was no change. What did I miss?

Thank you!

User avatar
KevC
Support Team Member
Support Team Member
Posts: 69740
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Forum rules / pink box of this phpBB forum

Post by KevC »

PZRoses wrote:I tried changing the colors in the rules box at the top of each forum from pink via your instructions but nothing has happned. I edited both colors and commons.css. I can see where in viewbody there is spot for color changes. I'm using prosilver_se.

Thanks in advance.
You need to clear the theme cache for the changes to show up.
XtremeD63 wrote:Hi there. I tried to create the pink rules box that I see right now here on this board. I went to the ACP>Manage Forums>Green Cog (Edit) - then I filled in the fields with the URL to the rules I have then the actual rules in the bottom field. I submitted it, but there was no change. What did I miss?

Thank you!
Make sure you edited a forum and not a category.
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"

PZRoses
Registered User
Posts: 28
Joined: Sat Nov 20, 2010 4:04 pm

Re: Forum rules / pink box of this phpBB forum

Post by PZRoses »

Thank you. Is that "refresh" under styles>>themes?

Sorry for the basic questions but new to this.

User avatar
KevC
Support Team Member
Support Team Member
Posts: 69740
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Forum rules / pink box of this phpBB forum

Post by KevC »

Yep
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"

XtremeD63
Registered User
Posts: 208
Joined: Tue Oct 04, 2005 3:52 pm
Contact:

Re: Forum rules / pink box of this phpBB forum

Post by XtremeD63 »

I tried twice, taking each step and making sure I did it right... still nothing. It just refuses to show up. I refreshed the themes, image sets and templates.

Nothing. Bummer.

Anything else I can try?

User avatar
KevC
Support Team Member
Support Team Member
Posts: 69740
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Forum rules / pink box of this phpBB forum

Post by KevC »

What's the exact css code you have in that file?
What's the address of the site?
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"

XtremeD63
Registered User
Posts: 208
Joined: Tue Oct 04, 2005 3:52 pm
Contact:

Re: Forum rules / pink box of this phpBB forum

Post by XtremeD63 »

I'm sorry - css code? A little over my head at the moment.

The site is:

http://www.cerwin-vega-fans.com/forums

Locked

Return to “[3.0.x] Support Forum”