vBulletin Modifications

while...

Welcome to vBHackers.com! - vBHackers Updates:

Go Back   vBulletin Modifications > General vBulletin Section > General vBulletin Support

Reply
 
LinkBack Thread Tools
Old 07-24-2006, 04:48 PM   #1
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default while...

I was just wondering how you do a loop in vB by that i mean if you select something of the db which has more than 1 row then you can use the code below
You must first be a registered member to view any code.
the problem is that will put all of it at the top rather than what you can do with normal php and echo it in the middle of a table, see below:
You must first be a registered member to view any code.
so basically how would i position where to stream out the results?

Regards,
Nick.


oh yeah: that code is curtesy of me, livewire and bairy




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 07-24-2006, 05:32 PM   #2
vB Newbie
Join Date: Jul 2006
Real Name: Jonathan
Location: Tennessee
SaintDog is on a distinguished road

Default

It'd be best to simply create a new template and use the template to position the data you're wanting to display. There's no need to use hard-coded HTML when you don't need to .

This will start you off with the basics.


1). Create a PHP file with the following inside it.

You must first be a registered member to view any code.

Then create a new template in the vBulletin Admin CP under the style you will using this with and name it 'index_shell' (without the quotes) and inside it, paste the following:

You must first be a registered member to view any code.

Finally, create an additional template in the Admin CP and name it 'index_information' and place inside it:

You must first be a registered member to view any code.

Save both templates and save the above PHP file as test.php (rename it later to whatever you want). That will give you the basics of pulling the data from the templates so it can be displayed without hardcoding anything specifically. You can change the variable names as needed.
__________________
FiveOhFour Media - vBulletin Coding, Styling and Design




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-24-2006, 05:53 PM   #3
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

ok, thanks for that, btw you don't have to dumb everything mate :p




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-24-2006, 06:07 PM   #4
vB Newbie
Join Date: Jul 2006
Real Name: Jonathan
Location: Tennessee
SaintDog is on a distinguished road

Default

heh, wasn't trying to , just trying to make it as simple as possible. Someone else later own down the road could find the same information useful and not know as much, so simple usually ends up better overall .




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-25-2006, 03:31 AM   #5
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

see your point




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -3. The time now is 01:54 PM.


SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. (Patent Pending)