View Full Version : [vB3:G] Compact Forumrules


feldon27
5th December 2003, 07:38 PM
Here is a compact (2 lines instead of 8 plus <hr>) version of forumrules.

Yes, it's more to read, but you can collapse it (On vB2, I actually deleted this from my forums).

Disjunto
5th December 2003, 11:38 PM
nice, just installed. i tweaked it slightly so when it's collapsed it doesn't change width, well it doesn't for me anyway.


In forumrules find:

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="180">

and replace with:

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">


simple but it looks better, well for me :)

update: noticed this looks really poor on showthread.php :| i'm currently finding a fix

feldon27
6th December 2003, 08:43 PM
Only one problem with the code I posted. It doesn't work!

conditional != condition

I've rewritten it and posted a new attachment.

Disjunto
6th December 2003, 08:45 PM
it did work, now the attachement has gone :|

feldon27
6th December 2003, 08:52 PM
it did work, now the attachement has gone :|

Seriously, <if conditional=""> does nothing. The correct statement is <if condition="">.

Log in as guest and you will see that it says you have full privileges to post attachments, and edit and reply to posts.



The new version is much better anyway. With the way I'd written it, even if it worked, guests would just see "You may" and no end to that sentence. Now if someone has NO privileges, it says "You must register to post or reply to other's posts." Much nicer. :)


I've just removed the width rather than mess with 180 or 100%.

Disjunto
6th December 2003, 08:56 PM
ok then :) never looked at it as a guest ;)

Elmer
7th December 2003, 12:12 AM
I would installed it if I could translate it from the language sistem

'cause you aren't using phrases

:(

feldon27
7th December 2003, 12:43 AM
I would installed it if I could translate it from the language sistem

'cause you aren't using phrases

:(
I'm working on doing this with phrases but these phrases which I need to use do not work in forumrules:

$vbphrase[can_post_threads]
$vbphrase[can_reply_to_others_threads]
$vbphrase[can_edit_own_posts]
$vbphrase[vb_code]


So I guess I need to create 14 phrases for this hack! And I'm not sure which group to create the new phrases in. I'd rather not create them in GLOBAL unless absolutely necessary.

Floris
7th December 2003, 03:23 AM
Nice work, thank you for sharing :)

feldon27
7th December 2003, 07:41 AM
Right now I'm trying to do Welcome Panel. I might be able to do it with one hack vs the vB2 one which required 5.

surfhog
31st December 2003, 02:39 AM
Nice idea and I hope nobody minds? But I used 2 modifications in one:

[vB3:G] Compact Forumrules
forum rules update for warez posters

Thus:

<center><table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="315">
<thead>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumrules')"><img id="collapseimg_forumrules" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumrules].gif" alt="" border="0" /></a>
$vbphrase[posting_rules]
</td>
</tr>
</thead>
<tbody id="collapseobj_forumrules" style="$vbcollapse[collapseobj_forumrules]">
<tr>
<td class="alt1"><div class="smallfont" style="white-space:nowrap">
<if condition="($rules[postreply] == 'not') && ($rules[postnew] == 'not') && ($rules[attachment] == 'not') && ($rules[edit] == 'not')">
You must register to post or reply to other's posts.
<else />
<div style="margin-bottom: 6px;">
You may
<if condition="$rules[postnew] != 'not'"><strong>Post new threads</strong>, </if>
<if condition="$rules[attachment] != 'not'">(with Attachments)</if>
<if condition="$rules[postnew] != 'not'"><else />, </if>
<if condition="$rules[postreply] != 'not'"><strong>Reply</strong> to existing new threads, </if>
<if condition="$rules[edit] != 'not'">and <strong>Edit</strong> your own threads</if>.</div>

<div>You may use
<if condition="$foruminfo[allowbbcode]"><a href="misc.php?$session[sessionurl]do=bbcode">vB Code</a>, </if>
<if condition="$foruminfo[allowsmilies]"><a href="misc.php?$session[sessionurl]do=showsmilies">Smilies</a>, </if>
<if condition="$foruminfo[allowimages]"><a href="misc.php?$session[sessionurl]do=bbcode#imgcode">[IMG]</a> tags, </if>
<if condition="$foruminfo[allowhtml]">and HTML</if> in your posts.</div>
</div>
</if> </div></td>
</tr>
<tr>
<td class="alt1" colspan="2"><div class="smallfont" style="white-space:nowrap">
You may <b>NOT</b> post anything <b>WAREZ</b> related!<br>
You may <b>NOT</b> request any <b>WAREZ</b> in your posts!<br>
You may <b>NOT</b> have any <b>WAREZ</b> links in your posts!
</span></td>
</tr>
</tbody>
</table></center>