1
Chainsaw
PHP block to display WFS-Channel index page on home page
  • 2005/1/16 2:29

  • Chainsaw

  • Quite a regular

  • Posts: 304

  • Since: 2003/9/28


I know there is an option to display the index of WFS-Channel as the home page. Except the home page URL is redirected to the WFS-Channel module.

I wanted my church pastor to edit the welcome message himself. So I took some PHP codes from some of the suggestions at this forum and came up with this.

mysql_pconnect('localhost''''') or die ("Can't connect to DB");
mysql_query("USE ");

$query "SELECT page FROM xoops_wfschannel where CID = 1";

$result mysql_query($query);

while (
$data mysql_fetch_object($result)) {
echo 
"$data->page";
}


I created a PHP block with this and it automatically retrieve the first wfschannel record.

One tiny little problem tho, it doesn't do line breaks so I had to put

html tags on the wfschannel welcome page.

The welcome message at our church website is an example of the codes above. Simple but it works.

The wfchannel page is http://www.albanycc.org.nz/modules/wfchannel/index.php?pagenum=1

Our home page is http://www.albanycc.org.nz


Login

Who's Online

328 user(s) are online (188 user(s) are browsing Support Forums)


Members: 0


Guests: 328


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits