Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
JLS Posted November 10, 2015 Posted November 10, 2015 I've found several old IP4 topics that were in the beta, feedback, and bug report (closed) areas. I'm not sure if any of them in those areas seemed appropriate to comment in still so I'm making a new topic. I need to include an external file in our template like I did in IP3. From what I can gather the code is {{insert='/home/username/public_html/domain/external-file.txt'}} But that's not working. Any ideas? I read one comment that might indicate the file has to be in the IP installations folder rather then in another location on our site but nobody confirmed. I hope that's not the case. Thanks!
Morrigan Posted November 10, 2015 Posted November 10, 2015 Have you tried the proper PHP wrapped in the double braces? {{include '/home/username/public_html/domain/external-file.txt';}} That may work?
Marcher Technologies Posted November 10, 2015 Posted November 10, 2015 It's a template plugin, single braces, not double: {insert='/home/username/public_html/domain/external-file.txt'}
JLS Posted November 11, 2015 Author Posted November 11, 2015 20 hours ago, Morrigan said: Have you tried the proper PHP wrapped in the double braces? {{include '/home/username/public_html/domain/external-file.txt';}} That may work? I've tried this and just tried it again. Produces a "Safari Can't Open Page - Can't decode raw data error NSURLErrorDomain:-1015". But safari never had a problem with the old code in 3.4 and same file which was: {parse include="/home/username/public_html/domain/external-file.txt"} 20 hours ago, Marcher Technologies said: It's a template plugin, single braces, not double: {insert='/home/username/public_html/domain/external-file.txt'} I've tried that too but just tried again. Error 500 :(
JLS Posted November 11, 2015 Author Posted November 11, 2015 Can anyone confirm they got one of these codes to work on their own site? Debating if I should submit a new bug for it since there was one in the past and it was debated whether it was fixed or not I believe... Thanks
Tom S. Posted November 11, 2015 Posted November 11, 2015 1 hour ago, JLS said: Can anyone confirm they got one of these codes to work on their own site? Debating if I should submit a new bug for it since there was one in the past and it was debated whether it was fixed or not I believe... Thanks This works for me. {insert="mydocs/somefolder/somefile.php"} I'm on 4.1.0 though. Probably the insert command doesn't work with .txt files.
JLS Posted November 12, 2015 Author Posted November 12, 2015 Ok thanks! I'm using 4.1.0 as well. I did get that code to work (and with .txt) so that's cool. BUT, it's only working if the file is inside the forum folders and not another location on the site. I can probably make this work but that's an odd restriction. Especially if it's only happening to me?...LOL.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.