Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Changing default profile plugin tab from the Stream plugin

11 years 6 months ago
Licenses:
JomSocial Expired

ISSUE SUMMARY:
When a user is logged in and goes to her profile page, i would want to set the default plugin tab from Stream to a Profile plugin i have created. if you log into the jomsocial instance you will see my plugin, Challenge Tray. Please test on our development box.

STEPS TO REPLICATE:
1
2
3
4
5
RESULT
EXPECTED RESULT
BROWSER

11 years 6 months ago
Licenses:

HI, Sean.

Plugins in tab are loaded in loop and Theme Designer you could only set Stream or About me as default tabs. I suggest you to use jQuery plugin that will change classes thus you could set any tab s active.

Just look in Google, there are many examples of such scripts.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
11 years 6 months ago
Licenses:
JomSocial Expired

I took a look at several of the web examples for adjusting tabs but they dont seem to work with the joms-tab. It seems like the lack of using the UL tags is making it different than usual. I tried these variations to find the active tab but they all returned an object instead of the a number indicating the active tab item.
$( "jom-tabs" ).tabs( "option", "active" );
$( ".jom-tabs" ).tabs( "option", "active" );
$( ".joms-tabs" ).tabs( "option", "active" );
$( ".joms-middlezone" ).tabs( "option", "active" );

I think i can handle the rest if you can point me to the right selector for the tab.

11 years 6 months ago
Licenses:

Hi, Sean.

Tabs are <a> e.g:

<a href="#joms-app--29">“My Contacts”</a>


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
11 years 6 months ago
Licenses:
JomSocial Expired

I think you misunderstood my question. I see that the tabs are in the A tags. I am trying to use the jquery tabs widget controls ( api.jqueryui.com/tabs/ ).Is that not what is being used to implement your tabs?
i am able to make the actual tab <a> active by using
$('.joms-middlezone a[href="#joms-app--1"]').addClass('active');
however this doesnt, deselect the previous item (in this case, the stream tab) or make the actual content for my tab visible.

11 years 6 months ago
Licenses:

Hi, Sean.

So maybe I assign developer to this thread.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
11 years 6 months ago
Licenses:

Hi Sean,

you can do it by using template override:
1. copy tabs.php from /components/com_community/templates/jomsocial/layouts/application/ to /templates/[your frontend template]/html/com_community/layouts/application/
2. edit it, change the code from

<div class="joms-tab__bar">
    <?php

        foreach ($apps as $app) {
            //special case for active tab (about me and fix will follow the backend settings)
            $active = true;
            if($app->id == 'feeds-special'){
                $config = CFactory::getConfig();
                $active = ($config->get('default_profile_tab') == 0) ? true : false;
            }elseif($app->id == 'aboutme-special'){
                $config = CFactory::getConfig();
                $active = ($config->get('default_profile_tab') == 1) ? true : false;
            }
            if (trim($app->data) != '') {
                ?>
                <a<?php echo (!$active || $i++) ? '' : ' class="active"' ?>
                    href="#joms-app--<?php echo $app->id; ?>"><?php echo JText::_($app->title); ?></a>
            <?php
            }
        }
    ?>
</div>
to
<div class="joms-tab__bar">
    <?php
        foreach ($apps as $app) {
            if (trim($app->data) != '') {
                ?>
                <a<?php echo ($app->id == "1") ? ' class="active"' : '' ?>
                    href="#joms-app--<?php echo $app->id; ?>"><?php echo JText::_($app->title); ?></a>
            <?php
            }
        }
    ?>
</div>

3. copy box.php from /components/com_community/templates/jomsocial/layouts/application/ to /templates/[your frontend template]/html/com_community/layouts/application/
4. edit it, and change line 15 from
<div id="joms-app--<?php echo $app->id ?>" class="joms-tab__content joms-tab__content--stream <?php if($app->core) echo " app-core"; ?>" <?php echo $first ? ' style="display:none"'  : '' ?>>
to
<div id="joms-app--<?php echo $app->id ?>" class="joms-tab__content joms-tab__content--stream <?php if($app->core) echo " app-core"; ?>" <?php echo ($app->id != "1") ? ' style="display:none"' : '' ?>>

Regards

The following user(s) said Thank You: Sean O'Connor
Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW