User Title Shop [All version]
3 posters
Page 1 of 1
User Title Shop [All version]
Hello everyone. Today, I want to share a feature that can be used as a reward for members ^^! (They can purchase it with their points). This feature is 'User Title Shop'.
Step1. ACP >> Users >> Users & Groups >> Profiles >> Add a new field as follows:
Next, go to the Administrator profile page (/u1) >> Find the field you created earlier >> Edit field value >> right-click on the textarea >> inspect element >> Remember the number highlighted in the image below.
Step2. ACP >> General >> Forum >> Categories & Forums >> Add a new forum. Information about this forum is optional and can be entered at your discretion. (Ex: The forum name can be: User title change logs...)
Go to this forum, start a new topic (optional title, ex: BBcode title...), and remember the topic ID and the forum ID (ex: /f1-, /t100-...)
Step3. Set the permissions for this forum as shown in the image below and save:
(Members are allowed to create topics and post replies. Only administrators can view the posts)
Step4. ACP >> Modules >> Points and reputation >> Points system >> Points management. Set the number of points required to purchase the 'Plain Text' title in the 'per subject' column, and the 'BBcode' title in the 'per message' column >> Save. Ex: -500 or -1000 (must have a minus)
Step5. ACP >> Modules >> HTML & Javascript >> HTML pages management >> Create in advanced mode (HTML)
Title: Optional
Do you wish to use your forum header and footer ? Yes
Content:
- Replace
and
in the code with the numbers remembered from step 2. (Plain text - forum_id, BBcode - topic_id)
- Replace
with the number of points set in the 'per message' column, and
with the number of points set in the 'per subject' column.
- Replace
with the number found after
in step 1, and replace
with the value in
(step 1).
- Submit this HTML page.
NOTE:
- When you need to delete old posts, set the forum's points to 0. After deletion, restore the points to original values. You can set up auto-pruning in the ACP.
- You can customize the input fields for each title according to this post (ex: maxlength,...)
- Fix the issue of automatic bolding of titles in AwesomeBB version:
Add to CSS
** Do not remove the copyright when using this feature.
- Spoiler:
- Feature:
- Automatically deducts points when making a purchase and updates to the member's profile.
- Supports two types of titles: 'plain text' and 'BBcode'.
- Displays the information (name and points) of that member.
Disadvantage:
- WYSIWYG editing mode is not available yet; manual BBcode entry is required.
- The price of the title is fixed.
Step1. ACP >> Users >> Users & Groups >> Profiles >> Add a new field as follows:
Next, go to the Administrator profile page (/u1) >> Find the field you created earlier >> Edit field value >> right-click on the textarea >> inspect element >> Remember the number highlighted in the image below.
Step2. ACP >> General >> Forum >> Categories & Forums >> Add a new forum. Information about this forum is optional and can be entered at your discretion. (Ex: The forum name can be: User title change logs...)
Go to this forum, start a new topic (optional title, ex: BBcode title...), and remember the topic ID and the forum ID (ex: /f1-, /t100-...)
Step3. Set the permissions for this forum as shown in the image below and save:
(Members are allowed to create topics and post replies. Only administrators can view the posts)
Step4. ACP >> Modules >> Points and reputation >> Points system >> Points management. Set the number of points required to purchase the 'Plain Text' title in the 'per subject' column, and the 'BBcode' title in the 'per message' column >> Save. Ex: -500 or -1000 (must have a minus)
Step5. ACP >> Modules >> HTML & Javascript >> HTML pages management >> Create in advanced mode (HTML)
Title: Optional
Do you wish to use your forum header and footer ? Yes
Content:
- Spoiler:
- Code:
<h1>User Title Shop by zest_n</h1><div id="ztabs">
<ul>
<li><a href="#tabs-1">Plain text</a> | </li>
<li><a href="#tabs-2">BBcode</a> | </li>
<li><a href="#tabs-3">Info</a></li>
</ul>
<div id="tabs-1" class="zcontent">Only plain text
<input class="input-subtle" id="zval" name="message" maxlength="50">
<input class="btn btn-default" id="zpurchase" type="submit" name="submit" value="Purchase">
</div>
<div id="tabs-2" class="zcontent">Allow BBCode
<input class="input-subtle" id="bbval" name="message" maxlength="50">
<input class="btn btn-default" id="bbpurchase" type="submit" name="submit" value="Purchase">
</div>
<div id="tabs-3" class="zcontent">
<div class="zinfo">Username: <span class="zusername"></span>
<br />
Points: <span class="zpoint"></span>
<br /><div class="credit">COPYRIGHT</div>
Author: <a href="https://help.forumotion.com/u111611">zest_n</a> <br />
Do not remove the copyright without the author's permission.<br />
We do not support forums that remove copyright.
</div>
<div class="zhelp">Describe your shop
</div>
</div>
</div>
<br /><br />
<style>.credit{border-bottom:1px solid #0095FF;color:#0095FF;font-weight:bold;}
.zinfo span{float:right}.zcontent{line-height:3em;font-size:15px}.zinfo{width:40%;;display:inline-block;position:relative}.zhelp{width:58%;left:60px;float:right;position:relative}#ztabs{background:#FFF;padding:10px;box-shadow:rgba(50,50,93,0.25) 0 2px 5px -1px,rgba(0,0,0,0.3) 0 1px 3px -1px}#ztabs li{list-style:none;display:inline-block;padding:5px;font-size:20px;color:#0095FF}#ztabs ul{border-bottom:1px solid #0095FF}#ztabs a{color:#0095FF}#ztabs a:hover{color:#ffc0cb}ul,ol{margin-left:0!important}
</style>
<script src="https://code.jquery.com/jquery-3.7.1.js"></script>
<script src="https://code.jquery.com/ui/1.14.0/jquery-ui.js"></script>
<script>
$(function() {
$("#ztabs").tabs();
});
</script>
<script>
$(function() {
$('.zusername').html(_userdata["username"]);
$('.zpoint').load('/u' + _userdata["user_id"] + ' #field_id-13 .field_uneditable');
$('#zpurchase').click(function() {
if ($('#zval').val().search(/\s|\[\/?(b|i|u|strike|list(=(1|a))?|\*|quote(=".+")?|hr|code|spoiler(=[^\[\]]*)?|hide|table|tr|td|img.+\/img|flash.+\/flash|youtube.+\/youtube|dailymotion.+\/dailymotion|size(=\d+)?|color(=#.{6})?|font(=[^\[\]]*)?|url(=[^\s\[\]]*)?|rand|flipv|fliph|blur|fade|wow|sub|sup|updown|scroll|justify|right|center|left)\]/gi) > -1) {
alert('Only plain text, do not use BBcode');
} else if (Number($('.zpoint').text()) >= 500) {
var f = $('#zval').val();
$.post("/post", {
mode: "newtopic",
f: "forum_id",
subject: "Plain text title",
message: f,
post: "Ok"
}).done(function(p) {
alert('You have successfully purchased!');
}).fail(function() {
alert('Error');
});
$.post("/ajax_profile.forum?jsoncallback=?", {
id: "1",
user: _userdata["user_id"],
active: "1",
content: '[["profile_field_2_1", "[center]' + $('#zval').val() + '[/center]"]]',
tid: $("#qjump input[name='tid']").val()
}, {}, "json").done(function(pp) {
window.location.reload();
}).fail(function() {
alert('Error');
});
}
else {alert('You dont have enough points to purchase the title!')}
});
$('#bbpurchase').click(function() {
if (Number($('.zpoint').text()) >= 1000) {
var x = $('#bbval').val();
$.post("/post", {
mode: "reply",
t: "topic_id",
message: x,
post: "Ok"
}).done(function(b) {
alert('You have successfully purchased!');
}).fail(function() {
alert('Error');
});
$.post("/ajax_profile.forum?jsoncallback=?", {
id: "1",
user: _userdata["user_id"],
active: "1",
content: '[["profile_field_2_1", "[center]' + $('#bbval').val() + '[/center]"]]',
tid: $("#qjump input[name='tid']").val()
}, {}, "json").done(function(bb) {
window.location.reload();
}).fail(function() {
alert('Error');
});
}
else {alert('You dont have enough points to purchase the title!')}
});
});
</script>
- Replace
|
|
- Replace
|
|
- Replace
|
|
|
|
- Submit this HTML page.
NOTE:
- When you need to delete old posts, set the forum's points to 0. After deletion, restore the points to original values. You can set up auto-pruning in the ACP.
- You can customize the input fields for each title according to this post (ex: maxlength,...)
- Fix the issue of automatic bolding of titles in AwesomeBB version:
Add to CSS
- Code:
.post-author-details span{font-weight:normal!important}
- Code:
<script> $(function(){$("label:contains('User Title').remove();});</script>
** Do not remove the copyright when using this feature.
Last edited by zest_n on September 21st 2024, 5:32 pm; edited 1 time in total
zest_n- New Member
- Posts : 17
Reputation : 7
Language : English
invisible_fa, SarkZKalie, TonnyKamper, poesia-verses, tikky, كونان2000 and Wizzard like this post
Re: User Title Shop [All version]
Hmm.. Interesting
You can autommate a shop for the members and avoid the staff to intervening
You can autommate a shop for the members and avoid the staff to intervening
zest_n likes this post
Re: User Title Shop [All version]
@كونان2000 thank you
@YoshiGM That's right. Completely automated, members can change their titles at any time without having to wait for a moderator's approval.
Because the 'User Title Shop' allows members to freely change their titles (with no censorship on words when purchasing), there will be some violating titles. Today, I added a feature that allows moderators to delete violating titles without needing to access the violator's profile.
ACP >> Modules >> HTML & Javascript >> HTML pages management >> Create in advanced mode (HTML)
Title: Moderator Control Panel - Delete User Title
Do you wish to use your forum header and footer ? Yes
Content:
NOTE:
- In the "who can modify the profile field value ?" section (step 1), check both Moderators and Member himself
- Replace the number 1 in
and
with the number found after
in step 1
- Replace
with the value in
(step 1)
@YoshiGM That's right. Completely automated, members can change their titles at any time without having to wait for a moderator's approval.
Because the 'User Title Shop' allows members to freely change their titles (with no censorship on words when purchasing), there will be some violating titles. Today, I added a feature that allows moderators to delete violating titles without needing to access the violator's profile.
Description wrote:- Moderators cannot change user titles as they wish; they can only delete the titles of members who violate the rules.
- An automatic warning will be added, allowing all members to see the name of the moderator who removed the title.
- Members who have their titles removed can still purchase a new one. If they continue to violate the rules, moderators may take stronger actions, such as banning access.
ACP >> Modules >> HTML & Javascript >> HTML pages management >> Create in advanced mode (HTML)
Title: Moderator Control Panel - Delete User Title
Do you wish to use your forum header and footer ? Yes
Content:
- Spoiler:
- Code:
<h1>Moderator Control Panel - Delete User Title</h1><div id="ztabs">
<input id="zname" type="text" placeholder="Username..." class="inputbox"/><div class="zalert"></div>
<div class="btn btn-default btn-green" name="submit" id="bpreview">Preview</div>
<div class="btn btn-default btn-red" id="zdel" style="display:none">Confirm Delete</div>
<div class="zpreview" style="display:none"><br />Preview <span class="zusername"></span>'s title: <br />
<div class="ztitle"></div></div></div>
<script>$(function() {
$('#bpreview').click(function() {
if($('#zname').val().length < 3) {
alert('Please enter username!');
}
else {
var name = $('#zname').val();
$('#zdel,.zpreview').show();
$('.zusername').html('' + name + '');
$('.ztitle').load('/profile?mode=viewprofile&u=' + name + ' #field_id1 .field_uneditable');
$.get('/profile?mode=viewprofile&u=' + name + '', function(data) {
var zid = $(data).find('a[href^="/u"]').attr('href').replace(/^\/u([0-9]*)?.*$/, "$1");
$('#zdel').click(function() {
$.post("/ajax_profile.forum?jsoncallback=?", {
id: "1",
user: zid,
active: "1",
content: '[["profile_field_2_1", "[color=red]' + _userdata["username"] + ' has deleted this title.[/color]"]]',
tid: $("#qjump input[name='tid']").val()
}, {}, "json").done(function(pp) {
$('.zalert').html('<span class="salert">The title has been successfully deleted!</span>').fadeOut(2000);
}).fail(function() {
$('.zalert').html('<span class="salert">An error has occurred, please try again!</span>').fadeOut(2000);
});
});
});
}
});
});
</script>
<style>#ztabs{background:#FFF;padding:10px;box-shadow:rgba(50,50,93,0.25) 0 2px 5px -1px,rgba(0,0,0,0.3) 0 1px 3px -1px}
.salert {
background: indianred;
color: #FFF;
padding: 10px;
width: 27%;
border-radius: 3px;
display: block;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
margin: 5px 0px 5px 0;
}
</style>
NOTE:
- In the "who can modify the profile field value ?" section (step 1), check both Moderators and Member himself
- Replace the number 1 in
|
|
|
- Replace
|
|
zest_n- New Member
- Posts : 17
Reputation : 7
Language : English
TonnyKamper, كونان2000 and Wizzard like this post
Similar topics
» Display a mini-version of user avatars in posts in the mobile version?
» Full Topic Title on Mobile Version Latest Discussion
» Mobile version : New features for a better user experience
» User sees an incorrect version of the calender
» user summary above the forum title
» Full Topic Title on Mobile Version Latest Discussion
» Mobile version : New features for a better user experience
» User sees an incorrect version of the calender
» user summary above the forum title
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum