Dynamic letters avatar - ThemesCorp.com [Deleted]

Allan

Well-known member
#1
Allan submitted a new resource:

Dynamic letters avatar - ThemessCorp.com - This add-on allows your members to use a dynamic avatar, it is a color background with the first let

This add-on allows your members to use a dynamic avatar, it is a color background with the first letters of the username.

With 2 letters:
View attachment 153608

With 1 letter:
View attachment 153618

You can select the font used and the number of letters to display.
View attachment 153605

You can add an unlimited number of background colors and color letters.
View attachment 153606

Users can choose the background of their choice:...
Read more about this resource...
 

Anthony Parsons

Well-known member
#2
I assume this uses all CSS and the default font, i.e. Google Font used? So nothing additionally is loaded on the page?

Obviously this works from the "can upload avatar" permission. I don't allow uploaded avatars, so would this work if avatar upload was set to 0 size only allowing this avatar? Or can this support a separate permission for use?
 

remiff

New member
#3
I assume this uses all CSS and the default font, i.e. Google Font used? So nothing additionally is loaded on the page?
We do not use the css system. Everything is managed from the options. An image is then created relative to it in the form of a hash.

Obviously this works from the "can upload avatar" permission. I don't allow uploaded avatars, so would this work if avatar upload was set to 0 size only allowing this avatar? Or can this support a separate permission for use?
Yes it works because the system has its own permissions
 

Anthony Parsons

Well-known member
#11
Ok, testing this I've got this error:

Code:
Error Info
ErrorException: Undefined offset: 4 - library/ThemesCorp/DLA/Model/Dla.php:153
Generated By: anthony, A moment ago
Stack Trace
#0 /var/www/myptsd/html/c/library/ThemesCorp/DLA/Model/Dla.php(153): XenForo_Application::handlePhpError(8, 'Undefined offse...', '/var/www/myptsd...', 153, Array)
#1 /var/www/myptsd/html/c/library/ThemesCorp/DLA/Model/Dla.php(170): ThemesCorp_DLA_Model_Dla->removeExtensionsOfFontFamily('')
#2 /var/www/myptsd/html/c/library/ThemesCorp/DLA/XenForo/ControllerPublic/Account.php(70): ThemesCorp_DLA_Model_Dla->getInfoAvatar(Array)
#3 /var/www/myptsd/html/c/library/ThemesCorp/DLA/XenForo/ControllerPublic/Account.php(20): ThemesCorp_DLA_XenForo_ControllerPublic_Account->_prepareViewParams()
#4 /var/www/myptsd/html/c/library/XenForo/FrontController.php(351): ThemesCorp_DLA_XenForo_ControllerPublic_Account->actionDynamicAvatar()
#5 /var/www/myptsd/html/c/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#6 /var/www/myptsd/html/c/index.php(13): XenForo_FrontController->run()
#7 {main}
Request State
array(3) {
  ["url"] => string(200) "https://www.myptsd.com/c/account/dynamic-avatar?&_xfRequestUri=%2Fc%2Faccount%2Fpersonal-details&_xfNoRedirect=1&_xfToken=1%2C1499312324%2C0196c01892505e9e182875d992c91b6de0969b23&_xfResponseType=json"
  ["_GET"] => array(5) {
   ["/c/account/dynamic-avatar"] => string(0) ""
   ["_xfRequestUri"] => string(27) "/c/account/personal-details"
   ["_xfNoRedirect"] => string(1) "1"
   ["_xfToken"] => string(53) "1,1499312324,0196c01892505e9e182875d992c91b6de0969b23"
   ["_xfResponseType"] => string(4) "json"
  }
  ["_POST"] => array(0) {
  }
}
 

Anthony Parsons

Well-known member
#12
Also:

Code:
Error Info
ErrorException: Undefined index: contentName - library/ThemesCorp/DLA/Helper/DynamicLettersAvatar.php:206
Generated By: Simply Simon, 6 minutes ago
Stack Trace
#0 /var/www/myptsd/html/c/library/ThemesCorp/DLA/Helper/DynamicLettersAvatar.php(206): XenForo_Application::handlePhpError(8, 'Undefined index...', '/var/www/myptsd...', 206, Array)
#1 /var/www/myptsd/html/c/library/ThemesCorp/DLA/Helper/DynamicLettersAvatar.php(31): ThemesCorp_DLA_Helper_DynamicLettersAvatar->_initializerParams()
#2 /var/www/myptsd/html/c/library/ThemesCorp/DLA/Helper/Avatar.php(135): ThemesCorp_DLA_Helper_DynamicLettersAvatar->getAvatarDla()
#3 /var/www/myptsd/html/c/library/ThemesCorp/DLA/Helper/Avatar.php(56): ThemesCorp_DLA_Helper_Avatar::_callClassDla(Array, 48)
#4 /var/www/myptsd/html/c/library/XenForo/Template/Helper/Core.php(853): ThemesCorp_DLA_Helper_Avatar::helperAvatarUrl(Array, 's')
#5 /var/www/myptsd/html/c/library/XenForo/ViewPublic/Member/Find.php(11): XenForo_Template_Helper_Core::callHelper('avatar', Array)
#6 /var/www/myptsd/html/c/library/XenForo/ViewRenderer/Abstract.php(229): XenForo_ViewPublic_Member_Find->renderJson()
#7 /var/www/myptsd/html/c/library/XenForo/ViewRenderer/Json.php(88): XenForo_ViewRenderer_Abstract->renderViewObject('XenForo_ViewPub...', 'Json', Array, 'member_autocomp...')
#8 /var/www/myptsd/html/c/library/XenForo/FrontController.php(606): XenForo_ViewRenderer_Json->renderView('XenForo_ViewPub...', Array, 'member_autocomp...', NULL)
#9 /var/www/myptsd/html/c/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_Json), Array)
#10 /var/www/myptsd/html/c/index.php(13): XenForo_FrontController->run()
#11 {main}
Request State
array(3) {
  ["url"] => string(68) "https://www.myptsd.com/c/index.php?members/find&_xfResponseType=json"
  ["_GET"] => array(2) {
   ["members/find"] => string(0) ""
   ["_xfResponseType"] => string(4) "json"
  }
  ["_POST"] => array(5) {
   ["q"] => string(8) "anthony "
   ["_xfRequestUri"] => string(3) "/c/"
   ["_xfNoRedirect"] => string(1) "1"
   ["_xfToken"] => string(8) "********"
   ["_xfResponseType"] => string(4) "json"
  }
}
I noticed that when two users with the same first letter appear, it changed it to use two letters from one, even though the setting is one letter.
 

Allan

Well-known member
#14
Ok, testing this I've got this error:

Code:
Error Info
ErrorException: Undefined offset: 4 - library/ThemesCorp/DLA/Model/Dla.php:153
Generated By: anthony, A moment ago
Stack Trace
#0 /var/www/myptsd/html/c/library/ThemesCorp/DLA/Model/Dla.php(153): XenForo_Application::handlePhpError(8, 'Undefined offse...', '/var/www/myptsd...', 153, Array)
#1 /var/www/myptsd/html/c/library/ThemesCorp/DLA/Model/Dla.php(170): ThemesCorp_DLA_Model_Dla->removeExtensionsOfFontFamily('')
#2 /var/www/myptsd/html/c/library/ThemesCorp/DLA/XenForo/ControllerPublic/Account.php(70): ThemesCorp_DLA_Model_Dla->getInfoAvatar(Array)
#3 /var/www/myptsd/html/c/library/ThemesCorp/DLA/XenForo/ControllerPublic/Account.php(20): ThemesCorp_DLA_XenForo_ControllerPublic_Account->_prepareViewParams()
#4 /var/www/myptsd/html/c/library/XenForo/FrontController.php(351): ThemesCorp_DLA_XenForo_ControllerPublic_Account->actionDynamicAvatar()
#5 /var/www/myptsd/html/c/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#6 /var/www/myptsd/html/c/index.php(13): XenForo_FrontController->run()
#7 {main}
Request State
array(3) {
  ["url"] => string(200) "https://www.myptsd.com/c/account/dynamic-avatar?&_xfRequestUri=%2Fc%2Faccount%2Fpersonal-details&_xfNoRedirect=1&_xfToken=1%2C1499312324%2C0196c01892505e9e182875d992c91b6de0969b23&_xfResponseType=json"
  ["_GET"] => array(5) {
   ["/c/account/dynamic-avatar"] => string(0) ""
   ["_xfRequestUri"] => string(27) "/c/account/personal-details"
   ["_xfNoRedirect"] => string(1) "1"
   ["_xfToken"] => string(53) "1,1499312324,0196c01892505e9e182875d992c91b6de0969b23"
   ["_xfResponseType"] => string(4) "json"
  }
  ["_POST"] => array(0) {
  }
}
Also:

Code:
Error Info
ErrorException: Undefined index: contentName - library/ThemesCorp/DLA/Helper/DynamicLettersAvatar.php:206
Generated By: Simply Simon, 6 minutes ago
Stack Trace
#0 /var/www/myptsd/html/c/library/ThemesCorp/DLA/Helper/DynamicLettersAvatar.php(206): XenForo_Application::handlePhpError(8, 'Undefined index...', '/var/www/myptsd...', 206, Array)
#1 /var/www/myptsd/html/c/library/ThemesCorp/DLA/Helper/DynamicLettersAvatar.php(31): ThemesCorp_DLA_Helper_DynamicLettersAvatar->_initializerParams()
#2 /var/www/myptsd/html/c/library/ThemesCorp/DLA/Helper/Avatar.php(135): ThemesCorp_DLA_Helper_DynamicLettersAvatar->getAvatarDla()
#3 /var/www/myptsd/html/c/library/ThemesCorp/DLA/Helper/Avatar.php(56): ThemesCorp_DLA_Helper_Avatar::_callClassDla(Array, 48)
#4 /var/www/myptsd/html/c/library/XenForo/Template/Helper/Core.php(853): ThemesCorp_DLA_Helper_Avatar::helperAvatarUrl(Array, 's')
#5 /var/www/myptsd/html/c/library/XenForo/ViewPublic/Member/Find.php(11): XenForo_Template_Helper_Core::callHelper('avatar', Array)
#6 /var/www/myptsd/html/c/library/XenForo/ViewRenderer/Abstract.php(229): XenForo_ViewPublic_Member_Find->renderJson()
#7 /var/www/myptsd/html/c/library/XenForo/ViewRenderer/Json.php(88): XenForo_ViewRenderer_Abstract->renderViewObject('XenForo_ViewPub...', 'Json', Array, 'member_autocomp...')
#8 /var/www/myptsd/html/c/library/XenForo/FrontController.php(606): XenForo_ViewRenderer_Json->renderView('XenForo_ViewPub...', Array, 'member_autocomp...', NULL)
#9 /var/www/myptsd/html/c/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_Json), Array)
#10 /var/www/myptsd/html/c/index.php(13): XenForo_FrontController->run()
#11 {main}
Request State
array(3) {
  ["url"] => string(68) "https://www.myptsd.com/c/index.php?members/find&_xfResponseType=json"
  ["_GET"] => array(2) {
   ["members/find"] => string(0) ""
   ["_xfResponseType"] => string(4) "json"
  }
  ["_POST"] => array(5) {
   ["q"] => string(8) "anthony "
   ["_xfRequestUri"] => string(3) "/c/"
   ["_xfNoRedirect"] => string(1) "1"
   ["_xfToken"] => string(8) "********"
   ["_xfResponseType"] => string(4) "json"
  }
}
I noticed that when two users with the same first letter appear, it changed it to use two letters from one, even though the setting is one letter.
Also... even though I had the banned option off, it still loaded the banned avatar.
Can you open a ticket, So that we can fix these bugs please.
 
Top