I have groups and homes for holocms 100% working if u want, but im sure theres plenty of releases on rz of that for holo/haddo... lmk
Printable View
I have groups and homes for holocms 100% working if u want, but im sure theres plenty of releases on rz of that for holo/haddo... lmk
I think homes/groups always worked on Holo without any problems, except it had exploits in it if I'm not mistaken.
http://i.imgur.com/Vxz1BF6.png
- - - Updated - - -
Revision 2:
http://i.imgur.com/MlYh8bl.png
As I said I would, referrals have been added to member_registerhttp://i.imgur.com/3OVUpGn.gif
- - - Updated - - -
When I was updating the registration.css I accidently deleted code below; so there's that
Code:
#registerform input.register-ok {
background: #FFF url(../images/registration/ok_icon.gif) no-repeat 99% 50%;
}
- - - Updated - - -
I don't think I'll need to make anymore changed to member_register, I still need to clean up registeration.js though
- - - Updated - - -
Compressed registration.js and resolved 100+ validation errors
Code:HabboView.add(function(){HabboEditor.addCallback("setGender",function(e){$("register-gender").value=e}),HabboEditor.addCallback("setFigure",function(e){$("register-figure").value=e}),HabboEditor.addCallback("setEditorState",function(e){$("register-editor-state").value=e}),window.refreshingAvatars=!1,$("register-avatars-refresh")&&Event.observe($("register-avatars-refresh"),"click",function(e){window.refreshingAvatars=!0}),$("register-birthday")&&(RegistrationForm.createEnterValidBirthdayTooltip(),Event.observe($("register-birthday"),"click",function(){Tips.get("register-birthday")&&($("register-birthday").removeClassName("error"),Tips.get("register-birthday").hideTip())})),$("register-name")&&(RegistrationForm.createCheckButtonTooltip(),RegistrationForm.createNameTooltip(),RegistrationForm.previousName=$F("register-name"),Event.observe($("register-name"),"keydown",function(e){if(e.keyCode==Event.KEY_TAB||e.keyCode==Event.KEY_RETURN)Event.stop(e),RegistrationForm.Validator._checkName();else{var t=$F("register-name");t!=RegistrationForm.previousName&&(RegistrationForm.Validator._resetErrorState($("register-name")),RegistrationForm.previousName=t,RegistrationForm.Validator._lastCheckedName="",$("registration-overlay").style.display="block",RegistrationForm._toggleFormSection("register-section-3",!0),"create"!=RegistrationForm.nameTooltipState&&(RegistrationForm.nameTooltipState="create",RegistrationForm.createNameTooltip(),Tips.get($("register-name")).showTip())),RegistrationForm.Validator._nameCheckNeeded=!0}}),Event.observe($("register-name-check"),"click",function(e){Event.stop(e),RegistrationForm.Validator._checkName()}),$("register-name-check-container").show(),Event.observe($("register-name"),"blur",function(e){""!==$F("register-name")&&RegistrationForm.Validator._nameCheckNeeded&&(RegistrationForm.nameSuggestionEnabled||Tips.get("register-name-check").showTip(),RegistrationForm.Validator._showErrorState($("register-name")))}),Event.observe($("register-name"),"focus",function(e){Tips.get("register-name-check").hideTip()})),$("register-password")&&(RegistrationForm.createPasswordTooltip(),new Form.Element.Observer($("register-password"),.5,RegistrationForm.Validator.checkPasswordValidity),Event.observe($("register-password"),"keyup",function(e){var t=$("register-password"),r=$F("register-password");RegistrationForm.Validator._lastCheckedPassword="",Tips.get(t).hideTip(),""!==r&&r.length<6?(RegistrationForm.Validator._showErrorState(t,!0),"tooshort"!=RegistrationForm.passwordTooltipState&&(RegistrationForm.passwordTooltipState="tooshort",RegistrationForm.createPasswordTooShortTooltip())):""===r&&(RegistrationForm.Validator._resetErrorState(t),RegistrationForm.Validator._resetErrorState($("register-password2")),$("register-password2").value="","create"!=RegistrationForm.passwordTooltipState&&(RegistrationForm.passwordTooltipState="create",RegistrationForm.createPasswordTooltip())),Tips.get(t).showTip()}),Event.observe($("register-password2"),"focus",function(e){""===$F("register-password")&&$("register-password").focus(),Tips.get("register-password").showTip()}),Event.observe($("register-password2"),"blur",function(e){Tips.get("register-password").hideTip()}),Event.observe($("register-password2"),"keyup",function(e){var t=$("register-password2"),r=$F("register-password2");""!==r?$("register-password").hasClassName("error")?"invalid"!=RegistrationForm.passwordTooltipState&&(RegistrationForm.passwordTooltipState="invalid",RegistrationForm.createPasswordInvalidTooltip()):r==$F("register-password")?(RegistrationForm.Validator._showSuccessState(t),"success"!=RegistrationForm.passwordTooltipState&&(RegistrationForm.passwordTooltipState="success",RegistrationForm.createPasswordSuccessTooltip())):(RegistrationForm.Validator._showErrorState(t,!0),"notsame"!=RegistrationForm.passwordTooltipState&&(RegistrationForm.passwordTooltipState="notsame",RegistrationForm.createRetypedPasswordNotSameTootip())):""!==$F("register-password")&&(RegistrationForm.Validator._resetErrorState(t),"retype"!=RegistrationForm.passwordTooltipState&&(RegistrationForm.passwordTooltipState="retype",RegistrationForm.createRetypePasswordTooltip())),Tips.get("register-password").showTip()})),$("register-email")&&(RegistrationForm.createEmailToolTip(),new Form.Element.Observer($("register-email"),.5,RegistrationForm.Validator.checkEmailValidity),Event.observe($("register-email"),"keyup",function(e){var t=$F("register-email"),r=$("register-email");RegistrationForm.Validator._lastCheckedEmail="",Tips.get(r).hideTip(),""===t?(RegistrationForm.Validator._resetErrorState(r),RegistrationForm.Validator._resetErrorState($("register-email2")),$("register-email2").value="","create"!=RegistrationForm.emailTooltipState&&(RegistrationForm.emailTooltipState="create",RegistrationForm.createEmailToolTip())):RegistrationForm.Validator.validateEmail(t)||(RegistrationForm.Validator._showErrorState(r,!0),"invalid"!=RegistrationForm.emailTooltipState&&(RegistrationForm.emailTooltipState="invalid",RegistrationForm.createInvalidEmailTooltip())),Tips.get(r).showTip()}),Event.observe($("register-email2"),"keyup",function(e){var t=$("register-email2"),r=$F("register-email2");""!==r?$("register-email").hasClassName("error")?"invalid"!=RegistrationForm.emailTooltipState&&(RegistrationForm.emailTooltipState="invalid",RegistrationForm.createInvalidEmailTooltip()):r==$F("register-email")?(RegistrationForm.Validator._showSuccessState(t),"success"!=RegistrationForm.emailTooltipState&&(RegistrationForm.emailTooltipState="success",RegistrationForm.createEmailSuccessTooltip())):(RegistrationForm.Validator._showErrorState(t,!0),"notsame"!=RegistrationForm.emailTooltipState&&(RegistrationForm.emailTooltipState="notsame",RegistrationForm.createRetypedEmailNotSameTootip())):""!==$F("register-email")&&(RegistrationForm.Validator._resetErrorState(t),"retype"!=RegistrationForm.emailTooltipState&&(RegistrationForm.emailTooltipState="retype",RegistrationForm.createRetypeEmailTooltip())),Tips.get("register-email").showTip()}),Event.observe($("register-email2"),"focus",function(e){""===$F("register-email")&&$("register-email").focus(),Tips.get("register-email").showTip()}),Event.observe($("register-email2"),"blur",function(e){Tips.get("register-email").hideTip()})),Event.observe($("registerform"),"submit",RegistrationForm.handleSubmit)}),RegistrationForm={ageLimit:-1,banHours:-1,parentEmailAgeLimit:-1,previousName:null,passwordTooltipState:null,emailTooltipState:null,nameTooltipState:null,elementFocused:null,isCaptchaEnabled:!1,personalInfoDisabled:!1,nameSuggestionEnabled:!1,captchaPublicKey:"none",registrationTipStyle:{className:"bubbletip left",title:" ",hook:{target:"topRight",tip:"bottomRight"},fixed:!0,startEvent:"focus",endEvent:"blur"},defaultPos:{offset:{x:40,y:-6}},init:function(e){e&&($("registration-overlay").style.display="block",RegistrationForm._toggleFormSection("register-section-3",!0),RegistrationForm.personalInfoDisabled=!0,RegistrationForm.createPersonalInfoDisabledTooltip(),$("register-name")&&$("register-name").focus())},handleSubmit:function(e){window.refreshingAvatars||(RegistrationForm.Validator.validate()?RegistrationForm.isRegistrationAllowed()?!RegistrationForm.Validator._parentEmailOk&&RegistrationForm.isParentEmailNeeded()?(Event.stop(e),RegistrationForm.showParentEmailCaptchaField(),$("register-parentEmail-bubble").focus()):!RegistrationForm.Validator._captchaOk&&RegistrationForm.isCaptchaEnabled?(Event.stop(e),RegistrationForm.showParentEmailCaptchaField(),$("imagestring")?$("imagestring").focus():$("recaptcha_response_field")&&$("recaptcha_response_field").focus()):(Event.stopObserving($("registerform"),"submit",RegistrationForm.handleSubmit),Event.observe($("registerform"),"submit",function(e){return!1})):(Event.stop(e),Cookie.set("rb",1,RegistrationForm.banHours/24),RegistrationForm.showAgeLimitMessage()):(Event.stop(e),Element.show("form-validation-error-box")))},cancel:function(e){location.href=habboReqPath+"index.php"+(e||"")},isParentEmailNeeded:function(){if(-1<RegistrationForm.parentEmailAgeLimit&&$("register-birthday")){var e=RegistrationForm._calculateAge();if(-1!=e)return e<=RegistrationForm.parentEmailAgeLimit}return!1},showParentEmailCaptchaField:function(){if($("register-parent-email"))RegistrationForm.isParentEmailNeeded()&&RegistrationForm.Validator.checkParentEmailValidity();else{Element.hide("form-validation-error-box");var e="";RegistrationForm.isParentEmailNeeded()&&(e=e.concat(L10N.get("register.message.parent_email_js_form"))),RegistrationForm.isCaptchaEnabled&&(e=e.concat(L10N.get("register.message.captcha_js_form"))),RegistrationForm._showErrorBubble("register-parent-email",e,function(){RegistrationForm._disableFormFields(!0,["register-button-continue","register-parentEmail-bubble","imagestring","register-permission-bubble","recaptcha_response_field"]),$("captcha-reload")?Event.observe($("captcha-reload"),"click",function(e){Event.stop(e),Utils.reloadCaptcha()}):$("recaptcha-reload")&&(Event.observe($("recaptcha-reload"),"click",function(e){Event.stop(e),Recaptcha.reload()}),Utils.showRecaptcha("recaptcha_challenge",RegistrationForm.captchaPublicKey))}),$("imagestring")&&Event.observe($("imagestring"),"keyup",RegistrationForm.Validator.checkCapchaValidity),$("recaptcha_response_field")&&Event.observe($("recaptcha_response_field"),"keyup",RegistrationForm.Validator.checkCapchaValidity),$("register-parentEmail-bubble")&&(Prototype.Browser.IE&&($("bean_month").setStyle({visibility:"hidden"}),$("bean_year").setStyle({visibility:"hidden"})),Rounder.addCorners($("parentEmail-error-box-container"),4,4,"rounded-container"),Event.observe($("register-parentEmail-bubble"),"keypress",function(e){e.keyCode==Event.KEY_TAB||e.keyCode==Event.KEY_RETURN?RegistrationForm.Validator.checkParentEmailValidity():(RegistrationForm.Validator._lastCheckedParentEmail="",RegistrationForm.Validator._parentEmailOk=!1,RegistrationForm.Validator._resetErrorState($("register-parentEmail-bubble")),$("parentEmail-error-box-content").innerHTML=L10N.get("register.tooltip.enteremail"))}),RegistrationForm._track("parentEmail"))}},showAgeLimitMessage:function(){RegistrationForm._showErrorBubble("register-ageLimit",L10N.get("register.message.age_limit_ban"),function(){RegistrationForm._disableFormFields(!1,["register-parentEmail-cancel"])}),RegistrationForm._track("ageLimit")},isRegistrationAllowed:function(){if(-1<RegistrationForm.ageLimit){var e=RegistrationForm._calculateAge();if(-1!=e)return e>=RegistrationForm.ageLimit}return!0},createNameTooltip:function(){new Tip("register-name",L10N.get("register.tooltip.name"),Object.extend({target:$("register-section-2"),offset:{x:155,y:3}},RegistrationForm.registrationTipStyle))},createPasswordTooltip:function(){RegistrationForm._createTooltip("register-password","register.tooltip.password")},createRetypePasswordTooltip:function(){RegistrationForm._createTooltip("register-password","register.tooltip.retypepassword")},createCheckButtonTooltip:function(){new Tip("register-name-check",L10N.get("register.tooltip.namecheck"),{className:"bubbletip left",title:" ",hook:{target:"topRight",tip:"bottomRight"},offset:{x:130,y:-3},startEvent:"focus",endEvent:"blur"})},createPersonalInfoDisabledTooltip:function(){new Tip("registration-overlay",L10N.get("register.tooltip.personalinfo.disabled"),{className:"bubbletip left",title:" ",hook:{target:"topRight",tip:"bottomRight"},fixed:!0,offset:{x:20,y:150}})},createNameSuccessTooltip:function(){new Tip("register-name",L10N.get("register.tooltip.namechecksuccess"),Object.extend({offset:{x:85,y:-6}},RegistrationForm.registrationTipStyle))},createPasswordSuccessTooltip:function(){RegistrationForm._createTooltip("register-password","register.tooltip.passwordsuccess")},createPasswordTooShortTooltip:function(){RegistrationForm._createTooltip("register-password","register.tooltip.passwordtooshort")},createRetypedPasswordNotSameTootip:function(){RegistrationForm._createTooltip("register-password","register.tooltip.passwordnotsame")},createPasswordInvalidTooltip:function(){RegistrationForm._createTooltip("register-password","register.tooltip.invalidpassword")},createEmailToolTip:function(){RegistrationForm._createTooltip("register-email","register.tooltip.email")},createRetypeEmailTooltip:function(){RegistrationForm._createTooltip("register-email","register.tooltip.retypeemail")},createInvalidEmailTooltip:function(){RegistrationForm._createTooltip("register-email","register.tooltip.invalidemail")},createEmailSuccessTooltip:function(){RegistrationForm._createTooltip("register-email","register.tooltip.emailsuccess")},createRetypedEmailNotSameTootip:function(){RegistrationForm._createTooltip("register-email","register.tooltip.emailnotsame")},createEnterPasswordTooltip:function(){RegistrationForm._createTooltip("register-password","register.tooltip.enterpassword")},createEnterNameToolTip:function(){RegistrationForm._createTooltip("register-name","register.tooltip.entername")},createEnterEmailTooltip:function(){RegistrationForm._createTooltip("register-email","register.tooltip.enteremail")},createEnterBirthdayTooltip:function(){RegistrationForm._createTooltip("register-birthday","register.tooltip.enterbirthday")},createEnterValidBirthdayTooltip:function(){RegistrationForm._createTooltip("register-birthday","register.tooltip.invalidbirthday")},_createTooltip:function(e,t){new Tip(e,L10N.get(t),Object.extend(RegistrationForm.defaultPos,RegistrationForm.registrationTipStyle))},updateNameFromBubble:function(e){var t=$("register-name");t.value=e,t.removeClassName("error"),t.addClassName("register-ok"),RegistrationForm.Validator._lastCheckedName=e,RegistrationForm.Validator._nameCheckNeeded=!1,"success"!=RegistrationForm.nameTooltipState&&(RegistrationForm.nameTooltipState="success",RegistrationForm.createNameSuccessTooltip(),Tips.get("register-name-check").hideTip()),$("registration-overlay").style.display="none",RegistrationForm._toggleFormSection("register-section-3",!1),RegistrationForm.personalInfoDisabled=!1,RegistrationForm.nameSuggestionEnabled=!1,$("register-password").focus()},_showErrorBubble:function(e,t,r){var i=$("register-buttons"),o=Builder.node("div",{id:e,className:"bubbletip"},[Builder.node("div",{className:"title"}),Builder.node("div",{id:"error-bubble-content",className:"content"})]);i.appendChild(o),$("error-bubble-content").innerHTML=t,Element.hide(o),r&&r();var a=Element.getDimensions(o),s=Element.getDimensions(i);o.style.left=s.width-a.width/2-50+"px",o.style.top=$("register-button-continue").offsetTop-a.height-50+"px",Element.show(o)},_calculateAge:function(){var e=$F("bean_year"),t=$F("bean_month"),r=$F("bean_day");if(e&&t&&r){var i=new Date,o=new Date;o.setFullYear(e,t-1,r);var a=i.getFullYear()-o.getFullYear();if((o.getMonth()>i.getMonth()||o.getMonth()==i.getMonth()&&o.getDate()>i.getDate())&&a--,0<=a)return a}return-1},_disableFormFields:function(i,o){var a=$("registerform"),e=a.getElementsByTagName("*");$A(e).each(function(e){if(("select"==e.tagName.toLowerCase()||"input"==e.tagName.toLowerCase())&&"hidden"!=e.type&&-1==o.indexOf(e.id)&&(e.disabled=!0,i&&"button"!=e.type&&"submit"!=e.type)){var t=e.value,r=e.name;("radio"!=e.type&&"checkbox"!=e.type||"radio"==e.type&&e.checked||"checkbox"==e.type&&e.checked)&&a.appendChild(Builder.node("input",{type:"hidden",name:r,value:t})),e.name=r+"Disabled"}})},_toggleFormSection:function(e,t){var r=$(e).getElementsByTagName("*");$A(r).each(function(e){"select"!=e.tagName.toLowerCase()&&"input"!=e.tagName.toLowerCase()||(e.disabled=t)})},_track:function(e){window.pageTracker&&pageTracker._trackPageview("/register/"+e)}},RegistrationForm.Validator={_lastCheckedName:null,_lastCheckedPassword:null,_lastCheckedEmail:null,_lastCheckedParentEmail:null,_lastCheckedCaptcha:null,_nameCheckNeeded:!0,_captchaOk:!1,_parentEmailOk:!1,validate:function(){var r=!0,e=function(e,t){t()||(r=!1,RegistrationForm.Validator._showErrorState($(e),!0),RegistrationForm.elementFocused=e)};return RegistrationForm.elementFocused="",RegistrationForm.personalInfoDisabled||($("register-birthday")&&e("register-birthday",function(){return!!($F("bean_year")&&$F("bean_month")&&$F("bean_day"))&&!((new Date).setFullYear($F("bean_year"),$F("bean_month")-1,$F("bean_day"))>new Date)}),$("register-email")&&(e("register-email",function(){return""===$F("register-email")&&(RegistrationForm.emailTooltipState="enter"),RegistrationForm.Validator.validateEmail($F("register-email"))&&!$("register-email").hasClassName("error")}),e("register-email2",function(){return!!$("register-email").hasClassName("error")||(""===$F("register-email2")?RegistrationForm.emailTooltipState="retype":$F("register-email")!=$F("register-email2")&&(RegistrationForm.emailTooltipState="notsame",RegistrationForm.createRetypedEmailNotSameTootip()),RegistrationForm.Validator.validateEmail($F("register-email2"))&&$F("register-email")==$F("register-email2"))})),$("register-password")&&(e("register-password",function(){return""===$F("register-password")&&(RegistrationForm.passwordTooltipState="enter",RegistrationForm.createEnterPasswordTooltip()),!!$F("register-password")&&!$("register-password").hasClassName("error")}),e("register-password2",function(){return!!$("register-password").hasClassName("error")||(""===$F("register-password2")?(RegistrationForm.passwordTooltipState="retype",RegistrationForm.createRetypePasswordTooltip()):$F("register-password")!=$F("register-password2")&&(RegistrationForm.emailTooltipState="notsame",RegistrationForm.createRetypedPasswordNotSameTootip()),!!$F("register-password2")&&$F("register-password")==$F("register-password2"))}))),$("register-name")&&e("register-name",function(){return""===$F("register-name")&&(RegistrationForm.nameTooltipState="enter",RegistrationForm.createEnterNameToolTip()),!!$F("register-name")&&!$("register-name").hasClassName("error")}),$("register-parentEmail")&&e("parentEmail",function(){return RegistrationForm.Validator.checkParentEmailValidity(),RegistrationForm.Validator._parentEmailOk}),$("recaptcha_response_field")&&e("recaptcha_response_field",function(){return!!$F("recaptcha_response_field")&&(RegistrationForm.Validator._captchaOk=!0),!!$F("recaptcha_response_field")}),RegistrationForm.Validator._showNonFieldTips(),r},checkNameAvailability:function(){Tips.get("register-name-check").hideTip();var e=$F("register-name");""!==e&&RegistrationForm.Validator._nameCheckNeeded?($("register-name").addClassName("register-loading"),RegistrationForm.Validator._lastCheckedName=e,new Ajax.Request(habboReqPath+"xmlhttp.php?action=username_availability",{method:"post",parameters:{name:e},onComplete:function(e,t){var r;($("register-name").removeClassName("register-loading"),t.registration_name_in_use||t.registration_name)?($("register-name").removeClassName("register-ok"),$("register-name").addClassName("error"),t.registration_name_in_use&&""!==e.responseText?(r=e.responseText,RegistrationForm.nameSuggestionEnabled=!0):r=t.registration_name?t.registration_name:t.registration_name_in_use,new Tip("register-name",r,{className:"bubbletip left",title:" ",hook:{target:"topRight",tip:"bottomRight"},offset:{x:85,y:-3},fixed:!0,startEvent:"focus",endEvent:null}),RegistrationForm.Validator._boundNameClickObserver=RegistrationForm.Validator._nameClickObserver.bindAsEventListener(document),RegistrationForm.Validator._nameCheckNeeded=!0,Event.observe(document,"click",RegistrationForm.Validator._boundNameClickObserver),$("register-name").focus(),Tips.get("register-name").showTip()):(RegistrationForm.Validator._showSuccessState($("register-name")),"success"!=RegistrationForm.nameTooltipState&&(RegistrationForm.nameTooltipState="success",RegistrationForm.createNameSuccessTooltip()),$("name-error-box").hide(),RegistrationForm.Validator._nameCheckNeeded=!1,Event.stopObserving(document,"click",RegistrationForm.Validator._boundNameClickObserver),$("registration-overlay").style.display="none",RegistrationForm._toggleFormSection("register-section-3",!1),RegistrationForm.personalInfoDisabled=!1,$("register-password").focus())}})):""===e&&$("register-name").removeClassName("register-ok")},checkEmailValidity:function(){var o=$F("register-email"),a=$("register-email");o!=RegistrationForm.Validator._lastCheckedEmail&&RegistrationForm.Validator.validateEmail(o)&&(RegistrationForm.Validator._lastCheckedEmail=o,new Ajax.Request(habboReqPath+"xmlhttp.php?action=email_availability",{method:"post",parameters:{email:o},onComplete:function(e,t){if("emailOk"==t){var r=$F("register-email2"),i=$("register-email2");r&&r==o?(RegistrationForm.Validator._resetErrorState(i),RegistrationForm.Validator._showSuccessState(i),RegistrationForm.emailTooltipState="success",RegistrationForm.createEmailSuccessTooltip()):r&&""!==r?(RegistrationForm.Validator._showErrorState(i,!1),"notsame"!=RegistrationForm.emailTooltipState&&(RegistrationForm.emailTooltipState="notsame",RegistrationForm.createRetypedEmailNotSameTootip())):"retype"!=RegistrationForm.emailTooltipState&&(RegistrationForm.emailTooltipState="retype",RegistrationForm.createRetypeEmailTooltip()),a.removeClassName("error"),a.addClassName("register-ok")}else RegistrationForm.Validator._showErrorState(a,!1),"invalid"!=RegistrationForm.emailTooltipState&&(RegistrationForm.emailTooltipState="invalid",RegistrationForm.createInvalidEmailTooltip());Tips.get(a).showTip()}}))},checkCapchaValidity:function(e){RegistrationForm.Validator._captchaOk=""!==Event.element(e).value},checkPasswordValidity:function(){var o=$("register-password"),a=$F("register-password");a&&6<=a.length&&a!=RegistrationForm.Validator._lastCheckedPassword&&(RegistrationForm.Validator._lastCheckedPassword=a,new Ajax.Request(habboReqPath+"xmlhttp.php?action=complex_password",{method:"post",parameters:{password:a},onComplete:function(e,t){if("charOk"==t){var r=$F("register-password2"),i=$("register-password2");r&&r==a?(RegistrationForm.Validator._resetErrorState(i),RegistrationForm.Validator._showSuccessState(i),RegistrationForm.passwordTooltipState="success",RegistrationForm.createPasswordSuccessTooltip()):r&&""!==r?(RegistrationForm.Validator._showErrorState(i,!1),"notsame"!=RegistrationForm.passwordTooltipState&&(RegistrationForm.passwordTooltipState="notsame",RegistrationForm.createRetypedPasswordNotSameTootip())):"retype"!=RegistrationForm.passwordTooltipState&&(RegistrationForm.passwordTooltipState="retype",RegistrationForm.createRetypePasswordTooltip()),o.removeClassName("error"),o.addClassName("register-ok")}else RegistrationForm.Validator._showErrorState(o,!1),RegistrationForm.passwordTooltipState="error",new Tip("register-password",e.responseText,Object.extend(RegistrationForm.defaultPos,RegistrationForm.registrationTipStyle));Tips.get(o).showTip()}}))},_showErrorState:function(e,t){e.removeClassName("register-ok"),e.addClassName("error"),t&&!e.disabled&&e.focus()},_showSuccessState:function(e){e.removeClassName("error"),e.addClassName("register-ok")},_resetErrorState:function(e){e.removeClassName("error"),e.removeClassName("register-ok")},validateEmail:function(e){return!!e&&-1!=e.search(/[^@]+@[^@]+/i)},_nameClickObserver:function(e){var t=Event.element(e);"namelist-link"==t.className?(Event.stop(e),RegistrationForm.updateNameFromBubble(t.name)):"register-name"!=t.id&&Tips.get($("register-name")).hideTip()},_checkName:function(){var e=$F("register-name");""!==e&&e!=RegistrationForm.Validator._lastCheckedName?(RegistrationForm.Validator._resetErrorState($("register-name")),RegistrationForm.Validator.checkNameAvailability()):$("register-name").focus()},_showNonFieldTips:function(){"register-birthday"==RegistrationForm.elementFocused&&Tips.get("register-birthday").showTip()}};var HabboEditor=function(){var e=!0,r=[];return{addCallback:function(e,t){r[e]||(r[e]=[]),r[e].push(t)},setGenderAndFigure:function(e,t){this.setGender(e),this.setFigure(t)},setFigure:function(t){t,r.setFigure&&r.setFigure.each(function(e){e(t)})},setGender:function(t){t,r.setGender&&r.setGender.each(function(e){e(t)})},setAllowedToProceed:function(t){e=t,r.setAllowedToProceed&&r.setAllowedToProceed.each(function(e){e(t)})},isAllowedToProceed:function(){return e},showHabboClubNotice:function(){r.showHabboClubNotice&&r.showHabboClubNotice.each(function(e){e()})},hideHabboClubNotice:function(){r.hideHabboClubNotice&&r.hideHabboClubNotice.each(function(e){e()})},showOldFigureNotice:function(){r.showOldFigureNotice&&r.showOldFigureNotice.each(function(e){e()})},hideOldFigureNotice:function(){r.hideOldFigureNotice&&r.hideOldFigureNotice.each(function(e){e()})},setEditorState:function(t){r.setEditorState&&r.setEditorState.each(function(e){e(t)})}}}();
- - - Updated - - -
Language files will be on my todo list, I'll just attach them onto existing plugins and go from there
- - - Updated - - -
http://i.imgur.com/4R1SM2M.png
This is the best you're going to get it, unless you make a plugin (like I did on my first attempt), but then you'll be wasting code since you'll have to rewrite everything in the plugin to get the same results but maybe with your avatar. Honestly, it's not that bad, it serves its purpose and offers functionality
Super easy to implement! I just need to add a couple of queries to update some fields and add some stickers into the database for the store/inventory to workhttp://i.imgur.com/TatMYn3.gif
http://i.imgur.com/5adLBME.png
Will probably spend some time deleting the trash and keeping the good one's
http://i.imgur.com/zDu7o5U.png
Here is the new table that will be added when you activate/install the member profile plugin (if you uninstall this plugin, the table and all of its data will be removed)
I am not looking forward to cataloguing these stickers
- - - Updated - - -
Made slight changes to some columns
http://i.imgur.com/Qsbd7bb.png
- - - Updated - - -
Here is the template for member_profile (still work in progress)
Code:<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->profile}</title>
{$headerinclude}
<link rel="stylesheet" href="{$theme['imgdir']}/styles/myhabbo/myhabbo.css" type="text/css" />
<link rel="stylesheet" href="{$theme['imgdir']}/styles/myhabbo/skins.css" type="text/css" />
<link rel="stylesheet" href="{$theme['imgdir']}/styles/myhabbo/dialogs.css" type="text/css" />
<link rel="stylesheet" href="{$theme['imgdir']}/styles/myhabbo/buttons.css" type="text/css" />
<link rel="stylesheet" href="{$theme['imgdir']}/styles/myhabbo/control.textarea.css" type="text/css" />
<link rel="stylesheet" href="{$theme['imgdir']}/styles/myhabbo/boxes.css" type="text/css" />
<link rel="stylesheet" href="{$theme['imgdir']}/v2/styles/myhabbo.css" type="text/css" />
<link rel="stylesheet" href="{$theme['imgdir']}/styles/myhabbo/assets.css" type="text/css" />
<link rel="stylesheet" href="{$theme['imgdir']}/v2/styles/group.css" type="text/css" />
{$navi2}
<script src="{$theme['imgdir']}/static/js/homeview.js" type="text/javascript"></script>
<script src="{$theme['imgdir']}/static/js/homeauth.js" type="text/javascript"></script>
<script src="{$theme['imgdir']}/static/js/homeedit.js" type="text/javascript"></script>
<script type="text/javascript">
document.observe('dom:loaded', function() {
initView({$id}, {$id});
});
function cancelEditing(expired) {
location.replace('member.php?action=profile&uid={$id}');
}
</script>
</head>
<body id="{$mode}">
{$header}
<div id="content-container">
<div id="navi2-container" class="pngbg">
<div id="navi2" class="pngbg clearfix">
<ul>
<li><a href="{$mybb->settings['bburl']}/index.php">Homepage</a></li>
<li class="selected">My Page</li>
<li>Account Settings</li>
<li class="last">{$mybb->settings['bbname']} Club</li>
</ul>
</div>
</div>
</div>
<div id="container">
<div id="content" style="position: relative;" class="clearfix">
<div id="mypage-wrapper" class="cbb blue">
<div class="box-tabs-container box-tabs-left clearfix">
{$edit}
<h2 class="page-owner">{$formattedname}</h2>
<ul class="box-tabs"></ul>
</div>
<div id="mypage-content">
{$editpage}
<div id="mypage-bg" class="{$background}{">
<div id="playground-outer">
<div id="playground">
{$display}
</div>
</div>
</div>
</div>
<script language="JavaScript" type="text/javascript">
initEditToolbar();
initMovableItems();
document.observe('dom:loaded', initDraggableDialogs);
</script>
<div id="edit-save" style="display:none;"></div>
{$footer}
</body>
</html>
- - - Updated - - -
I'll be pausing development for a couple of days as I have other projects that need priotising! Thanks for understanding
No images today just stuff I've done in my spare time
* Reporting profiles implemented (this was a lost feature that I had to reengineer as the revision of holocms I'm using doesn't have this implemented)
* Saving profile, checks are made to make sure that you're the user saving the profile and that all information is secured and not empty.
* Add/remove/edit widgets, stickers and stickies
* habboauth.js, habboedit.js and habboview.js have revision changes
* If user doesn't have profile widget, they are given one and the webpage is refreshed using <meta />. If profile doesn't exist, we throw error
* Checks are made to make sure only relevant files/information is being shown if user is logged in and is their profile (E.G. user can't report a profile if its their own or they are not logged in)
*
member_profile template
Code:<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->profile}</title>
{$headerinclude}
<link rel="stylesheet" href="{$theme['imgdir']}/styles/myhabbo/myhabbo.css" type="text/css" />
<link rel="stylesheet" href="{$theme['imgdir']}/styles/myhabbo/skins.css" type="text/css" />
<link rel="stylesheet" href="{$theme['imgdir']}/styles/myhabbo/dialogs.css" type="text/css" />
<link rel="stylesheet" href="{$theme['imgdir']}/styles/myhabbo/buttons.css" type="text/css" />
<link rel="stylesheet" href="{$theme['imgdir']}/styles/myhabbo/control.textarea.css" type="text/css" />
<link rel="stylesheet" href="{$theme['imgdir']}/styles/myhabbo/boxes.css" type="text/css" />
<link rel="stylesheet" href="{$theme['imgdir']}/styles/myhabbo/assets.css" type="text/css" />
<link rel="stylesheet" href="{$theme['imgdir']}/v2/styles/myhabbo.css" type="text/css" />
{$profileincludes}
</head>
<body id="{$profilemode}">
{$header}
<div id="content-container">
<div id="navi2-container" class="pngbg">
<div id="navi2" class="pngbg clearfix">
<ul>
<li><a href="{$mybb->settings['bburl']}/index.php">Homepage</a></li>
<li class="selected">My Page</li>
<li>Account Settings</li>
<li class="last">{$mybb->settings['bbname']} Club</li>
</ul>
</div>
</div>
</div>
<div id="container">
<div id="content" class="clearfix">
<div id="mypage-wrapper" class="cbb blue">
<div class="box-tabs-container box-tabs-left clearfix">
{$editbutton}
<h2 class="page-owner">{$formattedname}</h2>
<ul class="box-tabs"></ul>
</div>
<div id="mypage-content">
{$toptoolbar}
<div id="mypage-bg" class="{$profilebackground}">
<div id="playground-outer">
<div id="playground">
{$profilecontents}
</div>
</div>
</div>
</div>
</div>
{$footer}
</body>
</html>
http://i.imgur.com/S8NGPmJ.gif
What have I done with the web store? I've removed it entirely.
Why have you removed it? You monster! The web store served no purpose, all it did was use up more resources.
How does this inventory work then? Pretty simple, whatever you add into profileinventory will be in everybodys inventory, there is no set amount and you can change the amount limit of stickers/stickies/widgets in admin cp.
Future plans? I want to add more quality of life updates to enhance the back end and offer the user a better experience overall
There is a couple of more things I want to do with homes before I prioritise something else
- - - Updated - - -
http://i.imgur.com/Y2PgKZo.png
Changes made to profilestickers
- - - Updated - - -
My mistake, all columns have been set as unsigned
Showcasing some quality of life updates for homes!
http://i.imgur.com/qqt1EFR.gif
- - - Updated - - -
Fixed some alignment issues, especially with the footer
- - - Updated - - -
http://i.imgur.com/gbVwKT9.gifvBackend functionality: Sticker/widget/stickie/background limit and advertisements
http://i.imgur.com/gbVwKT9.gif
Advertisement plugin works for both the entire website and profiles
http://i.imgur.com/NLm9zZ5.gif
Minor tweaks with the advertisement plugin and memberprofile plugin.
http://i.imgur.com/QjTnbxD.gif
Fixed the gap that advertisement positioning had
Advertisement no longer displays on the about page (it could, but then we'd be making box-content even more tiny than they already are)
- - - Updated - - -
As always, feedback is welcome
http://i.imgur.com/LrSOmGR.png
As always, it's work in progress but I wanted to share my thoughts on this.
Initially I was just going to throw 1K+ (ballpark figure) stickers into the stickers category, but then realised that wouldn't be a great idea. Instead I'll add other categories that'll hold an array of stickers for their specific grouping. Any unsorted stickers will just be added into the stickers category.
I would like to add more admin cp features, adding your own categories and stickers
Feedback is welcome
- - - Updated - - -
I would love some constructive feedback on this piece of code!
- - - Updated - - -PHP Code:global $db;
$mode = $mybb->get_input('key');
$type = $mybb->get_input('type');
$widget = $db->escape_string($mybb->get_input('itemId', MyBB::INPUT_INT));
// $noteText = $mybb->get_input('noteText');
// $newskin = $mybb->get_input('skin', MyBB::INPUT_INT);
$stickerid = $db->escape_string($mybb->get_input('selectedStickerId', MyBB::INPUT_INT));
$z = $db->escape_string($mybb->get_input('zindex', MyBB::INPUT_INT));
if(empty($type) && empty($widget) && empty($stickerid) && empty($z) != "")
{
error_no_permission();
exit;
}
if($mode == 'inventory')
{
$query = $db->simple_select("profileinventory", "message", "type = '1'", array("limit" => 1));
if($db->num_rows($query) > 0)
{
$results = $db->fetch_array($query);
header('X-JSON: [["Inventory", "Webstore"], ["'.$results['message'].'_pre", "'.$results['message'].'", "'.$results['message'].'", "Sticker", null, 1]]');
}
else
{
header('X-JSON: [["Inventory", "Webstore"], []]');
}
echo '
<div style="position: relative;">
<div id="inventory-categories-container">
<h4>Categories:</h4>
<div id="inventory-categories">
<ul class="purchase-main-category">
<li id="inv-cat-stickers" class="selected-main-category-no-subcategories"><div><strong>Stickers</strong></div></li>
<li id="inv-cat-bling" class="main-category-no-subcategories"><div>∟ Alpha Bling</div></li>
<li id="inv-cat-plastic" class="main-category-no-subcategories"><div>∟ Alpha Platic</div></li>
<li id="inv-cat-wood" class="main-category-no-subcategories"><div>∟ Alpha Wood</div></li>
<li id="inv-cat-buttons" class="main-category-no-subcategories"><div>∟ Buttons</div></li>
<li id="inv-cat-backgrounds" class="main-category-no-subcategories"><div><strong>Backgrounds</strong></div></li>
<li id="inv-cat-widgets" class="main-category-no-subcategories"><div><strong>Widgets</strong></div></li>
<li id="inv-cat-notes" class="main-category-no-subcategories"><div><strong>Notes</strong></div></li>
</ul>
</div>
</div>
<div id="inventory-content-container">
<div id="inventory-items-container">
<h4>Click an item to select it:</h4>
<div id="inventory-items">
<ul id="inventory-item-list">';
$query = $db->simple_select("profileinventory", "fid, message", "type = '1'");
$number = $db->num_rows($query);
if($number > 0)
{
while($results = $db->fetch_array($query))
{
echo '
<li id="inventory-item-'.$results['fid'].'" title="'.$results['message'].'">
<div class="webstore-item-preview '.$results['message'].'_pre">
<div class="webstore-item-mask"><div class="webstore-item-count"><div>∞</div></div></div>
</div>
</li>';
}
if($number < 20)
{
$number = 20 - $number;
for($count = 1; $count <= $number; $count++)
{
echo '<li class="webstore-item-empty"></li>';
}
}
}
else
{
echo '
<div class="webstore-frank">
<div class="blackbubble">
<div class="blackbubble-body">
<p><strong>Your inventory for this category is completely empty!</strong></p>
<br class="clear" />
</div>
</div>
<div class="blackbubble-bottom">
<div class="blackbubble-bottom-body"><img src="'.$bburl.'/web-gallery/images/box-scale/bubble_tail_small.gif" alt="" class="invitation-tail" /></div>
</div>
<div class="webstore-frank-image"><img src="'.$bburl.'/web-gallery/images/frank/sorry.gif" alt="" /></div>
</div>';
}
echo '
</ul>
</div>
</div>
<div id="inventory-preview-container">
<div id="inventory-preview-default"></div>
<div id="inventory-preview">
<h4> </h4>
<div id="inventory-preview-box"></div>
<div id="inventory-preview-place" class="clearfix">
<div class="clearfix">
<a href="#" class="new-button" id="inventory-place"><b>Place</b><i></i></a>
</div>
</div>
</div>
</div>
</div>
<div id="webstore-close-container">
<div class="clearfix"><a href="#" id="webstore-close" class="new-button"><b>Close</b><i></i></a></div>
</div>';
}
elseif($mode == 'inventory_items')
{
if($type == 'stickers')
{
$typeset = 1;
}
else if($type == 'widgets')
{
$typeset = 2;
}
else if($type == 'notes')
{
$typeset = 3;
}
else if($type == 'backgrounds')
{
$typeset = 4;
}
if($typeset != 2)
{
$query = $db->simple_select("profileinventory", "fid, message", "type = '".$typeset."'");
$number = $db->num_rows($query);
echo '
<ul id="webstore-item-list">';
if($number > 0)
{
while($results = $db->fetch_array($query))
{
echo '
<li id="inventory-item-'.$results['fid'].'" title="'.$results['message'].'">
<div class="webstore-item-preview '.$inventorytype.$results['message'].'_pre">
<div class="webstore-item-mask"><div class="webstore-item-count"><div>∞</div></div></div>
</div>
</li>';
}
if($number < 20)
{
$number = 20 - $number;
for($count = 1; $count <= $number; $count++)
{
echo '<li class="webstore-item-empty"></li>';
}
}
}
else
{
echo '
<div class="webstore-frank">
<div class="blackbubble">
<div class="blackbubble-body">
<p><strong>Your inventory for this category is completely empty!</strong></p>
<br class="clear" />
</div>
</div>
<div class="blackbubble-bottom">
<div class="blackbubble-bottom-body"><img src="'.$bburl.'/web-gallery/images/box-scale/bubble_tail_small.gif" alt="" class="invitation-tail" /></div>
</div>
<div class="webstore-frank-image"><img src="'.$bburl.'/web-gallery/images/frank/sorry.gif" alt="" /></div>
</div>';
}
echo '
</ul>';
}
else
{
echo '
<ul id="inventory-item-list">
<li id="inventory-item-p-1" title="Guestbook" class="webstore-widget-item '.webstorewidgetdisabled(2).'">
<div class="webstore-item-preview w_guestbookwidget_pre">
<div class="webstore-item-mask"></div>
</div>
<div class="webstore-widget-description">
<h3>Guestbook</h3>
<p>Guestbook</p>
</div>
</li>
<li id="inventory-item-p-2" title="My Friends" class="webstore-widget-item '.webstorewidgetdisabled(3).'">
<div class="webstore-item-preview w_friendswidget_pre">
<div class="webstore-item-mask"></div>
</div>
<div class="webstore-widget-description">
<h3>My Friends</h3>
<p>Display all your friends</p>
</div>
</li>
<li id="inventory-item-p-3" title="My Badges" class="webstore-widget-item '.webstorewidgetdisabled(4).'">
<div class="webstore-item-preview w_badgeswidget_pre">
<div class="webstore-item-mask"></div>
</div>
<div class="webstore-widget-description">
<h3>My Badges</h3>
<p>Show your badges on your page.</p>
</div>
</li>
<li id="inventory-item-p-4" title="My Video" class="webstore-widget-item '.webstorewidgetdisabled(5).'">
<div class="webstore-item-preview w_movieswidget_pre">
<div class="webstore-item-mask"></div>
</div>
<div class="webstore-widget-description">
<h3>My Video</h3>
<p>Lights, camera and action.</p>
</div>
</li>
<li id="inventory-item-p-5" title="My Ratings" class="webstore-widget-item '.webstorewidgetdisabled(6).'">
<div class="webstore-item-preview w_ratingwidget_pre">
<div class="webstore-item-mask"></div>
</div>
<div class="webstore-widget-description">
<h3>My Ratings</h3>
<p>Let other people rate your page.</p>
</div>
</li>
<li id="inventory-item-p-6" title="My Trax" class="webstore-widget-item '.webstorewidgetdisabled(7).'">
<div class="webstore-item-preview w_traxplayerwidget_pre">
<div class="webstore-item-mask"></div>
</div>
<div class="webstore-widget-description">
<h3>My Trax</h3>
<p>Listen to music on your page.</p>
</div>
</li>
</ul>';
}
}
else if($mode == 'inventory_preview')
{
header('X-JSON: ["'.inventorypreview($widget, $type).'_pre", "'.inventorypreview($widget, $type).'", "'.inventorypreview($widget, $type).'", "'.$type.'", null, 1]');
echo '
<h4> </h4>
<div id="inventory-preview-box"></div>
<div id="inventory-preview-place" class="clearfix">
<div class="clearfix"><a href="#" class="new-button" id="inventory-place"><b>Place</b><i></i></a></div>
</div>';
}
else if($mode == 'place_sticker')
{
$query = $db->simple_select("profileinventory", "*", "fid = '".$stickerid."' AND type = '1'", array("limit" => 1));
if($db->num_rows($query) > 0)
{
$results = $db->fetch_array($query);
$insert = array(
'message' => $results['message'],
'type' => '1',
'subtype' => '0',
'pid' => $myid,
'x' => '10',
'y' => '10',
'z' => $z
);
$db->insert_query("profilestickers", $insert);
$query = $db->simple_select("profilestickers", "*", "pid = '".$myid."' AND message = '".$results['message']."' AND type = '1'", array("order_by" => "fid DESC", "limit" => 1));
$results = $db->fetch_array($query);
header('X-JSON: ['.$results['fid'].','.$results['fid'].']');
echo '<div class="movable sticker '.$results['message'] . '" style="left: 10px; top: 10px; z-index: '.$results['z'].'" id="sticker-'.$results['fid'].'">
<img src="'.$bburl.'/web-gallery/images/myhabbo/icon_edit.gif" class="edit-button" id="sticker-' . $results['fid'] . '-edit" />
<script language="JavaScript" type="text/javascript">
Event.observe(\'sticker-'.$results['fid'].'-edit\', \'click\', function(e) { openEditMenu(e, '.$results['fid'].', \'sticker\', \'sticker-'.$results['fid'].'-edit\'); }, false);
</script>
</div>';
}
Here is an updated revision
- - - Updated - - -PHP Code:global $db;
$mode = $mybb->get_input('key');
$type = $mybb->get_input('type');
$widget = $db->escape_string($mybb->get_input('itemId', MyBB::INPUT_INT));
// $noteText = $mybb->get_input('noteText');
// $newskin = $mybb->get_input('skin', MyBB::INPUT_INT);
$stickerid = $db->escape_string($mybb->get_input('selectedStickerId', MyBB::INPUT_INT));
$z = $db->escape_string($mybb->get_input('zindex', MyBB::INPUT_INT));
if(empty($type) && empty($widget) && empty($stickerid) && empty($z) != "")
{
error_no_permission();
exit;
}
if($mode == 'inventory')
{
$query = $db->simple_select("profileinventory", "message", "type = '1'", array("limit" => 1));
if($db->num_rows($query) > 0)
{
$results = $db->fetch_array($query);
header('X-JSON: [["Inventory", "Webstore"], ["'.$results['message'].'_pre", "'.$results['message'].'", "'.$results['message'].'", "Sticker", null, 1]]');
}
else
{
header('X-JSON: [["Inventory", "Webstore"], []]');
}
echo '
<div style="position: relative;">
<div id="inventory-categories-container">
<h4>Categories:</h4>
<div id="inventory-categories">
<ul class="purchase-main-category">
<li id="inv-cat-stickers" class="selected-main-category-no-subcategories"><div><strong>Stickers</strong></div></li>
<li id="inv-cat-bling" class="main-category-no-subcategories"><div>∟ Alpha Bling</div></li>
<li id="inv-cat-plastic" class="main-category-no-subcategories"><div>∟ Alpha Platic</div></li>
<li id="inv-cat-wood" class="main-category-no-subcategories"><div>∟ Alpha Wood</div></li>
<li id="inv-cat-buttons" class="main-category-no-subcategories"><div>∟ Buttons</div></li>
<li id="inv-cat-backgrounds" class="main-category-no-subcategories"><div><strong>Backgrounds</strong></div></li>
<li id="inv-cat-widgets" class="main-category-no-subcategories"><div><strong>Widgets</strong></div></li>
<li id="inv-cat-notes" class="main-category-no-subcategories"><div><strong>Notes</strong></div></li>
</ul>
</div>
</div>
<div id="inventory-content-container">
<div id="inventory-items-container">
<h4>Click an item to select it:</h4>
<div id="inventory-items">
<ul id="inventory-item-list">';
getitems(1);
echo '
</ul>
</div>
</div>
<div id="inventory-preview-container">
<div id="inventory-preview-default"></div>
<div id="inventory-preview">
<h4> </h4>
<div id="inventory-preview-box"></div>
<div id="inventory-preview-place" class="clearfix">
<div class="clearfix">
<a href="#" class="new-button" id="inventory-place"><b>Place</b><i></i></a>
</div>
</div>
</div>
</div>
</div>
<div id="webstore-close-container">
<div class="clearfix"><a href="#" id="webstore-close" class="new-button"><b>Close</b><i></i></a></div>
</div>';
}
elseif($mode == 'inventory_items')
{
if($type == 'stickers')
{
$typeset = 1;
}
else if($type == 'widgets')
{
$typeset = 2;
}
else if($type == 'notes')
{
$typeset = 3;
}
else if($type == 'backgrounds')
{
$typeset = 4;
}
if($typeset != 2)
{
echo '
<ul id="webstore-item-list">';
getitems($typeset);
echo '
</ul>';
}
else
{
echo '
<ul id="inventory-item-list">
<li id="inventory-item-p-1" title="Guestbook" class="webstore-widget-item '.webstorewidgetdisabled(2).'">
<div class="webstore-item-preview w_guestbookwidget_pre">
<div class="webstore-item-mask"></div>
</div>
<div class="webstore-widget-description">
<h3>Guestbook</h3>
<p>Guestbook</p>
</div>
</li>
<li id="inventory-item-p-2" title="My Friends" class="webstore-widget-item '.webstorewidgetdisabled(3).'">
<div class="webstore-item-preview w_friendswidget_pre">
<div class="webstore-item-mask"></div>
</div>
<div class="webstore-widget-description">
<h3>My Friends</h3>
<p>Display all your friends</p>
</div>
</li>
<li id="inventory-item-p-3" title="My Badges" class="webstore-widget-item '.webstorewidgetdisabled(4).'">
<div class="webstore-item-preview w_badgeswidget_pre">
<div class="webstore-item-mask"></div>
</div>
<div class="webstore-widget-description">
<h3>My Badges</h3>
<p>Show your badges on your page.</p>
</div>
</li>
<li id="inventory-item-p-4" title="My Video" class="webstore-widget-item '.webstorewidgetdisabled(5).'">
<div class="webstore-item-preview w_movieswidget_pre">
<div class="webstore-item-mask"></div>
</div>
<div class="webstore-widget-description">
<h3>My Video</h3>
<p>Lights, camera and action.</p>
</div>
</li>
<li id="inventory-item-p-5" title="My Ratings" class="webstore-widget-item '.webstorewidgetdisabled(6).'">
<div class="webstore-item-preview w_ratingwidget_pre">
<div class="webstore-item-mask"></div>
</div>
<div class="webstore-widget-description">
<h3>My Ratings</h3>
<p>Let other people rate your page.</p>
</div>
</li>
<li id="inventory-item-p-6" title="My Trax" class="webstore-widget-item '.webstorewidgetdisabled(7).'">
<div class="webstore-item-preview w_traxplayerwidget_pre">
<div class="webstore-item-mask"></div>
</div>
<div class="webstore-widget-description">
<h3>My Trax</h3>
<p>Listen to music on your page.</p>
</div>
</li>
</ul>';
}
}
else if($mode == 'inventory_preview')
{
header('X-JSON: ["'.inventorypreview($widget, $type).'_pre", "'.inventorypreview($widget, $type).'", "'.inventorypreview($widget, $type).'", "'.$type.'", null, 1]');
echo '
<h4> </h4>
<div id="inventory-preview-box"></div>
<div id="inventory-preview-place" class="clearfix">
<div class="clearfix"><a href="#" class="new-button" id="inventory-place"><b>Place</b><i></i></a></div>
</div>';
}
else if($mode == 'place_sticker')
{
$query = $db->simple_select("profileinventory", "*", "fid = '".$stickerid."' AND type = '1'", array("limit" => 1));
if($db->num_rows($query) > 0)
{
$results = $db->fetch_array($query);
$insert = array(
'message' => $results['message'],
'type' => '1',
'subtype' => '0',
'pid' => $myid,
'x' => '10',
'y' => '10',
'z' => $z
);
$db->insert_query("profilestickers", $insert);
$query = $db->simple_select("profilestickers", "*", "pid = '".$myid."' AND message = '".$results['message']."' AND type = '1'", array("order_by" => "fid DESC", "limit" => 1));
$results = $db->fetch_array($query);
header('X-JSON: ['.$results['fid'].','.$results['fid'].']');
echo '<div class="movable sticker '.$results['message'] . '" style="left: 10px; top: 10px; z-index: '.$results['z'].'" id="sticker-'.$results['fid'].'">
<img src="'.$bburl.'/web-gallery/images/myhabbo/icon_edit.gif" class="edit-button" id="sticker-' . $results['fid'] . '-edit" />
<script language="JavaScript" type="text/javascript">
Event.observe(\'sticker-'.$results['fid'].'-edit\', \'click\', function(e) { openEditMenu(e, '.$results['fid'].', \'sticker\', \'sticker-'.$results['fid'].'-edit\'); }, false);
</script>
</div>';
}
}
I just noticed that
PHP Code:$query = $db->simple_select("profileinventory", "*", "fid = '".$stickerid."' AND type = '1'", array("limit" => 1));
PHP Code:
$query = $db->simple_select("profileinventory", "message", "fid = '".$stickerid."' AND type = '1'", array("limit" => 1));
So there's that updated
- - - Updated - - -
Same goes for
to:PHP Code:$query = $db->simple_select("profilestickers", "*", "pid = '".$myid."' AND message = '".$results['message']."' AND type = '1'", array("order_by" => "fid DESC", "limit" => 1));
But besides that, I think it's looking pretty goodPHP Code:$query = $db->simple_select("profilestickers", "fid, message, z", "pid = '".$myid."' AND message = '".$results['message']."' AND type = '1'", array("order_by" => "fid DESC", "limit" => 1));
- - - Updated - - -
There is some deprecated html inside this code too, but again this is all work in progress!
- - - Updated - - -
This is kind of great, I'm spotting more mistakes that I had made
Updated!
- - - Updated - - -PHP Code:$db->insert_query("profilestickers", array('message' => $results['message'], 'type' => '1', 'subtype' => '0', 'pid' => $myid, 'x' => '10', 'y' => '10', 'z' => $z));
Pretty happy with the results, thanks guys :lol:
- - - Updated - - -
No longer need this:
Now I can just have:Code:["Inventory", "Webstore"]
- - - Updated - - -Code:["Inventory"]
Removed from integer values. $mybb->get_input() is enough.
Added htmlspecialchars_uni() to $results['message'] before outputting itCode:$db->escape_string()
- - - Updated - - -
Removed exit; before error_no_permission() as it's already called from another function that uses it
- - - Updated - - -
Here is the updated revision:
- - - Updated - - -PHP Code:$mode = $mybb->get_input('key');
$type = $mybb->get_input('type');
$widget = $mybb->get_input('itemId', MyBB::INPUT_INT);
// $noteText = $mybb->get_input('noteText');
// $newskin = $mybb->get_input('skin', MyBB::INPUT_INT);
$stickerid = $mybb->get_input('selectedStickerId', MyBB::INPUT_INT);
$z = $mybb->get_input('zindex', MyBB::INPUT_INT);
if(empty($type) && empty($widget) && empty($stickerid) && empty($z) != "")
{
error_no_permission();
}
global $db;
if($mode == 'inventory')
{
$query = $db->simple_select("profileinventory", "message", "type = '1'", array("limit" => 1));
if($db->num_rows($query) > 0)
{
$results = $db->fetch_array($query);
header('X-JSON: [["Inventory"], ["'.$results['message'].'_pre", "'.$results['message'].'", "'.$results['message'].'", "Sticker", null, 1]]');
}
else
{
header('X-JSON: [["Inventory"], []]');
}
echo '
<div style="position: relative;">
<div id="inventory-categories-container">
<h4>Categories:</h4>
<div id="inventory-categories">
<ul class="purchase-main-category">
<li id="inv-cat-stickers" class="selected-main-category-no-subcategories"><div><strong>Stickers</strong></div></li>
<li id="inv-cat-bling" class="main-category-no-subcategories"><div>∟ Alpha Bling</div></li>
<li id="inv-cat-plastic" class="main-category-no-subcategories"><div>∟ Alpha Platic</div></li>
<li id="inv-cat-wood" class="main-category-no-subcategories"><div>∟ Alpha Wood</div></li>
<li id="inv-cat-buttons" class="main-category-no-subcategories"><div>∟ Buttons</div></li>
<li id="inv-cat-backgrounds" class="main-category-no-subcategories"><div><strong>Backgrounds</strong></div></li>
<li id="inv-cat-widgets" class="main-category-no-subcategories"><div><strong>Widgets</strong></div></li>
<li id="inv-cat-notes" class="main-category-no-subcategories"><div><strong>Notes</strong></div></li>
</ul>
</div>
</div>
<div id="inventory-content-container">
<div id="inventory-items-container">
<h4>Click an item to select it:</h4>
<div id="inventory-items">
<ul id="inventory-item-list">';
getitems(1);
echo '
</ul>
</div>
</div>
<div id="inventory-preview-container">
<div id="inventory-preview-default"></div>
<div id="inventory-preview">
<h4> </h4>
<div id="inventory-preview-box"></div>
<div id="inventory-preview-place" class="clearfix">
<div class="clearfix">
<a href="#" class="new-button" id="inventory-place"><b>Place</b><i></i></a>
</div>
</div>
</div>
</div>
</div>
<div id="webstore-close-container">
<div class="clearfix"><a href="#" id="webstore-close" class="new-button"><b>Close</b><i></i></a></div>
</div>';
}
elseif($mode == 'inventory_items')
{
if($type == 'stickers')
{
$typeset = 1;
}
else if($type == 'widgets')
{
$typeset = 2;
}
else if($type == 'notes')
{
$typeset = 3;
}
else if($type == 'backgrounds')
{
$typeset = 4;
}
if($typeset != 2)
{
echo '
<ul id="webstore-item-list">';
getitems($typeset);
echo '
</ul>';
}
else
{
echo '
<ul id="inventory-item-list">
<li id="inventory-item-p-1" title="Guestbook" class="webstore-widget-item '.webstorewidgetdisabled(2).'">
<div class="webstore-item-preview w_guestbookwidget_pre">
<div class="webstore-item-mask"></div>
</div>
<div class="webstore-widget-description">
<h3>Guestbook</h3>
<p>Guestbook</p>
</div>
</li>
<li id="inventory-item-p-2" title="My Friends" class="webstore-widget-item '.webstorewidgetdisabled(3).'">
<div class="webstore-item-preview w_friendswidget_pre">
<div class="webstore-item-mask"></div>
</div>
<div class="webstore-widget-description">
<h3>My Friends</h3>
<p>Display all your friends</p>
</div>
</li>
<li id="inventory-item-p-3" title="My Badges" class="webstore-widget-item '.webstorewidgetdisabled(4).'">
<div class="webstore-item-preview w_badgeswidget_pre">
<div class="webstore-item-mask"></div>
</div>
<div class="webstore-widget-description">
<h3>My Badges</h3>
<p>Show your badges on your page.</p>
</div>
</li>
<li id="inventory-item-p-4" title="My Video" class="webstore-widget-item '.webstorewidgetdisabled(5).'">
<div class="webstore-item-preview w_movieswidget_pre">
<div class="webstore-item-mask"></div>
</div>
<div class="webstore-widget-description">
<h3>My Video</h3>
<p>Lights, camera and action.</p>
</div>
</li>
<li id="inventory-item-p-5" title="My Ratings" class="webstore-widget-item '.webstorewidgetdisabled(6).'">
<div class="webstore-item-preview w_ratingwidget_pre">
<div class="webstore-item-mask"></div>
</div>
<div class="webstore-widget-description">
<h3>My Ratings</h3>
<p>Let other people rate your page.</p>
</div>
</li>
<li id="inventory-item-p-6" title="My Trax" class="webstore-widget-item '.webstorewidgetdisabled(7).'">
<div class="webstore-item-preview w_traxplayerwidget_pre">
<div class="webstore-item-mask"></div>
</div>
<div class="webstore-widget-description">
<h3>My Trax</h3>
<p>Listen to music on your page.</p>
</div>
</li>
</ul>';
}
}
else if($mode == 'inventory_preview')
{
if(empty($widget))
{
exit;
}
header('X-JSON: ["'.inventorypreview($widget, $type).'_pre", "'.inventorypreview($widget, $type).'", "'.inventorypreview($widget, $type).'", "'.$type.'", null, 1]');
echo '
<h4> </h4>
<div id="inventory-preview-box"></div>
<div id="inventory-preview-place" class="clearfix">
<div class="clearfix"><a href="#" class="new-button" id="inventory-place"><b>Place</b><i></i></a></div>
</div>';
}
else if($mode == 'place_sticker')
{
$query = $db->simple_select("profileinventory", "message", "fid = '".$stickerid."' AND type = '1'", array("limit" => 1));
if($db->num_rows($query) > 0)
{
$results = $db->fetch_array($query);
$db->insert_query("profilestickers", array('message' => htmlspecialchars_uni($results['message']), 'type' => '1', 'subtype' => '0', 'pid' => $myid, 'x' => '10', 'y' => '10', 'z' => $z));
$query = $db->simple_select("profilestickers", "fid, message, z", "pid = '".$myid."' AND message = '".htmlspecialchars_uni($results['message'])."' AND type = '1'", array("order_by" => "fid DESC", "limit" => 1));
$results = $db->fetch_array($query);
header('X-JSON: ['.$results['fid'].','.$results['fid'].']');
echo '<div class="movable sticker '.$results['message'].'" style="left: 10px; top: 10px; z-index: '.$results['z'].'" id="sticker-'.$results['fid'].'">
<img src="'.$bburl.'/web-gallery/images/myhabbo/icon_edit.gif" class="edit-button" id="sticker-' . $results['fid'] . '-edit" />
<script type="text/javascript">
Event.observe(\'sticker-'.$results['fid'].'-edit\', \'click\', function(e) { openEditMenu(e, '.$results['fid'].', \'sticker\', \'sticker-'.$results['fid'].'-edit\'); }, false);
</script>
</div>';
}
}
Made one slight change
- - - Updated - - -
10000% performance increase :lol:
http://i.imgur.com/FubNY5u.gif
- - - Updated - - -
Here's something different, it actually turned out better than I expected. The green does "pop"
http://i.imgur.com/NyRavLZ.png
- - - Updated - - -
I'm just going to leave this here, it's for my own personal use as the revision of holocms I was using to get information from, didn't have this
Code:<div class="habblet-container">
<div class="cbb clearfix red">
<h2 class="title">What's going on?</h2>
<div id="hotcampaigns-habblet-list-container">
<ul id="hotcampaigns-habblet-list">
<li class="">
<div class="hotcampaign-container">
<a href="">
<img src="" align="left" alt="" /></a>
<h3>'</h3>
<p></p>
<p class="link"><a href="">Go there »</a></p>
</div>
</li>
</ul>
</div>
</div>
</div>
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
#hotcampaigns-habblet-list-container {
padding:5px 5px 0 5px;
}
#hotcampaigns-habblet-list-container p {
padding:5px
}
#hotcampaigns-habblet-list {
list-style-type:none;
margin:0;
padding:0
}
#hotcampaigns-habblet-list li {
float:left;
clear:both;
width:100%
}
#hotcampaigns-habblet-list li div.hotcampaign-container {
padding:5px 10px
}
#hotcampaigns-habblet-list li.even:hover {background-color:#dceafa}#hotcampaigns-habblet-list li.odd:hover{background-color:#f1f8ff}#hotcampaigns-habblet-list li p.link{margin:0;padding:0;text-align:right}#hotcampaigns-habblet-list li p.link a{color:#399001}#hotcampaigns-habblet-list li p{margin:0;padding:0}#hotcampaigns-habblet-list li h3{font-size:13px;margin:5px 0 0 0;padding:0}#hotcampaigns-habblet-list li img{margin:5px 5px 5px 0}#avatar-selector-habblet{padding-top:5px}#avatar-selector-habblet li{height:64px}
- - - Updated - - -
I'm also going to leave this link here to remind myself what I'm going to use this for!
https://github.com/mybb/mybb/blob/mybb_1820/admin/modules/user/group_promotions.php#L37
- - - Updated - - -
I've just made an executive decision for this project, I am removing the credits tab
- - - Updated - - -
I needed more colour tabs
http://i.imgur.com/LKOZXWU.png
- - - Updated - - -
I've asked myself, do I really want tags and the answer was no
- - - Updated - - -
I haven't downloaded the plugin, but this will probably be the plugin for habbo club:
https://community.mybb.com/mods.php?action=view&pid=458 (It looks very promising from the description). Plus it saves me writing up my own plugin, why reinvent the wheel when it's already done for you (something along those lines)
- - - Updated - - -
This also looks promising, as a contender for habbo club subscriptions
https://community.mybb.com/mods.php?action=view&pid=35
- - - Updated - - -
I don't think I'll need to make anymore changes to the memeber profiles javascript files, I am pretty happy with them, one less thing to do
- - - Updated - - -
My intention was that I wasn't going to add boardstats/birthdays/who's online to the personal page, but it is personal information for the user. Plus it fills out the webpage more :tongue:
http://i.imgur.com/rBEjsXv.png
I will be removing tags in its entirety from the build, that means everything tag related (html, js, css) will be removed because tags do not exist in Habbo's current format.http://i.imgur.com/l7lJRCO.png
I won't be implementing groups because Habbo's current format there is no way to access the group page on their website
Initially I was going to implement groups, but it doesn't make sense if I'm aiming to use this cms/mybb on current Habbo emulation
Before I continue the project for the 2009 theme/templates, I am going to remove any code that isn't/or won't be used to save up resources and performance
Once I'm satisfied with the results I'll continue the push on with development
Updates!
When I changed the theme over from the default mybb theme, I broke a script that would redirect you back to the page you were on when logging in, I have now fixed that and it's working as intended.
I have updated boardstats/forum statistics/who's online/birthdays to this:
If someone could hook me up with icons for board statistics, that would be great. I'd just need them to be relatively small (10x10 to 15x15) and them all being the same size.
- - - Updated - - -
http://i.imgur.com/Z0JonCQ.png
Subnavi looking tiny
- - - Updated - - -
Things to remove:
Code:
<li id="mygroups"><a href="#"><span>My Groups</span></a><span class="r"></span></li>
<li id="myrooms"><a href="#"><span>My Rooms</span></a><span class="r"></span></li>
- - - Updated - - -
Things to remove and fix:
Code:
<a onclick="openOrFocusHelp(this); return false" href="http://192.168.1.219/mybb/misc.php?action=help" target="habbohelp">Help</a>
- - - Updated - - -
CSS (ill check if the images are used anywhere else, otherwise they're taking a hike)
Code:
#qtab-container-myrooms p.create-room, #qtab-container-mygroups p.create-group,
#qtab-container-myrooms p.create-room a, #qtab-container-mygroups p.create-group a {
padding: 0 21px 2px 0;
background: transparent url(../images/myhabbo_icons.png) no-repeat 100% -236px;
}
div.favourite-group, div.owned-group, div.admin-group, #quickmenu-groups li a.group-room,
#promogroups-habblet-list-container a.group-room {
display: block;
float: right;
width: 16px;
height: 16px;
background: transparent url(../images/info_icons.png) no-repeat;
}
div.favourite-group { background-position: 100% -433px; }
div.owned-group { background-position: 100% -480px; }
div.admin-group { background-position: 100% -528px; }
#quickmenu-groups li a.group-room, #promogroups-habblet-list-container a.group-room { background-position: 0 -800px; width: 19px; }
#promogroups-habblet-list-container a.group-room { margin-top: 15px; width: 24px; }
- - - Updated - - -
hopefully
I figured I'd post this boring stuff because it's a part of the development and you should all be aware how much effort I'm putting into this development andit'll inspire at least one of you
- - - Updated - - -
Need editing: You thought you were safe?! HA!!!!!!
Code:
HabboView.add(function() {
if (document.habboLoggedIn && $("subnavi-user")) {
var B = new QuickMenu();
var A = $A([
["myfriends", "habblet/quickmenu.php?key=friends_all"],
["mygroups", "habblet/quickmenu.php?key=groups"],
["myrooms", "habblet/quickmenu.php?key=rooms"]
]);
A.each(function(C) {
B.add($(C[0]), function(D) {
var E = C[1];
Element.wait(D);
new Ajax.Updater(D, E, {
onComplete: function() {
new QuickMenuListPaging(C[0], E)
}
})
})
});
Event.observe(document.body, "click", function(C) {
B.closeContainer()
})
}
});
HabboView.add(function() {
if (document.habboLoggedIn && $("subnavi-user")) {
var B = new QuickMenu();
var A = $A([
["myfriends", "habblet/ajax_habblet/quickmenu.php?key=friends_all"],
["mygroups", "habblet/ajax_habblet/quickmenu.php?key=groups"],
["myrooms", "habblet/ajax_habblet/quickmenu.php?key=rooms"]
]);
A.each(function(C) {
B.add($(C[0]), function(D) {
var E = C[1];
Element.wait(D);
new Ajax.Updater(D, E, {
onComplete: function() {
new QuickMenuListPaging(C[0], E)
}
})
})
});
Event.observe(document.body, "click", function(C) {
B.closeContainer()
})
}
});
- - - Updated - - -
I'll leave the script as an array, incase people want to add other quickmenus in the future
- - - Updated - - -
This also needs removing
Code:
function openOrFocusHelp(C) {
var E = (C.href ? C.href : C);
var D = HabboClient._openEmptyHabboWindow("habbohelp");
var B = false;
try {
B = (D.habboHelp)
} catch (A) {}
if (B) {
D.focus()
} else {
D.location.href = E;
D.focus()
}
}
- - - Updated - - -
No longer need this as it was used for quickmenu
Code:function roomForward(C, B, A) {
HabboClient.roomForward(C, B, A)
}
- - - Updated - - -
Anyway you guys get the point :lol:
- - - Updated - - -
I can't help myself, here's a juicy script that needs removing: tags
Code:var TagHelper = Class.create();
TagHelper.initialized = false;
TagHelper.init = function(A) {
if (TagHelper.initialized) {
return
}
TagHelper.initialized = true;
TagHelper.loggedInAccountId = A;
TagHelper.bindEventsToTagLists()
};
TagHelper.addFormTagToMe = function() {
var A = $("add-tag-input");
TagHelper.addThisTagToMe($F(A), true);
Form.Element.clear(A)
};
TagHelper.bindEventsToTagLists = function() {
var A = function(B) {
TagHelper.tagListClicked(B, TagHelper.loggedInAccountId)
};
$$(".tag-list.make-clickable").each(function(B) {
Event.observe(B, "click", A);
Element.removeClassName(B, "make-clickable")
})
};
TagHelper.setTexts = function(A) {
TagHelper.options = A
};
TagHelper.tagListClicked = function(E) {
var D = Event.element(E);
var B = Element.hasClassName(D, "tag-add-link");
var A = Element.hasClassName(D, "tag-remove-link");
if (B || A) {
var F = Element.up(D, ".tag-list li");
if (!F) {
return
}
var C = TagHelper.findTagNameForContainer(F);
Event.stop(E);
if (B) {
TagHelper.addThisTagToMe(C, true)
} else {
TagHelper.removeThisTagFromMe(C)
}
}
};
TagHelper.findTagNameForContainer = function(A) {
var B = Element.down(A, ".tag");
if (!B) {
return null
}
return B.innerHTML.strip()
};
TagHelper.addThisTagToMe = function(B, C, A) {
if (typeof(A) == "undefined") {
A = {}
}
new Ajax.Request("/myhabbo/tag/add", {
parameters: "accountId=" + encodeURIComponent(TagHelper.loggedInAccountId) + "&tagName=" + encodeURIComponent(B),
onSuccess: function(E) {
var D = E.responseText;
if (D == "valid" && C) {
$$(".tag-list li").each(function(F) {
if (TagHelper.findTagNameForContainer(F) == B) {
var H = Element.down(F, ".tag-add-link");
var G = $$(".tag-remove-link").first();
H.title = G ? G.title : "";
H.removeClassName("tag-add-link").addClassName("tag-remove-link")
}
})
} else {
if (D == "taglimit") {
Dialog.showInfoDialog("tag-error-dialog", TagHelper.options.tagLimitText, TagHelper.options.buttonText, null)
} else {
if (D == "invalidtag") {
Dialog.showInfoDialog("tag-error-dialog", TagHelper.options.invalidTagText, TagHelper.options.buttonText, null)
}
}
}
if (D == "valid" || D == "") {
if (C) {
TagHelper.reloadMyTagsList()
} else {
TagHelper.reloadSearchBox(B, 1)
}
if (typeof(A.onSuccess) == "function") {
A.onSuccess()
}
}
}
})
};
TagHelper.reloadSearchBox = function(A, B) {
if ($("tag-search-habblet-container")) {
new Ajax.Updater($("tag-search-habblet-container"), "/habblet/ajax/tagsearch", {
method: "post",
parameters: "tag=" + A + "&pageNumber=" + B,
evalScripts: true
})
}
};
TagHelper.removeThisTagFromMe = function(A) {
new Ajax.Request("/myhabbo/tag/remove", {
parameters: "accountId=" + encodeURIComponent(TagHelper.loggedInAccountId) + "&tagName=" + encodeURIComponent(A),
onSuccess: function(C) {
var B = function(D) {
$$(".tag-list li").each(function(E) {
if (TagHelper.findTagNameForContainer(E) == A) {
var G = Element.down(E, ".tag-remove-link");
var F = $$(".tag-add-link").first();
if (F) {
G.title = F.title || "";
G.removeClassName("tag-remove-link").addClassName("tag-add-link")
}
}
})
};
TagHelper.reloadMyTagsList({
onSuccess: B
})
}
})
};
TagHelper.reloadMyTagsList = function(B) {
var A = {
evalScripts: true
};
Object.extend(A, B);
new Ajax.Updater($("my-tags-list"), "/habblet/mytagslist", A)
};
TagHelper.matchFriend = function() {
var A = $F("tag-match-friend");
if (A) {
new Ajax.Updater($("tag-match-result"), habboReqPath + "/habblet/ajax/tagmatch", {
parameters: {
friendName: A
},
onComplete: function(D) {
var C = $("tag-match-value");
if (C) {
var B = parseInt(C.innerHTML, 10);
if (typeof TagHelper.CountEffect == "undefined") {
$("tag-match-value-display").innerHTML = B + " %";
Element.show("tag-match-slogan")
} else {
var E;
if (B > 0) {
E = 1.5
} else {
E = 0.1
}
new TagHelper.CountEffect("tag-match-value-display", {
duration: E,
transition: Effect.Transitions.sinoidal,
from: 0,
to: B,
afterFinish: function() {
Effect.Appear("tag-match-slogan", {
duration: 1
})
}
})
}
}
}
})
}
};
var TagFight = Class.create();
TagFight.init = function() {
if ($F("tag1") && $F("tag2")) {
TagFight.start()
} else {
return false
}
};
TagFight.start = function() {
$("fightForm").style.display = "none";
$("tag-fight-button").style.display = "none";
$("fightanimation").src = habboStaticFilePath + "/images/tagfight/tagfight_loop.gif";
$("fight-process").style.display = "block";
setTimeout("TagFight.run()", 3000)
};
TagFight.run = function() {
new Ajax.Updater("fightResults", "/habblet/ajax/tagfight", {
method: "post",
parameters: "tag1=" + $F("tag1") + "&tag2=" + $F("tag2"),
onComplete: function() {
$("fight-process").style.display = "none";
$("fightForm").style.display = "none";
$("tag-fight-button-new").style.display = "block"
}
})
};
TagFight.newFight = function() {
$("fight-process").style.display = "none";
$("fightForm").style.display = "block";
$("fightResultCount").style.display = "none";
$("tag-fight-button").style.display = "block";
$("tag-fight-button-new").style.display = "none";
$("fightanimation").src = habboStaticFilePath + "/images/tagfight/tagfight_start.gif";
$("tag1").value = "";
$("tag2").value = ""
};
- - - Updated - - -
Removing:
Code:var HabbletGroupPaging = Class.create(HabbletPaging, {
initialize: function($super, A) {
this.setOptions({
contentElementId: "groups-habblet-list-container",
pagingElementId: "groups-habblet-list-container-list-paging",
pagingListLinkClass: "groups-habblet-list-container-list-paging-link"
});
$super(A)
}
});
Code:var HighscoreHabblet = Class.create();
HighscoreHabblet.prototype = {
initialize: function(A) {
this.habbletId = A;
this.containerEl = $("highscores-habblet-list-container-" + A);
this._setupPaging();
this._setupGameLinks()
},
_setupPaging: function() {
if ($("habblet-paging-" + this.habbletId)) {
Event.observe($("habblet-paging-" + this.habbletId), "click", function(A) {
Event.stop(A);
this._handlePagingClick(A)
}.bind(this))
}
},
_handlePagingClick: function(D) {
var C = Event.findElement(D, "a");
if (Element.hasClassName(C, "list-paging-link")) {
var A = $F(this.habbletId + "-pageNumber");
var B = $F(this.habbletId + "-gameId");
switch (C.id.split("-").last()) {
case "next":
A++;
break;
case "previous":
A--;
break
}
this._updateContent(A, B)
}
},
_setupGameLinks: function() {
Event.observe($("highscores-habblet-games-" + this.habbletId), "click", function(A) {
Event.stop(A);
this._handleGameLinkClick(A)
}.bind(this))
},
_handleGameLinkClick: function(C) {
var B = Event.findElement(C, "a");
if (Element.hasClassName(B, "highscores-habblet-game-link")) {
var A = B.id.split("-").last();
this._updateContent(0, A)
}
},
_updateContent: function(A, B) {
new Ajax.Updater(this.containerEl, habboReqPath + "/habblet/personalhighscores", {
method: "post",
parameters: {
pageNumber: A,
gameId: B,
hid: this.habbletId
},
onComplete: function() {
this._setupPaging();
this._setupGameLinks()
}.bind(this)
})
}
};
var BestExpsHabblet = Class.create();
BestExpsHabblet.prototype = {
initialize: function(A) {
this.habbletId = A;
this.containerEl = $("best-exps-habblet-list-container-" + A);
this._setupTypeLinks();
this._setupOffsetLinks()
},
_setupTypeLinks: function() {
Event.observe($("best-exps-habblet-types-" + this.habbletId), "click", function(A) {
Event.stop(A);
this._handleTypeLinkClick(A)
}.bind(this))
},
_setupOffsetLinks: function() {
var A = $F(this.habbletId + "-type");
if (A == "alltime") {
return
}
Event.observe($("best-exps-habblet-offset-" + this.habbletId), "click", function(B) {
Event.stop(B);
this._handleOffsetLinkClick(B)
}.bind(this))
},
_handleTypeLinkClick: function(C) {
var B = Event.findElement(C, "a");
if (Element.hasClassName(B, "best-exps-habblet-type-link")) {
var A = B.id.split("-").last();
this._updateContent(A, 0)
}
},
_handleOffsetLinkClick: function(C) {
var B = Event.findElement(C, "a");
if (Element.hasClassName(B, "best-exps-habblet-offset-link")) {
var D = B.id.split("-").last();
var A = $F(this.habbletId + "-type");
this._updateContent(A, -D)
}
},
_updateContent: function(A, B) {
new Ajax.Updater(this.containerEl, habboReqPath + "/habblet/bestexps", {
method: "post",
parameters: {
type: A,
offset: B,
hid: this.habbletId
},
onComplete: function() {
this._setupTypeLinks();
this._setupOffsetLinks()
}.bind(this)
})
}
};
var HallOfFameHabblet = Class.create();
HallOfFameHabblet.prototype = {
initialize: function(A) {
this.habbletId = A;
this.containerEl = $("hall-of-fame-habblet-list-container-" + A);
this._setupGameLinks()
},
_setupGameLinks: function() {
Event.observe($("hall-of-fame-habblet-games-" + this.habbletId), "click", function(A) {
Event.stop(A);
this._handleGameLinkClick(A)
}.bind(this))
},
_handleGameLinkClick: function(C) {
var B = Event.findElement(C, "a");
if (Element.hasClassName(B, "hall-of-fame-habblet-game-link")) {
var A = B.id.split("-").last();
this._updateContent(A, 0)
}
},
_updateContent: function(A) {
new Ajax.Updater(this.containerEl, habboReqPath + "/habblet/halloffame", {
method: "post",
parameters: {
game: A,
hid: this.habbletId
},
onComplete: function() {
this._setupGameLinks()
}.bind(this)
})
}
};
Code:
Code:var RoomSelectionHabblet = {
initClosableHabblet: function() {
$("habblet-close-roomselection").observe("click", function(A) {
RoomSelectionHabblet.showConfirmation()
})
},
hideHabblet: function() {
new Ajax.Request(habboReqPath + "habblet/ajax_roomselectionHide.php");
Effect.Fade("roomselection", {
afterFinish: function() {
$("roomselection").remove()
}
})
},
showConfirmation: function() {
Overlay.show();
var A = Dialog.createDialog("roomselection-dialog", L10N.get("roomselection.hide.title"), false, false, false, RoomSelectionHabblet.hideConfirmation);
Dialog.setAsWaitDialog(A);
Dialog.makeDialogDraggable(A);
Dialog.moveDialogToCenter(A);
new Ajax.Request(habboReqPath + "habblet/ajax_roomselectionConfirm.php", {
onComplete: function(B) {
$("roomselection-dialog-body").update(B.responseText);
$("roomselection-cancel").observe("click", function(C) {
Event.stop(C);
RoomSelectionHabblet.hideConfirmation()
});
if ( !! $("roomselection-hide")) {
$("roomselection-hide").observe("click", function(C) {
Event.stop(C);
RoomSelectionHabblet.hideConfirmation();
RoomSelectionHabblet.hideHabblet()
})
}
}
})
},
hideConfirmation: function() {
$("roomselection-dialog").remove();
Overlay.hide()
},
create: function(B, D) {
var A = false;
try {
A = window.habboClient
} catch (C) {}
if (A) {
window.location.href = B;
return false
}
if (document.habboLoggedIn) {
new Ajax.Request(habboReqPath + "habblet/ajax_roomselectionCreate.php", {
parameters: {
roomType: D
}
})
}
HabboClient.openOrFocus(B);
if ($("roomselection-plp-intro")) {
$("roomselection-plp", "habblet-close-roomselection").invoke("hide");
$("roomselection-plp-intro").update(L10N.get("roomselection.old_user.done"))
}
return false
}
};
Code:
Code:
var GiftQueueHabblet = {
init: function(A) {
GiftQueueHabblet.container = $("gift-countdown");
if ( !! GiftQueueHabblet.container) {
new PrettyTimer(A, function(B) {
GiftQueueHabblet.container.update(B)
}, {
showDays: false,
showMeaningfulOnly: false,
localizations: {
hours: L10N.get("time.hours") + " ",
minutes: L10N.get("time.minutes") + " ",
seconds: L10N.get("time.seconds")
},
endCallback: function() {
GiftQueueHabblet.reload()
}
})
}
},
initClosableHabblet: function() {
$("habblet-close-giftqueue").setStyle({
display: "inline"
});
$("habblet-close-giftqueue").observe("click", function(A) {
GiftQueueHabblet.hide()
})
},
reload: function() {
new Ajax.Request(habboReqPath + "habblet/ajax_nextgift.php", {
onComplete: function(B, A) {
$("gift-container").update(B.responseText);
GiftQueueHabblet.init(parseInt(A))
}
})
},
hide: function() {
new Ajax.Request(habboReqPath + "habblet/ajax_roomselectionHide.php");
Effect.Fade("giftqueue", {
afterFinish: function() {
$("giftqueue").remove()
}
})
}
};
var CurrentRoomEvents = {
init: function() {
$("event-category").observe("change", function(A) {
Element.wait($("event-list"));
new Ajax.Updater("event-list", "habblet/ajax_load_events.php", {
parameters: {
eventTypeId: $F("event-category")
},
onComplete: function() {
CurrentRoomEvents.initListItems()
}
})
});
CurrentRoomEvents.initListItems()
},
initListItems: function() {
$$("#current-events ul.habblet-list").each(function(A) {
Event.observe(A, "click", function(C) {
var D = Event.element(C);
if (D.tagName.toUpperCase() == "A") {
return
}
Event.stop(C);
if (!$(D).match("li")) {
D = $(D).up("li")
}
var B = $(D).readAttribute("roomid");
if (B) {
HabboClient.roomForward("client.php?forwardId=2&roomId=" + B, B, "private")
}
})
})
}
};
Code:
Code:HabboView.add(HabbletTabber.init);
var TagHelper = Class.create();
TagHelper.initialized = false;
TagHelper.init = function(A) {
if (TagHelper.initialized) {
return
}
TagHelper.initialized = true;
TagHelper.loggedInAccountId = A;
TagHelper.bindEventsToTagLists()
};
TagHelper.addFormTagToMe = function() {
var A = $("add-tag-input");
TagHelper.addThisTagToMe($F(A), true);
Form.Element.clear(A)
};
TagHelper.bindEventsToTagLists = function() {
var A = function(B) {
TagHelper.tagListClicked(B, TagHelper.loggedInAccountId)
};
$$(".tag-list.make-clickable").each(function(B) {
Event.observe(B, "click", A);
Element.removeClassName(B, "make-clickable")
})
};
TagHelper.setTexts = function(A) {
TagHelper.options = A
};
TagHelper.tagListClicked = function(E) {
var D = Event.element(E);
var B = Element.hasClassName(D, "tag-add-link");
var A = Element.hasClassName(D, "tag-remove-link");
if (B || A) {
var F = Element.up(D, ".tag-list li");
if (!F) {
return
}
var C = TagHelper.findTagNameForContainer(F);
Event.stop(E);
if (B) {
TagHelper.addThisTagToMe(C, true)
} else {
TagHelper.removeThisTagFromMe(C)
}
}
};
TagHelper.findTagNameForContainer = function(A) {
var B = Element.down(A, ".tag");
if (!B) {
return null
}
return B.innerHTML.strip()
};
TagHelper.addThisTagToMe = function(B, C, A) {
if (typeof(A) == "undefined") {
A = {}
}
new Ajax.Request("habblet/tags_ajax.php?key=add", {
parameters: "accountId=" + encodeURIComponent(TagHelper.loggedInAccountId) + "&tagName=" + encodeURIComponent(B),
onSuccess: function(E) {
var D = E.responseText;
if (D == "valid" && C) {
$$(".tag-list li").each(function(F) {
if (TagHelper.findTagNameForContainer(F) == B) {
var H = Element.down(F, ".tag-add-link");
var G = $$(".tag-remove-link").first();
H.title = G ? G.title : "";
H.removeClassName("tag-add-link").addClassName("tag-remove-link")
}
})
} else {
if (D == "taglimit") {
Dialog.showInfoDialog("tag-error-dialog", TagHelper.options.tagLimitText, TagHelper.options.buttonText, null)
} else {
if (D == "invalidtag") {
Dialog.showInfoDialog("tag-error-dialog", TagHelper.options.invalidTagText, TagHelper.options.buttonText, null)
}
}
} if (D == "valid" || D == "") {
if (C) {
TagHelper.reloadMyTagsList()
} else {
TagHelper.reloadSearchBox(B, 1)
} if (typeof(A.onSuccess) == "function") {
A.onSuccess()
}
}
}
})
};
TagHelper.reloadSearchBox = function(A, B) {
if ($("tag-search-habblet-container")) {
new Ajax.Updater($("tag-search-habblet-container"), "/habblet/ajax/tagsearch", {
method: "post",
parameters: "tag=" + A + "&pageNumber=" + B,
evalScripts: true
})
}
};
TagHelper.removeThisTagFromMe = function(A) {
new Ajax.Request("habblet/tags_ajax.php?key=remove", {
parameters: "accountId=" + encodeURIComponent(TagHelper.loggedInAccountId) + "&tagName=" + encodeURIComponent(A),
onSuccess: function(C) {
var B = function(D) {
$$(".tag-list li").each(function(E) {
if (TagHelper.findTagNameForContainer(E) == A) {
var G = Element.down(E, ".tag-remove-link");
var F = $$(".tag-add-link").first();
if (F) {
G.title = F.title || "";
G.removeClassName("tag-remove-link").addClassName("tag-add-link")
}
}
})
};
TagHelper.reloadMyTagsList({
onSuccess: B
})
}
})
};
TagHelper.reloadMyTagsList = function(B) {
var A = {
evalScripts: true
};
Object.extend(A, B);
new Ajax.Updater($("my-tags-list"), "habblet/tags_ajax.php?key=mytagslist", A)
};
TagHelper.matchFriend = function() {
var A = $F("tag-match-friend");
if (A) {
new Ajax.Updater($("tag-match-result"), habboReqPath + "/habblet/ajax/tagmatch", {
parameters: {
friendName: A
},
onComplete: function(D) {
var C = $("tag-match-value");
if (C) {
var B = parseInt(C.innerHTML, 10);
if (typeof TagHelper.CountEffect == "undefined") {
$("tag-match-value-display").innerHTML = B + " %";
Element.show("tag-match-slogan")
} else {
var E;
if (B > 0) {
E = 1.5
} else {
E = 0.1
}
new TagHelper.CountEffect("tag-match-value-display", {
duration: E,
transition: Effect.Transitions.sinoidal,
from: 0,
to: B,
afterFinish: function() {
Effect.Appear("tag-match-slogan", {
duration: 1
})
}
})
}
}
}
})
}
};
var TagFight = Class.create();
TagFight.init = function() {
if ($F("tag1") && $F("tag2")) {
TagFight.start()
} else {
return false
}
};
TagFight.start = function() {
$("fightForm").style.display = "none";
$("tag-fight-button").style.display = "none";
$("fightanimation").src = habboStaticFilePath + "/images/tagfight/tagfight_loop.gif";
$("fight-process").style.display = "block";
setTimeout("TagFight.run()", 3000)
};
TagFight.run = function() {
new Ajax.Updater("fightResults", "habblet/ajax_tagfight.php", {
method: "post",
parameters: "tag1=" + $F("tag1") + "&tag2=" + $F("tag2"),
onComplete: function() {
$("fight-process").style.display = "none";
$("fightForm").style.display = "none";
$("tag-fight-button-new").style.display = "block"
}
})
};
TagFight.newFight = function() {
$("fight-process").style.display = "none";
$("fightForm").style.display = "block";
$("fightResultCount").style.display = "none";
$("tag-fight-button").style.display = "block";
$("tag-fight-button-new").style.display = "none";
$("fightanimation").src = habboStaticFilePath + "/images/tagfight/tagfight_start.gif";
$("tag1").value = "";
$("tag2").value = ""
};
Code:
Code:var GroupUtils = {
validateGroupElements: function(C, A, E) {
var D = $(C);
if (D.value.length >= A) {
D.value = D.value.substring(0, A);
$(C + "_message_error").innerHTML = E;
$(C + "_message_error").style.display = "block"
} else {
$(C + "_message_error").innerHTML = "";
$(C + "_message_error").style.display = "none"
} if ($(C + "-counter")) {
var B = A - D.value.length;
$(C + "-counter").value = B
}
}
};
var GroupPurchase = function() {
var A = null;
var C = null;
var B = function(D) {
Dialog.setAsWaitDialog(A);
new Ajax.Request("habblet/ajax_grouppurchase.php" + D, {
parameters: C,
onComplete: function(F, E) {
Dialog.setDialogBody(A, F.responseText)
}
})
};
return {
open: function() {
A = Dialog.createDialog("group_purchase_form", L10N.get("purchase.group.title"), 9001, 0, -1000, GroupPurchase.close);
Dialog.setAsWaitDialog(A);
Dialog.moveDialogToCenter(A);
Dialog.makeDialogDraggable(A);
Overlay.show();
new Ajax.Request("habblet/ajax_grouppurchase.php", {
onComplete: function(E, D) {
Dialog.setDialogBody(A, E.responseText)
}
})
},
close: function(D) {
if ( !! D) {
Event.stop(D)
}
$("group_purchase_form").remove();
Overlay.hide();
A = null;
C = null
},
confirm: function() {
C = {
name: $F("group_name"),
description: $F("group_description")
};
B("?do=purchase_confirmation")
},
purchase: function() {
B("purchase_ajax")
}
}
}();
When removing scripts/code, you need to becareful, cause if you remove something you shouldn't, everything will break!
- - - Updated - - -
When deleting code that could potentitally break your website, do it in tiny steps, don't go crazy like me and delete everything you see in sight :D
- - - Updated - - -
Ok next step would be for me to review the css/html/images I don't need.
Now this part is a lot more difficult than just deleting scripts because these pieces of code may not be used on any pages that I've worked on so far, but they may be used on others - So this can be time consuming!
This is why you should always comment on your code :D
- - - Updated - - -
A good place to start is to find things what you're deleting, as you can see I've already found lots of information that's critical for me to remove everything regarding groups/tags/etc
http://i.imgur.com/lpEwaba.png
- - - Updated - - -
Don't just delete everything, write down the names of files and folders that you will be deleting, then review the names and files with other files that you think may have used said files
- - - Updated - - -
I hope you guys have been inspired and maybe have learnt something today! :P:
- - - Updated - - -
I have made some changes to the referral/search plugin
The script was fairly pointless for referring a friend, you clicked a button and the textarea appeared. Let's just get straight to the point.
I've made some some CSS changes to search users, as you can see
http://i.imgur.com/JUCthiD.gif
- - - Updated - - -
When turning off referrals, we now get this:
http://i.imgur.com/V3q5Ml4.png
- - - Updated - - -
New icons! I mean (thanks for your contributions :lol:)
http://i.imgur.com/DVxelkW.png
- - - Updated - - -
Frank saves the day
http://i.imgur.com/S9YEdO9.png
Habborator has some nice icons.
Small: https://www.habborator.org/archive/nav_1.php
Medium: https://www.habborator.org/archive/nav_2.php
Loving all the work you're doing. Keep it up
Have to say that this development is activly worked on for weeks now and everytime with new exciting stuff to discover.
Keep it up @Sabbo
I wanted to showcase this yesterday, but I messed it up.
http://i.imgur.com/ELPCZKj.gif
Interactive staff team page
Showcases all your staff members
Create silly messages to reveal who they are and what they do
Only administrators can modify the page
If the user is in the correct usergroup, they will automatically be added to the staff page, you will just have to align them to how you see fit and add a stickie next to their name (or dont)
This is kind of like a group, but isn't
Administrators will always be in edit mode when browsing forum team
- - - Updated - - -
I may introduce a staff category into the store, so staff members get limited stickers/backgrounds that only they can use for the staff page