honeyem.co.uk | Nearly there - last 10% to go

discuss about sites that are just under construction or where experimental stuff is used
Post Reply
macmukka

honeyem.co.uk | Nearly there - last 10% to go

Post by macmukka » Wed 27. Jun 2007, 15:42

Hi all

Thought I'd share this with you

http://www.jamesryder.co.uk/clients/honey/

I am currently testing it at the moment and waiting for content changes - the text is not right...

It uses AJAX to load each of the pages from phpwcms using a modified (very) version of index.php which creates XML versions of the pages....

10% to go.

Lots of bugs and NOT OPTIMISED!

One bug I have is with the links on the front page. Clicking on HONEY CLIENTS works in FF/Safari but not in IE 6/7 - any ideas?

Site uses lots of different things to make it all work and may be a bit slow. Normal HTML version is on the way.

Best - Jim

User avatar
Kosse
Posts: 1066
Joined: Thu 9. Sep 2004, 12:08
Location: Brussels, Belgium
Contact:

Post by Kosse » Wed 27. Jun 2007, 23:32

I like the idea , very nice
Hope yuo can find the bugs that are annoying you.
Cool thing, the pages like that.
Cheers

macmukka

Post by macmukka » Wed 27. Jun 2007, 23:50

Thanks Kosse we're working on it!

the site is now up and looking slightly different here:-

http://www.honeyem.co.uk

Bugs are going to be ironed out in the next couple of weeks - client wanted a site! So news and gallery in next 2 weeks....

User avatar
metti
Posts: 81
Joined: Tue 28. Nov 2006, 07:34
Location: Merseburg
Contact:

Post by metti » Tue 31. Jul 2007, 20:25

Hey macmukka!

It's cool that you're going to use phpwcms for xml-output, even because this not easy. It would be great, if you could post the index.php if you get it to work :roll:

greetz
#GeorgeWBush { position:absolute; bottom:-6ft; }

macmukka

Post by macmukka » Mon 6. Aug 2007, 16:02

Sure no problem, the site has changed again and should be finished today (may be) and I will post a link.

page.php which creates the XML looks like this:-

Code: Select all

<?php
// define some general vars
$content 			= array();
$phpwcms 			= array();
$BL					= array();

/// load general configuration
require_once ('config/phpwcms/conf.inc.php');
require_once ('include/inc_lib/default.inc.php');
require_once (PHPWCMS_ROOT.'/include/inc_lib/dbcon.inc.php');

// some initial actions
cleanupPOSTandGET();
define('FE_CURRENT_URL', PHPWCMS_URL . 'page.php' . buildGlobalGET('getQuery'));

require_once (PHPWCMS_ROOT.'/config/phpwcms/conf.template_default.inc.php');
require_once (PHPWCMS_ROOT.'/config/phpwcms/conf.indexpage.inc.php');

require_once (PHPWCMS_ROOT.'/include/inc_lib/general.inc.php');
require_once (PHPWCMS_ROOT.'/include/inc_front/cnt.lang.inc.php');
require_once (PHPWCMS_ROOT.'/include/inc_lib/modules.check.inc.php');
require_once (PHPWCMS_ROOT.'/include/inc_lib/article.contenttype.inc.php');
require_once (PHPWCMS_ROOT.'/include/inc_lib/imagick.convert.inc.php');
require_once (PHPWCMS_ROOT.'/include/inc_front/front.func.inc.php');
require_once (PHPWCMS_ROOT.'/include/inc_front/ext.func.inc.php');
require_once (PHPWCMS_ROOT.'/include/inc_front/content.func.inc.php');

// create a new XML document
$doc = new DomDocument('1.0', 'UTF-8');

//play nicely
$doc->formatOutput = true;

// create page node
$page = $doc->createElement('page');
$page = $doc->appendChild($page);

// create title node - not really needed for me but you may want to use it
//$title = $doc->createElement('title');
//$title = $page->appendChild($title);
// create title text node
//$pgTitle = $doc->createTextNode(html_specialchars($content["pagetitle"]));
//$pgTitle = $title->appendChild($pgTitle);

// create body node
$body = $doc->createElement('body');
$body = $page->appendChild($body);

// content for body text node
$main = $doc->createCDATASection($content["all"]);
$main = $body->appendChild($main);

// add type header
header("Content-type: text/xml");

// get completed xml document
$xml_string = $doc->saveXML();

echo $xml_string;

?>
it's called by some javascript: page.php?alias etc

This will only work with PHP5 - you'll have to go another route with PHP4...

Best -

User avatar
metti
Posts: 81
Joined: Tue 28. Nov 2006, 07:34
Location: Merseburg
Contact:

Post by metti » Mon 6. Aug 2007, 16:08

Thank you very much! I will take a look at this.
Regards
#GeorgeWBush { position:absolute; bottom:-6ft; }

Post Reply