vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Info Box when starting new thread (https://vborg.vbsupport.ru/showthread.php?t=119228)

Avalon111 06-20-2006 10:00 PM

Info Box when starting new thread
 
This small modification will add a Info Box that is shown when a new thread is started.

It can be used to "remember" the users to follow the posting guidelines.

open admincp:
styles & templates -> Style Manager -> edit templates -> New posting templates -> newthread

look for:
Code:

<tr>
        <td class="tcat">
                <span class="smallfont" style="float:$stylevar[right]"><strong>$vbphrase[forum]</strong>: <a href="forumdisplay.php?$session[sessionurl]f=$foruminfo[forumid]">$foruminfo[title]</a></span>
                $vbphrase[post_new_thread]
        </td>
</tr>

below add your code
Code:

<tr>
        <td class="panelsurround">
<div class="panel">

<b><font size="4">Important:</font></b>

<ul>
<li>Rule 1:</li>
<li>Rule 2:</li>
<li>Rule 3:</li>
</ul>

If you do not follow this advice your post will be ignored or deleted.
        </td>
</tr>

If you want multiple lines under the Rules i.e.
  • Rule 1:
    Make sure that.....
    and please do not...
    oh and you should never
  • Rule 2:
    Make sure that.....
    and please do not...
    oh and you should never

you have to use </br> at the point you want the text to start in a new line.

i.e.
Code:

<tr>
        <td class="panelsurround">
<div class="panel">

<b><font size="4">Important:</font></b>

<ul>
<li>Rule 1:</li>
 </br>Make sure that.....
 </br>and please do not...
 </br>oh and you should never
<li>Rule 2:</li>
 </br>Make sure that.....
 </br>and please do not...
 </br>oh and you should never
<li>Rule 3:</li>
 </br>Make sure that.....
 </br>and please do not...
 </br>oh and you should never
</ul>

If you do not follow this advice your post will be ignored or deleted.
        </td>
</tr>


rmxs 06-21-2006 07:30 AM

COol Thanks :)

hotwheels 06-21-2006 12:52 PM

great idea

Grendel 06-21-2006 02:23 PM

Nice, but very invalid XHTML:

1. You can't have breaks (nor any other tag) between a closed and an open Listelement. So it has to look like this:
Code:

<li>Rule 1:
<br />Make sure that.....
<br />and please do not...
<br />oh and you should never
</li>
<li>Rule 2:
.
.
.

2. A break-tag looks like this:
Code:

<br />

Ntfu2 06-21-2006 05:13 PM

how could i use this to display in only one forum :D

edit: found the code
Code:

<if condition="in_array($forumid, array(x, y, z))">

Holidazed 06-21-2006 08:22 PM

Can this be done on a per-forum basis? I have many forums wth completely different rules. I would love to have this display the forum rules before a post is made.

COBRAws 06-21-2006 08:37 PM

is there a way so we can make this a plugin?

Ntfu2 06-22-2006 05:51 AM

Quote:

Originally Posted by bitg
Can this be done on a per-forum basis? I have many forums wth completely different rules. I would love to have this display the forum rules before a post is made.


See my post above yours for the code to do it per forum.

Holidazed 06-22-2006 12:22 PM

Quote:

Originally Posted by Ntfu2
See my post above yours for the code to do it per forum.

OK, but does that code make and ACP option to add an info box to the individual forum newthread or reply screens?

Avalon111 06-22-2006 12:25 PM

Quote:

Originally Posted by bitg
OK, but does that code make and ACP option to add an info box to the individual forum newthread or reply screens?

nope. that would require a extensive modification.

and before you ask. i can not do it. this is just how i was able to get such a Info Box into my forum :)

Holidazed 06-23-2006 03:26 PM

Thank you for the reply. This is useless to me, but maybe helpful to others.

SHalliday 06-28-2006 07:19 PM

Just what I needed. Thank you very much, as I "click Install"

Hornbone 07-01-2006 05:08 PM

I love it, very helpful!

zeroality 07-26-2006 05:41 AM

Can we set specific forums for this to be set up in?

I have a development subforum that would benefit greatly from this but it wouldn't really be useful anywhere else on my forums.

Avalon111 07-26-2006 05:48 AM

Quote:

Originally Posted by zeroality
Can we set specific forums for this to be set up in?

as it only is a simple template edit -> NO

maybe a advanced coder can take this a few steps further ;)

but you can try this -> post#5

chkdgate 07-27-2006 05:34 AM

Very simple and effective. Thank you. *installed*

JD210 08-05-2006 01:09 PM

Very nice. Is it possible to use this for posting Replys as well?

PoetJA-1975 09-29-2006 02:53 AM

Very helpful - thanx for the sharing - hits install :)

Jacquii.

Gizmo5h1t3 10-10-2006 11:51 AM

very useful addition...thanks mate.

simalert 10-17-2006 01:34 PM

Quote:

Originally Posted by JD210
Very nice. Is it possible to use this for posting Replys as well?

Yes, I've set that up on my own forum so you get a different notice for new threads and one for replies.

Simlpy search for this code instead in the Newreply template
Code:

<td class="tcat">
                <span class="smallfont" style="float:$stylevar[right]"><strong>$vbphrase[thread]</strong>: <a href="showthread.php?$session[sessionurl]t=$threadinfo[threadid]">$threadinfo[title]</a></span>
                $vbphrase[reply_to_thread]
        </td>
</tr>

and paste your new code under that.

DPSR 10-18-2006 02:13 PM

Thanks Avalon111 for the hack, hope it works on vb3.6.2 :D
EDIT: Workin fine ;)

Thanks simalert for reply template edit.

siraxi 12-05-2008 03:30 AM

Yes, small piece of code, but very useful. Thank you.


All times are GMT. The time now is 02:55 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01114 seconds
  • Memory Usage 1,762KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (22)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete