[SSD] Custom Markup For User

[SSD] Custom Markup For User 1.0.1

No permission to download
Some Bugs with this add-on:
- With this add-on active, it bypasses the Xenforo banners option to hide the Trophy titles.
I just checked the code again and this shouldn't have happened (XenForo makes the userTitie an empty string, which my addon uses directly). What settings do you have?
 
I just checked the code again and this shouldn't have happened (XenForo makes the userTitie an empty string, which my addon uses directly). What settings do you have?
It's just installed by defaut, i disable it hides the rank, i enable it shows the rank, i want my admin hidden since it shows the banner (and the other user groups) but it always show it when the mod is activated.
 
Can we 'upgrade' the add-on or do we have to uninstall/re-install?
You need to upgrade the addon. Uninstalling would cause all your current markups to be lost.

It's just installed by defaut, i disable it hides the rank, i enable it shows the rank, i want my admin hidden since it shows the banner (and the other user groups) but it always show it when the mod is activated.
Not quite sure what is happening here - I'll look into it.
 
@tyteen4a03 I have your addon disabled right now, but it's causing my users to can't register, as already reported before http://xenforo.com/community/threads/problems-with-users.57461/

It's the same Msql error that is causing new registrations to end up in Server Errors, i installed your addon in the most recent version (there was no updates after that one), but when upgraded to XF 1.2.1 this did happen. o_O

