WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • General Community »
  • Off-Topic »
  • how would i add this into a page
  • Print
Pages: [1]   Go Down

Author Topic: how would i add this into a page  (Read 8228 times)

peachey

  • Guest
how would i add this into a page
« on: September 19, 2006, 10:21:59 AM »
i want to inculde this into my page in the row under the "lastest News:"
the code i want:
Code: [Select]
<!--P
$number=1;
$category=1;
include("/home/peachey/public_html/cutenews/show_news.php");
-->

and my current page is this:
Code: [Select]
<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

  • Guest
Re: how would i add this into a page
« Reply #1 on: September 21, 2006, 10:23:42 AM »
the code is php btw
Logged

Offline ruebenwurzel

  • Betatester
  • **
  • Posts: 8544
  • Gender: Male
  • Keep on Rockin
    • Familie Gallas Online
Re: how would i add this into a page
« Reply #2 on: September 21, 2006, 10: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

  • Guest
Re: how would i add this into a page
« Reply #3 on: September 21, 2006, 10:36:50 AM »
it displays the cutenews output into a page (sort of like an iframe)
Logged

Offline ruebenwurzel

  • Betatester
  • **
  • Posts: 8544
  • Gender: Male
  • Keep on Rockin
    • Familie Gallas Online
Re: how would i add this into a page
« Reply #4 on: September 21, 2006, 11: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: [Select]
<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, 12:20:30 PM by ruebenwurzel »
Logged

peachey

  • Guest
Re: how would i add this into a page
« Reply #5 on: September 26, 2006, 05:25:38 AM »
sorry for taking so long to reply, i just want it on the front page in the table cell.
Logged

Offline ruebenwurzel

  • Betatester
  • **
  • Posts: 8544
  • Gender: Male
  • Keep on Rockin
    • Familie Gallas Online
Re: how would i add this into a page
« Reply #6 on: September 26, 2006, 06: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

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • General Community »
  • Off-Topic »
  • how would i add this into a page
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2