Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted November 10, 20159 yr 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!
November 10, 20159 yr Have you tried the proper PHP wrapped in the double braces? {{include '/home/username/public_html/domain/external-file.txt';}} That may work?
November 10, 20159 yr It's a template plugin, single braces, not double: {insert='/home/username/public_html/domain/external-file.txt'}
November 11, 20159 yr Author 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 :(
November 11, 20159 yr Author 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
November 11, 20159 yr 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.
November 12, 20159 yr Author 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.
Archived
This topic is now archived and is closed to further replies.