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

Recent

Welcome to TinyPortal. Please login or sign up.

May 05, 2024, 05:04:28 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,178
  • Total Topics: 21,220
  • Online today: 232
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 206
  • Total: 206

Articles being Chopped

Started by clothahump, February 14, 2011, 08:27:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

clothahump

Quote from: IchBin on February 16, 2011, 11:26:08 PM
Change art.date to art.subject

Another problem, it seems that regardless of what you do in the articles admin the order does not change, image attached.


IchBin

It's doing what most article systems do that I've seen. Lists the articles in the order they were created. If you want them different, it's just a matter of tracking down the query like I did for the last one and changing it.

It would be much appreciated if you would keep your different questions in different topics. This will help keep topics on the subject and make things easier to find in a search as well. Thanks.

clothahump

QuoteIf you want them different, it's just a matter of tracking down the query like I did for the last one and changing it.
I would not have clue where to start looking, if it does list the articles as they are written how do you change things when there is a new article added at a later date, not really much point in having the facility in admin if it does not work.

IchBin

Don't get me wrong, there should be some flexibility on how one could choose to display the articles. It's just not something I can add in right now. The only thing I'm trying to do is to get TP as stable as possible so we can reach our first ever "Official/Stable/Final" release. :)

I'll see if I can't track down the change for you. It might be a day or two because I had an ID10T moment and locked myself out of my server today... so I don't have access to my test files and sites etc. If you don't hear from me in the next couple days, please bump the topic and remind me.

clothahump

Give me a clue and I will have search through the code.

IchBin

Actually, I just opened the file after downloading it again and I think I found it.

In TPortal.php find this on about line #820
// should we supply links to articles in same category?
if(in_array('category', $context['TPortal']['article']['visual_options']))
{
$request =  tp_query("SELECT id, subject, shortname
FROM " . $tp_prefix . "articles
WHERE category=" . $context['TPortal']['article']['category'] . "
AND off=0
AND approved=1", __FILE__, __LINE__);


Just change the last line to be this instead and see if it works.
AND approved=1 ORDER BY subject", __FILE__, __LINE__);

clothahump


clothahump

Quote from: IchBinâ,,¢ on February 22, 2011, 05:49:34 PM
Actually, I just opened the file after downloading it again and I think I found it.

In TPortal.php find this on about line #820
// should we supply links to articles in same category?
if(in_array('category', $context['TPortal']['article']['visual_options']))
{
$request =  tp_query("SELECT id, subject, shortname
FROM " . $tp_prefix . "articles
WHERE category=" . $context['TPortal']['article']['category'] . "
AND off=0
AND approved=1", __FILE__, __LINE__);


Just change the last line to be this instead and see if it works.
AND approved=1 ORDER BY subject", __FILE__, __LINE__);

The fix failed this time, there is no sign of ", __FILE__, __LINE__) in TPortal.php

IchBin

Did you upgrade to SMF2 or something? The fix I posted was for TP install on SMF1.x. If there is no sign of ,__FILE__,__LINE__) it would be because you are using the files that are meant for SMF2.

clothahump

That explains it, I am using SMF 2.0.2  ::)