Jump to content


Photo

Output help


  • Please log in to reply
2 replies to this topic

#1 fewchurpro

fewchurpro
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 22 October 2006 - 05:36 PM

Im putting parsed info into a box. But im having trouble with some of the parts repeating itself. Is there something I need to add to stop that?

Here is the code for the output

[pre]// output HTML
// print ("<div class=\"channelname\">" . $rss_channel["TITLE"] . "</div>");

if (isset($rss_channel["ITEMS"])) {
if (count($rss_channel["ITEMS"]) > 0) {
for($i = 0;$i < 5;$i++) {
if (isset($rss_channel["ITEMS"][$i]["LINK"])) {
print ("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td background=\"wow5summ_01.jpg\" height=\"33\" width=\"64\"></td><td background=\"wow5summ_02.jpg\" height=\"33\">\n<div class=\"itemtitle\"><a href=\"" . $rss_channel["ITEMS"][$i]["LINK"] . "\"><strong><font color =\"#ffcc00\" size =\"3\" Verdana, Arial, Helvetica, sans-serif>" . $rss_channel["ITEMS"][$i]["TITLE"] . "</font></strong></a></td><td background=\"wow5summ_03.jpg\" width=\"46\" height=\"33\"></td></tr></div>");
} else {
print ("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td width=\"64\" background=\"wow5summ_01.jpg\" height=\"33\"></td><td background=\"wow5summ_02.jpg\" height=\"33\">\n<div class=\"itemtitle\"><strong><font color=\"#b7baab\" size=\"2\">" . $rss_channel["ITEMS"][$i]["TITLE"] . "</font></strong></td><td background=\"wow5summ_03.jpg\" width=\"46\" height=\"33\"></td></tr></div>");
}
print ("<tr><td background=\"wow5summ_04.jpg\" width=\"64\" height=\"20\"></td><td background=\"wow5summ_05.jpg\"></td><td background=\"wow5summ_06.jpg\" width=\"46\" height=\"20\"></td></tr>");
print ("<tr><td background=\"wow5summ_07.jpg\" width=\"64\" height=\"86\"></td><td background=\"wow5summ_08.jpg\"><font size=\"2\"><div class=\"itemdescription\">" . $rss_channel["ITEMS"][$i]["DESCRIPTION"] . "</font></td><td background=\"wow5summ_09.jpg\" width=\"64\" height=\"86\"></td></tr></div>");
print ("<tr><td background=\"wow5summ_10.jpg\" width=\"64\" height=\"25\"></td><td background=\"wow5summ_11.jpg\"></td><td background=\"wow5summ_12.jpg\" width=\"46\" height=\"25\"></td></tr></table><br/>");            }
} else {
print ("<b>There are no articles in this feed.</b>");
}
}
[/pre]


And here you can see what is happening. Ive added box at the bottom to show what it should look like as well.

Parsed Output

also if there is anyway to make the text for the title bar look the same as the css file part I would really appreciate the help on that too.

Here is the setup for the css file for the title section. Unfortunately in my output i was unable to make a class work for that.

[pre].summ1 {background-image: url(wow5summ_02.jpg); color:#FFCC00;font-weight:bold; font-size:12px;}
.summ1 a:link,.summ1 a:active,.summ1 a:visited {font-weight:bold; font-size:12px; color:#FFCC00;}
.summ1 a:hover {color:#000000;}[/pre]

#2 gmwebs

gmwebs
  • Members
  • PipPipPip
  • Advanced Member
  • 174 posts
  • LocationLondon

Posted 22 October 2006 - 09:07 PM

You are obviously nesting a table/cell within a table/cell somewhere, but is very difficult to see exactly where you are going wrong. If it were me, I would redo the script using the good table you have, and use the heredoc syntax. This will allow you to do away with all those escaped quotation marks, and you will be able to use variables directly as well.

http://uk2.php.net/m....syntax.heredoc

Have a look at my example below as well...


<?php

	$deltagfieldlimit = 5;
	$deltagcounter = 1;
				
	while( $deltagcounter <= $deltagfieldlimit ) {
	
	$del_tag_fields .= <<<DELTAGEOF

		<tr class="upload">
			<td class="uploadlbl">tag</td>
			<td class="upload"><select name="cvbtag_name[]"><option value="" class="fieldcell" >select</option>$delete_tag_list</select></td>
		</tr>

DELTAGEOF;
		
	$deltagcounter++;

	}

?>


This example will build 5 drop down lists... Note how the variable $delete_tag_list is used directly?

HTH

#3 fewchurpro

fewchurpro
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 23 October 2006 - 12:46 AM

its a script from global syndication, I wouldnt know how to change it up. Im not that advanced. I used it on another site but it only used border 1 and just 1 gif for header bar.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users