Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Customizazion No Link Articles

Customizazion No Link Articles 6 Jahre 2 Monate her #3394

  • user_francesco
  • user_francescos Avatar
  • OFFLINE
  • Fresh Boarder
  • Beiträge: 10
  • Dank erhalten: 1
  • Karma: 0
Hi, in some cases I only prefer to show in the module a Table of Contents without links. Is it possible to have a customization? So if I choose Link category NO it also affects to Articles link?

If it is very easy you can even tell me which line to modify, I will do it by myself.

Thanks a lot
Francesco

Customizazion No Link Articles 6 Jahre 2 Monate her #3395

  • Jonny132
  • Jonny132s Avatar
  • OFFLINE
  • Administrator
  • Beiträge: 151
  • Dank erhalten: 3
  • Karma: 4
Hi user_francesco,

the modification is very easy. I assume youre talking about the module like in the last thread? If so:
  1. Open the file 'sectioncategoryarticlelistmodulehelper.php
  2. Find the line (Nr 163)
    $link = '<a href="' .  JRoute::_(ContentHelperRoute::getArticleRoute($article->id, $article->catid)) . '">' . $article->title . '</a>';
  3. Replace it with
    $link = $article->title;

Customizazion No Link Articles 6 Jahre 2 Monate her #3396

  • user_francesco
  • user_francescos Avatar
  • OFFLINE
  • Fresh Boarder
  • Beiträge: 10
  • Dank erhalten: 1
  • Karma: 0
Hi, yes you understood well, I'm talking about the module.

I replace the code, but now in every module links disappeared, I try to explain better what I wish. Please see the attached file, I would like the only when I choose Link categories: NO - also links articles have no links. The situation is this one, if I want to show a table of content, just to sell a subscription, people should not be able to follow the links. When they bought the subscription, they can access to a different area of the site where they will found again the table of contents (a copy of the previous module), but with Link categories set on YES, so they can follow the links of categories and articles. I hope I was enough clear.
Thank you very much.
Francesco
Anhang:

Customizazion No Link Articles 6 Jahre 2 Monate her #3397

  • Jonny132
  • Jonny132s Avatar
  • OFFLINE
  • Administrator
  • Beiträge: 151
  • Dank erhalten: 3
  • Karma: 4
Ahh ok you have created multiple modules from this type and you want to configure the appearance of the links individual.

If thats correct you can replace the precious mentioned line with this:
$link;
if($linkcategories==1)
{
    $link = '<a href="' .  JRoute::_(ContentHelperRoute::getArticleRoute($article->id, $article->catid)) . '">' . $article->title . '</a>';
}
else
{
    $link = $article->title;
}

Customizazion No Link Articles 6 Jahre 2 Monate her #3398

  • user_francesco
  • user_francescos Avatar
  • OFFLINE
  • Fresh Boarder
  • Beiträge: 10
  • Dank erhalten: 1
  • Karma: 0
Hi, we are close to the solution, but I think it needs a little more modification.

When I replace the code, I have this situations:

1) Module with link categories = NO (works fine, no links in the page, perfect!)
2) Module with link categoies = YES (only categories link work, but there are no links for the articles, only the title)

Thanks a lot
Francesco

Customizazion No Link Articles 6 Jahre 2 Monate her #3399

  • Jonny132
  • Jonny132s Avatar
  • OFFLINE
  • Administrator
  • Beiträge: 151
  • Dank erhalten: 3
  • Karma: 4
Well, thats odd...
The code (with the customization) is ident to the code where the categories are linked (or not). So there should be either all links or no links at all.

Here the code for the categories:
  if($linkcategories==1)
  {
    $link = '<a class="categorylink" href="' .  JRoute::_(ContentHelperRoute::getCategoryRoute($category->id)) . '">' . $category->title . '</a>';
  }
  else
  {
    $link = '<span class="categorylink">'.$category->title.'</span>';
  }

And here the (customized) code vor the articles:
if($linkcategories==1)
{
    $link = '<a href="' .  JRoute::_(ContentHelperRoute::getArticleRoute($article->id, $article->catid)) . '">' . $article->title . '</a>';
}
else
{
    $link = $article->title;
}
 

You see - the criteria if there should be the link is the same. So tecnically there can't be categories which are linked and articles which are not.

Customizazion No Link Articles 6 Jahre 2 Monate her #3406

  • user_francesco
  • user_francescos Avatar
  • OFFLINE
  • Fresh Boarder
  • Beiträge: 10
  • Dank erhalten: 1
  • Karma: 0
Yes, I agree with you, but still in my site doesn't work.

Could you please test it in one of your sites?

2 modules, one with Link categories YES (all the links) and the other one NO (no links categories no links articles).

As you know I'm ready to pay for this, many thanks!
Francesco

Customizazion No Link Articles 6 Jahre 2 Monate her #3407

  • Jonny132
  • Jonny132s Avatar
  • OFFLINE
  • Administrator
  • Beiträge: 151
  • Dank erhalten: 3
  • Karma: 4
Ahhh, I'm very sorry!
When I made your customization I didn't realize that the code was in a different method where the $linkcategories-variable was not available...
My fault...

Use this customization - it should work ;)

Dateianhang:

Dateiname: mod_SectionCategoryArticleListModule.zip
Dateigröße: 8 KB

Customizazion No Link Articles 6 Jahre 2 Monate her #3408

  • user_francesco
  • user_francescos Avatar
  • OFFLINE
  • Fresh Boarder
  • Beiträge: 10
  • Dank erhalten: 1
  • Karma: 0
You are very very kind, now it works perfectly!

I joined the 2 customizations you made for me and create a single zip (do you remember also public and no public access?). Now everything is perfect exactly as I needed.

I'm very grateful, thank you!
Francesco
Anhang:

Customizazion No Link Articles 6 Jahre 2 Monate her #3409

  • Jonny132
  • Jonny132s Avatar
  • OFFLINE
  • Administrator
  • Beiträge: 151
  • Dank erhalten: 3
  • Karma: 4
Of course I remember :)
Glad I could help you.

Have a nice week!
Ladezeit der Seite: 0.400 Sekunden