Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
chopin Posted May 12, 2016 Posted May 12, 2016 I have a conditional in the AttachedFile template, that is supposed to ignore files that are mp3 and pdf. The reason why I want this functionality is because I built a module that reads mp3s and pdfs in a better way (for my forum). When I edit a topic, the below code works fine. However when someone creates a new post, the below fails. I am not sure if this is a bug with IPB, or if there is another template that I am supposed to make an edit to. But when I searched for the keyword "ipsAttachLink" in the templates, the only files that came up were "attachedFile" and "attachedImage". See below, for the conditional I added to get this functionality to partially work. {{if pathinfo($title, PATHINFO_EXTENSION) == 'mp3' OR pathinfo($title, PATHINFO_EXTENSION) == 'pdf'}} {$addLink = false} {{else}} {{if $pTag}}<p>{{endif}}<a class="ipsAttachLink" href="{$url}">{$title}</a>{{if $pTag}}</p>{{endif}} {{endif}}
Recommended Posts
Archived
This topic is now archived and is closed to further replies.