Solved: 5 Years, 11 Months, 3 Weeks ago Category defauly setting help
#1
Solved: 5 Years, 11 Months, 3 Weeks ago
I have a category that will have forumsĀ  under it for all 50 states. I want the default view of the category to be closed (-) so you only see the category title. then you click on the (+) to open it up to see all sub forums.

any help appreciated.


chris
Reply
#2
Solved: 5 Years, 11 Months, 3 Weeks ago
Try to change lines 417 - 429 of inc/functions_forumlist .php from:


if(isset($collapsed[$collapsed_name]) && $collapsed[$collapsed_name] == "display: show;")
{
	$expcolimage = "collapse_collapsed.png";
	$expdisplay = "display: none;";
	$expthead = " thead_collapsed";
	$expaltext = "[+]";
}
else
{
	$expcolimage = "collapse.png";
	$expthead = "";
	$expaltext = "[-]";
}

To:
if(isset($collapsed[$collapsed_name]) && $collapsed[$collapsed_name] != "display: show;")
{
	$expcolimage = "collapse.png";
	$expthead = "";
	$expaltext = "[-]";
}
else
{
	$expcolimage = "collapse_collapsed.png";
	$expdisplay = "display: none;";
	$expthead = " thead_collapsed";
	$expaltext = "[+]";
}

I tried it with my test forum and it worked.
But it must be checked whether it works for all users.
Regards, Ad Bakker (NL)
Reply
#3
Solved: 5 Years, 11 Months, 3 Weeks ago
Will this collapse just the "Your Reviews" category? or all of them? usafoodreview.com
Reply
#4
Solved: 5 Years, 11 Months, 3 Weeks ago
As I see it all catagories, being Welcome, Your Reviews and Supporting Establishments (when that gets forums).

Simply try it.

I just see that it does not work properly, because when you unfold a category, go to a forum, and return to the index it is folded again.

This will require some further study. It can be done for one category only.
Regards, Ad Bakker (NL)
Reply
#5
Solved: 5 Years, 11 Months, 3 Weeks ago
it seems to collapse all open categories when you go to another page and come back....but I would like it to collapse on the "your reviews" category at this time. can that be done?

thanks

chris
Reply
#6
Solved: 5 Years, 11 Months, 3 Weeks ago
(2015-07-24, 09:34 PM)chris.t Wrote: but I would like it to collapse on the "your reviews" category at this time. can that be done?

I think it will be possible, but the problem that the category is closed every time you return to the index page will persist.

I will have a look at it tomorrow. For now it is childrem's bedtime here Big Grin Wink .
Regards, Ad Bakker (NL)
Reply
#7
Solved: 5 Years, 11 Months, 3 Weeks ago
Im okay with that.....tuck those children in....thanks!
Reply
#8
Solved: 5 Years, 11 Months, 3 Weeks ago
Promise is a promise.
When you replace lines 417 - 429 of inc/functions_forumlist.php by:


if ($forum['fid'] == 4)
	if(isset($collapsed[$collapsed_name]) && $collapsed[$collapsed_name] != "display: show;")
	{
		$expcolimage = "collapse.png";
		$expthead = "";
		$expaltext = "[-]";
	}
	else
	{
		$expcolimage = "collapse_collapsed.png";
		$expdisplay = "display: none;";
		$expthead = " thead_collapsed";
		$expaltext = "[+]";
	}
else
{
	if(isset($collapsed[$collapsed_name]) && $collapsed[$collapsed_name] == "display: show;")
	{
		$expcolimage = "collapse_collapsed.png";
		$expdisplay = "display: none;";
		$expthead = " thead_collapsed";
		$expaltext = "[+]";
	}
	else
	{
		$expcolimage = "collapse.png";
		$expthead = "";
		$expaltext = "[-]";
	}
}


then you achieve what you want.
I am still not happy with this solution, but I could not find something better. I also looked at the javascript involved with collapsing and expanding, but could not find the solution either.
Regards, Ad Bakker (NL)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)