Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 15 Dec 2010, 20:12
MikesSite MikesSite is offline
 
Join Date: Jan 2009
Thumbs up User Album Conditionals?

I would like to display something in postbit but only if the user has a user album. Is there a conditional for this?

Thanks!
Reply With Quote
  #2  
Old 15 Dec 2010, 20:19
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
You would basically have to write a query on the table 'album' to see if they have an albumid for that userid. So, you would have to JOIN with that table ON userid to get, say MAX(albumid) and if that exists then display whatever. If it is NULL, then you wouldn't display anything.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #3  
Old 15 Dec 2010, 20:24
MikesSite MikesSite is offline
 
Join Date: Jan 2009
Okay, thanks. If I were to do this in the postbit do you think it would cause a noticeable load on the server?
Reply With Quote
  #4  
Old 15 Dec 2010, 20:27
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
If you do it by using a plugin to the post query, then I doubt you would notice a thing. If you do it by running a separate query per post, then you could notice something, but it's doubtful since it's such a small query, but that depends on your server really.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #5  
Old 15 Dec 2010, 20:38
MikesSite MikesSite is offline
 
Join Date: Jan 2009
Lynn, you are the best!! Thanks very much, I'm going to toy with this for a bit
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 11:41.

Layout Options | Width: Wide Color: