Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 1368

phpBB Custom Coding • Re: Hiding file attachments from guests (using style template)

$
0
0
The reason it's not working is because it's in a loop, this is one of those rare occurrences where the global template variables are not available. The convoluted solution is to copy the entire code for the loop from <!-- BEGIN _file --> to <!-- END _file --> and paste it after <!-- END _file --> and then add the if/else.

Code:

<!-- IF  S_USER_LOGGED_IN --><!-- BEGIN _file -->//unedited code<!-- END _file --><!-- ELSE --><!-- BEGIN _file -->//edit the file section so it displays error.<!-- END _file --><!-- ENDIF -->
Haven't tested it but that should work. Ideally you'd add template variable but that might require a little more work. It's on line 1300 of /includes/functions_content.php if someone else wants to take a look.

Statistics: Posted by thecoalman — Wed Sep 04, 2024 12:57 am



Viewing all articles
Browse latest Browse all 1368

Trending Articles