solved Forum Redirect option

gary.moncrieff
gary.moncrieff
@garymoncrieff
11 years ago
865 posts
Hey

Having the option to redirect a forum category link to another location would be nice.

Regards
updated by @garymoncrieff: 12/17/14 06:35:16PM
michael
@michael
11 years ago
7,768 posts
go ahead and explain that just a little more please.

What I'm guessing at is: "it looks like a forum category on the top level, but goes somewhere completely different."

Which seams weird.
gary.moncrieff
gary.moncrieff
@garymoncrieff
11 years ago
865 posts
Yes that's it, its a really useful feature in vb and other forum software.
michael
@michael
11 years ago
7,768 posts
I haven't used those systems, could you explain how its useful.

You could probably do it right now via a module to intercept the url.
gary.moncrieff
gary.moncrieff
@garymoncrieff
11 years ago
865 posts
A lot of users will still prefer the forum to report problems or ask for new features etc, a false forum pointing to respective area of tracker will help reduce this.
michael
@michael
11 years ago
7,768 posts
Ah, I see what your saying. The forums have:

* General Discussion
* Specific Topic 1
* Specific Topic 2
* Backstage
* Report a Problem

Where "Report a Problem" redirects to the tracker system. Gotcha. Thanks.
michael
@michael
11 years ago
7,768 posts
To do it for your system right now, the template you want is:
/modules/jrForum/templates/item_categories.tpl

You can over-ride that by copying it to
/skin/YOUR-SKIN/jrForum_item_categories.tpl

Then locate this section:
    {if is_array($_items)}
    <div class="block_content">
        <div class="item">
        {foreach from=$_items item="cat"}
            <div class="p5 mb5">
                <div>
                    <a href="{$jamroom_url}/{$profile_url}/{$murl}/{$cat.cat_title_url}">
                    {if $cat.cat_new_topic_posts == '1' && $cat.cat_topic_count > 0}
                        <div class="forum_post_count forum_post_count_new{$pinned_class}">
                    {else}
                        <div class="forum_post_count{$pinned_class}">
                    {/if}
                    {$cat.cat_topic_count|number_format} {jrCore_lang module="jrForum" id="60" default="topics"} {if $cat.cat_update_user._user_id > 0}<span style="display:inline-block;margin-left:6px" title="{jrCore_lang module="jrForum" id="34" default="update by"} {$cat.cat_update_user.user_name}, {$cat.cat_updated|jrCore_format_time:false:"relative"}">{jrCore_module_function function="jrImage_display" module="jrUser" type="user_image" item_id=$cat.cat_update_user._user_id size="small" crop="auto" width="32" alt=$cat.cat_update_user.user_name}</span>{/if}
                    </div></a>

                    <h2><a href="{$jamroom_url}/{$profile_url}/{$murl}/{$cat.cat_title_url}">{$cat.cat_title}</a></h2>
                    <br><span class="normal">
                    {if strlen($cat.cat_desc) > 0}
                        &raquo; {$cat.cat_desc}
                    {else}
                        &nbsp;
                    {/if}
                    </span>
                </div>
            </div>
        {/foreach}
        </div>

    </div>
    {/if}

That is the foreach loop that displays the categories.

You can add your link in at the bottom of that.
eg:

    {if is_array($_items)}
    <div class="block_content">
        <div class="item">
        {foreach from=$_items item="cat"}
            <div class="p5 mb5">
                <div>
                    <a href="{$jamroom_url}/{$profile_url}/{$murl}/{$cat.cat_title_url}">
                    {if $cat.cat_new_topic_posts == '1' && $cat.cat_topic_count > 0}
                        <div class="forum_post_count forum_post_count_new{$pinned_class}">
                    {else}
                        <div class="forum_post_count{$pinned_class}">
                    {/if}
                    {$cat.cat_topic_count|number_format} {jrCore_lang module="jrForum" id="60" default="topics"} {if $cat.cat_update_user._user_id > 0}<span style="display:inline-block;margin-left:6px" title="{jrCore_lang module="jrForum" id="34" default="update by"} {$cat.cat_update_user.user_name}, {$cat.cat_updated|jrCore_format_time:false:"relative"}">{jrCore_module_function function="jrImage_display" module="jrUser" type="user_image" item_id=$cat.cat_update_user._user_id size="small" crop="auto" width="32" alt=$cat.cat_update_user.user_name}</span>{/if}
                    </div></a>

                    <h2><a href="{$jamroom_url}/{$profile_url}/{$murl}/{$cat.cat_title_url}">{$cat.cat_title}</a></h2>
                    <br><span class="normal">
                    {if strlen($cat.cat_desc) > 0}
                        &raquo; {$cat.cat_desc}
                    {else}
                        &nbsp;
                    {/if}
                    </span>
                </div>
            </div>
        {/foreach}
            <div class="p5 mb5">
                <div>
                    <h2><a href="{$jamroom_url}/link/to/wherever/">Report a Problem</a></h2>
                </div>
            </div>
        </div>

    </div>
    {/if}

Or you could adjust the same file in the template editor if you wanted to do it that way too.

ACP -> FORUM MODULE -> TEMPLATES -> item_categories.tpl
gary.moncrieff
gary.moncrieff
@garymoncrieff
11 years ago
865 posts
Thanks Michael. The more I use and understand Jamroom the more I really like it.
michael
@michael
11 years ago
7,768 posts
Nice one Gary. :)

One of the concepts aimed for in JR5 was "make it as minimal as possible but with ways to extend it."

Because if we put something in then its sometimes hard to turn off for those that don't want it.

Glad to hear your sorted.
gary.moncrieff
gary.moncrieff
@garymoncrieff
11 years ago
865 posts
Thanks again

I had to make one minor change to ensure the links only show on the Community profile forum and not on any other forum in case I decide to allow members to use them.

Tags