Recent content by XFConvert

  1. X

    XF 2.0 template variable for avatar URL and profile URL

    Well I found this in another template, and it works for me: {$xf.visitor.getAvatarUrl('o', null, true)}
  2. X

    XF 2.0 template variable for avatar URL and profile URL

    When I tried the above, I got this error message: "The function visitor may not be called in a template. Only functions with whitelisted prefixes are allowed."
  3. X

    XF 2.0 template variable for avatar URL and profile URL

    Thanks Brad! Anyone know the code to get the avatar URL?
  4. X

    XF 2.0 template variable for avatar URL and profile URL

    What is the template variable for a user avatar URL? And also the profile URL?
  5. X

    XF 2.0 how to add an HTML script tag to every page only for logged in users

    Want to add an HTML script tag with some variables in the script, to be on every page of the site, but only for logged in users. I assume I need to add some conditionals in a template. Exactly what template and exactly what is the code for the conditional? Thanks!
  6. X

    XF 2.0 cannot use Login service after using Finder

    I first require_once a file with this code to set up the XF2 environment: $dir = __DIR__; require($dir . '/src/XF.php'); XF::start($dir); Then I use the finder as follows: $finder = \XF::finder('XF:User'); $xfuser = $finder->where('username', $username)->fetchOne(); Then I get some data...
  7. X

    XF 2.0 PHP code to get age from a user object or user profile object

    Thank you Katsulynx. Pardon this newbie question: What is the best way to look at one of the classes such as that one (/src/Entity/UserProfile.php)? Just opening the PHP file itself, or is there an API showing all of the XF 2 classes and functions?
  8. X

    XF 2.0 PHP code to get age from a user object or user profile object

    I know I can get a user object like this: $finder = \XF::finder('XF:User'); $user = $finder->where('username', "Joe")->fetchOne(); There is no age property or date of birth. So I can get a profile object like this: $profile = $user->Profile; And that profile object has date of birth day...
  9. X

    XF 2.0 How to get custom field value in PHP when it's from a set of choices

    Thank you very much katsulynx, that was a huge help. I had to play around with it a bit but I got it working. Now a related question if I may. What would the template syntax be to do the same thing -- but in a thread post? Basically I want to add a custom field like "country" near the...
  10. X

    XF 2.0 How to get custom field value in PHP when it's from a set of choices

    Have my own PHP script to authenticate an XF2 user and trying to get the custom profile fields, like "country". That profile field is from a set of choices. Here is how far I've gotten: // bootstrap framework $dir = __DIR__; require($dir . '/src/XF.php'); XF::start($dir); $app =...
  11. X

    XF 1.5 addons before or after import, does it matter?

    Oh, yah, that does make sense, especially with a lot of addons. Thank you.
  12. X

    XF 1.5 password protect website before test import

    I"m password protecting our test site the simple way via .htaccess, even before the very long import process (importing millions of posts from VB4). Will that cause any problem with the import? I assume not, just want to confirm, thanks!
  13. X

    XF 1.5 SEO friendly URLs: forum name in thread URL

    We have many forums (but no subforums within forums) and I believe it's best for SEO purposes to have the particular forum name included in the thread URLs. Is it possible to configure XF such that the URL of my threads includes the forum name as a directory? Like this: mysite.com/[forum...
  14. X

    XF 1.5 addons before or after import, does it matter?

    Doing some practice imports here, (importing from VB4+VBSEO), just have a simple question. Have many XF addons to install... does it really matter if the addons are done before or after the import? Thanks
  15. X

    XF 1.5 vb4+vbseo import: problem rebuilding search index

    Okay I guess we're getting warmer, will study this soon, thanks! One question for future reference, should board be turned off while rebuilding the search index?
Top Bottom