Welcome, Guest. Please login or register.
Did you miss your activation email?
May 16, 2012, 09:58:59 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155094 Posts in 21661 Topics by 7721 Members
Latest Member: arrow345
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Show PHP code on page  (Read 2115 times)
PeterM

Offline Offline

Posts: 182



WWW
« on: March 12, 2006, 08:34:39 AM »

Hi,

I started working on the template building text. It uses a lot of php-code snippets. I can paste them inside the fck-editor. But when i save the page and reopen it, the formatting is gone, and it looks really bad.

How can i use these snippets, so people can copy and paste them without losing the formatting?

PeterM

Edit:
I want to use the manual module for this. When i use a simple WYSIWYG page i can use php-code, but when using the manual module it gets all tangled up.
« Last Edit: March 12, 2006, 08:46:52 AM by PeterM » Logged
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6974


WWW
« Reply #1 on: March 12, 2006, 09:07:45 AM »

OK ... there is the "code" type page/section, which is thought for this. What you could try as an alternative is open the "source" view of your WYSIWYG editor and paste the code into the required php-tags.

Haven't tried it though ...

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

PeterM

Offline Offline

Posts: 182



WWW
« Reply #2 on: March 12, 2006, 09:12:13 AM »

But the code page is for running php-code. I just want to display it. And it is working in the WYSIWYG form, but not with the manual module, where i also use the WYSIWYG editor.

This is a normal WYSIWYG page on my site where php-code can be displayed:
http://www.mijnplekophetnet.nl/pages/themes/road-to-conversion.php

This is a page made with the manual module displaying the same text.
http://www.mijnplekophetnet.nl/pages/manual105/bad.php

I pasted the same text in the html code screen. Saved it. Everything looked good. Opened it again and saved it again. Then everything went wrong as you can see.

With a normal WYSIWYG page this doesn't happen.
« Last Edit: March 12, 2006, 09:17:11 AM by PeterM » Logged
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6974


WWW
« Reply #3 on: March 12, 2006, 10:54:36 AM »

OK ... I see what you mean ... didn't HTML have a special "quote" tag for this kind of display?

sorry, I have not much time on my hands ...

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

PeterM

Offline Offline

Posts: 182



WWW
« Reply #4 on: March 12, 2006, 10:58:46 AM »

I guess you mean te CDATA keyword.
Logged
PeterM

Offline Offline

Posts: 182



WWW
« Reply #5 on: March 12, 2006, 11:03:07 AM »

I tested it some more. When i open a new page with WYSIWYG and i type:

<?php ?> it is saved the right way.

When i type <?php ?> in a manual module page it get's deleted while saving. So i guess the problem is with the manual module.
« Last Edit: March 12, 2006, 12:52:07 PM by PeterM » Logged
pcwacht
Guest
« Reply #6 on: March 12, 2006, 01:02:35 PM »

Looks to me there are differences between wysiwyg and manual in the way they store (or retrieve) the data from the database

John
Logged
PeterM

Offline Offline

Posts: 182



WWW
« Reply #7 on: March 12, 2006, 01:06:39 PM »

Looks to me there are differences between wysiwyg and manual in the way they store (or retrieve) the data from the database

John

I guess you are right. I hope there is a quick fix for this. It's a great module.
Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7970



WWW
« Reply #8 on: May 04, 2006, 06:29:05 AM »

Hello,

Rob has fixed the code problem in the manual modul. Look here for the new version:

http://forum.websitebaker.org/index.php/topic,308.msg19911.html#msg19911

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!