Skip to content
View in the app

A better way to browse. Learn more.

MagicDuel Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Sorting list of heat voters by Heat given

Featured Replies

  • Root Admin

For heat votes, you can use a simple one line piece of code to sort heat voters into heat given in desending order


[CODE]
@vb = mdsi_item_heat();
arsort(@vb['players']);
[/CODE]

This assumes that your heat variable has been assigned to @vb as in the example. When printing the information out with this format, it will produce it in an ordered format

[code]
foreach(@vb['players'] as @vk => @vh){
echo @vk . ': ' . @vh . '<br />';
}
[/code]

its nicer to show those who have given the most heat at the top than rather the first people who visited the clicky

Comments and questions can go on this post :)

Edited by Chewett

Not sure if this can be part of the code, but is there anyway to prevent amount heat donated to go down is one click the button without donating? Code wize I mean?

The heat goes down by one a second, just like it does outside of items. That's not related to how often you check the clicky.

Thanks chewett! I tend to rsort instead of arsort, for my personal views of lists, so that the "big" people sink down to the bottom.
But the technique is still sound!

[quote name='Burns' timestamp='1342417143' post='117598']
The heat goes down by one a second, just like it does outside of items. That's not related to how often you check the clicky.
[/quote]

That shouldn't happen to heat vote then.. It's a voting method and I think it's stupid to lose somehow a vote casted? So there's no funtion to prevent the loss at all?

However, I believe losing heat should happen to scripted items since somehow can be... abused, but that's not the case of heat for vote.

If the concept of the heat vote is not only how hard the community agrees with the voting theme, but also the dedication to keep it high, there is actually a point for the heat to be reduced in time.

And also i guess a function for the clickie would be able to be used in items as well, so it could be abused from ppl with scripting item ability as well

(I haven't even given a look to the md script so if there is a way to make a function just to work for clikies and not for items, ignore my second paragraph :P )

  • Author
  • Root Admin

[quote name='BFH' timestamp='1342446129' post='117622']
That shouldn't happen to heat vote then.. It's a voting method and I think it's stupid to lose somehow a vote casted? So there's no funtion to prevent the loss at all?

However, I believe losing heat should happen to scripted items since somehow can be... abused, but that's not the case of heat for vote.
[/quote]

The amount one has given is stored, but the active heat drops, as Valldore says, its not how much was given, its a continual effort.

[quote name='BFH' timestamp='1342446129' post='117622']
That shouldn't happen to heat vote then.. It's a voting method and I think it's stupid to lose somehow a vote casted? So there's no funtion to prevent the loss at all?

However, I believe losing heat should happen to scripted items since somehow can be... abused, but that's not the case of heat for vote.
[/quote]
[quote][color="#CCCCCC"]Ann. 2206 - [2012-02-17 22:33:18 - Stage 11][/color]
[b]Heat Voting (concept)[/b]
...
The fact heat drops is also relevant when considering that a certain matter might be seen by someone that can do something about it at a later time. In other words it is a vote that slowly fades away if not sustained and has as only "enemy" the "forgetting" of that cause...and that is in a way very realistic.[/quote]
If you really want to show the total amount of heat donated you can add up the amounts of heat donated by each player (after subtracting the heat from previous votes.) If I'm right that doesn't drop over time.

  • Author
  • Root Admin

[quote name='samon' timestamp='1342468830' post='117630']
If you really want to show the total amount of heat donated you can add up the amounts of heat donated by each player (after subtracting the heat from previous votes.) If I'm right that doesn't drop over time.
[/quote]

indeed, my clickable displays current and total heat, along with all the heat donated by all the voters, and calculates it based on the method you suggested.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Forum Statistics

  • Total Topics 17.5k
  • Total Posts 182.2k

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.