|
|
Subject:
XML Feed (Yahoo Search Marketing Code) Display Problems
Category: Computers > Programming Asked by: nyoung-ga List Price: $45.00 |
Posted:
14 Sep 2006 05:57 PDT
Expires: 14 Oct 2006 05:57 PDT Question ID: 765228 |
|
There is no answer at this time. |
|
Subject:
Re: XML Feed (Yahoo Search Marketing Code) Display Problems
From: paul_thomas-ga on 19 Sep 2006 07:37 PDT |
You can float things to the right no problem. But having two inline tables isn't that great. You could use cells from the same table. Or better still don't use tables but divs. I don't really understand you question. Are you asking for help adapting you php code to output what you want? |
Subject:
Re: XML Feed (Yahoo Search Marketing Code) Display Problems
From: paul_thomas-ga on 19 Sep 2006 08:26 PDT |
In genral if you have an array of 9 results you can output them with php like so <?php //Array of 9 results $results = Array( 1 => "result1", 2 => "result2", 3 => "result3", 4 => "result4", 5 => "result5", 6 => "result6", 7 => "result7", 8 => "result8", 9 => "result9",); //output $ouput = <<<EOT <html> <head> <style type="text/css"> .set1 {display:inline; float:left;width:200px} .set2 {display:inline; float:right;width:200px} </style> </head> <body> <div class='set1'> <li>$results[1]</li> <li>$results[2]</li> <li>$results[3]</li> <li>$results[4]</li> <li>$results[5]</li> </div> <div class='set2'> $results[6]<br> $results[7]<br> $results[8]<br> $results[9]<br> </div> </body> </html> EOT; //display echo $ouput; ?> Here is the example in practice: http://www.pttools.co.uk/listload.php In order to adapt the yahoo feed and implement the xml correctly I will have to look at your Yahoo code first |
Subject:
Re: XML Feed (Yahoo Search Marketing Code) Display Problems
From: paul_thomas-ga on 19 Sep 2006 08:30 PDT |
note there shouldn't really be a comma after "result9" |
Subject:
Re: XML Feed (Yahoo Search Marketing Code) Display Problems
From: paul_thomas-ga on 20 Sep 2006 07:07 PDT |
This is how I would do it: http://www.pttools.co.uk/yahoofeed.php I tidied up the code a bit and corrected some syntax errors. The code: <?php /* # test values for ($x=0; $x<=9; $x++){ $listings[$x] = Array('CLICKURL' => 'click'.$x ,'TITLE' => 'title'.$x, 'DESCRIPTION' => 'desc'.$x, 'SITEHOST' => 'host'.$x, 'BIDDEDLISTING' => 'bid'.$x); } */ // Display the results echo "<div style='display:inline;float:left;vertical-align:top'>"; foreach ($listings as $key=>$val) { if ($key<=5){ echo '<table width="250" height="1" cellpadding="1" border="0" cellspacing="0"><tr><td colspan="2"bgcolor="#ECF5FA">'; echo '<b>'; echo '<br><li><a href="/clickcount/click.php?url='; echo $val['CLICKURL']; echo '"><SPAN style="font-size: 11pt; font-weight:bold; text-decoration: underline" onclick="dmclick=1;">'; echo $val['TITLE']; echo '</span></a></li></b><br>'; echo '<a href="/clickcount/click.php?url='; echo $val['CLICKURL']; echo '"><SPAN style="font-size: 9pt; color: #000000; font-weight:500" onclick="dmclick=1;">'; echo $val['DESCRIPTION']; echo '</span></a>'; echo ' <a href="/clickcount/click.php?url='; echo $val['CLICKURL']; echo '"><SPAN style="font-size: 9pt; font-weight:900" onclick="dmclick=1;">'; #what goes here? echo '</span></a>'; echo '<a href="/clickcount/click.php?url='; echo $val['CLICKURL']; echo '"><SPAN style="font-size: 10pt; color: #318000; font-style: italic; font-weight: 500; text-decoration: underline" onclick="dmclick=1;">'; echo $val['SITEHOST']; echo '</span></a>'; if( 'true' == $val['BIDDEDLISTING'] ) { echo ' <font size="2">'.$val['BIDDEDLISTING']>'</font>'; } echo '</td></tr> </table>'; if($key==5){echo "</div>";} }else{ if($key==6){echo "<div style='display:inline;float:right;vertical-align:top;background-color:red;'>";} echo '<table width="250" height="1" cellpadding="1" border="0" cellspacing="0"><tr><td colspan="2"bgcolor="#ECF5FA">'; echo '<b>'; echo '<br><li><a href="/clickcount/click.php?url='; echo $val['CLICKURL']; echo '"><SPAN style="font-size: 11pt; font-weight:bold; text-decoration: underline" onclick="dmclick=1;">'; echo $val['TITLE']; echo '</span></a></li></b><br>'; echo '<a href="/clickcount/click.php?url='; echo $val['CLICKURL']; echo '"><SPAN style="font-size: 9pt; color: #000000; font-weight:500" onclick="dmclick=1;">'; echo $val['DESCRIPTION']; echo '</span></a>'; echo ' <a href="/clickcount/click.php?url='; echo $val['CLICKURL']; echo '"><SPAN style="font-size: 9pt; font-weight:900" onclick="dmclick=1;">'; #what goes here? echo '</span></a>'; echo '<a href="/clickcount/click.php?url='; echo $val['CLICKURL']; echo '"><SPAN style="font-size: 10pt; color: #318000; font-style: italic; font-weight: 500; text-decoration: underline" onclick="dmclick=1;">'; echo $val['SITEHOST']; echo '</span></a>'; if( 'true' == $val['BIDDEDLISTING'] ) { echo ' <font size="2">'.$val['BIDDEDLISTING']>'</font>'; } echo '</td></tr> </table>'; } } echo "</div>"; ?> |
Subject:
Re: XML Feed (Yahoo Search Marketing Code) Display Problems
From: paul_thomas-ga on 23 Sep 2006 04:07 PDT |
Hi Nic I don't think I can post in the answer section because Google answers are not accepting Researcher applications at the moment for some reason. If you want to discuss it with me you can at dt01pqt_pt at yahoo dot com or any other requirements you have. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |