SunQuest
           Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old March 9th, 2004, 07:15 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
PHP output to html

Not sure if this is even doable.

I have a rss feed set up and it works so long as I access it as a separate page http://www.johnstons.cc/rss_news.php

Wha I want to do is have it embedded in on the site's main page. I'm using phpbb2 as my foundation. phpbb2 uses .tpl files that are called from the related .php page.

So, with that bit of info, is it possible to incude:

Code:

<?php 
include('rss_newsfeed.php');
?> 


in

<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" height="25"><span class="genmed"><b>Feeds of Knowledge</b></span></td>
</tr>
<tr>
<td class="row1" align="center"><span class="gensmall"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<table cellspacing="0" cellpadding="2" border="0" width="100%">
<tr>
<br>
<div align="center">Tutorials and News</div>
<br>
<table width="100%" border="1">
<tr>
<td width="50%" valign="top"><div align="center"><font size="-1">PHP Tutorial from Codewalkers</font></a><br /><br /> FEED RESULTS HERE</div></td>

<td width="50%" valign="top"><div align="center"><font size="-1">Another News Feed</font></a><br /><br /> FEED RESULTS HERE</div></td>
</tr>
</table>

Reply With Quote
  #2  
Old March 9th, 2004, 08:43 PM
Blindeddie Blindeddie is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: NJ - USA
Posts: 2,152 Blindeddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
RE: PHP output to html

did you try it?

Reply With Quote
  #3  
Old March 9th, 2004, 08:50 PM
bearqst bearqst is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Alaska
Posts: 153 bearqst User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 47 sec
Reputation Power: 2
RE: PHP output to html

Guess I should of noted that ..

Yes I did try it, no errors, no content either. The page loaded and the table "block" showed with the 2 <td's I have dividing the layout, but no content.

I tried to embed

Code:
<td width="50%" valign="top"><div align="center"><font size="-1">PHP Tutorial from Codewalkers</font></a><br /><br /> 
<?php 
include('rss_newsfeed.php');
?> 
</div></td>


nada

Reply With Quote
  #4  
Old March 9th, 2004, 09:56 PM
Blindeddie Blindeddie is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: NJ - USA
Posts: 2,152 Blindeddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
RE: PHP output to html

try echoing another line of text inside the include file to see if that appears in the table cell. That will help determine if the include portion is working. Also, what is the extension of the file you are putting the include in?

Reply With Quote
  #5  
Old March 10th, 2004, 01:57 AM
bearqst bearqst is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Alaska
Posts: 153 bearqst User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 47 sec
Reputation Power: 2
RE: PHP output to html

It seems I can't get the include to work. I tried to echo a little text, nothing.

I think it might be because of the PHPBB structure?

My rss_feed pages are both .php, but the page the html code is embedded in is a .tpl file extension.

.tpl is similar to .txt (I think). However, if I change the extension to .php or even .html the rest of the site doesn't load right

I can get the feed output, as long as I use .php extension, you can see it at

http://www.johnstons.cc/rss_test.php

Here it prints out just fine and presents the proper layout I want

Reply With Quote
  #6  
Old March 10th, 2004, 12:55 PM
Blindeddie Blindeddie is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: NJ - USA
Posts: 2,152 Blindeddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
RE: PHP output to html

Unfortunatly I am not familiar with PHPBB so I relly can't be of much help there, but your assumption about the problem seems to be correct. The php is not being parsed when the page is loaded, so the include is not working.

Reply With Quote
  #7  
Old March 10th, 2004, 01:08 PM
bearqst bearqst is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Alaska
Posts: 153 bearqst User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 47 sec
Reputation Power: 2
RE: PHP output to html

Thanks Blindeddie,

I think I have figured out a solution, not sure if my minimal knowledge of php will allow me to do it though. It's more phpbb structure related, so forward and onward....

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > PHP output to html


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway