Support Forums

Php include

This is a discussion on Php include within the Customizations forums, part of the Developer Forums category; I am trying to include an external web page from within my site. It's a store locator script that is ...


Go Back   68 Classifieds Forums > Developer Forums > Customizations

Reply
 
Thread Tools Display Modes
Old 11-16-2009, 03:18 PM   #1
Junior Member
 
Join Date: Aug 2009
Posts: 6
Rep Power: 0
pixel97504 is on a distinguished road
Default Php include

I am trying to include an external web page from within my site. It's a store locator script that is for users to find riding clubs across the country.

I have tried creating a new page with page editor and inserted the following code (using the edit html source button)

<?php
include("http://findaridingbuddy.com/clubs/store_locator.php");
?>

This did not work and I just get a blank page... Does anyone have a method that would work for wrapping an external page into a page created in page editor?

Thanks for your help,
Paul

Find A Riding Buddy | Horse Riding | Horse Riding Trails | Find Riding Friends
V4.1.5 Designer
__________________
V4.1.5 Developer - Custom Template
pixel97504 is offline   Reply With Quote
Old 11-16-2009, 03:34 PM   #2
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,489
Rep Power: 136
Eric Barnes is just really nice Eric Barnes is just really nice
Default

You can do this in Smarty but you need to use the include php syntax:
Smarty
Code:
{include_php file='/path/to/load_nav.php'}
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Old 11-16-2009, 08:47 PM   #3
Junior Member
 
Join Date: Aug 2009
Posts: 6
Rep Power: 0
pixel97504 is on a distinguished road
Default

Hi Eric,

Thanks for your fast reply. Can this code be inserted directly into the page using HTML source edit?
I am not having any luck having the page recognize the code. Just reads it as text

Here is the code I am inserting:
{include_php file='http://findaridingbuddy.com/clubs/store_locator.php'}

Here is the page I am inserting the code into:
horse clubs

Any ideas?
Thanks Paul
__________________
V4.1.5 Developer - Custom Template
pixel97504 is offline   Reply With Quote
Old 11-16-2009, 11:03 PM   #4
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,489
Rep Power: 136
Eric Barnes is just really nice Eric Barnes is just really nice
Default

You need to use the server path not the url. For example: /home/user/httpdocs/path/to/file.php
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Old 11-17-2009, 01:13 PM   #5
Junior Member
 
Join Date: Aug 2009
Posts: 6
Rep Power: 0
pixel97504 is on a distinguished road
Default

I have updated the server path to: {include_php file='/home/findarid/public_html/clubs/store_locator.php'}

It still seems to see the code as a line of plain text and not code....

horse clubs
__________________
V4.1.5 Developer - Custom Template
pixel97504 is offline   Reply With Quote
Old 11-17-2009, 01:52 PM   #6
curmudgeon
 
Join Date: Mar 2006
Posts: 5,416
Rep Power: 139
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by pixel97504
I have updated the server path to: {include_php file='/home/findarid/public_html/clubs/store_locator.php'}

It still seems to see the code as a line of plain text and not code....

horse clubs
You cant insert code into a page created within the 68C admin. The reason being is that the content of those pages is stored in the database and presented to the client as text, its never parsed by the server.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 11-17-2009, 01:52 PM   #7
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,489
Rep Power: 136
Eric Barnes is just really nice Eric Barnes is just really nice
Default

Ah yes you can't do that from the content editor in admin. It has to be added to the actual template tpl file.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How many modules are include ? anthony Pre Sales Questions 7 08-20-2009 06:57 AM
Include Features On Other Pages afrederc Technical Support 5 04-20-2008 12:43 AM
want to include a header arminium Templates, HTML, CSS, and Design Help 1 09-07-2007 11:48 PM
PHP include include in Cat promo text?? Tim_A Technical Support 2 07-30-2007 11:12 AM


All times are GMT -4. The time now is 01:33 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0