Thanked Message - Code issue
2 posters
Page 1 of 1
Thanked Message - Code issue
Hello,
I am using the code from "Tips & Tricks" where you can add a custom Thanked message i was just wondering is there a way to remove the user's rank? see image below i have also inserted the code i am using. This is for PHPBB2.
Forum Url: http://stars-clan.forumotion.co.uk/
The Forum is for members only, if you need access i have setup an account so you can access the Forum. Let me know if you need it.
Screenshot of the Issue
Is there a way to remove the "Forum Moderator" part in the thanked message and just have the users name.
Thanks in Advance.
I am using the code from "Tips & Tricks" where you can add a custom Thanked message i was just wondering is there a way to remove the user's rank? see image below i have also inserted the code i am using. This is for PHPBB2.
Forum Url: http://stars-clan.forumotion.co.uk/
The Forum is for members only, if you need access i have setup an account so you can access the Forum. Let me know if you need it.
- Code:
$(function() {
var message = function(child, parent) {
var pseudo = $(child, parent).text(),
icon = '<img src="http://i68.servimg.com/u/f68/14/69/73/51/citade11.png" alt=""/>';
return '<div id="fa_thanks_message">' + icon + ' The topic starter has thanked ' + pseudo + ' ! ' + icon + '</div>';
},
version = $('.bodylinewidth')[0] ? 0 : document.getElementById('wrap') ? 1 : $('.pun')[0] ? 2 : document.getElementById('ipbwrapper') ? 3 : 'badapple', // version check
node = document.createElement(version ? 'DIV' : 'TR'),
post = $(version ? 'div' : 'tr' + '.post'),
j = post.length,
i = 0;
if (version == 'badapple') {
if (window.console) console.error('This plugin is not optimized for your forum version. Please contact the support for further assistance.');
return;
}
node.id = 'fa_thanks'; // id for style modifications
if (!version) node.innerHTML = '<td colspan="2"></td>'; // phpbb2 must have a cell as the child node
for (; i < j; i++) {
if ((version ? post[i] : post[i].firstChild).style.backgroundColor) { // thanked posts have the backgroundColor style property
post[i].className += ' thanked'; // mark the thanked post with a class
(version ? node : node.firstChild).innerHTML = message(['.name', 'dl > dt > strong', '.username', '.popmenubutton'][version], post[i]); // thanks message
switch (version) {
case 0 : // phpbb2
node.firstChild.style.backgroundColor = post[i].firstChild.style.backgroundColor;
node.firstChild.className = post[i].firstChild.className;
post[i].parentNode.insertBefore(node, post[i].nextSibling);
break;
case 1 : // phpbb3
post[i].firstChild.insertBefore(node, post[i].firstChild.lastChild.previousSibling);
break;
case 2 : // punbb
node.className = 'postfoot';
node.style.margin = '0';
post[i].appendChild(node);
break;
case 3 : // invision
node.className = 'post-footer';
node.style.backgroundColor = post[i].style.backgroundColor;
post[i].appendChild(node);
break;
}
break; // break out of the for loop when the thanked post is found
}
}
});
Screenshot of the Issue
Is there a way to remove the "Forum Moderator" part in the thanked message and just have the users name.
Thanks in Advance.
Last edited by Matikka on December 13th 2015, 1:00 pm; edited 2 times in total
Re: Thanked Message - Code issue
The code should only display the username of the member who been thanked. Is there a member called MarkForum Moderator?
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Thanked Message - Code issue
No, the user name is just "Mark" but for some reason it is showing his Forum rank which is Forum Moderator
Edit: added a screenshot
Edit: added a screenshot
Re: Thanked Message - Code issue
Do you have any templates that are modified?
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Thanked Message - Code issue
Is one of them related to messages/posts?
Try this: turn off your modified templates. The option is above the templates.
Try this: turn off your modified templates. The option is above the templates.
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Thanked Message - Code issue
It is above the list. It will have two choices: yes or no.
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Thanked Message - Code issue
You're welcome.
Do you need your modified templates?
Do you need your modified templates?
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Thanked Message - Code issue
Have many modified templates do you have?
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Thanked Message - Code issue
I have made so many modifications to the Forum, not sure where to start. would i need to post all codes to the modified templates i have for you to go through them?
Edit:
The Modified templates are: General & Profile
General section
Profile Section
Not sure if this helps?
Edit:
The Modified templates are: General & Profile
General section
Profile Section
Not sure if this helps?
Re: Thanked Message - Code issue
More likely the issue is with the viewtopic_body template.
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Thanked Message - Code issue
Hi SLGray,
i have fixed the issue and can use all the Modified template again i done the following:
I used the hide rank title text tips and tricks: https://help.forumotion.com/t122026-hiding-rank-title-text
Then removed this code from the Viewtopics_body:
this then fixed the issue i was having with the rank being added at the end of Forum Users. Thank you for the assistence this can now be locked.
i have fixed the issue and can use all the Modified template again i done the following:
I used the hide rank title text tips and tricks: https://help.forumotion.com/t122026-hiding-rank-title-text
Then removed this code from the Viewtopics_body:
- Code:
{postrow.displayed.POSTER_RANK}
this then fixed the issue i was having with the rank being added at the end of Forum Users. Thank you for the assistence this can now be locked.
Re: Thanked Message - Code issue
Thank you for posting the solution.
Topic solved and archived
Topic solved and archived
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Similar topics
» Add a message to thanked posts
» tutorial ad a message to thanked no working
» Thanked post message position
» How can I edit the Thanked Message in Forumactif Edge
» Homepage Message Profile Issue
» tutorial ad a message to thanked no working
» Thanked post message position
» How can I edit the Thanked Message in Forumactif Edge
» Homepage Message Profile Issue
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum