Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 17 Feb 2005, 09:32
cinq's Avatar
cinq cinq is offline
 
Join Date: Oct 2002
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
Reply With Quote
  #2  
Old 17 Feb 2005, 10:25
trafix's Avatar
trafix trafix is offline
 
Join Date: Dec 2002
look at the coding for the jukebox .... it has most of that for playing defult song
Reply With Quote
  #3  
Old 17 Feb 2005, 10:33
cinq's Avatar
cinq cinq is offline
 
Join Date: Oct 2002
I did a quick scan, I presume you mean the part below


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

of the vb_jukebox.php file ?

Don't really think it does what I seek ?
Reply With Quote
  #4  
Old 17 Feb 2005, 10:44
trafix's Avatar
trafix trafix is offline
 
Join Date: Dec 2002
Most popular links
this finds the most played song

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Random link

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #5  
Old 17 Feb 2005, 10:47
cinq's Avatar
cinq cinq is offline
 
Join Date: Oct 2002
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.

Last edited by cinq; 17 Feb 2005 at 10:50.
Reply With Quote
  #6  
Old 17 Feb 2005, 10:54
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Real name: sabe
seriously i'd just suggest adding a column to the table "block_order" and then
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
UNDER CONSTRUCTION: Confessionary Hack

Make me a Hack of The Month author: GRPS: Groups Commune
make my hacks, they'll make you famous

unless it's a security concern, please do not pm/im me for support unless you're willing to pay.
Reply With Quote
  #7  
Old 17 Feb 2005, 12:46
cinq's Avatar
cinq cinq is offline
 
Join Date: Oct 2002
Hmm, isn't there another means ?
Reply With Quote
  #8  
Old 17 Feb 2005, 13:26
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Real name: Dean Clatworthy
I wouldn't use queries for this. Use vBcron and cache the info every x hours
__________________
Dean Clatworthy - Web Developer/Designer
Reply With Quote
  #9  
Old 17 Feb 2005, 13:32
cinq's Avatar
cinq cinq is offline
 
Join Date: Oct 2002
You lost me there, Dean
Reply With Quote
  #10  
Old 17 Feb 2005, 15:42
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Real name: sabe
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


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

i can't explain it but chances are if i wanted to do what you're trying that'd be what i'd try.
__________________
UNDER CONSTRUCTION: Confessionary Hack

Make me a Hack of The Month author: GRPS: Groups Commune
make my hacks, they'll make you famous

unless it's a security concern, please do not pm/im me for support unless you're willing to pay.
Reply With Quote
  #11  
Old 18 Feb 2005, 06:39
cinq's Avatar
cinq cinq is offline
 
Join Date: Oct 2002
Thanks for trying to explain it sabe but I still don't quite get it
I'm still drawing a blank at how I should do this
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 06:38.

Layout Options | Width: Wide Color: