How to extend page with custom PHP
-
Hi
I’m a Windows sysadmin and have been asked to help restore some custom PHP functionality for a group I’m involved with – they recently changed their website design & hosting and can’t get their custom code running. Whilst I know Windows very well, it’s fair to call my WP/PHP skills almost non-existent so please be kind ??
I have a backup of their custom PHP but have zero thoughts on how to make it live – I’ve tried Google and these forums but honestly don’t know enough to make use of what I find.
The code starts
<?php class WeatherPage2 extends Page { } class WeatherPage2_Controller extends Page_Controller { private $objWeather; public function init() { global $objWeather; parent::init(); $objWeather = $this->getWeatherzoneObject(); /* echo "<pre>"; die(var_dump($objWeather));*/ } private static function getWeatherzoneObject() { // get key $date = time();
and continues for pages.
I believe the code is fine but I just don’t know how to integrate it into the WP site (plug-in?, additional config file via FTP?, some form of magic?) – any ideas would be gratefully received.
Many thanks in advance
David
- The topic ‘How to extend page with custom PHP’ is closed to new replies.