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?!
Many Thanks,
G.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
Does anyone actually read my posts? There never appears to be any responses, or should I be posting somewhere ele?
G.
Is anyone actually reading my reply to this ???? LOLZ ;-) doan be so pushy heh heh;;; after all it's sunday !! rest day.. Sure can mix php & html anytime ;-) shud work. ackshully there's already some kinda random quotes plugins thingy, maybe several.. floating around..
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! :-)
G.
<?php
include("quotes.php");
?>
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 ;-)
Can't find any plugins when I search for 'quotes' or 'random quotes' in the plugin lists. So I guess I'm back to using my 'include quotes php' file idea for my external page. If only I could find a way of doing it!
G.
Try "Prayers" - that similar OR try ask my smartie-girly-friend Goofers -- she online right now - she has something called "Scopes" for random text ;-)
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.
G.
PS you must have a good taste in friends - do they all cause you hassle on your day of rest?
quotes.php is fine... but need to look where u r calling the "include" from (i think that yr prob maybe...) if quotes.php not pulled in - read yr apache error log for include not found error..
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.
G.
r u talking re : "externalpages" in elgg ?
- Previous
- 1
- 2
- Next
You must log in to post replies.