×
Kunena 5.1.16 Released (18 Mar 2020)

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

× 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 Read more link to full article tabs rules and help

More
7 years 8 months ago - 7 years 8 months ago #1 by gimenezadrian
Hello,

I put in the rules menu
[article=full]1[/article]

and i get read more link


Choose how to display configuration article by default does nothing, since nothing has to do

No read more in article


I post here in case anyone finds the solution

K 2.0.1

┬┐Article full not working?
Attachments:
Last edit: 7 years 8 months ago by gimenezadrian.

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

More
7 years 8 months ago #2 by achartier
I am having the same problem. Also, all text included in the Rules or Help article is displaying in italics and all spaces are being stripped. I imaging this is a css problem but not sure where to fix it.

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

More
7 years 7 months ago #3 by achartier
The stripped spaces turned out to be an artifact of attempting to use a slider inside the article.

I would still like to see some way to override the italics style.

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

More
7 years 4 months ago - 7 years 4 months ago #4 by Jazzvox
Same problem! In addition, we get some more "Just Another Homemade SEO-Killer"s like:
/component/content/article/2-uncategorised/48-help.html

I found this thread in the German forum: www.kunena.org/forum/36-German/123781-re...-lesen-button-stoert

After reading this, until the bug is fixed, I thought this could work:

In bbcode.php remove line 1193:
case 'full':
	if ( !empty($article->fulltext) ) {
		$article->text = $article->introtext. ' '. $article->fulltext;
// $link = '<a href="'.$url.'" class="readon">'.JText::sprintf('COM_KUNENA_LIB_BBCODE_ARTICLE_READ').'</a>';
		break;
	}

Despite it seems to be logical, this doesn't work, the unwanted "readon" still appears.
Might be anything wrong with this condition
'$article->text = $article->introtext. ' '. $article->fulltext;'
or the latter
case 'intro': ... $article->text = $article->introtext;

Sorry, but I'm not a versed coder, any idea ??
Last edit: 7 years 4 months ago by sozzled. Reason: Removed user's signature under Section 7.3 of terms of use

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

More
7 years 4 months ago #5 by rich

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

More
7 years 2 months ago #6 by Hoffi
Hi,

as posted in the german forum (see link in rich's post) I have found the cause for the wrong link text as well as a nice "hack" we use on our site to let the admin/user skip the link if not needed.

In case of articles without a "read more" tag all the text is stored in introtext member of article object. So the code in the "case full" block (in bbcode.php, you know ;)) is not executed. Instead it falls through to the "case intro" block and shows the "Read more" link.

I think the code needs to become a bit more complex to follow these rules:
If "full" is requested and introtext OR fulltext contain some text, all text and "Read article" link should be shown.
If "intro" is requested and introtext is present, this text should be shown. If fulltext isn't empty too "Read more" link should be shown, otherwise "Read article" link.

Additionally my "hack": I used additional value "fullnolink" instead of "full" in which case I don't add the "Read article" link (see code below).

Here my code (without fulltext check in intro part because we don't need this), corresponding to bbcode.php lines 1189++ in Kunena 2.0.3:
switch ($default) {
  // Hoffi: (a) fix introtext-only, (b) allow full w/o link (use [article=fullnolink] instead of [article=full])
  case 'fullnolink':
  case 'full':
    if ( !empty($article->fulltext) || !empty($article->introtext) ) {
      if ( !empty($article->fulltext) && !empty($article->introtext) ) {
        $article->text = $article->introtext . ' ' . $article->fulltext;
      } else {
        $article->text = $article->introtext . $article->fulltext;
      }
      if ( $default == 'fullnolink' ) {
        $link = '';
      } else {
        $link = '<a href="'.$url.'" class="readon">'.JText::sprintf('COM_KUNENA_LIB_BBCODE_ARTICLE_READ').'</a>';
      }
      break;
    }
    // continue to intro if fulltext is empty
  case 'intro': //...

I hope this will find it's way into next release ;)

Thanks,
Hoffi

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

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Time to create page: 0.833 seconds