Kunena 6.3.0 released

The Kunena team has announce the arrival of Kunena 6.3.0 [K 6.3.0] in stable which is now available for download as a native Joomla extension for J! 4.4.x/5.0.x/5.1.x. This version addresses most of the issues that were discovered in K 6.2 and issues discovered during the last development stages of K 6.3

Question Is the Kunena parser stripping out module functionality code?

More
14 years 2 months ago - 14 years 2 months ago #1 by Bhrawn
Ok, I'm having a little problem tracking down an issue I'm having with my Kunena Forum.

I've been reading the forum for 2 nights now, going back and forth between Kunena code and Joomla code, trying to decide why I can't get a jscript from a popular gaming website to work in my forum.

A previous post:

World of Warcraft PU Itemstats or wowhead Itemstats

asked how you can get the Wowhead plugin to work on Kunena, but it was never answered.

There *is* a module already that you can install into Joomla called "Powered By Wowhead" that puts the functionality I'm looking for into all site pages *except* Kunena posts.

I read a post about someone trying to get a bbcode tag added that would replace text with an image and a link ( www.kunena.com/forum/114-hacks/20920-adding-a-neww-bbcode-tag ), which got me thinking that the kunena parser is quite possibly stripping out all the code that gets inserted when the posts are generated.

I'm probably completely wrong, but I can't think of any other reason this is not working, so here's my post:

In my Kunena forum I would like to make a way for a Wowhead jscript to function. Here's an example:

www.wowhead.com/?forums&topic=3464

In this link, hover your mouse over the yellow " www.wowhead.com/?item=19019 " link part way down the page.

See that neat little hover box with stuff in it...?

According to the Wowhead site, all that's required is the tag
<script src=" static.wowhead.com/widgets/power.js "></script>
to be *somewhere* on the page and it will work. The problem is, it doesn't work for Kunena posts.

Now I don't really care what the best solution is, I'd just like to be able to put this functionality in my forum. Can I get that jscript tag in a post without the parser trashing it, or can I add some neat little parser code to have the parser reinsert the code I need to make this work with 'wowhead.com' links?

If I haven't explained myself, please let me know what's confusing and I'll try harder to clarify what I'm hoping to accomplish.

Thanks

B
Last edit: 14 years 2 months ago by Bhrawn.
The following user(s) said Thank You: neebrad

Please Log in or Create an account to join the conversation.

More
14 years 2 months ago - 14 years 2 months ago #2 by sozzled
G'day. I'm not sure if I can offer you too much help (and besides, WoW is not something that grabs me) but let's see if we I can summarise your request.

You've asked a number of questions. Some of those questions have something to do with a WoWHead Itemstats plugin - which I have no understanding of. Basically, though, according to www.wowhead.com they advise you to insert a small piece of HTML code on any website page and, hey presto, everything works. For example:
Code:
<script src="http://static.wowhead.com/widgets/power.js[b]"></script>
That's fine if you're writing HTML but, you're correct that the Kunena parser strips out HTML (actually, it doesn't strip it out, it just converts the HTML angle-brackets). The idea is, of course, to prevent malicious script kiddies from injecting malicious code into your forum posts.

Bhrawn wrote:

... I can't get a Javascript ... to work in my forum.

That's correct. That (according to my understanding about Kunena) is how it's supposed to work. In your case, if this WoWHead feature is a "must-have" for your website, I'm sorry to disappoint you by saying that Kunena is probably not the forum component for you.

You might be able to heavily customise Kunena to your website by using some of the WoWHead's ideas, but you would have to develop a bit of fancy BBCode that call your own Javascript functions to perform the tooltip generation. It's not impossible, but it would be a lot of work. Good luck.
Last edit: 14 years 2 months ago by sozzled.
The following user(s) said Thank You: neebrad

Please Log in or Create an account to join the conversation.

More
14 years 2 months ago - 14 years 2 months ago #3 by Bhrawn
Thanks for the quick reply Sozzled.

I was afraid I was going to get that answer. I guess I'll be diving into the BBCode and see if I can't wrap my head around implementing it into Kunena.
Last edit: 14 years 2 months ago by Bhrawn.
The following user(s) said Thank You: neebrad

Please Log in or Create an account to join the conversation.

More
14 years 2 months ago #4 by xillibit
Hello,

To do something like this in kunena 1.5.9, you need to load the javascript file in the components\com_kunena\template\default_ex\view.php and add a new bbcode into the kunena parser, i haven't investigated more the thing on wowhead or maybe it's just tooltip, in this case it's more esaier to implement.

I don't provide support by PM, because this can be useful for someone else.

Please Log in or Create an account to join the conversation.

More
14 years 2 months ago #5 by Bhrawn
Thanks for your input Xillibit. That's a huge help. That solves the first problem I was working on... which file to put the include in. I was looking through several files trying to figure out which one was going to be best, let alone actually have a chance of working. Knowing that's the right file will save a lot of trial/error in the future.

Please Log in or Create an account to join the conversation.

More
14 years 1 month ago - 14 years 1 month ago #6 by Moonstone
I'm in the same boat, Bhrawn. Wowhead itemstats tooltips are a must for my users. I just opened a new site today and they're already asking for this feature. >.<

I've used the Powered by Wowhead Joomla plugin on sites for a couple years now and it works like a charm in your news posts, etc. It makes Wowhead links give you a tooltip popup on mouseover. But the forums have always needed an extra hack to get it to work there.

In phpBB3, you put the one line of code into overall_header.html, which is located in your template directory. \styles\{template name}\template\overall_header.html Simple as that and you're done.

So, I was hoping the same would be true in Kunena's case, but modifying header.html didn't work.

Then I stumbled onto this post. Thank you very much for the help, xillibit. =D

But, I still need some more help.

I've added the script code into view.php but...how do I properly add the new bbcode into the kunena parser?
Last edit: 14 years 1 month ago by Moonstone.

Please Log in or Create an account to join the conversation.

More
14 years 3 weeks ago #7 by cwizardtx
I was able to add the wowhead tooltip functionality by adding those four lines of scripting txt to an area inside view.php

If you head over to www.jerkstoreguild.com and check out the forums, i have a sample post where the wowhead tooltip thing WORKS when you view the post itself, but then for some reason when you are looking at the forum list of topics it messes up the topic view.

Would anyone care to set eyes on that and give thoughts?

Please Log in or Create an account to join the conversation.

More
14 years 3 weeks ago #8 by cwizardtx
Ok, I had to go into flat.php and right before the -- favorutie -- section I changed the call to CKunenaLink... I just duplicated the message title bit so that it wouldn't try to preview the message body and therefore break with the wowhead stuff.

make sense?

Please Log in or Create an account to join the conversation.

More
14 years 2 weeks ago - 14 years 2 weeks ago #9 by tharot
Wow, really a great work Cwizardtx.

It's exactly the same, what I need to do - unfortunately, not for WoW but I would require it for Aion.

So, I can follow your second step regarding CKunenaLink - but, I'm not sure what I should add into view.php.

Of course, I am already able to see a tooltip with adding a normal link into a post. But, I noticed on your website, that your users just need to use "[*item]stark ametrine[/item]" for the tooltip.

So, I would really appreciate it, if you could provide me some further details. I think the difference between WoWHead and AionArmory shouldn't be that huge ( www.aionarmory.com/syndication.aspx ).

Thanks in advance!
Last edit: 14 years 2 weeks ago by tharot.

Please Log in or Create an account to join the conversation.

More
14 years 2 weeks ago - 14 years 2 weeks ago #10 by Moonstone
Wow, great job, Cwizardtx! That's exactly how it should look!

I'm still a bit confused about the entire process, so I'd like to clarify with a step-by-step?

The first step is to open components\com_kunena\template\default_ex\view.php and add the following code:
Code:
<script src="http://static.wowhead.com/widgets/power.js"></script>

xillibit said the second step involved adding a new bbcode into the kunena parser.

Cwixardtx said the second step involved opening components\com_kunena\template\default_ex\flat.php and making a change right before <!--Favourite--> on line 230? I'm sorry, can you please clarify exactly what you did?

Also, can a dev please confirm the best practice?
Last edit: 14 years 2 weeks ago by Moonstone.

Please Log in or Create an account to join the conversation.

Time to create page: 0.499 seconds