The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Show Name "SubForums:"

View previous topic View next topic Go down

Solved Show Name "SubForums:"

Post by dmwdead909 on September 28th 2011, 11:48 am

Hi I was wondering if there was anyway so if you have sub forums it says that name:
SubForums: And Here All the SubForums The Section has.

dmwdead909
Forumember

Male Posts : 124
Reputation : 0
Language : English
Location : Pomona

http://lmc-forums.inmyclan.com

Back to top Go down

Solved Re: Show Name "SubForums:"

Post by Mati on September 28th 2011, 1:45 pm

Not possible at moment sorry. Sad

Mati
Active Poster

Posts : 1882
Reputation : 283
Language : || HTML || CSS || jQuery ||
Location : At the Gym

http://footballforums.forumotion.net/

Back to top Go down

Solved Re: Show Name "SubForums:"

Post by dmwdead909 on September 28th 2011, 2:28 pm

Im pretty sure someone knows how to do it. I mean I can do it except my way shows it even on the forums that dont have a sub forum.

What I did is go to the the INDEX_BOX template and put it right in this part
This is original
Code:
                     <!-- END switch_moderators_links -->
                     {catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}
                     <strong>{forumrow.L_SUBFORUM_STR}</strong> {forumrow.SUBFORUMS}

This is what i did
Code:
                     <!-- END switch_moderators_links --> I WROTE SUB FORUMS HERE:
                     {catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}
                     <strong>{forumrow.L_SUBFORUM_STR}</strong> {forumrow.SUBFORUMS}

Only problem like I said it puts it for all the Sections even if they dont have a Sub Forum.

dmwdead909
Forumember

Male Posts : 124
Reputation : 0
Language : English
Location : Pomona

http://lmc-forums.inmyclan.com

Back to top Go down

Solved Re: Show Name "SubForums:"

Post by Mati on September 28th 2011, 2:44 pm

yeah that's the problem mate.

Mati
Active Poster

Posts : 1882
Reputation : 283
Language : || HTML || CSS || jQuery ||
Location : At the Gym

http://footballforums.forumotion.net/

Back to top Go down

Solved Re: Show Name "SubForums:"

Post by petros_7 on September 28th 2011, 3:06 pm

Is there a solution for phpBB2??

petros_7
Forumember

Male Posts : 341
Reputation : 2
Language : Greek
Location : Greece

http://www.thegreeksenergy.com/forum

Back to top Go down

Solved Re: Show Name "SubForums:"

Post by Nera. on September 28th 2011, 3:21 pm

Hi,

AP > Display > Structure and hijerarhy > Sub-level links on index : Yes

Wouldn't that do what you want or you are thinking on something else?

Nera.
Energetic

Female Posts : 7077
Reputation : 2013
Language : English
Location : -

http://webartzforum.com

Back to top Go down

Solved Re: Show Name "SubForums:"

Post by petros_7 on September 28th 2011, 3:37 pm

Νο no i know it...Nera i want to put the word SubForums:

petros_7
Forumember

Male Posts : 341
Reputation : 2
Language : Greek
Location : Greece

http://www.thegreeksenergy.com/forum

Back to top Go down

Solved Re: Show Name "SubForums:"

Post by Nera. on September 28th 2011, 3:44 pm

That's easy, go to your index_box and find this {catrow.forumrow.LINKS}
Write it before that.

Nera.
Energetic

Female Posts : 7077
Reputation : 2013
Language : English
Location : -

http://webartzforum.com

Back to top Go down

Solved Re: Show Name "SubForums:"

Post by petros_7 on September 28th 2011, 3:50 pm

You are master!thank you again Wink

petros_7
Forumember

Male Posts : 341
Reputation : 2
Language : Greek
Location : Greece

http://www.thegreeksenergy.com/forum

Back to top Go down

Solved Re: Show Name "SubForums:"

Post by Mati on September 28th 2011, 3:52 pm

Yes but that shows on every forums even on those forums who doesn't have Subforums: Wink

Mati
Active Poster

Posts : 1882
Reputation : 283
Language : || HTML || CSS || jQuery ||
Location : At the Gym

http://footballforums.forumotion.net/

Back to top Go down

Solved Re: Show Name "SubForums:"

Post by petros_7 on September 28th 2011, 3:53 pm

Become self to look only to the categories SubForums:

petros_7
Forumember

Male Posts : 341
Reputation : 2
Language : Greek
Location : Greece

http://www.thegreeksenergy.com/forum

Back to top Go down

Solved Re: Show Name "SubForums:"

Post by dmwdead909 on September 29th 2011, 7:05 am

Yea like Bender said it puts it on every Forum even if it dont have a sub forum.

dmwdead909
Forumember

Male Posts : 124
Reputation : 0
Language : English
Location : Pomona

http://lmc-forums.inmyclan.com

Back to top Go down

Solved Re: Show Name "SubForums:"

Post by Guest on September 29th 2011, 8:06 am

Since I'm in a good mood tonight, I'm going to share one of the biggest secrets about templates. Nera was on the right track, but what's needed is a way to only display the text if subforums actually exist.

Javascript to the rescue!

What, you say? You can't do that because {catrow.forumrow.LINKS} is a PHP variable? OF COURSE YOU CAN! Since the PHP interpreter replaces variables before writing out the HTML page, it is possible to use PHP variables in template scripts if you have some basic knowledge of PHP and some advanced knowledge of javascript. And in this situation it's possible.

So...replace the {catrow.forumrow.LINKS} variable in the index_box template with the following and you should have exactly what you want. I say "should" because there are some limitations, though it's unlikely you will encounter one.

Code:
<script type="text/javascript">
//<![CDATA[
var x='{catrow.forumrow.LINKS}';
if (x!='') {document.write('Subforums: ' + x);}
//]]>
</script>
Don't ask me how or why this works, or what the limitations are. My mood isn't good enough for that. Wink

Guest
Guest


Back to top Go down

Solved Re: Show Name "SubForums:"

Post by dmwdead909 on September 29th 2011, 8:41 am

Thanks that worked.

dmwdead909
Forumember

Male Posts : 124
Reputation : 0
Language : English
Location : Pomona

http://lmc-forums.inmyclan.com

Back to top Go down

Solved Re: Show Name "SubForums:"

Post by Nera. on September 29th 2011, 5:03 pm

Solved > Locked

Nera.
Energetic

Female Posts : 7077
Reputation : 2013
Language : English
Location : -

http://webartzforum.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum