Profile Types Splitter Premium from AntonLV - part 2

13 Sep 2013

 

UnderDog4All

Try to use this construction instead of a $aProfileInfo['ProfileType'] :

_t($GLOBALS['aPreValues']['ProfileType'][$aProfileInfo['ProfileType']]['LKey'])And yes, if you're going to add something directly to thumbnail then you would have to edit the thumbnail_single.html file.

 AWESOME!!!....That worked perfectly for the Member Browse Page :D

However, when I add __profiletype__ to the thumbnail_single.html I get this-

UnderDog4All __profiletype__

Not sure if I am asking this correctly-

Do I need to define a class __profiletype__   in a different script file for ALL avatars/member-icons ?

I tried to add to BxBaseFunctions.php this-

        $aVariables = array(
            'iProfId' => $iId ? $iId : 0,
            'sys_thb_float' => $sFloat,
            'classes_add' => ($bGenProfLink ? ' thumbnail_block_with_info' : '') . ($sType != 'medium' ? ' thumbnail_block_icon' : ''),
            'profiletype' => _t($GLOBALS['aPreValues']['ProfileType'][$aProfileInfo['ProfileType']]['LKey']),

But that did not work Undecided

Is there another file I should be adding this to for it to work with thumbnail_single.html ?

Thanks

13 Sep 2013

If you added the __profiletype__ inside <bx_if:profileLink></bx_if:profileLink> tags then the line

'profiletype' => _t($GLOBALS['aPreValues']['ProfileType'][$aProfileInfo['ProfileType']]['LKey']),

must be added to a respective section, for example after the line

'user_title' => $sUserTitle,

P.S. Are you sure that in your variant of that file the profile info is stored in the $aProfileInfo array? By default it is $aProfile there. So that may also be the problem.

Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
13 Sep 2013

 

If you added the __profiletype__ inside <bx_if:profileLink></bx_if:profileLink> tags then the line

'profiletype' => _t($GLOBALS['aPreValues']['ProfileType'][$aProfileInfo['ProfileType']]['LKey']),

must be added to a respective section, for example after the line

'user_title' => $sUserTitle,

P.S. Are you sure that in your variant of that file the profile info is stored in the $aProfileInfo array? By default it is $aProfile there. So that may also be the problem.

 X~) SWEET!!! Sooooo Close!!!! Thanks Anton....

OK, SO I changed the code to-  _t($GLOBALS['aPreValues']['ProfileType'][$aProfile['ProfileType']]['LKey']),

and put it after this-

'user_title' => $sUserTitle,

NOW, my NickName looks like this on all Avatars-

UnderDog4All Personal, shalisamarie Student, ETC...

I would really like to have the Profile Type show below the avatar image and be BOLD GREEN...

In this case, where would I need to place my
__profiletype__

and how to color it?

Thanks very much...this is great progess!!!

13 Sep 2013

Try to replace__profiletype__ with

<br /><span style="color: green;">__profiletype__</span>

Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
13 Sep 2013

 

Try to replace__profiletype__ with

<br /><span style="color: green;">__profiletype__</span>

 Ahhhh there....that's PERFECT!!!!

You my friend are a genius!!!

My wife was like- "WOW- That looks soooo awesome!"

Thanks you so much Anton- CHEERS!

13 Sep 2013

UnderDog4All

:) You're welcome.

Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
13 Sep 2013

Anton,

I'm looking for a way to make certain buttons be displayed based on the profile type.

I have a module called 'Marketplace' and have added the following code to display different buttons in the subtitle area (added as language keys).

I can't get this to work and believe that the problem is within the part below in red.

 

class BxMarketplacePageMain extends BxDolTwigPageMain {

