Support Request TemplateWhat version of phpBB are you using? phpBB 3.0.9What is your board's URL?http://gothambynight.com/DC/index.phpWho do you host your board with? Byethost/IFastNetHow did you install your board? I used a tool provided by my hostWhat is the most recent action performed on your board? Fresh InstallIs registration required to reproduce this issue? NoDo you have any MODs installed? YesDo you have any extensions installed? NoWhat MODs do you have installed? mChat & reIMG Image ResizerWhat styles do you currently have installed? prosilver, sacred2light (custom tweaked version called DC)What language(s) is your board currently using? EnglishWhich database type/version are you using? MySQL 5What is your level of experience? New to PHP but not phpBBWhat actions did you take (updating your board; installing a MOD, style or extension; etc.) prior to this problem becoming noticeable? Added three custom profile fields, then code to the viewtopic and functions_profile_fields files to allow bbcode use in them.Please describe your problem.
I have added three custom profile fields (TRAIT, STATUS, and HUMANITY) for a roleplaying game on this forum, with code tweaks to the viewtopic and functions_profile_fields files which allow bbcode so that icons can be displayed in the mini profile under the avatar for each user. However, the icons show for SOME users but not others, and I can't figure out why. Different users (all of whom are at the same permission level, Registered Users) seem to be seeing different displayed mini profiles, but no one (including me, as administrator) can see all of them. (I mean ones that HAVE images/text entered - obviously if the field were blank, we wouldn't see it.)

All the images being displayed are located on my host in the same directory, and they all display perfectly on the individual user's profile, just not in topics. Repeated style refreshes and purges of all the caches I can find aren't solving the problem. I currently have General > Server Configuration > Load Settings > Recompile Stale Style Components set to YES as well and have for the duration of the attempted project.

In the ACP, I have Users and Groups > Custom Profile Fields > each individual field checked as YES for Display in User Control Panel and Display on View Topic Screen. (Currently the fields are also checked as required, but I've tried without that and it didn't make any difference.) I also have General > Server Configuration > Load Settings > Display custom profile fields on topic pages set to YES. Again, none of these settings seem to be the problem, since SOME users' mini profiles are showing on topic pages, just not all of them.

Stay tuned, second post to come with code and screenshots.Generated by SRT Generator

For one thing there's a cookie problem, your cookie domain shows gothambynight.com and it should be .gothambynight.com, note the leading dot. See Knowledge Base - Fixing incorrect cookie settings. Once you correct that rename your cookie by changing the last letter then open the board’s /cache folder on the server and delete everything except index.htm and .htaccess. Incidentally, where did you get that code from?

"The more connected we get the more alone we become" - Kyle Broflovski

It didn't impact the profile fields problem, unfortunately, but it definitely still needed fixing!

Brf:

Hmm, okay, what should I be using there instead? I'm mostly confused by how piecemeal the results are - I would understand if using the incorrect "memberrow" made it not work at all, but I don't get how it's currently working for some users but not others.

I just gave it a shot with "postrow" instead, which I think is the right one for viewtopic?:

Oops, Mick, sorry, didn't see your question at the end there. I have the exact place I got the code from archived on my PC at home, but I'm stuck at work, will update with it when I get back there later today.

<!-- IF postrow.S_PROFILE_FIELD1 -->
<!-- Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. -->
<dd><strong>{postrow.PROFILE_FIELD1_NAME}:</strong> {postrow.PROFILE_FIELD1_VALUE}</dd>
<!-- ENDIF -->

Unfortunately, this seems to have sparked an even WEIRDER problem... here's an example, from this live topic:

Now the folks who weren't showing their profile fields STILL aren't, as you can see, but the ones who were... are showing it twice.

Clearly something is being duplicated somewhere, but I've just gone through all the files that have been edited since December 16th (when I started tinkering with this) to confirm that ONLY viewtopic_body.html (for both the DC style and prosilver) and functions_profile_fields.php have any changes or reference to the custom profile fields.

Any idea what I could have borked for this to happen? (Also, the original problem is STILL occurring!) In case more context would help, here's the functions_profile_fields.php code in broader context in case it's an issue of where it's placed:

Unfortunately... the original issue, of some users' custom profile fields showing and some not, still isn't. After another round of cache clears, the custom profile fields still show only in some topics for some users, and the SAME user might have their custom fields show in one topic, and then not show in another topic.

Big thanks to everyone helping me sort out the other issues that came up along the way so far, though!

Looking at your code, do you realize you are breaking the foreach loop?
The foreach just before you code is supposed to be executing the code after your added code. Instead it is looping your "$uid = " line.

Is the one that enables BBCode in the custom profile fields. Where it is now, it works for some profile fields but it breaks the overall display by messing up the foreach function in front of it, which is probably why all fields aren't displaying right.

I've been experimenting with moving it around to other places in the code to avoid this, but I can't seem to figure out where to actually put it to make it function AND not break anything else.

Ok ... are you sure they have any value on their custom profile fields?
If they are already registered and there is no default value the custom profile field is not visible in any way.
Check for example Bjorn's profile via ACP see if he has any custom profile field filled up.

Yes, actually! Every user except for one has a value in at least one of the three custom fields, none of which are showing. I know because I added it for all of them!

Since we're using Bjorn as an example, here's what's in those profile fields when I peek in at him on the ACP:

As you can see, the first field is just normal text, and for the others it's just regular bbcode to display the icons he should have showing in each field, the same as the folks who ARE displaying. ("imgalt" is just a custom bbcode enabling alt/title text on mouse hover.)

Here's what the icons SHOULD look like, displaying fine on his profile right now:

I'm pretty sure Brf is correct and it's an issue with where I've placed the code to enable bbcodes in profile fields messing up the overall display of topics, rather than an issue of lack of information/base settings.