Question about RPG feature

Go down

Solved Question about RPG feature

Post by SarkZKalie on Tue Jul 10, 2018 7:24 am

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
punBB - Question about RPG feature OqN16DC
And when viewing in user's profile
punBB - 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 Tue Aug 07, 2018 4:16 pm; edited 2 times in total
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1080
Reputation : 178
Language : English

https://www.rotavn.xyz/

Back to top Go down

Solved Re: Question about RPG feature

Post by SarkZKalie on Thu Jul 12, 2018 11:22 pm

Bump Very Happy


punBB - Question about RPG feature Sarkzk10
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1080
Reputation : 178
Language : English

https://www.rotavn.xyz/

Back to top Go down

Solved Re: Question about RPG feature

Post by SarkZKalie on Wed Jul 18, 2018 1:19 am

Have a nice days everyone Very Happy


punBB - Question about RPG feature Sarkzk10
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1080
Reputation : 178
Language : English

https://www.rotavn.xyz/

Back to top Go down

Solved Re: Question about RPG feature

Post by skouliki on Wed Jul 18, 2018 1:43 am

hi

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

Female Posts : 6734
Reputation : 1000
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Question about RPG feature

Post by SarkZKalie on Wed Jul 18, 2018 8:45 am

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 punBB - 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>


punBB - Question about RPG feature Sarkzk10
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1080
Reputation : 178
Language : English

https://www.rotavn.xyz/

Back to top Go down

Solved Re: Question about RPG feature

Post by SarkZKalie on Fri Jul 20, 2018 8:00 am

Hello it's bump again Very Happy


punBB - Question about RPG feature Sarkzk10
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1080
Reputation : 178
Language : English

https://www.rotavn.xyz/

Back to top Go down

Solved Re: Question about RPG feature

Post by skouliki on Fri Jul 20, 2018 10:00 am

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

Female Posts : 6734
Reputation : 1000
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Question about RPG feature

Post by SarkZKalie on Fri Jul 20, 2018 9:27 pm

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


punBB - Question about RPG feature Sarkzk10
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1080
Reputation : 178
Language : English

https://www.rotavn.xyz/

Back to top Go down

Solved Re: Question about RPG feature

Post by skouliki on Sat Jul 21, 2018 7:09 am

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

Female Posts : 6734
Reputation : 1000
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Question about RPG feature

Post by SLGray on Sat Jul 21, 2018 3:47 pm

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


punBB - 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 : 46325
Reputation : 3257
Language : English
Location : United States

https://help.forumotion.com/

Back to top Go down

Solved Re: Question about RPG feature

Post by SarkZKalie on Tue Aug 07, 2018 4: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


punBB - Question about RPG feature Sarkzk10
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1080
Reputation : 178
Language : English

https://www.rotavn.xyz/

Back to top Go down

Back to top


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