MyBB Community Forums
[General] Rep button not working - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: [General] Rep button not working (/thread-234687.html)

Pages: 1 2


Rep button not working - Shooting - 2022-01-13

Hi everyone, I can't get the REP button to work, here is the code from style-templates&action=edit_template&title=postbit_rep_button


<a href="javascript:MyBB.reputation({$post['uid']},{$post['pid']});" title="{$lang->postbit_reputation_add}" class="postbit_reputation_add"><i class="fa fa-plus"></i> <span>{$lang->postbit_button_reputation_add}</span></a>


Any Ideas?

Regards


RE: Rep button not working - Matt - 2022-01-13

Can we have a URL and a test account? Check the browser developer console for errors, this is usually caused by javascript errors.


RE: Rep button not working - Shooting - 2022-01-14

(2022-01-13, 07:49 PM)Matt Wrote: Can we have a URL and a test account? Check the browser developer console for errors, this is usually caused by javascript errors.

Forum: Forum (cewl.selfip.com)

User: Test

Thanks


RE: Rep button not working - Shooting - 2022-01-14

I've replied with account details but it just disappears.. hope you got it?
Everything works on Standard Theme, it's when in "Purple Theme" things don't work, eg mod tools also

Thanks


RE: Rep button not working - Shooting - 2022-01-15

Up... anyone?


RE: Rep button not working - Matt - 2022-01-15

You have this console error:

Uncaught TypeError: $(...).error is not a function

It is from this code in templates:

<script>
$(function(){
$(".avatar").error(function () {
  $(this).unbind("error").attr("src", "http://cewl.selfip.com/forum/images/default_avatar.png");
});
});
</script>

<script type="text/javascript">
	$(".author_avatar img").error(function () {
		$(this).unbind("error").closest('.author_avatar').remove();
	});
</script>

This won't work in current versions of jQuery so will need to be removed. The theme author needs to update the theme.


RE: Rep button not working - Shooting - 2022-01-15

(2022-01-15, 12:12 PM)Matt Wrote: You have this console error:

Uncaught TypeError: $(...).error is not a function

It is from this code in templates:

<script>
$(function(){
$(".avatar").error(function () {
  $(this).unbind("error").attr("src", "http://cewl.selfip.com/forum/images/default_avatar.png");
});
});
</script>

<script type="text/javascript">
	$(".author_avatar img").error(function () {
		$(this).unbind("error").closest('.author_avatar').remove();
	});
</script>

This won't work in current versions of jQuery so will need to be removed. The theme author needs to update the theme.


Thanks, how do I do that? sorry I'm new to this

Regards

Up... anyone can help?


RE: Rep button not working - Shooting - 2022-01-17

Up, can someone help?

thanks


RE: Rep button not working - Matt - 2022-01-17

Looks like you've installed a new theme and it works now. It's likely the old theme was just very outdated.


RE: Rep button not working - Shooting - 2022-01-17

(2022-01-17, 11:00 AM)Matt Wrote: Looks like you've installed a new theme and it works now. It's likely the old theme was just very outdated.

I modified the Default theme, but the purple theme still isn't working,
it's the purple theme I'm trying to fix

Thanks