Page Block Keys Support Forum

This is the support forum for my new Page Block Keys Module.

http://www.boonex.com/m/page-block-keys

https://www.deanbassett.com
27 Apr 2012

This looks like it could really have an impact on the way I use dolphin. Thanks for developing this Dean... I will be making a purchase... Are there any plans to release more keys in the future???

 

28 Apr 2012

Yes. Thats why i added a key update section to the module.

As i think of more, they will be added.

Keep in mind this is intended mostly for simple static elements. Complex functions are best left to a php block.

https://www.deanbassett.com
28 Apr 2012

I have updated the module in the market to include a copy of inc/classes/BxDolPageView.php for those that have a default version for dolphin 7.0.9 so you can use that instead of modifying by hand. I have also updated the install docs to indicate this as well as a few usage tips.

Do not use it to replace older versions or versions that have been modified. Instead modify by hand.

I have also attached it to this post for those that want it. Remember, this is for dolphin 7.0.9 only.

BxDolPageView.php · 26.5K · 413 downloads
https://www.deanbassett.com
30 Apr 2012

If you want to inform and communicate with your users quickly in a personal way. this is great mod from this Knowledgeable Developer ..

Thanks Deano Does just what it says on the label ....

1 May 2012

Any chance of adding some conditional keys similar to those used in some template files?

Ex: (From browse_unit.html)

        <bx_if:admin>
            <div class="bx_sys_unit_checkbox">
                <input type="checkbox" name="entry[]" value="{id}"/>
            </div>
        </bx_if:admin>

 

Where, for instance, anything between these two keys would only be visible for members>

[bx_if_member]    [/bx_if_member]

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
29 Aug 2012

Yea, i could probably do that.

I'll see about adding it when i get to this module during my dolphin 7.1.0 testing.

https://www.deanbassett.com
29 Aug 2012

I will be adding those keys you requested in the next version i hope to have out today.

I have also had a request for keys specific to the profile page for showing information on the member being viewed rather that the logged in member. So those are also being added.

Plus one more surprise key.

And compatibility with dolphin 7.1


https://www.deanbassett.com
17 Sep 2012

Tests are being done now on my site. For the new version being developed now.

http://www.deanbassett.com

The home page has a block showing lines that will be displayed if key matches a member logged in.

Keys tested there are

[bx_if_admin]Only Shown to Admin[/bx_if_admin]

[bx_if_guest]Only Shown to Guest[/bx_if_guest]

[bx_if_member]Only Shown to Member[/bx_if_member]

[bx_if_membership:standard]Only Shown to Membership Standard[/bx_if_membership:standard]

[bx_if_age:47]Only Shown to Age 47[/bx_if_age:47]

[bx_if_age:0-20]Only Shown to Age 0-20[/bx_if_age:0-20]

[bx_if_age:21-30]Only Shown to Age 21-30[/bx_if_age:21-30]

[bx_if_age:31-40]Only Shown to Age 31-40[/bx_if_age:31-40]

[bx_if_age:41-50]Only Shown to Age 41-50[/bx_if_age:41-50]

[bx_if_age:51-60]Only Shown to Age 51-60[/bx_if_age:51-60]

[bx_if_age:61-70]Only Shown to Age 61-70[/bx_if_age:61-70]

[bx_if_gender:male]Only Shown Males[/bx_if_gender:male]

[bx_if_gender:female]Only Shown to Females[/bx_if_gender:female]

[bx_php]BxDolService::call('shoutbox', 'get_shoutbox');[/bx_php]

If you will notice. I also have a bx_php tag which treats the code between the tags exactly as if it were a PHP block. Due to the tinymce editor some things may not work, but lots of stuff will.



On a profile page. Bottom left. http://www.deanbassett.com/Deano

An entire set of keys like the ones already included are being tested. These ones however are for use with profile page blocks and display information on the profile being viewed rather than the logged in member.

I am testing these now. Due to how long it took to finish them, it will not be released today, but should be by tomorrow after testing is complete.

https://www.deanbassett.com
17 Sep 2012

Is there also a key possible that can display the latest picture that you / or the person wich profile you visiting has uploaded?

In a media block we want to show the latest picture that someone had uploaded and in the right bottom the number of pictures the person has uploaded.

18 Sep 2012

hey why specific [bx_if_age:47]Only Shown to Age 47[/bx_if_age:47] ??

so much to do....
18 Sep 2012

 

hey why specific [bx_if_age:47]Only Shown to Age 47[/bx_if_age:47] ??

 Just a test. Example on how to use it.

It can be this.

[bx_if_age:##] to state a match on only one age.

Or

[bx_if_age:##-##] to state a match on a range from ## to ##


https://www.deanbassett.com
18 Sep 2012

oh, but still why 47 you could use 74 also
hmm! its you age?

lol 

so much to do....
18 Sep 2012

 

oh, but still why 47 you could use 74 also
hmm! its you age?

lol 

 Yes. Thats my age. Thats why i choose it for a test.


https://www.deanbassett.com
18 Sep 2012

 

Is there also a key possible that can display the latest picture that you / or the person wich profile you visiting has uploaded?

In a media block we want to show the latest picture that someone had uploaded and in the right bottom the number of pictures the person has uploaded.

 Ok. Those keys you requested have been added. Testing on the home page of my site.

If there are no other requests i will most likely release a new version tomorrow..

Oh, and i also added two more keys.

[bx_style]....[/bx_style]

And

[bx_iframe......]....[/bx_iframe]

Depending on what version of dolphin you have or what mods you have, tinymce may or may not strip out normal tags for style and iframe. So i provided alternative.

The image request you made will return a html img tag of the original last photo uploaded, so it will need to be sized with CSS. The proper way of course is to put the css in a css file thats normally loaded on the page the block is on like general.css. But it can also be done with style tags in the block itself. In any case, styling is up to the person using the mod.


https://www.deanbassett.com
19 Sep 2012

Oh, and this new update will require the old version be removed and the new one uploaded and installed.

The new keys are too complex for the auto updater i had built in to handle. So that auto updater has also proven to be of little use, so it has been removed from the new version.

https://www.deanbassett.com
19 Sep 2012

Page block keys version 2.0.0 released. http://www.boonex.com/m/page-block-keys

Change Log.

Sep 14, 2012 - Added new set of keys for specifically for profile page blocks.
Sep 16, 2012 - Removed auto key update section. Proved to be of little use.
Sep 16, 2012 - Moved hard coded internal html and JavaScript into templates.
Sep 17, 2012 - Added bx_if series of keys.
Sep 17, 2012 - Added bx_php key
Sep 18, 2012 - Added a couple of photo keys.
Sep 18, 2012 - Added bx_style and bx_iframe keys.
Sep 19, 2012 - Bug checking and cleanup of code.
Sep 19, 2012 - Added support for dolphin 7.1.0
Sep 19, 2012 - Released version 2.0.0


There are now 97 keys. Product screenshots will be updated by the end of the day.

https://www.deanbassett.com
19 Sep 2012

Super!!!
I will download the new version tonight :)

20 Sep 2012

I just installed it but I have troubles with that.

I send you a personal message, so maybe you can look at it?

 

Thanks in advance!

22 Sep 2012

It al ready works :)

Forgot to set "Enable key processing for HTML blocks:" on checked...

22 Sep 2012

How can I change the viewing of the date?

Now it is: Year, Month ( in number ), Day

I want Day, Month ( full out written ) and no birth year.

24 Sep 2012

I will add a date format option in the next version. For now it has to be done with a source code change.

Edit modules\deano\block_keys\classes\dbcsBlockKeysInclude.php

There are two for date of birth.

Line 48 change this.

define('DBCS_DATE_OF_BIRTH', $aMemberInfo['DateOfBirth']);

To This.

define('DBCS_DATE_OF_BIRTH', date("j, F", strtotime($aMemberInfo['DateOfBirth'])));

Then at line 87 change this.

define('DBCS_PP_DATE_OF_BIRTH', $aProfileInfo['DateOfBirth']);

To This

define('DBCS_PP_DATE_OF_BIRTH', date("j, F", strtotime($aProfileInfo['DateOfBirth'])));

https://www.deanbassett.com
24 Sep 2012

Thanks!

Also another idea for a key.

Your latest location viewed in a map. ( with custom with and height via css )

And a total count of all the locations were you logged in / vistited

24 Sep 2012

Is it possible to add some keys for messages?
I have a HTML block on member.php and want to view the logged in member's inbox.

I want to load the latest message with: Sender, Subject and the first lines of the message. ( set as not more than ... characters, so the message that will be viewed always fit in the block )

And in the right bottom a count of the unread messages that you have.

Like this:

This is the last key we need to make our website complete.

I hope that it is possible to add the keys...

 

Thanks in advance!

25 Sep 2012

I may not be able to get to that request before the end of the week. I am working on another project at the moment. And i may not even be able to do it anyway.

That request is not suited for a key. Because more than one item has to be returned, title, from, to, and a message snipit proper contol of the formating of the output cannot be adequately controlled.

Anything beyond a simple one item return is best done with a PHP block, and not  HTML block.

https://www.deanbassett.com
25 Sep 2012

I have a PHP block also, is it than possible with a key?

25 Sep 2012

The keys are designed for the HTML blocks to make them do things your cannot normally do with a HTML block. They are also intended to be for simple stuff. You cannot use the keys in a PHP block.

But PHP blocks are pretty much only limited to your imagination. You can do practically anything you want with them. PHP blocks are far more powerful. I assume you not using them because you do not know how to do PHP code.

I can do keys for your request later when i free up some time. Right now i have taking on another project and will have to get back to this one later.



https://www.deanbassett.com
25 Sep 2012

Ok, than I wait for you!

25 Sep 2012

Also a good key to add is the match percentage what you have with the member's profile you're visiting.
We need such a key.

 

Also we're want to use a HTML block for the information, you are looking for in a partner.
We've added this questions in the join section.
Such as: the sex, age ... - ... ( min - max ), with kids, smoking, drinking etc.


Can you help to add some keys for this?

27 Sep 2012

It is impossable to add keys for profile fields i do not know about. So to cover unknown profile fields there is a custom key. bx_profile_custom which returns the value of the specified profile field.

If you need more control over custom fields i suggest to learn how to do it in php and use a php block. There is only so far i can go with these keys.

https://www.deanbassett.com
27 Sep 2012

How can I set a CSS class to [bx_pp_member_avatar_small /] ?
I want to add a border around the avatar...

9 Oct 2012

Well, that goes beyond support of the module itself.

It's basic HTML and CSS

Just put the tag in a div with your own class.

<div class="myclass"][bx_pp_member_avatar_small /]</div>

Then in a css file add

.myclass img {

border: 1px solid #FF0000;

}

https://www.deanbassett.com
9 Oct 2012

I don't get these settings working in the avatar...
In all the other avatars on the site ( not with your key ) it works...

border-radius10px 10px 10px 10px;
border: 1px solid #000;

How can I set these?

12 Oct 2012

Deano I am having a few issues I hope you can help .

fresh install 7.1

please see the pictures . all the text out put for hobbies books ect show up fine . but others that show up in the general /description/ misc/ are only generating as the numbers   .

This is custom html block

this is the standard block that shows smoker age religion  ..

this is the html of most profile keys

 

 

This is the some data that is output email city country are generated

This one shows age

this one shows nothing

any suggestions

 

 

 

 

 

2 Nov 2012

It's displaying what it in the profile field in the database.

Some profile fields contain a number that references something else in a predefined list.

The custom key cannot look those up.

Looks like your attempting to create a block that exceeds the ability of the keys. More complex blocks that need to look things up, or deal with the possibility of empty values need to be done using a PHP block.

https://www.deanbassett.com
2 Nov 2012

I am using your standard keys IE: [bx_pp_ethnicity /]   [bx_pp_education /] in the profile . If these keys are not capable of collecting this data why are they there ?

2 Nov 2012

Sorry. I thought you were pulling custom fields.

I'll look into the other ones.

https://www.deanbassett.com
2 Nov 2012

I will have to check in on dolphin 7.1 which is not official yet. And see if something is done differently.

On my 7.0.9 install, not of those fields use any predefined values by default, so what you enter is what you get.

But your trying to use it on a version of dolphin the keys have not been tested on yet, so i will have to check it there.

https://www.deanbassett.com
2 Nov 2012

ok Thank you deano the mod does have a tick and I am just testing :O) the values in data base are showing numerical as in the value column

and shows the same if using php I did find that if I put the value in as a key value in the  numerical value in the field builders it showed the text correctly  .... it has been showing same results in 7.09 as well

2 Nov 2012

Yea. I have to do some more research.

The number is the position in the predefined list setup for that profile field.

The keys don't process field data types that use a selector field setup to use a predefined list.

I am still trying to figure out the differences between the dolphin versions. I had a 7.0.9 site that used predefined lists on some of the keys, and another one that does not. One of my sites was upgraded every time all the way up from the first dolphin 7 version. The other site was not. It was a clean install. But, both are different.

I will most likely be removing some of the keys from the next version. I have no plans on putting in support for keys that use predefined lists. (at least not yet).

I just need to try and determine which keys need to be removed based on which fields use predefined lists on various versions of dolphin.

https://www.deanbassett.com
2 Nov 2012

Deano have you any news about a fix or work round for the above problem ? As i really would like to be able to use this product .. As it is advertized .....

and do you know if there is any reason with the way dolphin works in general and the matching works if the value field has the Lkey value instead of the numeric value ?

 

IE: instead of 1 in value put male  Lkey __male as this is then the value in the profile data

 

And do you know if 0 always has no value ?

 

Many thanks

13 Nov 2012

I know you are busy but I would like some Feed back here as you can see there are some more anomalies.

The above happens after a different profile has been viewed and user returns to own profile

21 Nov 2012

Is there also a possibility in viewing the latest 3 pictures someone uploaded?
Or maybe a key when you can choose how much pictures are show?

8 Dec 2012

Hi, I've followed your instructions to install the module (nice work !).

However I encounter a problem : when I use [bx_if_member] [/bx_if_member] for exemple on the template file _sub_header.html like this :

    [bx_if_member]
    <div class="sys_top_menu">
        <bx_injection:injection_top_menu_before />
        __top_menu__
        <bx_injection:injection_top_menu_after />       
        <div class="clear_both">&nbsp;</div>
    </div>
    [/bx_if_member]

[bx_if_member] [/bx_if_member] just are displayed and not interpreted as expected...

Can you please help me on this point ?

Thanks

 

Alexandre

14 Dec 2012

Go into the keys admin and make sure you turned on the keys. They are off my default

You will also want to display block id's for a short time so you can determine that blocks id so you can make sure the keys are only processed for that block.

All of that is off by default, and activating only for specific blocks is done to improve performance of the site. Processing for every block on the site is a waste of resources.

https://www.deanbassett.com
14 Dec 2012

Thanks much deano for your quick feedback :)

Here are the two options I've manually checked in the admin :

- settings : Enable key processing for HTML blocks (unchecked by default)

- [bx_if_member]...[/bx_if_member] into the key list (I only checked this option to test your module)

It still won't work.

PS : I'm using Dolphin v7.0.9

14 Dec 2012

From the install instructions

STEP 2: SOURCE CODE CHANGES

Verify that step has been completed accurately.

https://www.deanbassett.com
14 Dec 2012

 

Hi, I've followed your instructions to install the module (nice work !).

However I encounter a problem : when I use [bx_if_member] [/bx_if_member] for exemple on the template file _sub_header.html like this :

    [bx_if_member]
    <div class="sys_top_menu">
        <bx_injection:injection_top_menu_before />
        __top_menu__
        <bx_injection:injection_top_menu_after />       
        <div class="clear_both">&nbsp;</div>
    </div>
    [/bx_if_member]

[bx_if_member] [/bx_if_member] just are displayed and not interpreted as expected...

Can you please help me on this point ?

Thanks

 

Alexandre

Oh wait. I did not read this properly. I missed the fact that your trying to use these keys in a template. _sub_header.html is a template. Not a html page block.

This module is for page blocks. Not templates. You not using this mod for what it was designed for.


https://www.deanbassett.com
14 Dec 2012

I've checked again : BxDolPageView.php has correctly been updated following your instructions (on line 592 : function getBlockCode_Echo)

14 Dec 2012

 

I've checked again : BxDolPageView.php has correctly been updated following your instructions (on line 592 : function getBlockCode_Echo)

 Well. Read the last message i just posted which is above your last message. I realized your trying to do this in a template, and not a page block which is what the mod was designed for. Hence the name Page Block Keys.


https://www.deanbassett.com
14 Dec 2012
14 Dec 2012
 
 
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.