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.

Sub forum template change

View previous topic View next topic Go down

Sub forum template change

Post by blindbat1457 on November 25th 2011, 9:48 pm

Alright so I wanted my sub forums to look different so I changed my template to this
Code:
               <tr>
                  <td class="tc0" rowspan="2" style="padding-left: {catrow.forumrow.INC_LEVEL_LEFT};">
                     <span class="status" style="margin-right: -{catrow.forumrow.INC_WIDTH_ICON}; margin-left: -{catrow.forumrow.INC_WIDTH_ICON};">
                        <img title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" />
                     </span>
                  </td>
                  <td class="tc1" style="padding-right: {catrow.forumrow.INC_LEVEL_RIGHT}; padding-left: 10px;">
                     <h{catrow.forumrow.LEVEL} class="hierarchy"><a href="{catrow.forumrow.U_VIEWFORUM}" class="forumtitle">{catrow.forumrow.FORUM_NAME}</a></h{catrow.forumrow.LEVEL}>
                     <br />
                     {catrow.forumrow.FORUM_DESC}
                     <!-- BEGIN switch_moderators_links -->
                     <br />
                     {catrow.forumrow.switch_moderators_links.L_MODERATOR}{catrow.forumrow.switch_moderators_links.MODERATORS}
                     <!-- END switch_moderators_links -->
                  </td>
                                          <td class="tc2">{catrow.forumrow.POSTS} Posts <br /> {catrow.forumrow.TOPICS} Topics</td>
                  <td class="tcr">
                     <span>
                     <!-- BEGIN switch_topic_title -->
                     <a href="{catrow.forumrow.U_LATEST_TOPIC}" title="{catrow.forumrow.LATEST_TOPIC_TITLE}">{catrow.forumrow.LATEST_TOPIC_NAME}</a><br />
                     <!-- END switch_topic_title -->
                     {catrow.forumrow.USER_LAST_POST}
                     </span>
                  </td>
               </tr>
                                        <tr>
                                          <td colspan="3">
                                            <strong>Sub-Forums:</strong>{catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}
                                          </td>
                                        </tr>

Only problem I am having is when you view my board it shows sub-forums on ever single forum even if they don't have sub forum links. Is there a way for this to only display when sub-forums are present?

Forum preview:
http://forumthememedia.forumotion.com/

blindbat1457
Forumember

Male Posts : 667
Reputation : 6
Language : English
Location : Santa Clarita, CA

Back to top Go down

Re: Sub forum template change

Post by Guest on November 25th 2011, 10:14 pm


Guest
Guest


Back to top Go down

Re: Sub forum template change

Post by blindbat1457 on November 25th 2011, 10:23 pm

Unless I am missing something that isn't quite what I am asking for.

I created a td with a colspan of three to fit between the description, posts and latest post. I have the Sub-Forum text and the sub links showing up just fine BUT the td shows up on every category even when there are no sub links to that category.

If you go to my forum you will see what I mean.

As I said before maybe you understand what I mean and I am misunderstanding what you posted Smile

EDIT: Alright I re-read what was posted and I understand the topic which my problem is similar but it has to do with the td as well.

Alright well I am going to lunch I will be back and I BETTER see a reply, totally kidding take your time.

blindbat1457
Forumember

Male Posts : 667
Reputation : 6
Language : English
Location : Santa Clarita, CA

Back to top Go down

Re: Sub forum template change

Post by blindbat1457 on November 26th 2011, 6:08 pm

Dion, you get a chance to look at it?

If you don't have time I can try to get someone else but so far I think you are the only one with knowledge on how to do this Razz

Ankillien maybe knows?

blindbat1457
Forumember

Male Posts : 667
Reputation : 6
Language : English
Location : Santa Clarita, CA

Back to top Go down

Re: Sub forum template change

Post by blindbat1457 on November 27th 2011, 9:10 pm

I won't be bumping this a lot but would like support with this.

blindbat1457
Forumember

Male Posts : 667
Reputation : 6
Language : English
Location : Santa Clarita, CA

Back to top Go down

Re: Sub forum template change

Post by Gangstar15 on November 27th 2011, 10:27 pm

Try replace this:
Code:
<strong>Sub-Forums:</strong>{catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}
with:
Code:
<span class="sub-frm">{catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}</span>

and use this js:
Code:

$(document).ready(function () {
$('span.sub-frm').before('<strong>Sub-Forums: </strong>');
});

Gangstar15
Forumember

Female Posts : 392
Reputation : 163

http://www.designdrops.net/

Back to top Go down

Re: Sub forum template change

Post by blindbat1457 on November 27th 2011, 11:45 pm

I did this and it didn't change anything, looks the same :/

Would it be possible to do an if statement?
I don't know JS or PHP but an idea.

If sub forums are present then place TD after another TD with a colspan of 3?

Make sense? And if not it won't draw the TD.

blindbat1457
Forumember

Male Posts : 667
Reputation : 6
Language : English
Location : Santa Clarita, CA

Back to top Go down

Re: Sub forum template change

Post by Gangstar15 on November 27th 2011, 11:53 pm

Wait wait, you want this "Sub-Forums:" to be displayed only there is there is sub forums?

Gangstar15
Forumember

Female Posts : 392
Reputation : 163

http://www.designdrops.net/

Back to top Go down

Re: Sub forum template change

Post by blindbat1457 on November 27th 2011, 11:59 pm

Yeah, I only want it to show when there are actual sub forums present or else it looks stupid. If it wasn't for that I would have been done with it lol

blindbat1457
Forumember

Male Posts : 667
Reputation : 6
Language : English
Location : Santa Clarita, CA

Back to top Go down

Re: Sub forum template change

Post by tonthuong on November 28th 2011, 4:14 am

my problem too, I did as instructed but can not be resolved

tonthuong
New Member

Posts : 2
Reputation : 1
Language : Viet Nam

Back to top Go down

Re: Sub forum template change

Post by Guest on November 28th 2011, 4:39 am

All you need to do is to replace this ENTIRE line:

Code:
<strong>Sub-Forums:</strong>{catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}
with this:

Code:
<script type="text/javascript">
//<![CDATA[
var x='{catrow.forumrow.LINKS}';
if (x!='') {document.write('<b>Subforums:</b>{catrow.forumrow.L_LINKS}' + x);}
//]]>
</script>
And things should look as you want. Read the post in the link I provided above for why I say "should".

Guest
Guest


Back to top Go down

Re: Sub forum template change

Post by blindbat1457 on November 28th 2011, 7:10 am

So in other words I am one of those limitations?

Is there no way to create an if statement for the td?

blindbat1457
Forumember

Male Posts : 667
Reputation : 6
Language : English
Location : Santa Clarita, CA

Back to top Go down

Re: Sub forum template change

Post by Guest on November 28th 2011, 7:48 am

In that case, you will need to remove the entire row structure:

Code:
<tr>
    <td colspan="3">
        <strong>Sub-Forums:</strong>{catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}
    </td>
</tr>
and replace it with this:

Code:
<script type="text/javascript">
//<![CDATA[
var x='{catrow.forumrow.LINKS}';
if (x!='') {document.write('<tr><td colspan="3"><b>Subforums:</b> {catrow.forumrow.L_LINKS}' + x + '</td></tr>');}
//]]>
</script>

Guest
Guest


Back to top Go down

Re: Sub forum template change

Post by blindbat1457 on November 28th 2011, 9:02 am

Dion I hate you (not really) but I am jealous on all the stuff you know. How did you begin learning JS, PHP and all?

It isn't 100% of what I want but I can deal with it I guess.

Here is exactly what I want, although I am assuming that is going to far though. If it isn't an easy fix then don't worry about it Smile I will deal with it and appreciate your help by far.

http://img502.imageshack.us/img502/1082/61044128.jpg

blindbat1457
Forumember

Male Posts : 667
Reputation : 6
Language : English
Location : Santa Clarita, CA

Back to top Go down

Re: Sub forum template change

Post by Guest on November 28th 2011, 8:10 pm

The fix is simple...throw away the garbage and switch to a real board type. Razz


Guest
Guest


Back to top Go down

Re: Sub forum template change

Post by petros_7 on November 28th 2011, 8:18 pm

Dion for punBB?Because this code if i put some subcategories does not shows....

petros_7
Forumember

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

http://www.thegreeksenergy.com/forum

Back to top Go down

Re: Sub forum template change

Post by blindbat1457 on November 28th 2011, 10:12 pm

@dion wrote:The fix is simple...throw away the garbage and switch to a real board type. Razz


Hey I would if I could but we are using Forumotion and I like some of the features that punBB has to offer other wise if I could switch databases I would use phpBB or maybe even vBulletin.

EDIT: Forgot to mention that didn't do anything but mess up my forum, not sure but either way I am pretty happy with the results.

blindbat1457
Forumember

Male Posts : 667
Reputation : 6
Language : English
Location : Santa Clarita, CA

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