I have an Elgg powered site at http://gardenerschat-shed.net using Betty Jones' modified Buddychat template
On the external pages (homepage) on that site I wish to use a php script that calls up random quotes. I already have this script working on our main site at http://aberaeronallotments.org"
However as the external pages on the Elgg powered site are apparently HTML a php script won't run because the page needs to run in has to be saved with the extension .php.
Has anyone got any ideas how I can achieve this?
Also as a "by the way". When I edit the external pages, the first text editor is for a
lefthand information pane
There's another editor below it that is for a righthand information pane hand. Regardeless of what is entered in the righthand information pane nothing appears on the site.
Can someone clarify why this is please? Or am I missing something elementary here?!
Thanks Dhrup - when you say you can mix php and HTML - I already know that, because a file with a php extension will display exactly the same in a browser as a HTML file, except it will execute php commands.
What I REALLY need to know is how do I get this line of code
<?php include("quotes.php"); ?>
inserted into the 'external page' on the front page of my site? At present when I edit the page the php line disappears when I save it and the 'include' file obviously does not appear when the page is displayed. I assume it's because Elgg saves the 'external page' as a HTML file.
How do I get it to save the file as a php extension file (so that it will execute php commands) and if I change the extension name how do I then get Elgg to display that file on the front page of my site, because I again assume it will be trying to load the original file with a html extension?
Am I making sense? Hope I get a response - we're only 90mins away from Monday here in the UK and the 'day of rest' will be over! :-)
must be in a file named aaaaaa.php
in order for php to be called to process the php script and as well pass-thru whatever html may exist embedded in file. ps: u got my attention b/c I 1st read yr profile. u r not a kid ;-) u might be having a "path" problem. i know the timezone u r in. some of my best elgg-friends also live there ;-)
Thanks Dhrup! Ha-Ha no I wouldn't consider myself a 'kid' either!!!!
So what you're saying is I have to save the 'quotes.php' file as 'aaaaaa.php' in the root directory of my site? And then use <?php include("aaaaaa.php"); in the external page coding to call it up?
Why the difference? the 'quotes.php' file is already saved in the root directory.
PS you must have a good taste in friends - do they all cause you hassle on your day of rest?
So you recon the insertion of the <?php include("quotes.php"); ?> line should be OK to insert in the external page coding - just that the 'quotes.php' file should be in a directory other than the root? Why does this bit of coding disappear when I recheck the html coding of the external page then? I assumed it was because that page does not handle php.
Also where does the 'external page' live in my Elgg directories? I assume that's where the includes file should also be saved.
I don't have access to the Apache logs - they're on a server in Texas! I'm not running the site from my own localhost.
Security issues should be reported to email@example.com!