    function BxMarketplacePageMain(&$oMain) { 

$this->_oMain = $oMain;

$this->_oDb = $oMain->_oDb;

        $this->_oConfig = $oMain->_oConfig;

        $this->sSearchResultClassName = 'BxMarketplaceSearchResult';

        $this->sFilterName = 'bishop_marketplace_filter';

 

        $profileInfo = getProfileInfo();

        if(getLoggedId() <= 0) {

        $subTitle = _t('_bishop_marketplace_visitor_buttons'); }

        elseif($profileInfo['ProfileType'] == 2) {

        $subTitle = _t('_bishop_marketplace_seller_buttons'); }

        elseif($profileInfo['ProfileType'] == 4) {

        $subTitle = _t('_bishop_marketplace_buyer_buttons'); }

        $GLOBALS['oTopMenu']->setSubTitle($subTitle); 

 

parent::BxDolTwigPageMain('bishop_marketplace_main', $oMain);

}

 

Any help would be great.

Thanks

This is my signature, there are many like it but this one is mine...
28 Oct 2014

Richard,

I don't remember Dolphin have a method called setSubTitle for top menu classes, so I have no idea what it supposed to do. The previous code seems to be correct. But you can try to check where the problem is by "echoing" the variables:

right above the line

$GLOBALS['oTopMenu']->setSubTitle($subTitle);

add a temporary line

die($subTitle);

then visit Marketplace's main page and see what it prints, this way you can check whether the previous code works correctly.

Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
29 Oct 2014

Thanks Anton but that didn't echo anything, just a blank white page as before.

If I comment out this line, the site works again.

// $GLOBALS['oTopMenu']->setSubTitle($subTitle);

The alternative route is to add buttons in sys_objects_actions and change the code to allow only specific profile type(s).

Can you point me in the right direction?

Thanks

This is my signature, there are many like it but this one is mine...
29 Oct 2014

Probably you don't have a method setSubTitle, so if the line is there then it generates a PHP error which is most likely being suppressed by your php settings.

As to sys_object_actions entry, you can try to insert it with fields set to

Caption: {evalResult}

and

Eval: $p = getProfileInfo(); if(!$p) return _t('_bishop_marketplace_visitor_buttons'); elseif($p['ProfileType'] == 2) return _t('_bishop_marketplace_seller_buttons'); elseif($p['ProfileType'] == 4) return _t('_bishop_marketplace_buyer_buttons');

and other fields depending on your goal and the module.

Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
29 Oct 2014

Thanks Anton, I have simplified it as follows and it now works.

 

Caption: {evalResult}

Eval: $p = getProfileInfo(); if($p['ProfileType'] == 4) return _t('_bishop_marketplace_action_add_item');

URL: {BaseUri}browse/my&bishop_marketplace_filter=add_item

Type: bishop_marketplace_title


Many thanks for your help

This is my signature, there are many like it but this one is mine...
29 Oct 2014

You're welcome.

Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
30 Oct 2014

Hi Anton.

Another great module from you! We are very happy with it!

But 2 thinks we have found.

1. We can't disable the fields for the All section (search1.png)

2. When disabled an other section, a big blank area is visible (search2.png)

Please see attachment.

Rappi

search1.png · 147.5K · 323 views
search2.png · 55.8K · 346 views
Bezirzer.de, elbrocker.de, tierschutz-community.de
28 Aug 2015

Hi Rappi

1. That is normal. The "All" section shows all the fields that are common between all profile types.

2. Provide us please with a link to that page, we need to take a look at it.

Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
28 Aug 2015

Thanks for the fast answer.

1. Can you change this? Or can we complete disable the All section?

2. See http://www.tierschutz-community.de/search.php

Bezirzer.de, elbrocker.de, tierschutz-community.de
28 Aug 2015

Rappi

1. To remove the "All" section - edit the file modules/aqb/pts/classes/AqbPTSModule.php, remove the code

<div class="ui-accordion-group">
    <h3 class="ui-accordion-header">
        <a href="javascript:void(0);">'._t('_aqb_pts_visible_for_all').'</a>
    </h3>
    <div class="ui-accordion-content">'.$oBxDolProfileFields->getFormsSearch($aParams).'</div>
</div>

but keep the

'; 

at the end of last line

Then replace the line

$iFormsCounter = 1;

with

$iFormsCounter = 0;

 

2. It seems like some kind of problem with your jQuery version. Try to edit the file modules/aqb/pts/classes/AqbPTSModule.php and replace

$(\'#search_forms\').accordion({
    header: \'h3\',
    autoHeight: false,
    active: '.$iActiveForm.'
});

with

$(\'#search_forms\').accordion({
    header: \'h3\',
    autoHeight: false,
    active: '.$iActiveForm.'
});
$(\'.ui-accordion-content\').css(\'height\', \'auto\');

Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
28 Aug 2015

You are the best!

Another little problem:

The search result page is the standardview from Dolphin. I have change every file from your installation instructions and clear the cache from admin and with ftp.

In your section "Search results" in admin, I have insert many field to display.

But the result you can see in the image....

search3.png · 27.6K · 337 views
Bezirzer.de, elbrocker.de, tierschutz-community.de
28 Aug 2015

Ensure that the following post-installation instruction has been followed literally:

6. Edit the file templates/base/scripts/BxBaseSearchProfile.php find the line

global $aPreValues;

insert below it the code

//--- AQB Profile Types Splitter ---//
if ($sTemplateName == 'search_profiles_ext.html' && $oCustomTemplate == null && BxDolRequest::serviceExists('aqb_pts', 'get_custom_template')) {
    if ($aExtendedKey == null) $aExtendedKey = array();
    $oCustomTemplate = BxDolService::call('aqb_pts', 'get_custom_template');
    BxDolService::call('aqb_pts', 'get_search_layout', array($aProfileInfo, &$aExtendedKey));
    $aProfileInfo['Headline'] = '';
}
//--- AQB Profile Types Splitter ---//
Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
28 Aug 2015

That's what I have exactly changed!

Here my changes:

    function PrintSearhResult($aProfileInfo, $aCoupleInfo = '', $aExtendedKey = null, $sTemplateName = '', $oCustomTemplate = null)
    {
        global $site;
        global $aPreValues;
		
		//--- AQB Profile Types Splitter ---//
if ($sTemplateName == 'search_profiles_ext.html' && $oCustomTemplate == null && BxDolRequest::serviceExists('aqb_pts', 'get_custom_template')) {
	if ($aExtendedKey == null) $aExtendedKey = array();
	$oCustomTemplate = BxDolService::call('aqb_pts', 'get_custom_template');
	BxDolService::call('aqb_pts', 'get_search_layout', array($aProfileInfo, &$aExtendedKey));
	$aProfileInfo['Headline'] = '';
}
//--- AQB Profile Types Splitter ---//


        $iVisitorID = getLoggedId();
        $bExtMode = (!empty($_GET['mode']) && $_GET['mode'] == 'extended') || (!empty($_GET['search_result_mode']) && $_GET['search_result_mode'] == 'ext');
        $isShowMatchPercent = $bExtMode && $iVisitorID && ( $iVisitorID != $aProfileInfo['ID'] ) && getParam('view_match_percent') && getParam('enable_match');
Bezirzer.de, elbrocker.de, tierschutz-community.de
28 Aug 2015

In that case I'm out of ideas. Probably you have some kind of other modification applied in the same place which conflicts with PTS. For example, I see a membership level in results, which is definitely a part of some kind of customization.

We can find the problem only if you will provide us with a FTP access to your site (via PM of course).

Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
28 Aug 2015

I have changed the template to UNI and it works!

So, it must be a problem with my template (Smart Groups).

I search for the problem and write the developer or you again, when I fail.

Thanks again!

Bezirzer.de, elbrocker.de, tierschutz-community.de
28 Aug 2015

Hello Anton.

Another little problem.

I have change the fields in  admin/profile and now the following error is show:

Warning: Invalid argument supplied for foreach() in /usr/www/users/pflegp/modules/aqb/pts/classes/AqbPTSModule.php on line 427

Warning: array_values() expects parameter 1 to be array, null given in /usr/www/users/pflegp/modules/aqb/pts/classes/AqbPTSModule.php on line 434

Please help Cry

Rappi

Bezirzer.de, elbrocker.de, tierschutz-community.de
31 Aug 2015

Most likely you've removed all menu items either from top menu or from member menu. Try the following fix

Edit the file modules/aqb/pts/classes/AqbPTSModule.php, after the line

function serviceMenuItemsFilter($sType, &$aItems) {

insert the line

if (!$aItems) return;
Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
31 Aug 2015

Great!

It work again Wink

Bezirzer.de, elbrocker.de, tierschutz-community.de
31 Aug 2015

Hello again ;-)

 

I have make a fresh install of 7.2 and when a user click on the register/login button in EVO or in the splash area and change the profile type, the user is redirected to member.php....

 

When the reload on changing the profil type is noch working in the new popup, I think a redirect to join.php is better.

 

Rappi

 

Bezirzer.de, elbrocker.de, tierschutz-community.de
3 Sep 2015

Hello,

The module tries to redirect to the same page where it was at the time of selecting a different profile type. That is necessary for a proper work of profile edit page also. If you're not going to allow to change a profile type on any page other than join page then you can hardcode a redirect to join.php by editing the file modules/aqb/pts/classes/AqbPTSModule.php, the line

$aForm['inputs'][$id]['attrs']['onchange'] = 'window.location.href = "'.$_SERVER['PHP_SELF'].'?'.$sRequestString.'pid=" + this.value;';

replace with

$aForm['inputs'][$id]['attrs']['onchange'] = 'window.location.href = "/join.php?'.$sRequestString.'pid=" + this.value;';
Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
4 Sep 2015

I see a new version in the market.

How can I update?

Can I simple overwright the old one (and make my changes again ;-) ) or must I uninstall the old version with new install?

 

Rappi

Bezirzer.de, elbrocker.de, tierschutz-community.de
5 Sep 2015

You can simply replace the files. A complete reinstallation isn't required. Database hasn't been altered.

Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
5 Sep 2015

Just bought the Profile Splitter Premium. I just installed and think I have all file edits right.. The problem I am having is in the PTS Admin, I am on the Profile fields page.. I try to drag and drop different blocks and can not? Are we not supposed to be able to drag and drop blocks there for each and every different profile type we made?

6 Nov 2015

Just bought the Profile Splitter Premium. I just installed and think I have all file edits right.. The problem I am having is in the PTS Admin, I am on the Profile fields page.. I try to drag and drop different blocks and can not? Are we not supposed to be able to drag and drop blocks there for each and every different profile type we made?

  The profile fields section in Profile Types Splitter is there only for the purpose of setting profile types connections for fields. If you want to drag'n'drop, create, delete, rename the fields - then you should use the regular Fields builder of Dolphin. 

Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
6 Nov 2015

So in other word you make up your profile fields all as one and this module you can hide different fields that do not pertain to that profile type?

6 Nov 2015

Exactly. First you create a regular field, and then with the module you make that field relevant to a certain profile type(s) only.

Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
6 Nov 2015

Ok, Thank you.. I think I might have the understanding of it so far.. LOL..

6 Nov 2015

Not at all.

Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
6 Nov 2015

Is there a way to have all users view all profile fields but in the profile spliter they can only edit what they are?

Meaning I would like everyone see what is posted on the view info page but the police can only edit the police as robbers can only edit robbers but both can see what is posted?

 

Why are edit and view permission the same?

22 Nov 2015

Is there a way to have all users view all profile fields but in the profile spliter they can only edit what they are?

Meaning I would like everyone see what is posted on the view info page but the police can only edit the police as robbers can only edit robbers but both can see what is posted?

 

Why are edit and view permission the same?

 That makes no sense. If a field is editable by a Police only then it makes no sense to make it visible on any other profile, becuase it will not be shown anyway since it will be empty for any other profile. 

Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
23 Nov 2015

How does that make no sense? I do not have a site for police.. and if the field is not filled out it does not show anyways..

I am running a trucking site that has carriers, pilot cars, and shippers/ brokers. Each one of those profiles have different fields.. I don't need to ask a carrier if he runs high pole or the pilot car what type of trailer he runs. But the carrier does need to know if the pilot car runs the high pole or the shipper needs to know what trailer the carrier runs.

Is there a way that I can have different view permissions then the edit permissions?

23 Nov 2015

I'm not sure that I understood what is the problem. 

If the HighPole field is tied to Pilot Car profile type then this HighPole field should appear on all Pilot car profiles regardless of who is viewing a profile. I.e. the Carrier profile owner should see the HightPole field if he is looking at a Pilot Car profile. 

And at the same time the HighPole field will not appear on Carriers and Brokers profiles, because that makes no sense (field will be always empty on these profiles because it is not editable by these profiles). 

Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
23 Nov 2015

I see where I went wrong.. I edited the Predefined Values. To try and re order them.. Instead of just moving them I re-numbered them. That messed the permissions up. Now that I put them back the way they were, everything seems fine now.. Sorry about the confusion..

23 Nov 2015

No problem. 

Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
23 Nov 2015

Is the search function automatically changed when we install the module ? I dont think I have a use for it yet so I do not want to complicate the search page for users.

 

For example:

I want 2 profile types

 

Members and SuperMembers

 

Members have Fields 1, 2, 3, 4 

SuperMembers have fields 5,7,8,9 

 

If members view SuperMember page they see fields 5,7,8,9

If SuperMembers view Members they see fields 1,2,3,4

 

Is this a correct summary how this module works?

 

Thank you

8 Feb 2016

 

Is the search function automatically changed when we install the module ? I dont think I have a use for it yet so I do not want to complicate the search page for users.

 

For example:

I want 2 profile types

 

Members and SuperMembers

 

Members have Fields 1, 2, 3, 4 

SuperMembers have fields 5,7,8,9 

 

If members view SuperMember page they see fields 5,7,8,9

If SuperMembers view Members they see fields 1,2,3,4

 

Is this a correct summary how this module works?

 

Thank you

 Yes, this is a correct summary how this module works. If you don't need the search page to be changed then we'd recommend you to purchase the Basic version.

Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
9 Feb 2016

Thank you for the info -- I got the basic version

 

If for example I want to make 1 specific Member into a SuperMember -- how would I do that?

 

If i change their membership type it seems to still show them as a Member with fields 1,2,3,4 even though their membership has been changed to SuperMember and shows "SuperMember" on their membership page. 

 

Thanks!

12 Feb 2016

 Membership has nothing to do with Profile Type. If you want to change Profile Type then put ProfileType field on a profile edit page for admin and then change the type on a profile's edit page. 

 

Or if by Membership you've meant the Profile Type then ensure that you've installed the module correctly, take special attention to the step #5 of installation manual which is asking you to modify a few files manually. 

Thank you for the info -- I got the basic version

 

If for example I want to make 1 specific Member into a SuperMember -- how would I do that?

 

If i change their membership type it seems to still show them as a Member with fields 1,2,3,4 even though their membership has been changed to SuperMember and shows "SuperMember" on their membership page. 

 

Thanks!

 

Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
12 Feb 2016

Perfect! Thank you very much! Exactly what I needed. My brain thinks of a scenario and says ok this needs to be possible.

 

12 Feb 2016

===================================================== Installation manual =====================================================

1. If it's the first module you've purchased from AQB Soft you need to go to your server via FTP and create aqb folder in [your_dolphin_root_folder]/modules/ folder.

2. Upload the archived package(pts_2.2.zip) via Dolphin admin panel -> tools -> modules.

3. Set writable permissions (755 or 777 - depends on server configuration) on the cache folder (modules/aqb/pts/cache)

4. Find the module in 'Not Installed Modules' and install it.

5. Important!!! Complete installation as described in vendor's conclusion (you can see it in the `Operation Results` section right after installing the module)

6. Installation finished.


This was you setup, but its for expert ppl, let me tell you what I did and tell me if there is omething wrong: download addons on firefox name: fireftp then i create any module in my admin area to let the module folder create atumatecly in my server, then i go to file manager in cpanle and create aqb folder under modules the i open the folder i download it from the product page name : Profile Types Splitter Premium then i find pts file under Profile Types Splitter Premium 7.2.X-7.3.x the i open the firefox and use fireftp addons the i move the older pts from my machine to the left (my server ftp) under folder name aqb, when its upload it 100% i go to my admin >modules>add>i tick the Profile Types Splitter Premium from not installed area, then i install it. that all. doi miss something?? i see too much coding when ppl talking here, i'm not expert, but i can follow the steps. please if all that steps correct, next time i hope every body here give me easy steps.

 

and i get this 100%:

5. Important!!! Complete installation as described in vendor's conclusion (you can see it in the `Operation Results` section right after installing the module)

6. Installation finished.

 

...
7 Dec 2016

where I can do this step ?

Each profile type can have its own fields set

...
7 Dec 2016

and i get this 100%:

5. Important!!! Complete installation as described in vendor's conclusion (you can see it in the `Operation Results` section right after installing the module)

According to your description it seems like this step hasn't been done. This step actually asks you to modify 8 files manually per instructions given right after module's installation. If you have problems with modifying code then I would suggest you to purchase the mod installation service from us and we will install the module for you.

 

where I can do this step ?

Each profile type can have its own fields set

First create the necessary fields via the Dolphin's Fields Builder. Then in the [admin panel -> modules -> profile types splitter -> profile fields] sections set up the specific profile fields to be relevant for specific profile types.

Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
7 Dec 2016

under the module i have this tabs

  • Profile Types
  • Profile Fields
  • Top Menu
  • Member Menu
  • Page Blocks
  • Search Result

 

but only profile types and search result are working but the other 4 tabs only i can view, nothing i can edit

...
7 Dec 2016
7 Dec 2016
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.