You really need to look into it, even with the addon disabled the registrations end up in server errors:
Code:
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Field '3ps_cmfu_options' doesn't have a default value - library/Zend/Db/Statement/Mysqli.php:214
Generated By: Unknown Account, A moment ago
Stack Trace
#0 /home/bacon/www/www/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/bacon/www/www/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/bacon/www/www/library/Zend/Db/Adapter/Abstract.php(574): Zend_Db_Adapter_Abstract->query('INSERT INTO `xf...', Array)
#3 /home/bacon/www/www/library/XenForo/DataWriter.php(1612): Zend_Db_Adapter_Abstract->insert('xf_user', Array)
#4 /home/bacon/www/www/library/XenForo/DataWriter.php(1601): XenForo_DataWriter->_insert()
#5 /home/bacon/www/www/library/XenForo/DataWriter.php(1393): XenForo_DataWriter->_save()
#6 /home/bacon/www/www/library/XenForo/ControllerPublic/Register.php(294): XenForo_DataWriter->save()
#7 /home/bacon/www/www/library/XenForo/FrontController.php(337): XenForo_ControllerPublic_Register->actionRegister()
#8 /home/bacon/www/www/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#9 /home/bacon/www/www/index.php(13): XenForo_FrontController->run()
#10 {main}
Request State
array(3) {
  ["url"] => string(40) "http://ilovebacons.com/register/register"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(16) {
    ["username"] => string(8) "teste123"
    ["email"] => string(14) "love@gmail.com"
    ["password"] => string(8) "********"
    ["password_confirm"] => string(8) "********"
    ["dob_month"] => string(1) "2"
    ["dob_day"] => string(2) "15"
    ["dob_year"] => string(4) "1990"
    ["gender"] => string(4) "male"
    ["custom_fields"] => array(1) {
      ["sitelang"] => string(7) "english"
    }
    ["custom_fields_shown"] => array(1) {
      [0] => string(8) "sitelang"
    }
    ["timezone"] => string(13) "Europe/London"
    ["captcha_question_answer"] => string(6) "bacons"
    ["captcha_question_hash"] => string(40) "324908ac590df58c4a4e5eaf27befc1bcd46c5c5"
    ["agree"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["reg_key"] => string(32) "d819c76222aa764c5ae83875cd7d6f1a"
  }
}
 
@tyteen4a03 I have your addon disabled right now, but it's causing my users to can't register, as already reported before http://xenforo.com/community/threads/problems-with-users.57461/

It's the same Msql error that is causing new registrations to end up in Server Errors, i installed your addon in the most recent version (there was no updates after that one), but when upgraded to XF 1.2.1 this did happen. o_O

You really need to look into it, even with the addon disabled the registrations end up in server errors:
Code:
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Field '3ps_cmfu_options' doesn't have a default value - library/Zend/Db/Statement/Mysqli.php:214
Generated By: Unknown Account, A moment ago
Stack Trace
#0 /home/bacon/www/www/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/bacon/www/www/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/bacon/www/www/library/Zend/Db/Adapter/Abstract.php(574): Zend_Db_Adapter_Abstract->query('INSERT INTO `xf...', Array)
#3 /home/bacon/www/www/library/XenForo/DataWriter.php(1612): Zend_Db_Adapter_Abstract->insert('xf_user', Array)
#4 /home/bacon/www/www/library/XenForo/DataWriter.php(1601): XenForo_DataWriter->_insert()
#5 /home/bacon/www/www/library/XenForo/DataWriter.php(1393): XenForo_DataWriter->_save()
#6 /home/bacon/www/www/library/XenForo/ControllerPublic/Register.php(294): XenForo_DataWriter->save()
#7 /home/bacon/www/www/library/XenForo/FrontController.php(337): XenForo_ControllerPublic_Register->actionRegister()
#8 /home/bacon/www/www/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#9 /home/bacon/www/www/index.php(13): XenForo_FrontController->run()
#10 {main}
Request State
array(3) {
  ["url"] => string(40) "http://ilovebacons.com/register/register"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(16) {
    ["username"] => string(8) "teste123"
    ["email"] => string(14) "love@gmail.com"
    ["password"] => string(8) "********"
    ["password_confirm"] => string(8) "********"
    ["dob_month"] => string(1) "2"
    ["dob_day"] => string(2) "15"
    ["dob_year"] => string(4) "1990"
    ["gender"] => string(4) "male"
    ["custom_fields"] => array(1) {
      ["sitelang"] => string(7) "english"
    }
    ["custom_fields_shown"] => array(1) {
      [0] => string(8) "sitelang"
    }
    ["timezone"] => string(13) "Europe/London"
    ["captcha_question_answer"] => string(6) "bacons"
    ["captcha_question_hash"] => string(40) "324908ac590df58c4a4e5eaf27befc1bcd46c5c5"
    ["agree"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["reg_key"] => string(32) "d819c76222aa764c5ae83875cd7d6f1a"
  }
}
First thing when I get home.
 
That is nice the registrations work again. :)

But the issue of when enable the option: User Titles hidden when a banner is displayed, the titles show up again. :(
 
That is nice the registrations work again. :)

But the issue of when enable the option: User Titles hidden when a banner is displayed, the titles show up again. :(
Beta 2 is released just to fix the registration bug - the User Title one I don't have the time to touch yet. Will get back to it soon.
 
Found a potential bug. I'm running a mod that set's the user's user_id to an empty string. That's all fine and dandy but your plugin decides to do an extra 3 queries per said user_id that's empty and I was up to 100 queries on one thread because of this. While this might be mod-independant, you might wanna check if this happens when a user posts as a guest.
I fixed it by editing the following:
ThreePointStudio/CustomMarkupForUser/TemplateHelpers/12.php
Find:
PHP:
        if (!isset($user["3ps_cmfu_options"]))
Replace with:
PHP:
        if (!isset($user["3ps_cmfu_options"]) && !isset($user["user_id"])) {

I hope someone finds this useful!
 
Found a potential bug. I'm running a mod that set's the user's user_id to an empty string. That's all fine and dandy but your plugin decides to do an extra 3 queries per said user_id that's empty and I was up to 100 queries on one thread because of this. While this might be mod-independant, you might wanna check if this happens when a user posts as a guest.
I fixed it by editing the following:
ThreePointStudio/CustomMarkupForUser/TemplateHelpers/12.php
Find:
PHP:
        if (!isset($user["3ps_cmfu_options"]))
Replace with:
PHP:
        if (!isset($user["3ps_cmfu_options"]) && !isset($user["user_id"])) {

I hope someone finds this useful!
Why would you ever set the user_id to an empty string? For a guest the user_id should be set to 0.
 
Bottom line: I will add a check for user_ids that are less than 1. User_id should always be an integer - setting it to an empty string can break many addons.
Alright well thanks for the addition :) I'll fix the addon for my usage to prevent any further issues!
 
Top Bottom