flyalaska Posted August 21, 2009 Report Posted August 21, 2009 I'm working on the awards, I got them to show. The problem is they run on the same line. SO much that you have to scroll over to see them all. Is there a way to only show 4 per line? Another problem. How do I show the images on the public profiles? All I see is the text. Eddie Quote
G-NEWC Posted August 21, 2009 Report Posted August 21, 2009 I put mine into a table to show one per line, with the description of each award on the right hand side. Try the below to show the image...i think it is commented out on the actual code already. For example ; http://linkvirtual.info/index.php/profile/view/28 <img src="<?php echo $award->image?>" alt="" /> Whilst on the subject of awards, would it be possible to have awards automatically added to pilots that have completed a certain amount of hours? It's a little tedious adding awards manually for 180 pilots Quote
flyalaska Posted August 21, 2009 Author Report Posted August 21, 2009 Your format would not work on my site. I use ribbons for awards, and would need to go about 5 across then jump down to the next line after 5. http://www.flyaka.net/index.php/profile/view/1 Some of my ribbons are for hours. It sucks do them manually. Adding a auto award would be a time saver. Quote
G-NEWC Posted August 21, 2009 Report Posted August 21, 2009 Yeah i see now, didnt realise Nice looking site you've got there, anyway. Quote
Administrators Nabeel Posted August 22, 2009 Administrators Report Posted August 22, 2009 Use line breaks after each image: <br /> or enclose them in <p> (paragraph) tags Quote
flyalaska Posted August 22, 2009 Author Report Posted August 22, 2009 That would stack one image on top of each other. I want 5 across then after 5 break to the next line. Quote
Administrators Nabeel Posted August 22, 2009 Administrators Report Posted August 22, 2009 Then you need to write some PHP code to loop, something like this: $break = 5; $i=0; // This loop should already be there foreach (.....) { if($i%$break == 0) echo "<br />"; $i++; } Quote
Thomas Posted August 28, 2009 Report Posted August 28, 2009 http://members.pulseair.co.uk//index.php/profile/view/18 Does it take a certain amount of time for these to load/register on the pilots profile? I Updated mine about 8-10hrs ago and still nothing :'( Quote
Administrators Nabeel Posted August 28, 2009 Administrators Report Posted August 28, 2009 http://members.pulseair.co.uk//index.php/profile/view/18 Does it take a certain amount of time for these to load/register on the pilots profile? I Updated mine about 8-10hrs ago and still nothing :'( Perhaps you edited the wrong template? Quote
Thomas Posted August 30, 2009 Report Posted August 30, 2009 Perhaps i did erm? it is the Public_Profile.tpl correct? Quote
Administrators Nabeel Posted August 30, 2009 Administrators Report Posted August 30, 2009 Yes, I think that one is public_profile.tpl Quote
Scott Bourque Posted October 3, 2010 Report Posted October 3, 2010 Hi gentlemen, I see when I click your link that you got this code to work. I am looking for the same thing. I need to be able to put my awards in a five across and then start a new row beneath five across then another row, etc. I looked at the code here, but it is not working for me. Where can I find one of these loop codes and where exactly do I put it. I am a complete novice with all this code, so I pretty much have almost no understanding of how to make this work on my own. I am in no hurry here and I really do appreciate all you guys have done for the virtual flight community. Take care and I look forward to any feedback. Scott Then you need to write some PHP code to loop, something like this: $break = 5; $i=0; // This loop should already be there foreach (.....) { Â Â if($i%$break == 0) Â Â Â Â echo "<br />"; Â Â $i++; } Quote
Administrators Nabeel Posted October 4, 2010 Administrators Report Posted October 4, 2010 That's in public_profile.tpl . You have to add that $i and $break variables in there Quote
mattia Posted November 22, 2011 Report Posted November 22, 2011 Hi Nabel i found a error in your code your code: $break = 5; $i=0; // This loop should already be there foreach (.....) { if($i%$break == 0) echo "<br />"; $i++; } my correction: $break = 5; $i=0; // This loop should already be there foreach (.....) { $i++; if($i%$break == 0) echo "<br />"; } Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.