Foxum
Member
I have updated my forum to 2.0.4 and this code works but the custom field does not output the right thing it seems. You can see below when supplied a specific youtube channel it works, but when it relies on a custom field it does not work as shown in the red high lighted code.
Intended use: User adds their custom channel ID inside of their forum profile and subscribe button shows their personal channel.
Current problem: The custom field I specify gives no value and returns with an error.
Below is the code, as you can see I underlined the problem in red and not sure where to go to fix this issue.
Below image is what it looks like currently, as you can see it does work with GoogleDevs but not with custom field supplied in forum profile of users.
Below this is the custom field entry found on the user profile
I covered it pretty well and it for sure seems to be some kind of style issue but this is how the embed works https://developers.google.com/youtube/youtube_subscribe_button
ps. Manually adding my channel ID as shown above does work, I have narrowed it down to being something with custom field or style code. I am quite stuck.
The custom field is just standard and is called "youtube" nothing special.
Intended use: User adds their custom channel ID inside of their forum profile and subscribe button shows their personal channel.
Current problem: The custom field I specify gives no value and returns with an error.
Below is the code, as you can see I underlined the problem in red and not sure where to go to fix this issue.
Below image is what it looks like currently, as you can see it does work with GoogleDevs but not with custom field supplied in forum profile of users.
Below this is the custom field entry found on the user profile
I covered it pretty well and it for sure seems to be some kind of style issue but this is how the embed works https://developers.google.com/youtube/youtube_subscribe_button
ps. Manually adding my channel ID as shown above does work, I have narrowed it down to being something with custom field or style code. I am quite stuck.
The custom field is just standard and is called "youtube" nothing special.
Code:
<script src="https://apis.google.com/js/platform.js"></script>
<div class="g-ytsubscribe" data-channel="GoogleDevelopers" data-layout="full" data-count="default"></div>
<xen:if is="{$message.customFields.youtube}">
<div class="g-ytsubscribe" data-channel="{$message.customFields.youtube}" data-layout="full" data-count="default"></div>
</xen:if>
Last edited: