The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Question about RPG feature

3 posters

Go down

Solved Question about RPG feature

Post by SarkZKalie July 10th 2018, 2:24 pm

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 guys

I'm building a RPG feature for my site and first of thing here are my settings in ACP -> Modules -> RPG -> Fields Management
Question about RPG feature OqN16DC
And when viewing in user's profile
Question about RPG feature UU8p5hE
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>&nbsp;<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>
And without any image
Code:
<dl class="rpg_fields"><dt>&nbsp;<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
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1446
Reputation : 220
Language : English

https://rotavn.forumotion.com/

Back to top Go down

Solved Re: Question about RPG feature

Post by SarkZKalie July 13th 2018, 6:22 am

Bump Very Happy


Question about RPG feature Sarkzk10
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1446
Reputation : 220
Language : English

https://rotavn.forumotion.com/

Back to top Go down

Solved Re: Question about RPG feature

Post by SarkZKalie July 18th 2018, 8:19 am

Have a nice days everyone Very Happy


Question about RPG feature Sarkzk10
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1446
Reputation : 220
Language : English

https://rotavn.forumotion.com/

Back to top Go down

Solved Re: Question about RPG feature

Post by skouliki July 18th 2018, 8:43 am

hi

you want the name Character to one field to not displaying at all?
skouliki
skouliki
Manager
Manager

Female Posts : 15397
Reputation : 1709
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Question about RPG feature

Post by SarkZKalie July 18th 2018, 3:45 pm

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 Question about RPG feature 1f601
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>
This one shouldn't
Code:
<dl class="rpg_fields">
<dt><span>Character</span> :</dt>
<dd class="rpg_fields-l"><span><span>NOTHING HERE</span></span></dd>
</dl>


Question about RPG feature Sarkzk10
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1446
Reputation : 220
Language : English

https://rotavn.forumotion.com/

Back to top Go down

Solved Re: Question about RPG feature

Post by SarkZKalie July 20th 2018, 3:00 pm

Hello it's bump again Very Happy


Question about RPG feature Sarkzk10
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1446
Reputation : 220
Language : English

https://rotavn.forumotion.com/

Back to top Go down

Solved Re: Question about RPG feature

Post by skouliki July 20th 2018, 5:00 pm

did you try to put to the field name instead of character this
&nbsp;
skouliki
skouliki
Manager
Manager

Female Posts : 15397
Reputation : 1709
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Question about RPG feature

Post by SarkZKalie July 21st 2018, 4:27 am

It's good but how could you choose a field if it was invisible


Question about RPG feature Sarkzk10
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1446
Reputation : 220
Language : English

https://rotavn.forumotion.com/

Back to top Go down

Solved Re: Question about RPG feature

Post by skouliki July 21st 2018, 2:09 pm

i dont know any other solution sorry Sad
skouliki
skouliki
Manager
Manager

Female Posts : 15397
Reputation : 1709
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Question about RPG feature

Post by SLGray July 21st 2018, 10:47 pm

There should be a edit icon appear when you hover your cursor over the field.


Question about RPG feature Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51567
Reputation : 3525
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Question about RPG feature

Post by SarkZKalie August 7th 2018, 11:16 pm

My problem can be solved by adding these scripts
With an jQuery library
Code:
<script type="text/javascript">
$('.rpg-dll').not(':has(img)').hide() // or remove() to take it out completely
<script>
Without jQuery
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>
Special thanks to Luca and charlietfl

Problem solved & topic archived.
Please read our forum rules: ESF General Rules


Question about RPG feature Sarkzk10
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1446
Reputation : 220
Language : English

https://rotavn.forumotion.com/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum