Log in

View Full Version : Sub-Forums


TravisWPaquin
09-10-2012, 04:41 PM
<font face="Century Gothic">Hello, I have a question regarding Sub-forums. I see on other forums that they have the bold text that normally says "sub-forums" replaced with another name such as "Check this." I replaced the sub-forum to say what I wanted it to, but now I can't choose sub-forums when I need it to. How do I make an additional phrase and still keep it to say sub-forums?

Thanks!</font>

Lynne
09-10-2012, 05:30 PM
I'm not sure I follow. Do you have images to show what it currently looks like and what you want it to look like?

TravisWPaquin
09-10-2012, 06:46 PM
For example, I have replaced the phrase "Sub-Forums" with "Don't forget to check:" which you can see here (http://i.imgur.com/01q5H.png). Since I edited the phrase it doesn't show Sub-forums anymore as you can see here (http://i.imgur.com/huul5.jpg).


However, this forum has multiple phrases. Which I can't figure out how they did it.
http://i.imgur.com/dNpBS.jpg

I apologize if I am still unclear to you.

Lynne
09-10-2012, 10:31 PM
Ah, OK, so you only want it changed for some forums. You will need to edit the template and replace the phrase with a condition like:

<if condition="$forum[forumid] == xx">Custom Text here<else />phrase here</if>

TravisWPaquin
09-10-2012, 11:34 PM
What template would I be editing? I'm learning with Vb, fairly new.

Thanks!

Lynne
09-11-2012, 03:09 PM
Ah, sorry..... To find the template to modify, do this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code. (Sometimes the template is the one mentioned at the very top of the page source.)

TravisWPaquin
09-12-2012, 06:14 PM
Okay, I added the code where the phrase is and now I got this where the sub-forums used to be: Custom Text herephrase here:

How do I make it what I want it to say?

Lynne
09-12-2012, 06:29 PM
You would change "Custom Text Here" to what you want it to say, and change "phrase here" to the phrase that was listed there - $vbphrase[something]. (You can see the default template by clicking View Default.)

TravisWPaquin
09-12-2012, 07:05 PM
I'm confused and I'm not sure how this would give me options on different sub-forums if it's one phrase only.

Lynne
09-12-2012, 08:47 PM
Well, if you have several forums you want to do this on, you would expand the condition a bit. Or, you can write a plugin to do the same thing. Are you familiar with php coding at all?

TravisWPaquin
09-12-2012, 09:02 PM
Well, if you have several forums you want to do this on, you would expand the condition a bit. Or, you can write a plugin to do the same thing. Are you familiar with php coding at all?

No, I'm actual not. That's not something I have ever done.

Lynne
09-13-2012, 02:35 AM
A plugin like:

hook location - forumbit_display
if ($forum[forumid] == 4) $vbphrase[subforums] = "Forumid 4";

That would change the phrase only for forumid 4. You would add similar conditions for the other forumids you wish to change.