Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
themes-topic
Display specific group
Avatar
Moggle
Member
Free Members
sp_UserOfflineSmall Offline
Mar 6, 2012 - 6:06 am

I've added in the brackets and it hasn't made any difference.  I'm not in any rush so take your time in looking into this.  I'm going to keep working on this to see if i've missed anything.

 

Thank you!

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 6, 2012 - 8:07 pm

well, technically you can use the : and endif, but harder to read... plus it helps if you have the indentation correct...

can you repost your corrected code?

Avatar
Moggle
Member
Free Members
sp_UserOfflineSmall Offline
Mar 7, 2012 - 2:44 am

Hi Mr Papa,

I assume you mean the code that i have posted but with the correct indentations, well here goes:

<?php
# --------------------------------------------------------------------------------------
#
#    Simple:Press Template
#    Theme        :    myTheme
#    Template    :    group
#    Author        :    Simple:Press
#
#    The 'group' template is used to display the Group/Forum Index Listing
#
# --------------------------------------------------------------------------------------

# Start the Group Loop
# ----------------------------------------------------------------------
if( $spThisForum->group_id == $spThisGroup->group_id ) :

    # Start the 'groupHeader' section
    # ----------------------------------------------------------------------
    sp_SectionStart('tagClass=spGroupViewSection', 'groupHeader');
        sp_GroupHeaderName('tagClass=spHeaderName');
    sp_SectionEnd('tagClass=spGroupViewSection', 'groupHeader');

    sp_SectionStart('tagClass=spGroupViewSectionBox', 'groupHeader');
        sp_SectionStart('tagClass=spGroupViewForumBox', 'groupHeader');
            # Start the Forum Loop
            # ----------------------------------------------------------------------
            if (sp_this_forum()):

                # Start the 'forum' section
                # ----------------------------------------------------------------------
                sp_SectionStart('tagClass=spGroupForumSection', 'forum');

                # Column 1 of the forum row
                # ----------------------------------------------------------------------
                    sp_ColumnStart('tagClass=spColumnSection spLeft&width=12%&height=55px');
                        sp_ForumIndexIcon('tagClass=spRowIcon spLeft');
                    sp_ColumnEnd();

                    # Column 2 of the forum row
                    # ----------------------------------------------------------------------
                    sp_ColumnStart('tagClass=spColumnSection spLeft&width=80%&height=55px');
                        sp_ForumIndexName('tagClass=spRowName', __sp('Browse topics in %NAME%'));
                        sp_ForumIndexDescription('tagClass=spRowDescription');
                        sp_ForumIndexPageLinks('tagClass=spInRowPageLinks spLeft', __sp('Jump to page %PAGE% of topics'));
sp_ForumIndexSubForums('icon=0', '', __sp('Browse topics in %NAME%'));                        sp_InsertBreak();        
                    sp_ColumnEnd();
                            sp_InsertBreak();

                sp_SectionEnd('', 'forum');

            else:
                sp_NoForumsInGroupMessage('tagClass=spMessage', __sp('There are no forums in this group'));
            endif;

        sp_SectionEnd('', 'groupHeader');
    sp_SectionEnd('', 'groupHeader');
endif;
?>

 

This is posted in GroupSubView.php. If you need anymore info, feel free to ask. Thanks

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 8, 2012 - 9:07 pm

sorry, you were working with Andy and not sure what you are doing?  this is your theme?

you might to verify that $spThisForum->group_id is set up at the time you are checking it...  think it doesnt get set up until the sp_this_forum() call...

Avatar
Moggle
Member
Free Members
sp_UserOfflineSmall Offline
Mar 9, 2012 - 2:36 am

Thank you for your reply.

 

Yes this is my theme.

The above code works as far as only displaying the current forum and the topics associated with the forum as shown below:

http://i43.tinypic.com/35iaw7m.jpgImage Enlarger

For Example:

  • Viewing topics of Forum B which belongs to Group A on the right
  • Only displaying Group A and Forum B on the left
  • No Group A Header

However I want it to display the group heading and its associated forums with the topics that I am currently viewing:

For Example:

  • Viewing topics of Forum B which belongs to Group A on the right.
  • Group A and its associated forums on the left.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 9, 2012 - 9:35 am

did you consider what I said about checking the group id value too soon?

try putting this before it:

vshow($spThisForum->group_id);

and see what is reported...

Avatar
Moggle
Member
Free Members
sp_UserOfflineSmall Offline
Mar 9, 2012 - 10:19 am

thank you for the reply.

 

I've added the code above after

if (sp_this_forum()):  

and it displays the correct group ID for the forum i am looking at.

However, it would not display anything if I place it before

if( $spThisForum->group_id == $spThisGroup->group_id ) :  

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 9, 2012 - 12:09 pm

thats my point...  $spThisForum is not defined UNTIL you execute this function sp_this_forum()...

so you will need to do a bit more to get it...  take a look (data inspector) at the $spGroupView...  it contains all the forums in group...  see if you can index directly into it...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626