Question about RPG feature
3 posters
Page 1 of 1
Question about RPG feature
Technical Details
Forum version : #PunBB
Position : Founder
Concerned browser(s) : Google Chrome
Who the problem concerns : All members
Forum link : http://rotavn.forumotion.com/forum
Description of problem
Hello guysI'm building a RPG feature for my site and first of thing here are my settings in ACP -> Modules -> RPG -> Fields Management
And when viewing in user's profile
How to display an only field named "Character" what contains an <img> inside it?
For example they are 2 fields with a same name "Character"
With an image inside <dl>
- Code:
<dl class="rpg_fields"><dt> <span class="gen">Character</span> :</dt><dd class="rpg_fields-l"><span class="gen"><span class="gen">Prophetess ★★</span><img src="https://i.imgur.com/PPPIJEv.png" alt="Prophetess ★★" style="vertical-align: top;"> </span></dd></dl>
- Code:
<dl class="rpg_fields"><dt> <span class="gen">Character</span> :</dt><dd class="rpg_fields-l"><span class="gen"><span class="gen"></span></span></dd></dl>
Thanks
Last edited by SarkZKalie on August 7th 2018, 11:16 pm; edited 2 times in total
Re: Question about RPG feature
For more detail, there are 4~6 Character field and I only want the one already have an IMG tag inside be allow to show
This one should
This one should
- Code:
<dl class="rpg_fields">
<dt><span>Character</span> :</dt>
<dd class="rpg_fields-l"><span><span><img src="IMAGE LINK" /></span></span></dd>
</dl>
- Code:
<dl class="rpg_fields">
<dt><span>Character</span> :</dt>
<dd class="rpg_fields-l"><span><span>NOTHING HERE</span></span></dd>
</dl>
Re: Question about RPG feature
There should be a edit icon appear when you hover your cursor over the field.
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: Question about RPG feature
My problem can be solved by adding these scripts
With an jQuery library
With an jQuery library
- Code:
<script type="text/javascript">
$('.rpg-dll').not(':has(img)').hide() // or remove() to take it out completely
<script>
- Code:
<script type="text/javascript">
Array.from(document.querySelectorAll("dl.rpg-dll")).forEach(el => {
let hasImage = el.querySelectorAll("img").length > 0;
if (!hasImage) el.style.display = "none";
});
</script>
Problem solved & topic archived.
|
Similar topics
» Feature question
» Quick question about the "Discord Webhook"-feature...
» Advanced Users Question about Search feature and Keywords
» Plus 1 Feature
» "Thank you" feature
» Quick question about the "Discord Webhook"-feature...
» Advanced Users Question about Search feature and Keywords
» Plus 1 Feature
» "Thank you" feature
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum