Main Menu
collapse

Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

User Info

Welcome Guest.
Please log in.

Who's Online

  • Dot Guests: 925
  • Dot Hidden: 0
  • Dot Users: 1
  • Dot Users Online:

Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]


Blocks speak! Do you have an interest in getting more blocks - or even making your own? The Blocks Board is for you!

Poll (results ordering)

Started by Jorge_CS_, April 27, 2011, 04:06:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jorge_CS_

Hi there,

I was trying the poll block, is very good, but i was wondering if there's a way to put the most voted items first, i have a long poll and the most voted is at the bottom.

I will appreciate any help!

Thank you!!

:D

[SiNaN]

./Sources/PortalBlocks.php

Code (Find) Select
<li><strong>', $poll['question'], '</strong></li>';

Code (Replace) Select
<li><strong>', $poll['question'], '</strong></li>';

$sort = array();
foreach ($poll['options'] as $option)
$sort[] = $option['votes'];
array_multisort($sort, SORT_DESC, $poll['options']);
And slowly, you come to realize... It's all as it should be...

Jorge_CS_

Great!! Thank you so much!!  8)