- Posts: 44
- Thank you received: 0
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 [Solved] J! Article and CB Profile Custom BBCode
16 years 6 months ago - 16 years 5 months ago #31411
by Krycek
[Solved] J! Article and CB Profile Custom BBCode was created by Krycek
Hello,
I just migrated my forum from PHPBB to Kunena and was wondering how could I reproduce what I did in PHPBB that's to say some bbcode button to create a link to some J! Article or CB member profile...
I had then in PHPBB something like :
650 being an J! article ID and Smith being an member. This code was parsed as link to the specified Article (using its ID) and the CB member profile.
I read that Custom BBCode tutorial on gworldz.com though it doesn't explain how to create links. Having a look to Kunena.parser.php, it seems that it is quite tough to create url (many options I don't really understand).
Anyone already did that kind of hack ?
Thanks very much in advance for your support !
I just migrated my forum from PHPBB to Kunena and was wondering how could I reproduce what I did in PHPBB that's to say some bbcode button to create a link to some J! Article or CB member profile...
I had then in PHPBB something like :
Code:
[jarticle=650]Article name[/jarticle] written by [jauthor]Smith[/jauthor]
I read that Custom BBCode tutorial on gworldz.com though it doesn't explain how to create links. Having a look to Kunena.parser.php, it seems that it is quite tough to create url (many options I don't really understand).
Anyone already did that kind of hack ?
Thanks very much in advance for your support !
Last edit: 16 years 5 months ago by Krycek.
Please Log in or Create an account to join the conversation.
16 years 6 months ago #32257
by Krycek
Replied by Krycek on topic Re: J! Article and CB Profile BBCode
Hello,
Anyone has an idea on how to do that ?
Thank you.
Anyone has an idea on how to do that ?
Thank you.
Please Log in or Create an account to join the conversation.
16 years 5 months ago - 16 years 5 months ago #32386
by Krycek
Replied by Krycek on topic Re: J! Article and CB Profile BBCode
Hi,
Ok, so still no info... I found some by myself.
Exemple to create a BBlink to J! Article with its ID :
Thus below code will turn into direct link to J! Article.
This was piece of cake when I think about it... however, got trouble with below bbcode :
That code has to be changed to Mandela's CB profile (in my example of course).
I tried $between as below, puting code under case for img but it doesn't work...
Problem is, how to call what's between BBcodes ? Currently $between is empty variable...
Could anyone please help ?!
Thanks in advance.
Ok, so still no info... I found some by myself.
Exemple to create a BBlink to J! Article with its ID :
Code:
case 'jarticle':
if(!isset($tag->options['default'])
|| strlen($tag->options['default'])==0) {
return TAGPARSER_RET_NOTHING;
}
$tns = "<a href='http://www.yoursitehere.com/index.php?option=com_content&view=article&Itemid=1&id=".$tag->options['default']."' rel=\"nofollow\">";
$tne = '</a>';
return TAGPARSER_RET_REPLACED;
break;
Code:
[jarticle=35]Article number 35[/jarticle]
This was piece of cake when I think about it... however, got trouble with below bbcode :
Code:
[jauthor]Mandela[/jauthor]
I tried $between as below, puting code under case for img but it doesn't work...
Code:
case 'jauthor':
$tns = "<a href='http://www.yoursitehere.com/component/comprofiler/userprofile/".$between.".html' rel=\"nofollow\">";
$tne = '</a>';
return TAGPARSER_RET_REPLACED;
break;
Problem is, how to call what's between BBcodes ? Currently $between is empty variable...
Could anyone please help ?!
Thanks in advance.
Last edit: 16 years 5 months ago by Krycek.
Please Log in or Create an account to join the conversation.
16 years 5 months ago #32550
by Krycek
Replied by Krycek on topic Re: J! Article and CB Profile BBCode
Hello,
Is there ANYONE willing to help ? I just need to know where can I find a variable which contains the string between BBcodes...
Thanks.
Is there ANYONE willing to help ? I just need to know where can I find a variable which contains the string between BBcodes...
Thanks.
Please Log in or Create an account to join the conversation.
16 years 5 months ago - 16 years 5 months ago #33054
by Krycek
Replied by Krycek on topic Re:J! Article and CB Profile BBCode
Up ! Pleaaaaaase !!!
Edit: Ok, thanks to the very helpful community I finally succeed to get those BBcodes to work.
Link to J! Article based on its ID :
BBcode is :
Code to add in kunena.parser.php (after "size" switch case - around line 200) :
Link to J! Author based on its name :
BBcode is :
Code to add in kunena.parser.php (after "quote" switch case - around line 420) :
Thanks again for your help. :dry:
Edit: Ok, thanks to the very helpful community I finally succeed to get those BBcodes to work.
Link to J! Article based on its ID :
BBcode is :
Code:
[jarticle=360]Article 360 link[/jarticle]
Code to add in kunena.parser.php (after "size" switch case - around line 200) :
Code:
case 'jarticle':
if(!isset($tag->options['default'])
|| strlen($tag->options['default'])==0) {
return TAGPARSER_RET_NOTHING;
}
$tns = "<a href='http://www.yoursitehere.com/index.php?option=com_content&view=article&Itemid=1&id=".$tag->options['default']."' rel=\"nofollow\">";
$tne = '</a>';
return TAGPARSER_RET_REPLACED;
break;
Link to J! Author based on its name :
BBcode is :
Code:
[jauthor]Author Name[/jauthor]
Code to add in kunena.parser.php (after "quote" switch case - around line 420) :
Code:
case 'jauthor':
$tag_new = '<a href="http://www.yoursitehere.com/monprofil/userprofile/'.$between.'.html" title="" rel="nofollow">'.$between.'</a>';
return TAGPARSER_RET_REPLACED;
break;
Thanks again for your help. :dry:
Last edit: 16 years 5 months ago by Krycek.
Please Log in or Create an account to join the conversation.
Time to create page: 0.218 seconds