TinyPortal

Development => Support => Installation => Topic started by: clothahump on February 14, 2011, 08:27:59 PM

Title: Articles being Chopped
Post by: clothahump on February 14, 2011, 08:27:59 PM
Link to my site: http://www.tropicalfishforums.co.uk
SMF version: SMF ver. RC5
TP version: TP ver. TinyPortal10RC1
Default Forum Language: English
Theme name and version: Default
Browser Name and Version: Firefox?
Mods installed: Not Applicable
Related Error messages: None

When adding large articles they end up getting chopped, how do I increase word count?
Title: Re: Articles being Chopped
Post by: IchBin on February 15, 2011, 12:30:45 AM
How many characters is it allowing? You can see this in any good text editor like notepad++. TP's current table should allow over a million characters which I believe is a field type text in the database. If your upgrade didn't go properly you still might be on the old version of the table that only allowed about 65K of text.
Title: Re: Articles being Chopped
Post by: clothahump on February 15, 2011, 09:12:12 AM
40,646 according to notepad ++
Title: Re: Articles being Chopped
Post by: agent47 on February 15, 2011, 10:41:03 AM
I hate to go off topic but I have to ask how did you manage to make your forums quite popular. I see you have a reasonable amount of users online. Some tips on how you did this would be real nice :)
Title: Re: Articles being Chopped
Post by: clothahump on February 15, 2011, 11:38:24 AM
Quite simple, provide something which is required, be friendly and kick out any idiots that appear as soon as possible.
Title: Re: Articles being Chopped
Post by: IchBin on February 15, 2011, 06:47:19 PM
You're going to have to look at the smf_tp_articles table in your database. Look at the body row of that table and see what the column "type" is. If it is text, edit the row and change it to longtext.
Title: Re: Articles being Chopped
Post by: clothahump on February 15, 2011, 07:15:47 PM
That did it IchBin, http://www.tropicalfishforums.co.uk/index.php?page=diyco2

One more problem.
I would like to change the order of the articles in the Article Block, I have saved it time and time again but no go.
Title: Re: Articles being Chopped
Post by: IchBin on February 15, 2011, 09:07:58 PM
What type of article block?
Title: Re: Articles being Chopped
Post by: clothahump on February 15, 2011, 09:12:26 PM
Articles in a category.
Title: Re: Articles being Chopped
Post by: IchBin on February 16, 2011, 10:59:02 PM
In TPortal.php find this line on about #2149
AND art.approved=1", __FILE__, __LINE__);


Change to this:
AND art.approved=1 ORDER BY art.date", __FILE__, __LINE__);


That will order them by date.
Title: Re: Articles being Chopped
Post by: clothahump on February 16, 2011, 11:02:55 PM
Any chance to do it alphabetically?
Title: Re: Articles being Chopped
Post by: IchBin on February 16, 2011, 11:26:08 PM
Change art.date to art.subject
Title: Re: Articles being Chopped
Post by: clothahump on February 16, 2011, 11:28:38 PM
Thank you sir but it is still the same.
Title: Re: Articles being Chopped
Post by: IchBin on February 17, 2011, 12:20:56 AM
That's because you have put a dash at the beginning of your titles.
Title: Re: Articles being Chopped
Post by: clothahump on February 17, 2011, 08:20:33 AM
Did that to give the titles some sort of separation, without the dashes it does not look good.

EDIT.

Removed all Hyphens and still the same as before.
Title: Re: Articles being Chopped
Post by: IchBin on February 17, 2011, 04:15:06 PM
Then you either didn't make the changes properly, or the file didn't get changed some how. The changes worked on my install. If they don't  work for yours, I don't know what to tell you really.
Title: Re: Articles being Chopped
Post by: clothahump on February 17, 2011, 04:34:55 PM
Weird, it was not there, edited it 3 times and saved before it worked, must be my ftp client.

In the stats block it shows users online, is there any way to make this autofit instead of scrolling?
Title: Re: Articles being Chopped
Post by: IchBin on February 17, 2011, 06:53:26 PM
TPsubs.template.php

Find this line:
<div style="max-height: 23em; overflow: auto;">';

Remove max-height or change it to a greater value.
Title: Re: Articles being Chopped
Post by: clothahump on February 17, 2011, 07:02:35 PM
Instantly better, thanks mate.
Title: Re: Articles being Chopped
Post by: IchBin on February 17, 2011, 07:28:04 PM
Sure thing. Glad to help!
Title: Re: Articles being Chopped
Post by: clothahump on February 22, 2011, 03:03:15 PM
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.

Title: Re: Articles being Chopped
Post by: IchBin on February 22, 2011, 03:18:44 PM
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.
Title: Re: Articles being Chopped
Post by: clothahump on February 22, 2011, 03:23:30 PM
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.
Title: Re: Articles being Chopped
Post by: IchBin on February 22, 2011, 05:36:22 PM
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.
Title: Re: Articles being Chopped
Post by: clothahump on February 22, 2011, 05:40:53 PM
Give me a clue and I will have search through the code.
Title: Re: Articles being Chopped
Post by: 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__);
Title: Re: Articles being Chopped
Post by: clothahump on February 22, 2011, 06:13:30 PM
That worked, nice find.
Title: Re: Articles being Chopped
Post by: clothahump on December 27, 2011, 04:21:10 PM
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
Title: Re: Articles being Chopped
Post by: IchBin on December 27, 2011, 04:28:21 PM
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.
Title: Re: Articles being Chopped
Post by: clothahump on December 27, 2011, 04:44:55 PM
That explains it, I am using SMF 2.0.2  ::)
Title: Re: Articles being Chopped
Post by: clothahump on January 22, 2012, 02:59:56 PM
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__);

Just a heads up that this was not included in the latest version.  ???
Title: Re: Articles being Chopped
Post by: IchBin on January 23, 2012, 12:39:10 AM
I didn't plan on changing it for everyone. You are one of maybe just a couple of people that wanted it listed this way. I'd much rather just add a display option down the road.