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

ocThanks

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#72351 (In Topic #15178)
Avatar

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

Code

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

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

Code

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

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

Back to the top
 
Posted
Rating:
#72407
Avatar

ocStaff (admin)

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 ocPortal on Facebook or add me as a friend.

Expand: Was I helpful? Was I helpful?

Expand: Follow me on Twitter Follow me on Twitter







If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource.
Back to the top
 
Posted
Rating:
#72453
Avatar

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.

Code

[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.

Cheers!
Jean

Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:
 Add topic 

Quick reply   Contract

Your name:
Your message: