 |

aeadviser
User
Mar 6, 2008, 1:39 PM
Post #1 of 10
(1220 views)
Shortcut
|
|
Include a php script
|
Can't Post
|
|
I am trying to add an include statement for a php script within a category html page. I have added an include code like the following: <?php include('../../../../comments/head-inc.php'); ?> I have also changed the AM -> Admin -> General Settings -> Dynamic SSI Parsing for Server Resolved, ext. php. Then from reading several threads I added the following to the root .htaccess file: RemoveHandler .html .htm AddType application/x-httpd-php .php .htm .html .shtml However with this added to the .htaccess file, I get a popup box asking if I want to "open" or to "save to disk" when ever a web site link is clicked upon. Any ideas as to what may be causing this? Thanks in advance.
|
|
|  |
 |

Jake
Staff
/ Moderator

Mar 6, 2008, 4:06 PM
Post #2 of 10
(1218 views)
Shortcut
|
|
Re: [aeadviser] Include a php script
[In reply to]
|
Can't Post
|
|
Hi aeadviser, This is a bit beyond our depth for support, but I was able to track down some forum posts on another site that may be useful: http://www.webmasterworld.com/new_web_development/3425889.htm http://www.webmasterworld.com/forum88/603.htm Hopefully some of the suggestions offered there will be of use to you. ----------------------------------------------------------- Cheers, Jake Swanson - Product Specialist support@interactivetools.com
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
 |

aeadviser
User
Mar 7, 2008, 11:47 AM
Post #3 of 10
(1214 views)
Shortcut
|
|
Re: [Jake] Include a php script
[In reply to]
|
Can't Post
|
|
Thanks Jake, I believe this points to the real problem which is the php does not get parsed within a html file. If I change the file type to .php, every thing works fine. However I do not want to change all page file types from .shtml to .php and break all internal and external links. I will try working with the .htaccess file some more. I would think that this is a very common problem but maybe not?? thanks again.
|
|
|  |
 |

aeadviser
User
Mar 7, 2008, 3:58 PM
Post #4 of 10
(1210 views)
Shortcut
|
|
Re: [aeadviser] Include a php script
[In reply to]
|
Can't Post
|
|
If all the file types for all pages; including index, category and article pages, were changed from .shtml to .php; what would be the follow-on issues? 1) Does AM work the same? 2) Are there any advantages of having shtml or php file types? 3) Why is the default AM setup to use shtml? 4) This also means that any and all ss includes will also have to be converted to php includes! Is this a problem for AM? I would appreciate any input here from anyone since this is a big change. But this seems to be the only way to have php includes within AM pages.
|
|
|  |
 |

aeadviser
User
Mar 8, 2008, 10:57 AM
Post #5 of 10
(1200 views)
Shortcut
|
Another thought, is it possible to publish all article pages with a .php file type but leave the main index pages as a .shtml? Can this be done under the Article Page publishing rule option ext by making it a php type?? This would solve a lot of problems since most external link would be to the root or main cat pages. Thanks for any help!
|
|
|  |
 |

Jake
Staff
/ Moderator

Mar 10, 2008, 10:11 AM
Post #6 of 10
(1182 views)
Shortcut
|
|
Re: [aeadviser] Include a php script
[In reply to]
|
Can't Post
|
|
Hi aeadviser, There is absolutely no problem with using PHP code with Article Manager, or publishing PHP pages with the software. You will have to convert any SSI's on your templates to PHP includes if you do this though. By default, Article Manager uses SSI's which is why its pages are published with the .shtml extension. There's better cross-platform support for SSI's than PHP. In regards to your second post, you're on the right track. You can publish specific pages with different extensions by modifying the file extension field on your publishing rule pages. Just replace "<ext>" with "php" and re-publishing your files to make this change. Let us know if you have any other questions about this! ----------------------------------------------------------- Cheers, Jake Swanson - Product Specialist support@interactivetools.com
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
 |

aeadviser
User
Mar 16, 2008, 10:15 AM
Post #7 of 10
(1055 views)
Shortcut
|
As an update to this thread, I have successfully added what I believe is a good full-featured comments script from Talkback to this site; www.alleventsadviser.com, for every article page. I just changed the article page template, used the article page publishing rule to create all articles with a .php file type and did a redirect 301 within the .htaccess file for each article from .shtml to .php. This provides a smooth flow for the user and search engines. The site currently has less than 300 pages.
|
|
|  |
 |

alfredot
New User
Apr 11, 2008, 3:48 PM
Post #8 of 10
(745 views)
Shortcut
|
|
Re: [Jake] Include a php script
[In reply to]
|
Can't Post
|
|
Hi There, I am new to AM and I'm not quite sure how to get to my publishing rule page to set it to php. Any help would be greatly appreciated. Thanks
|
|
|  |
 |

MikeB
Staff
/ Moderator

Apr 11, 2008, 3:56 PM
Post #9 of 10
(740 views)
Shortcut
|
|
Re: [alfredot] Include a php script
[In reply to]
|
Can't Post
|
|
Hi, Thanks for posting and welcome to the forum! You can setup Article Manager to publish as PHP by logging into the admin program and clicking Admin->Publishing. You'll want to change the "Default File Extension" at the top of the page to "php" and then click "Save". After this you'll want to click the checkbox at the top of the list of publishing rules (to select them all) and then scroll down to the dropdown menu at the bottom of the page. Select "Templates: Convert SSIs to PHP includes" from this list and then click "Go". This will ensure that all of your includes (category list, search form, etc.) still work when you switch to PHP. From there you'll want to click the "Publish All" button to re-publish all of your articles and you should be all set up to have Article Manager publish PHP pages for you. Let me know if you have any other questions or comments! Cheers, Mike Briggs - Product Specialist support@interactivetools.com
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
 |

merriman
New User
Apr 22, 2008, 7:25 AM
Post #10 of 10
(575 views)
Shortcut
|
|
Re: [MikeB] Include a php script
[In reply to]
|
Can't Post
|
|
This also had me scratching my head and in the end went for the Scriptmill comments script - uses SSI instead of PHP Worked like a dream
|
|
|  |
|