Kunena 7.0.4 Released

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

Topics that are moved into this category are generally considered to be closed. Users may want to add additional information but these topics should not be resurrected in order to discuss new problems or unrelated matters.

Question BBcodes disabled

More
16 years 4 months ago - 16 years 4 months ago #34577 by vrc
Replied by vrc on topic Re:BBcodes disabled
Okay, I am geting somewhere! Not totally there, and I would appreciate any feedback to help.

I found that editing this top line in the parser.php is dynamically overwriting any urls to state just my client's site's url:

This was the original:
Code:
// match www.something.domain/path/file.extension?some=variable&another=asf% $text = preg_replace('/(?<!S)((http(s?):\/\/)|(www\.[a-zA-Z0-9-_]+\.))+([a-zA-Z0-9\/*+-_?&;:%=.,#]+)/', '<a href="http$3://$4$5" target="_blank" rel="nofollow">$4$5</a>', $text);

I took out the http$3://$4$5 in the middle and that makes just the site address appear, no matter what one posts in the post, and I put in asterisks in place of $4$5 and that is what appears for the text in any url.
Code:
// match www.something.domain/path/file.extension?some=variable&another=asf% $text = preg_replace('/(?<!S)((http(s?):\/\/)|(www\.[a-zA-Z0-9-_]+\.))+([a-zA-Z0-9\/*+-_?&;:%=.,#]+)/', '<a href="" target="_blank" rel="nofollow">**</a>', $text);

I also first had put in .$live_site. for those same spots below in the same file for urls, but the above code was overriding.

Now I want to see how to turn off urls going to those who subscribe so they are not the unintended victims of post spammers.

I still have not yet seen if this disables bb images. But I have disabled the bb url with my putting
Code:
$tag_new = "<a href='".$live_site."' rel=\"nofollow\" target=\"_blank\">".$live_site.'</a>';
wherever the original code was on that page.

I will be so glad if these tricks hold and do not compromise the site, as this will let my client be able to not be afraid about using forums on all 100+ sites he owns. I would like to give him the gift of peace of mind he does not have to worry and can let his communities enjoy themselves. :)


Quite frankly, if this was given as an additional commercial plugin, I would have gotten it right off. This definitely is a wide spread desire by many.
Last edit: 16 years 4 months ago by vrc.

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

More
16 years 4 months ago #34625 by vrc
Replied by vrc on topic Re:BBcodes disabled
I am still working on this, and I still have not found how to disable bbcode images from working. It would be great if you offered paid support subscription. That way people who needed x function now could pay for help, rather than depend on catching the sympathy of anyone here capable of helping. This makes kunena not a good choice for professional businesses, since it is all volunteer support, if the volunteer support is so sympathetic to one's cause. Otherwise, no support. While people could take risks hiring outsourcing, again that would be a risk that the 3rd parties actually understand the component.

Anyrate, I am still hoping to catch the sympathy of someone here who can solve this, now that I am going on the 3rd full day of working to try to see how, by hit or miss, because I am not a programmer to disable bbcodes of url and img from working at all, if someone types in or pastes in the proper bbcode format.

I have found how to disable the board from clicking the right code, and partially found how to do the url as mentioned above, but I have yet to find how to disable bbcode img from working.

There are a lot of files there and to tell someone to just look for all img and url is kind of ridiculous if the person has no knowledge of php, etc. As anyone who reads this can see, I have not yet been successful after 60 hours of testing and testing and trying and testing again.

Here I go again all night playing with the various codes and seeing if it works at all, stays working, because some of my attempts worked temporarily then reverted someway.

Is it really this hard to even someone who knows php to disable url/img bbcodes in kunena? :S Then I would understand the reluctance to help, that is why I am suggesting a paid support because some people need to have service on kunena from trusted sources, for features needed to fit in needed timeframes.

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

More
16 years 4 months ago #34655 by xillibit
Replied by xillibit on topic Re:BBcodes disabled
Hello,

I have searched to solve your problem, but i have fail, it will be more easier to disable it in kunena configuration panel.

I have thought, to something when an user post a new post, use regexp to replace by [*url], you can look in the file components\com_kunena\template\default\post.php

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
16 years 4 months ago - 16 years 4 months ago #34659 by vrc
Replied by vrc on topic Re:BBcodes disabled
xillibit wrote:

Hello,

I have searched to solve your problem, but i have fail, it will be more easier to disable it in kunena configuration panel.

I have thought, to something when an user post a new post, use regexp to replace by [*url], you can look in the file components\com_kunena\template\default\post.php


xillibit, I appreciate your putting some thought into this problem. However, I have no idea now to do regexp. I am clueless with php/codes and need blow-by-blow example or I cannot implement vague suggestions that require some further knowledge to do right.

I agree with you that it would be easier to disable in the configuration panel. In fact, the one problem I see is that in the future my client will refuse to do any upgrades to this version, because it took so long and was so unclear how to resolve.

I believe I have accomplished this through the kunena.parser page. Exactly how I am not sure as I just persisted in changing all instances of
Code:
autolink_disable--;
to this instead
Code:
autolink_disable++; # stop autolink conversion
and also went through all places urls in the image and url parts in that single file kunena.parser.php mentioned and replaced the inner code in the to
Code:
<a href='".$live_site."'
so only the site itself would be led to. I have to add this is imperfect solution as I have no idea if this is correct php or what. I just copied from another plugin source code what to put in that line so it would not stop the forum from working.

I would suggest those who want to try the same, to keep a backup of the original file page, and as you go, save the new one that works also with each tinker, because more than once a new way I tried led to the forum disappearing, and I had to paste in my earlier editing to make the forum come back. :laugh:

While it is not a perfect fix, it changes any urls to nonfunctioning or leading only to the client's site, effectively rendering bbcode url pasting useless, and images only show up as missing image links, which is exactly what I needed to accomplish so anyone posting porn pictures will be thwarted, as no images will show at all.

I sincerely hope this feature to choose to disable these bbcodes or all bbcodes if it is too hard, is put into future releases, otherwise my client will remain always with this 1.5.7 on many many sites. But there is nothing bad to say about 1.5.7, but my client may be missing on future features, but that is the price willingly paid to cripple copy/paste bbcode [ img] spammers.
Last edit: 16 years 4 months ago by vrc.

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

More
16 years 4 months ago - 16 years 4 months ago #34717 by Matias
Replied by Matias on topic Re:BBcodes disabled
Wow. I've been away for weekend and this thread has become quite long. Sorry that it took this long to reply on your post.

I do take paid jobs, but currently I'm not yelling about it as I need to get our next release ready to be released -- it solves a lot of limitations and make it possible to do custom code much easier.

And you're right: it took me 10 minutes to disable all links (lib/kunena.bbcode.php):

Go to change line 788:
Code:
var $autolink_disable = 100;
Then add this:
Code:
$tns = '';$tne = ''; return TAGPARSER_RET_REPLACED;
into line 246 (case 'email'),
into line 260 (case 'url')

and this
Code:
$tag_new = ''; return TAGPARSER_RET_REPLACED;
into line 326 (case 'email'),
into line 340 (case 'url'),
into line 351 (case 'img')

That's it!
Last edit: 16 years 4 months ago by Matias.

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

More
16 years 4 months ago #34730 by vrc
Replied by vrc on topic Re:BBcodes disabled
Matias wrote:

...disable all links (lib/kunena.bbcode.php):

Go to change line 788:

Code:
var $autolink_disable = 100;
Then add this:
Code:
$tns = '';$tne = ''; return TAGPARSER_RET_REPLACED;
into line 246 (case 'email'),
into line 260 (case 'url')

and this
Code:
$tag_new = ''; return TAGPARSER_RET_REPLACED;
into line 326 (case 'email'),
into line 340 (case 'url'),
into line 351 (case 'img')

That's it!


Matias, I was about to get all excited about this solution, then I found that I do not have a kunena.bbcode.php in either administrator or components folder. What I have are called kunena.bbcode.js.php and each of them have no more than 361 lines. So they cannot be the ones you are referencing, because you said to edit a line 788.

I see there is also a file called kunena.parser.bbcode.php and those 2 also have no more than 368 lines each! :huh:

And so the frustration continues.

Please, Matias, name the exact file, in the exact folder(s), because untrained persons as myself, are unable to locate it otherwise. I am guessing maybe you meant the one I have been working on all along, which is kunena.parser.php, with no bbcode in it. All the same, if there is a duplicate file in the administrator and component folder which needs the equal edit, please clarify that. Very much appreciated, and I can finally let go of the suspense of this solution when it is made clear. :unsure:

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

Time to create page: 0.246 seconds