Support Forum
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?
Visit Cruise Talk Central and Mr Papa's World
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
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...
Visit Cruise Talk Central and Mr Papa's World
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:
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.
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...
Visit Cruise Talk Central and Mr Papa's World
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...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)