Help with own code

Discussion forum for MOD Writers regarding MOD Development.
porfavor
Registered User
Posts: 108
Joined: Sat Aug 04, 2007 3:28 pm

Re: Help with own code

Post by porfavor » Sun Jun 08, 2008 3:29 pm

Still no output. I repeat: I have no expirience with template systems and that's the first thing I am doing for phpBB. However, it's not a mod but I hope to get more help here ;)

Code in the template is now:

Code: Select all

<!-- INCLUDE overall_header.html -->
<h2>Medaillengewinner Peking '08</h2>
<div class="panel">
   <div class="inner"><span class="corners-top"><span></span></span>

   <div class="content">
      <p>
<table width="1200" align="center" border="3" bordercolor="blue">       
<tr>
<th width="100"><h2>Medaille</h2></th>
<th width"550"><h2>Name</h2></th>
<th width="550"><h2>Sportart</h2></th>
</tr>
<tr>
<td width="100"><h3><center>{tabelle.EDELMETALL}</center></h3></td>
<td width="550"><h3><center>{tabelle.NAME}</center></h3></td>
<td width="550"><h3><center>{tabelle.SPORTART}</center></h3></td>
</table>
      </p>
   </div>

   <span class="corners-bottom"><span></span></span></div>
</div>



<!-- INCLUDE jumpbox.html -->
<!-- INCLUDE overall_footer.html -->

User avatar
stickerboy
Former Team Member
Posts: 7349
Joined: Mon Mar 29, 2004 2:27 pm
Location: Airdrie, UK (127.0.0.1)
Name: Kenny Cameron
Contact:

Re: Help with own code

Post by stickerboy » Sun Jun 08, 2008 4:26 pm

Even though it's not a MOD, it's not a topic suitable for Support (for vanilla phpBB installations, etc . . .)
You're still missing code - brf already provided it on the previous page.

Code: Select all

<!-- BEGIN tabelle -->
 . . . code goes here . . .
<!-- END tabelle -->
I'm a web-designing code-decrypting tech-support musician
|| Twitter || Flickr || phpBB Snippets ||
Formerly known as cherokee red

porfavor
Registered User
Posts: 108
Joined: Sat Aug 04, 2007 3:28 pm

Re: Help with own code

Post by porfavor » Sun Jun 08, 2008 7:41 pm

oh I need those tags then?

I thought it was only commented, sorry.

porfavor
Registered User
Posts: 108
Joined: Sat Aug 04, 2007 3:28 pm

Re: Help with own code

Post by porfavor » Mon Jun 09, 2008 3:00 pm

ok that works. Now I only have to edit some stuff in the template. I will get back to you if I'll be facing problems.

porfavor
Registered User
Posts: 108
Joined: Sat Aug 04, 2007 3:28 pm

Re: Help with own code

Post by porfavor » Mon Jun 09, 2008 3:14 pm

Ok looks pretty good so far. Now I'd like to assign a special image to every of the three choices. I know I will need some extra code by adding something like "if mysqlresult is gold assign "img...""
I am not sure how to do this. But I think the place is here isn't it?

Code: Select all

while($row = mysql_fetch_assoc($ergebnis)) {
         
 

	$template->assign_block_vars('tabelle', array(
			'EDELMETALL'			=> $row['Edelmetall'],
			'NAME'		=> $row['Name'],
			'SPORTART'		=> $row['Sportart'],
			));
the result for "Edelmetall" can only be three values as it's an option field in the form. So how am I gonna print a special image for every single one?

Locked

Return to “[3.0.x] MOD Writers Discussion”