how to set value in smf Cookie

Started by Shrink, July 10, 2014, 10:32:06 AM

Previous topic - Next topic

Shrink

Hi guys
i need to set collapse upshirnk section which is placed at top.
i found that we can do this by setting value of "name" - upshrink & "value" =1 in cookies Where PHPSESSID is stored.
please help me how to set such value in smf or where i can find that source code which sets PHPSESSID in cookie.
Thanks

Arantor

So, let me get this straight, you're trying to have the top area collapsed by default...? If so, why? There's useful stuff up there.

Sir Osis of Liver

If you want to load with header collapsed, and allow users to uncollapse it -

index.template.php



// Define the upper_section toggle in JavaScript.
echo '
<script type="text/javascript"><!-- // --><![CDATA[
var oMainHeaderToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_header']) ? 'true' : 'true', ',
aSwappableContainers: [
\'upper_section\'
],



If you want to load with header collapsed, and not allow users to uncollapse it -



// Define the upper_section toggle in JavaScript.
echo '
<script type="text/javascript"><!-- // --><![CDATA[
var oMainHeaderToggle = new smc_Toggle({
bToggleEnabled: false,
bCurrentlyCollapsed: ', empty($options['collapse_header']) ? 'true' : 'true', ',
aSwappableContainers: [
\'upper_section\'
],



Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Shrink

Quote from: ‽ on July 10, 2014, 01:36:32 PM
So, let me get this straight, you're trying to have the top area collapsed by default...? If so, why? There's useful stuff up there.
Correct bro!!

Shrink

Quote from: Krash on July 10, 2014, 04:16:26 PM
If you want to load with header collapsed, and allow users to uncollapse it -

index.template.php



// Define the upper_section toggle in JavaScript.
echo '
<script type="text/javascript"><!-- // --><![CDATA[
var oMainHeaderToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_header']) ? 'true' : 'true', ',
aSwappableContainers: [
\'upper_section\'
],



If you want to load with header collapsed, and not allow users to uncollapse it -



// Define the upper_section toggle in JavaScript.
echo '
<script type="text/javascript"><!-- // --><![CDATA[
var oMainHeaderToggle = new smc_Toggle({
bToggleEnabled: false,
bCurrentlyCollapsed: ', empty($options['collapse_header']) ? 'true' : 'true', ',
aSwappableContainers: [
\'upper_section\'
],


Thanks for this awesome help!

Advertisement: