Home » Forum
NoNumber!

Joomla!® Websites & Extensions
development  -  support  -  consultancy

I try to respond within 48 hours (excluding weekends).
If I haven't responded by then, feel free to post a reminder or bug me via email.

My last reply was: 16 Hours, 46 Minutes ago.

Welcome, Guest
Please Login or Register.    Lost Password?

Displaying an External .php file
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Displaying an External .php file
#98
Displaying an External .php file 3 Years, 7 Months ago  
I have a large script that I would like to use with Joomla's styles, so im using the Sourcerer plugin to try and do it.

The thing is though that I do not want to copy and past more than 100 php files into Joomla articles. That wouldn't be too bad but if I wanted to edit them it would be rather difficult.

Instead I was wondering if there is anyway to sort of "print" the php script into the article by retrieving the php file? So if I wanted to edit the .php file it would automatically change on the joomla site.

Using a wrapper will not work as if you click on a link you remain on the same page, which is a problem. It's not proper integration.

I hope someone can help with this request.

Thanks in advance.
Marked
Posts: 4
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#99
Displaying an External .php file 3 Years, 7 Months ago  
Yes, you can simply include external php file(s):
www.nonumber.nl/forum/index.php?action=v...;forum=7&topic=3
Peter van Westen
Admin
Posts: 9165
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#100
Displaying an External .php file 3 Years, 7 Months ago  
Thanks, I can do that now.

However, I keep getting Fatal Errors:
"Fatal error: Call to a member function database_query() on a non-object"
The php file I am including in the Joomla article has many other php files that need to be included(uses include "phpfile.php"; a lot), and these cause the non-object errors.

Anything I can do here?
Marked
Posts: 4
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#101
Displaying an External .php file 3 Years, 7 Months ago  
It looks like there is something in the php files that is not completely right. Keep in mind that you are including into a Joomla environment. So this means you can utilize the Joomla libraries. But it also means that - even though it might run ok on itself - your php might be conflicting with Joomla.

Your problem is somewhere with the database connection, as far as I can see. Again, you can use Joomla's database functions for this (see elsewhere in forum).
Peter van Westen
Admin
Posts: 9165
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#150
Displaying an External .php file 3 Years, 7 Months ago  
I don't suppose there would be a way to exclude it from joomla's environment so there wont be any interference?

I know little php so I cannot do a whole lot. Although merging two large scripts together shouldn't be expected to run so smoothly.
Marked
Posts: 4
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#151
Displaying an External .php file 3 Years, 7 Months ago  
If you want to run the scripts as stand alone pages, you'll have to use iframes to show them.
Peter van Westen
Admin
Posts: 9165
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#165
Displaying an External .php file 3 Years, 7 Months ago  
I see, thanks for your help.

I've decided to use the script for this particular task as it would be more hassle than its worth to get it working 100%.

Sorry for going off-topic here, but would you know how to simply take the header(menu's from a template) and place it onto another website? If not, then you can close this topic.
Marked
Posts: 4
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#167
Displaying an External .php file 3 Years, 7 Months ago  
If you don't need it to be dynamic, just copy it from the browser html source code. Otherwise it would be a bit more tricky (read: http-requests, reading output, stripping out content and replacing it with what you want, that kind of stuff).
Peter van Westen
Admin
Posts: 9165
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
Go to topPage: 1
Moderators: Peter van Westen
hosting joomla
Open Source Training | Online Joomla! Training and Support
MaxCDN | Content Delivery Network | Accelerate your site to the max