HTML Logo by World Wide Web Consortium ( Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.

open Badges

Login / Search

 [ Join | More ]
 Add topic 
Item has a rating of 5 (Liked by KingBast)  
#108415 (In Topic #21119)

Non-joined user

I was thinking that has a good setup and would be cool if there was a add in for it my coading skills sucks. or I would work on it it should be jest as easy as twitter intigration.
I would have replyed to a old post but a thread over 3 years old should die and not come back.
Back to the top
Item has a rating of 5 (Liked by Chris GrahamLiked by KingBast)  

Community saint

So, I took this as a challenge and created an ocPortal block (mainly because it was simpler then the Twitter Feed Integration addon). I could have done it quicker with a mini-block and no templates, but opted for a more standard ocPortal block with templates. I don't have any badges and only found a couple of OpenBadge ID's that had a single badge, so it's not fully tested with multiple badges or multiple badge groups. The default templates may need some work. The addon files are attached to this message post.

Put the openbadges.php file in sources_custom/blocks

And put the three *.tpl files in themes/default/templates_custom

For parameters:

Email = the email address of your OpenBadges account.
Title = title for the block (default: OpenBadges Backpack)
Max Badges = maximum number of badges to display (default: 6)
Max Badge Size = maximum size (in pixels) you want the badge images to be (default: 80)
Template = use your own custom template

For Max Badge Size, the option uses css style to limit the max size of the badge image. You can alter the template to force this option to be absolute size. The default templates have a lower case 'default' in them. To use your own templates with the Template block parameter, make a copy of all three templates and change the 'default' portion of the filename to a name of your choice. Then use that name for the Template parameter. For example, if you copy the *_default.tpl template files and name them *_fancy.tpl, then you would use fancy as the Template block parameter.

Once I do some more testing and get some feedback on how it works and how it looks, I will complete it (create .ini file for parameter documentation), add it to the addon downloads area, port it to Composr, and add it to github. It probably wouldn't take much additional work to also turn this into a member profile tab.

» Download: (3 Kb, 69 downloads so far)
Back to the top
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: