Welcome, Guest. Please login or register.
Did you miss your activation email?
May 27, 2012, 01:07:23 AM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155557 Posts in 21715 Topics by 7737 Members
Latest Member: gx-world
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: how would i add this into a page  (Read 1765 times)
peachey

Offline Offline

Posts: 14


« on: September 19, 2006, 09:21:59 AM »

i want to inculde this into my page in the row under the "lastest News:"
the code i want:
Code:
<!--P
$number=1;
$category=1;
include("/home/peachey/public_html/cutenews/show_news.php");
-->

and my current page is this:
Code:
<p><table style="WIDTH: 100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td><p align="center"><font size="5"><strong>Welcome to the <em>Hut Of Peachey</em>.</strong></font></p></td></tr><tr><td></td></tr><tr><td><strong><u>Latest News:</u></strong></td></tr><tr><td>td></tr></tbody></table></p>
Logged
peachey

Offline Offline

Posts: 14


« Reply #1 on: September 21, 2006, 09:23:42 AM »

the code is php btw
Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7973



WWW
« Reply #2 on: September 21, 2006, 09:28:43 AM »

Hello,

sorry for not answering. I don't understand exactly what you wanna do with this code. Can you please explain what result you wanna have on your page.

Matthias
Logged
peachey

Offline Offline

Posts: 14


« Reply #3 on: September 21, 2006, 09:36:50 AM »

it displays the cutenews output into a page (sort of like an iframe)
Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7973



WWW
« Reply #4 on: September 21, 2006, 10:35:36 AM »

Aaaaah,

now i understand. Ok there are different abilitys.

1. You wanna have the news only on one page
Go in WB admin interface to the edit page section and the page where you wanna have the news. On top right you see "manage section". Go to this and add a code section. Insert in this code section the php code without "<?php" at the beginning and "?>" at the end. The code should look like the one you posted

Didn't work on my test enviroment

2. You wanna have the news on every page at the same place (header or footer or wherever).
Edit the index.php of your template and the code where you wanna have it. From your example it should the look like
Code:
<td>
     <strong><u>Latest News:</u></strong>
     <?php
     
<!--P
     $number
=1;
     
$category=1;
     include(
"cutenews/show_news.php");
     -->
     
?>

</td>

Not tested but it should work

Matthias
« Last Edit: September 21, 2006, 11:20:30 AM by ruebenwurzel » Logged
peachey

Offline Offline

Posts: 14


« Reply #5 on: September 26, 2006, 04:25:38 AM »

sorry for taking so long to reply, i just want it on the front page in the table cell.
Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7973



WWW
« Reply #6 on: September 26, 2006, 05:21:25 AM »

Hello,

not nice but a working workaround:

Make a copy of your template. Change folder and name in the info.php. Add the code to the index.php of this template. Install this template and set this template for the first page as the default template.

this way you have on every page the same layout, only on the firstpage you have the additional cutenews. Bad thing is when you make changes on your template you have to do this twice.

Matthias
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!