News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Good Question Here

Started by thinklab71, March 31, 2018, 07:59:06 PM

Previous topic - Next topic

thinklab71

Is there a way I can disable the stats from showing on the top level pages?

I am trying to use a State, City and Category.    People only post to the category, but the stats never reach the main level (state) only the City. 
Is there a way I can not show the stats on the main level? instead of a bunch of zeros that make the site look dead?

Also in each city, I have the same 7 groups, is there a easier way to build this out then adding 7 each time I add a city?

br360

I'm guessing you don't really want to remove the posts and topic count, just have the child board posts show in the stats? If so-Go to  Admin » Boards » Settings and then check Count child's posts in parent's totals

That will count all posts made in child/sub boards on the main index page. (This will not count child boards of child boards though)

My recommendation if you do have sub boards of other sub boards (grand child boards), would be to move them alongside the other sub boards and not place them so deep.




thinklab71

Ok,  that won't really work. How about this.  On the parent directory,  can I hide the child boards?

For example  it will show the parent list like i.e. California, Nevada but it will not show to cities under it aka ( child boards) They can still click on the parant name that way I'll save space on the main page by not showing the child names

br360

You can use this mod to hide the child boards from the main index- http://custom.simplemachines.org/mods/index.php?mod=2864

thinklab71

The package you are trying to download or install is either corrupt or not compatible with this version of SMF.

I tried this on the 2 default themes.

br360


thinklab71

Thank you so much. I got it now :-) by doing it.

I have one more issue,  Is there a way I can make this into 3 column vs just one?  I don't want this list getting to long with what seems like a lot of empty space I would love you use up


thinklab71

Thank you so much, it worked, but the issue is I installed the mod to prevent the showing of the child boards on the home page.  When I turn this on, it shows the child boards on the home page.  I only want to see it on the 2nd level page like it shows.  No child boards are to show on home page.

Shambles

Ok, if I've understood you correctly...

Make a backup copy of Themes/default/BoardIndex.template.php then

Code (Find) Select

if(!empty($board['children']) && !empty($modSettings['tidy_child_boards']) && $modSettings['tidy_child_boards'] > 0)
tidyBoards($board);



Code (Replace with) Select

unset($board['children']);


See how that looks.

thinklab71

I changed it, but when I turn on the 3 columns, it still shows on the home page and un hides the child boards

Shambles

Hmm I tried it on my installation and it worked fine - no child boards on the main index (because of the unset($board['children']))

Can you attach your edited Themes/default/BoardIndex.template.php file?

thinklab71


Shambles

Hmm tricky - what you attached should show no child boards on the main index.

You even have some other mod that cancels child board display:

if (!empty($modSettings['kill_all_children']) || in_array($board['id'], $context['kill']))
$board['children'] = array();



I'll have another look at it later on.

thinklab71

Yes, I don't get the child board on the home page due to the other mod, but when i activate the one you told me and add 3 column, it shows up on the main index page

Shambles

Try the attached.

If it doesn't do what you want, uninstall the mod I suggested and we can think of another solution.


thinklab71

no luck,   uninstall this last one you send me?

Shambles

Regress all the changes I suggested (ie, reinstall the backup you took) then uninstall the "tidy child boards" mod.

thinklab71


Shambles

One quick question here.

When you made the edits I suggested, did you do a hard refresh on your board index?

The first edit prevented the child boards being populated/recognised. The second prevented display of child boards. One of them should have worked.

Advertisement: