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. ocPortal 9 is superseded by Composr 10.

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


Login / Search

 [ Join | More ]
 Add topic 
#72351 (In Topic #15178)

Community saint

I've followed the instructions to the letter:

It adds a 'stars' block that ranks members on how many points they have been given in a certain category. OK!  Main Stars (main_stars) block added (however it does not accept parameter values)

changes the points module to allow selection of such categories when giving points. OK!

It also adds a block to show recent points transfers. OK! Side Recent Points (side_recent_points) block added and works fine on the side panel.

It adds a line to member's profile screens that shows created topics versus replies. OK!

Added more categories to The POINTS_GIVE (themes/default/templates_custom) template: OK! Working fine when giving points.

This code added to side menu works fine


[block max='10']side_recent_points[/block]

However, this code in a comcode page does not seem to indicate any categories and recent holders:


[block='Helpful soul']main_stars[/block]

Here is the result after cache purges on blocks and more:
Back to the top

It adds a 'stars' block that ranks members on how many points they have been given in a certain category. OK!  Main Stars (main_stars) block added (however it does not accept parameter values)

All our non-bundled addons are liable to be a bit crappy compared to the bundled ones :lol:. This is a miniblock, so doesn't have the parameters structured out in a way the add-block-assistant can read. As you've identified, there is one parameter, 'param', which is used for matching (substring check) the messages entered when the gifts were sent.
I can see that makes it a bit awkward to edit using the new way blocks are shown with WYSIWYG, so you might want to turn that off to debug it.

The way the addon works is it just automatically prepends certain strings to the messages, to create the kind of consistency that you can then draw on via that parameter.
That's why on the give form, you'll see making a choice from the list it changes the message.

I just tested now, at first I could not make it work, but that was because I forgot that you need to put "Helpful soul" in in full because if you just put e.g. "Helpful" it searches for "Helpful: " which isn't going to work. I know from your post you didn't make this mistake though.

I am guessing you might have removed the auto-filled preview before making the gift, breaking the match.

Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Support me on Patreon
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top

Community saint

Thanks Chris for your helpful explanation, which made me realized that if it worked fine for you and that I actually did exactly as you recommended the first time out. Therefore there must be a syntax difference in the way I formulated the block code on my comcode page.

Yes: the param value must be enclosed in double quotes and not single quotes.


[block="Helpful soul"]main_stars[/block]

This is correctly stated in the Description and example that accompanies the Download, but it is incorrect on the Description of the addon installation which I used for my coding.

I'm glad this is solved, since this is a great addon which will quite popular with my students, I'm sure.

Back to the top
There are too many online users to list.
Control functions:
 Add topic 

Quick reply   Contract

Your name:
Your message: