MG 1.1 Baby steps -- syntax for user home page field on xengallery_media_view template

This guide will help you identify the template and code associated with the member home page: https://xenforo.com/community/resources/how-to.4390/

Whether that is available on the media template is another matter though.
This guide helps with determining whether variables/parameters are available to use in templates: https://xenforo.com/community/resources/using-variables-in-templates.5034/

It's worth bearing in mind the distinction between $user and $visitor; $visitor is always the record for the current logged in user, $user is the record being processed (e.g. message author, member list, list of online users, etc.).
 
Thank you, but I need another pointer as I am still lost. L
ooking at phpmyadmin, I know I need the
homepage
field, from the
xf_user_profile

table
but I need another baby step to identify what this would be called in the xenforo syntax.

I see I can print the user who posted the photo's linked username by using:
{xen:helper username, $user}<xen:username user="$media" />
on the xengallery_media_view template.
(not sure if the above is the correct or ideal syntax but it seems to work.)

Following the second tutorial, I don't know where to begin in terms of the variablename to test for to match the above table and column using the {xen:helper dump, $variablename} to see if variablename is available.
 
Last edited:
OK, used {xen:helper dump, $media} to dump the variables available on the xengallery_media_view template
and it seems I can access {$media.homepage} which is the user's homepage who added the media. So I lucked out and it's easy. Thanks!

I'm not up to speed at all on the xenforo syntax obviously, so need to get up to speed rapidly :)
Thank you for the help and tutorials you've provided!
 
Last edited:
Just when I think I'm getting smarter... (at tortoise speed maybe...)

Now curious what fields are available in the xengallery_media_block template as I'd like to explore including username below media thumbnail on the forum list media block carousel.
{xen:helper dump, $media} returns NULL
{xen:helper dump, $media_block} returns NULL
{xen:helper dump, $forum_list} returns NULL

Instead of $media, what would I enter for this template to see what fields are available?
 
Top Bottom