RPG Roleplay
4 posters
Page 1 of 1
RPG Roleplay
Hi! Sorry to bother you but i changed from ModernBB to AwesomeBB, can i ask you again for your support please?
I want to use the method posted by Razor in this topic:
https://help.forumotion.com/t163176-pet-roleplay-table
it doesn't work on AswesomeBB
Thank you a lot!
I want to use the method posted by Razor in this topic:
https://help.forumotion.com/t163176-pet-roleplay-table
it doesn't work on AswesomeBB
Thank you a lot!
Last edited by Simone Boi on March 19th 2024, 7:03 pm; edited 1 time in total
Re: RPG Roleplay
hello
i will tag @Razor12345 to look into it but keep in mind if you have changed the version to your forum probably all CSS codes and javascript will stop working cause each version has different elements
i will tag @Razor12345 to look into it but keep in mind if you have changed the version to your forum probably all CSS codes and javascript will stop working cause each version has different elements
Razor12345 likes this post
Re: RPG Roleplay
Hi skouliki!
Yes i know! I changed other scripts and css, but i can't figure out how to make @Razor12345 's solution works
Yes i know! I changed other scripts and css, but i can't figure out how to make @Razor12345 's solution works
Re: RPG Roleplay
I'll be able to do it next week
P.S. please specify how you modify fields in RPG profile - via AP or via the "Modify" button directly in the profile.
If through the Modify button - I found a bug there, because of which the picture is deleted when modifying the profile.
P.S. please specify how you modify fields in RPG profile - via AP or via the "Modify" button directly in the profile.
If through the Modify button - I found a bug there, because of which the picture is deleted when modifying the profile.
Razor12345- Support Moderator
- Posts : 1594
Reputation : 270
Language : Ukr, Rus, Eng
Location : Ukraine
Simone Boi likes this post
Re: RPG Roleplay
Hi Razor!
I wanna modify all by AP, users should not be able to change the Pic or others fields by profile, like you did for my last request on ModernBB
Thank you again!
I wanna modify all by AP, users should not be able to change the Pic or others fields by profile, like you did for my last request on ModernBB
Thank you again!
Re: RPG Roleplay
Ok, i tried a lot and removed the button edit on profile, my last problem is that i can't make the image show up on post profile, i think it depends from this scrip:
I tried changing ".postprofile" with ".post-aside" with no success, just a "null" text
- Code:
<script>
window.addEventListener('DOMContentLoaded', function() {
const users = document.querySelectorAll('.postprofile');
users.forEach(item => {
const address = item.querySelector('a[href$="rpgsheet"]');
if (address) {
$.ajax({
url: address.href,
method: "GET",
data: 'image',
dataType: "html",
success: function (data) {
let div = document.createElement('div');
div.innerHTML = data;
let findElement = div.querySelector('div.column1 div.rpg_image img');
item.querySelector('.character__container .character__image').append(findElement);
},
error: function (xhr, status, error) {
console.log("AJAX request error:" + error);
},
});
}
});
});
</script>
I tried changing ".postprofile" with ".post-aside" with no success, just a "null" text
Re: RPG Roleplay
try with:
'.post-avatar-rph' or '.post-header'
'.post-avatar-rph' or '.post-header'
Tamichi- New Member
- Posts : 1
Reputation : 1
Language : Napoletan
Re: RPG Roleplay
To remove the ability to change a character's avatar:
1) AP - Display - Templates - Profile - rpg_sheet_edit
Find:
Replace by this:
Find:
Replace by this:
Save. Publish.
2) AP - Display - Colors&CSS - CSS Stylesheet
Insert code:
Submit.
Result:
Upload a character image to the user's profile:
Only for PC:
1) AP - Display - Templates - General - viewtopic_body
Find:
Before this code, insert this:
At the end of template, insert this code:
Save. Publish.
3) AP - Display - Colors&CSS - CSS Stylesheet
Insert this code:
Submit
Result:
1) AP - Display - Templates - Profile - rpg_sheet_edit
Find:
- Code:
<form action="{U_ADMIN_RPG}" method="post" name="post">
<div class="block">
<div class="block-header">
{L_AVATAR_PANEL}
</div>
Replace by this:
- Code:
<form action="{U_ADMIN_RPG}" method="post" name="post">
<div class="block__rpg_image">
<div class="block-header">
{L_AVATAR_PANEL}
</div>
Find:
- Code:
<p style="text-align: center;">{POSTER_RANK}<br />{RPG_IMAGE}</p>
Replace by this:
- Code:
<p style="text-align: center;">{POSTER_RANK}<br /><div class='rpg_image'>{RPG_IMAGE}</div></p>
Save. Publish.
2) AP - Display - Colors&CSS - CSS Stylesheet
Insert code:
- Code:
.block__rpg_image {
display: none;
}
.rpg_image {
text-align: center;
}
Submit.
Result:
Upload a character image to the user's profile:
Only for PC:
1) AP - Display - Templates - General - viewtopic_body
Find:
- Code:
{postrow.displayed.POSTER_RPG}
Before this code, insert this:
- Code:
<div class='character__container'>
<div class='character__title'>Pet:</div>
<div class='character__image'></div>
</div>
At the end of template, insert this code:
- Code:
<script>
window.addEventListener('DOMContentLoaded', function() {
const users = document.querySelectorAll('.post-body');
users.forEach(item => {
const address = item.querySelector('a[href$="rpgsheet"]');
if (address) {
$.ajax({
url: address.href,
method: "GET",
data: 'image',
dataType: "html",
success: function (data) {
let div = document.createElement('div');
div.innerHTML = data;
let findElement = div.querySelector('div.rpg-view p img');
item.querySelector('.character__container .character__image').append(findElement);
},
error: function (xhr, status, error) {
console.log("AJAX request error:" + error);
},
});
}
});
});
</script>
Save. Publish.
3) AP - Display - Colors&CSS - CSS Stylesheet
Insert this code:
- Code:
.character__container {
display: flex;
justify-content: space-around;
align-items: center;
}
.character__image {
max-width: 100px;
max-height: 100px;
}
.character__image img {
width: 100%;
height: 100%;
}
Submit
Result:
Razor12345- Support Moderator
- Posts : 1594
Reputation : 270
Language : Ukr, Rus, Eng
Location : Ukraine
Simone Boi likes this post
Razor12345- Support Moderator
- Posts : 1594
Reputation : 270
Language : Ukr, Rus, Eng
Location : Ukraine
Simone Boi likes this post
Re: RPG Roleplay
In this code:
Try replace DOMContentLoaded with load:
- Code:
<script>
window.addEventListener('DOMContentLoaded', function() {
const users = document.querySelectorAll('.post-body');
users.forEach(item => {
const address = item.querySelector('a[href$="rpgsheet"]');
if (address) {
$.ajax({
url: address.href,
method: "GET",
data: 'image',
dataType: "html",
success: function (data) {
let div = document.createElement('div');
div.innerHTML = data;
let findElement = div.querySelector('div.rpg-view p img');
item.querySelector('.character__container .character__image').append(findElement);
},
error: function (xhr, status, error) {
console.log("AJAX request error:" + error);
},
});
}
});
});
</script>
Try replace DOMContentLoaded with load:
- Code:
<script>
window.addEventListener('load', function() {
const users = document.querySelectorAll('.post-body');
users.forEach(item => {
const address = item.querySelector('a[href$="rpgsheet"]');
if (address) {
$.ajax({
url: address.href,
method: "GET",
data: 'image',
dataType: "html",
success: function (data) {
let div = document.createElement('div');
div.innerHTML = data;
let findElement = div.querySelector('div.rpg-view p img');
item.querySelector('.character__container .character__image').append(findElement);
},
error: function (xhr, status, error) {
console.log("AJAX request error:" + error);
},
});
}
});
});
</script>
Razor12345- Support Moderator
- Posts : 1594
Reputation : 270
Language : Ukr, Rus, Eng
Location : Ukraine
TonnyKamper, poesia-verses and Simone Boi like this post
Re: RPG Roleplay
Razor, i tried again, maybe i had a problem on the other pc, but now it works!
https://imgur.com/reN1TqJ
Thank you man! I owe you a pizza!
I just have a little problem with text but i'll figure out how to solve
https://imgur.com/reN1TqJ
Thank you man! I owe you a pizza!
I just have a little problem with text but i'll figure out how to solve
Re: RPG Roleplay
Please don't double post. Your posts need to be separated by 24 hours before bumping. Please use the edit button, instead!
|
Problem solved & topic archived.
|
Similar topics
» PET & Roleplay table
» What is "Roleplay game"
» Roleplay Game Help
» Roleplay Makers
» The Twilight Roleplay
» What is "Roleplay game"
» Roleplay Game Help
» Roleplay Makers
» The Twilight Roleplay
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum