TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,991
  • Total Topics: 21,323
  • Online today: 545
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 367
  • Total: 367

Category shortname value

Started by fnrtshdev, April 05, 2012, 03:45:09 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fnrtshdev

Up
One little issue: after this patch, links like that started to appear in a linktree, but here's a solution to fix that:
In file TPortal.php (around line 1214)
find: TPadd_linktree($scripturl.'?cat='. $context['TPortal']['category']['id'] , $context['TPortal']['category']['value1']);
replace with: TPadd_linktree($scripturl.'?cat='. $context['TPortal']['category']['value8'] , $context['TPortal']['category']['value1']);

IchBin

That'll change what you need. But it doesn't account for the option if someone doesn't actually have a shortname, in which case it should be using the id instead.

if(!empty($context['TPortal']['category']['shortname']))
TPadd_linktree($scripturl.'?cat='. $context['TPortal']['category']['value8'], $context['TPortal']['category']['value1']);
else
TPadd_linktree($scripturl.'?cat='. $context['TPortal']['category']['id'], $context['TPortal']['category']['value1']);

This website is proudly hosted on Crocweb Cloud Website Hosting.