Hover preview and quote of the day

Hi there, recently imported from SMF2 - I’m looking to re-implement tow things. Add WoWhead link tooltips (when hovering over a wowhead link, you get a preview of the link (game items, etc.) and we also had an in-line JS script that would load one of the pre-set quote (Quote of the Day, but really just a random quote each time the page load)

For the first one, after adding the script in before /head it doesn’t appear to be working.
I was reading somewhere in a plugin reply saying that all hovers are uniform-ized (sanitized?) So that would make it not work? Is there a workaround? I am only familiar with the basics with HTML :confused:

As for the quote of the day - I am just not sure how or where I can add it. I tried to use Versatile Banner but it seems to only allow HTML/CSS. I don’t think there’s any HTML code that would allow a dynamic load?

I appreciate any tips and tricks :slight_smile:

Didn’t we have something like this related to WoW at one point @Falco? Wouldn’t you want this as a onebox?

Not sure if we have a “random quote” theme component yet.

I’ll google what onebox is in the meantime :smiley:
The Quote of the Day code is something like this:

<script type="text/javascript" language="JavaScript">
//<![CDATA[
<!-- Begin
var quote=new Array()
quote[0]="Say your name.  You all sound the same when you are panicking. - <b>Togalog</b>";
.
.
.
quote[110]="Did you try saran wrap? - <b>Xb</b>";

var Q = quote.length;
var whichQuotation=Math.round(Math.random()*(Q-1));
function showQuotation(){document.write(quote[whichQuotation]);}
showQuotation();

// End -->
//]]>
</script>

Close, we did it for HearthStone and Artifact as a proofs of concept:

https://github.com/xfalcox/discourse-artifact/

https://github.com/xfalcox/discourse-hearthstone

Nowadays with the improvements @j.jaffeux did on the tool tips for Discourse, it should be even easier.

Writing a plugin is probably beyond my skill-set, my IT skill set is in troubleshooting :frowning_face:
I’ll dig in a little bit and see if there’s enough there for me to attempt to duplicate and pull from WoWhead’s database.

As for the random quote of the day, is there a place that I can just add a block of unfiltered JavaScript with the code I pasted?

I’m thinking I’m gonna use the House Ads function in the ad plugin to do random quote of the day. xD
Will see how that goes.

이 답변으로 이 스레드를 부활(네크로)시킨 건 알지만, @FireAllianceNX가 사용했던 것과 정확히 동일한 WoWhead 툴팁 설정을 찾고 있습니다.

그렇지 않다면, 코드 헤더나 디스커스 설치 초기 부분에 이 코드를 넣을 수 있는 위치만 알려주시면 됩니다:

<script>const whTooltips = {colorLinks: true, iconizeLinks: true, renameLinks: true};</script>
<script src="https://wow.zamimg.com/widgets/power.js"></script>

플러그인으로도 만들 수 있을지 모르겠지만, 이 코드를 안전하게 붙여넣을 수 있는 곳이 있는지 알려주시면 감사하겠습니다.

감사합니다!

업데이트:

방금 관리자 > 사용자 지정 > CSS/HTML 편집의 ‘before ’ 부분에 스크립트를 추가해 보았지만, 아무런 효과가 없었습니다. 게시물에 wowhead 링크를 하이퍼링크와 원시 양쪽 방식으로 모두 게시해도 여전히 툴팁이 표시되지 않습니다.

테스트 게시물: https://deposit.midnightexchange.com/t/wowhead-tooltips-test/17

어떤 아이디어가 있을까요?