IP.Board 2.3: Collapsible forum rules
Started by Martin, Aug 13 2008 01:44 AM
13 replies to this topic
#1
Posted 13 August 2008 - 01:44 AM
This is the support topic for the tutorial Collapsible forum rules. Please post here if you have any questions or feedback.
#2
Posted 13 August 2008 - 02:32 AM
Thanks for the tut! It very useful. 
However it doesn't remember your preferences. =/ So you need to change the PHP code you add to this:
Thanks again for the great tut. It works!
However it doesn't remember your preferences. =/ So you need to change the PHP code you add to this:
//-----------------------------------------
// Collapsible forum rules
// by m4rtin @ InvisionModding.com
//-----------------------------------------
$cids = ','.$this->my_getcookie('collapseprefs').',';
$rules['fo'] = 'show';
$rules['fc'] = 'none';
if ( strstr( $cids, ",rules_".$forum['id']."," ) ) {
$rules['fo'] = 'none';
$rules['fc'] = 'show';
}
$rules['f_id'] = $forum['id'];
Thanks again for the great tut. It works!
Edited by herbivore, 13 August 2008 - 02:35 AM.

Over
Modifying modifications. Look! Some Tutorials.
Get the FREE Downloads Script and help it grow.
#3
Posted 13 August 2008 - 02:37 AM
Just a lack of a comma there. Tutorial updated.
And using '. $var .' is so ugly
"{$var}" is so much better looking
And using '. $var .' is so ugly
My: Modifications · Tutorials · Twitter

#4
Posted 13 August 2008 - 02:38 AM
m4rtin, on Aug 13 2008, 10:37 AM, said:
Just a lack of a comma there. Tutorial updated.
And using '. $var .' is so ugly
"{$var}" is so much better looking 
And using '. $var .' is so ugly
Thanks for the update.

Over
Modifying modifications. Look! Some Tutorials.
Get the FREE Downloads Script and help it grow.
#5
Posted 13 August 2008 - 11:21 AM
Great! Thank's m4rtin and herbivore.
#6
Posted 13 August 2008 - 12:08 PM
I get this ...
Parse error: syntax error, unexpected '(', expecting '}' in /home/.patachou/********/********.com/sources/ipsclass.php on line 3474
This is line 3474 ...
$cids = ",{$this->my_getcookie( 'collapseprefs' )},";
When I take off the edit it works again.
Also, as I mentioned in my original thread, 'borderwrap' doesn't work in Forum Rules unless you only use text. If you add an image, or a table, etc., it stuffs up. I get over this by substituting 'borderwrap' with 'row1'.
That was why I re-wrote the template bit in the first place.
Parse error: syntax error, unexpected '(', expecting '}' in /home/.patachou/********/********.com/sources/ipsclass.php on line 3474
This is line 3474 ...
$cids = ",{$this->my_getcookie( 'collapseprefs' )},";
When I take off the edit it works again.
Also, as I mentioned in my original thread, 'borderwrap' doesn't work in Forum Rules unless you only use text. If you add an image, or a table, etc., it stuffs up. I get over this by substituting 'borderwrap' with 'row1'.
That was why I re-wrote the template bit in the first place.
Edited by SergeantSkinner, 13 August 2008 - 12:24 PM.
#7
Posted 13 August 2008 - 12:23 PM
When I use the code in Post 2 it works.
#8
Posted 13 August 2008 - 12:28 PM
SergeantSkinner, on Aug 13 2008, 08:23 PM, said:
When I use the code in Post 2 it works.
Do you still have trouble with the borderwarp thingy?
Could you give a screenie of what you mean? Or did you manage to get what you wanted?

Over
Modifying modifications. Look! Some Tutorials.
Get the FREE Downloads Script and help it grow.
#9
Posted 13 August 2008 - 12:52 PM
If you use 'borderwrap', and add an image, etc., you get the text in a box, (borderwrap), and the image underneath, with no border around the rules.
So I substitute class="borderwrap' with class='row1'
I then add image borders.
So I substitute class="borderwrap' with class='row1'
I then add image borders.
#10
Posted 13 August 2008 - 12:53 PM
Well I wonder why borderwrap does that...
Oh well, at least its working perfectly for you now, right?
Oh well, at least its working perfectly for you now, right?

Over
Modifying modifications. Look! Some Tutorials.
Get the FREE Downloads Script and help it grow.
#11
Posted 13 August 2008 - 02:44 PM
SergeantSkinner, on Aug 13 2008, 02:08 PM, said:
I get this ...
Parse error: syntax error, unexpected '(', expecting '}' in /home/.patachou/********/********.com/sources/ipsclass.php on line 3474
This is line 3474 ...
$cids = ",{$this->my_getcookie( 'collapseprefs' )},";
When I take off the edit it works again.
Also, as I mentioned in my original thread, 'borderwrap' doesn't work in Forum Rules unless you only use text. If you add an image, or a table, etc., it stuffs up. I get over this by substituting 'borderwrap' with 'row1'.
That was why I re-wrote the template bit in the first place.
Parse error: syntax error, unexpected '(', expecting '}' in /home/.patachou/********/********.com/sources/ipsclass.php on line 3474
This is line 3474 ...
$cids = ",{$this->my_getcookie( 'collapseprefs' )},";
When I take off the edit it works again.
Also, as I mentioned in my original thread, 'borderwrap' doesn't work in Forum Rules unless you only use text. If you add an image, or a table, etc., it stuffs up. I get over this by substituting 'borderwrap' with 'row1'.
That was why I re-wrote the template bit in the first place.
Doesn't the default template use borderwrap? In that case you should have that problem even with out making the changes.
My: Modifications · Tutorials · Twitter

#12
Posted 13 August 2008 - 02:52 PM
That's right, borderwrap has never worked, except for text only.
#13
Posted 10 December 2008 - 10:25 AM
I have the following code for one of my custom skins:
<!-- Show FAQ/Forum Rules -->
<div class="catheadmid"><div class="catheadleft"><div class="catheadright"><div class="catheadtext">
<center>
{$rules['title']}
</center>
</div></div></div></div>
<div class="borderwrap8" style="clear: left;">
<div class="row6"><div class="row7">
{$rules['body']}>
</div></div></div>
<div class="catend"> </div>
<div class="catfoot"><div class="catfoot_left"><div class="catfoot_right"></div></div></div>
<br /><br /><br /><br />
<!-- End FAQ/Forum Rules -->
Can you please tell me what changes I need to make for this as its already been edited, thankyou #14
Posted 10 December 2008 - 11:05 AM
Try this, but it may not look good at all. Hard to do these kinds of changes on a custom skin, especially when you can't physically see it.
<!-- Show FAQ/Forum Rules -->
<div style="display: {$rules['fc']};" id="fc_rules_{$rules['f_id']}">
<div class="catheadmid">
<div class="catheadleft">
<div class="catheadright">
<div class="catheadtext">
<p class="expand"><a href="java script:togglecategory('rules_{$rules['f_id']}', 0);"><{E_PLUS}></a></p>
<center>
{$rules['title']}
</center>
</div>
</div>
</div>
</div>
</div>
<div style="display: {$rules['fo']};" id="fo_rules_{$rules['f_id']}">
<div class="catheadmid">
<div class="catheadleft">
<div class="catheadright">
<div class="catheadtext">
<p class="expand"><a href="java script:togglecategory('rules_{$rules['f_id']}', 1);"><{E_MINUS}></a></p>
<center>
{$rules['title']}
</center>
</div>
</div>
</div>
</div>
<div class="borderwrap8" style="clear: left;">
<div class="row6">
<div class="row7">
{$rules['body']}>
</div>
</div>
</div>
<div class="catend"> </div>
<div class="catfoot"><div class="catfoot_left"><div class="catfoot_right"></div></div></div>
</div>
<br /><br /><br /><br />
<!-- End FAQ/Forum Rules -->
My: Modifications · Tutorials · Twitter

0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users





Contributor










