The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Ideas needed on how this ordering can be achieved
Would like to showcase the following on the main links page.
Latest links Most popular links Random link Each of these would be a block on the main page. They would probably require 3 different queries. My question is how can I achieve this : I can set in the Admincp option : display orders for each block, such that I can arrange which block appears first, second and third. Any ideas would be most appreciated Thanks |
#2
|
||||
|
||||
look at the coding for the jukebox .... it has most of that for playing defult song
|
#3
|
||||
|
||||
I did a quick scan, I presume you mean the part below
Code:
//start load the song Don't really think it does what I seek ? |
#4
|
||||
|
||||
Most popular links
this finds the most played song PHP Code:
PHP Code:
|
#5
|
||||
|
||||
I know the query to get the stuff i need
What i mean is how could I order the blocks that shows these stuff ( latest, random, most popular ) based on changeable settings for display orders in the Admincp. edit: p.s I think order by rand() desc makes no sense just order by rand() will do. |
#6
|
||||
|
||||
seriously i'd just suggest adding a column to the table "block_order" and then [sql]ORDER BY links.block_order[/sql]
|
#7
|
||||
|
||||
Hmm, isn't there another means ?
|
#8
|
||||
|
||||
I wouldn't use queries for this. Use vBcron and cache the info every x hours
|
#9
|
||||
|
||||
You lost me there, Dean
|
#10
|
||||
|
||||
the only other way i can think of cinq is to do something like set it up in the vboptions so you can have the blocks orders then in your code set em out as an array, then cycle through the array with a while, using the block id's to set the order
i.e. vboptions[blockorder1] vboptions[blockorder2] vboptions[blockorder3] ok this may be impossible without a query but use a function to arrange them in numerical order as an array numorder[array] //would look something like = "3, 1, 2" ofcourse for that you'd need to assume your instructions dictate that which block is which number in the array anyway from there PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|