Uutiset:

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

Main Menu
Advertisement:

hidden forums feature?

Aloittaja darknovember, tammikuu 19, 2014, 08:45:52 IP

« edellinen - seuraava »

darknovember

unsure if this is where I need to be posting this or not but,
I was wondering if there was a mod somewhere to where parts of the forum could be viewable by anyone logged in or not via clicking a link and NOT be listed on the index page
to be more specific a hidden category

margarett

That can be done with a little tweak in BoardIndex.template.php, by skipping the relevant "foreach" loop if the category id equals a proper number. I'm not on the computer now, if no one picks it up I will tell you later how to do it ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

LainaaOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

margarett

#2
OK, taking the following setup as example:


I have a category I want to hide from BoardIndex. This category has ID 2
Inside I have boards with ID 3 and 4.

Now, I go to BoardIndex.template.php and find:

// If theres no parent boards we can see, avoid showing an empty category (unless its collapsed)
if (empty($category['boards']) && !$category['is_collapsed'])
continue;

Replace with:

// If theres no parent boards we can see, avoid showing an empty category (unless its collapsed)
if ((empty($category['boards']) && !$category['is_collapsed']) || $category['id'] == 2)
continue;

(note the "== 2"? That's the relevant category ID)
So it is gone now:


But I can still access the boards directly via www.forum_address.com/index.php?board=3.0 or www.forum_address.com/index.php?board=4.0 (3 and 4 are the board IDs that became hidden).
This way you will keep all the permissions you can set for a board. Also, the contents will still show in recent posts, unread messages, etc.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

LainaaOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

darknovember

wonder if im editing this properly x.x here is the path to the boardindex.template.php that i edited
/public_html/testforum/Themes/default
its in the themes directory, for the default theme.
thats the only place i know that that file is at haha, anyhow, when i make the change it just crashes the forum
"testforum/index.php?action=collapse;c=2;sa=collapse;f833db2=6fd03db8f1cd73cb2501be5845358ea7#c2"
is the actual link to the catagory that im trying to "hide" , its the second catagory there.
im running on smf  version  2.0.2  with the default core theme .

only other place i can figure that it could be changed at is
/public_html/testforum/Sources
on the boardindex.php file, but i have not tried editing it there as of yet....

margarett

Please attach your file here, with the changes that crash your forum
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

LainaaOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

darknovember


darknovember

ill probably get in trouble for doing this but,
bump~

margarett

I'm sorry, I missed this.

The file you attached doesn't have the changes I proposed you to do.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

LainaaOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

emanuele

Create a board (accessible only to admins) and put all the other boards as child of that one.

ETA: the only drawback is that the linktree will show the "admin-only" board, and if someone would click on it he gets an error.


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

darknovember

#9
at times i feel like such a noob haha on the topic id i needed 2.0 not 2 , haha got it now
thanks so much margarett

Thanks to you too emanuele , haha its a good idea , would of used it if i couldent get this figured out

Advertisement: