Warning: The author of this contribution does not provide support for it anymore.

Topics descriptions

Topic description box size - Topics descriptions

Topic description box size

by lifesux » Mon Jul 11, 2011 8:22 pm

[SOLVED]

Just installed this in about 30 mins with the bbcode parsing aswell and works like a dream so thankyou so much for sharing. :mrgreen:

I don't suppose you could help me with something that could make my life a whole lot easier??

I want all information from the viewtopic to be shown in the viewforum and this mod had got me half way there....

If i could increase the size of the area you can add the description in and allow new lines etc my nightmare would finally be over lol

Thanks Claire x
Last edited by lifesux on Thu Jul 14, 2011 5:45 pm
lifesux
Registered User
Posts: 32
Joined: Sun Jul 10, 2011 10:18 am
Contact:

Re: Topic description box size

by lifesux » Thu Jul 14, 2011 5:06 pm

SOLVED
lifesux
Registered User
Posts: 32
Joined: Sun Jul 10, 2011 10:18 am
Contact:

Re: Topic description box size

by Forum_espada_clan » Thu Oct 20, 2011 3:09 pm

Can you share with otherth your solution?
Sorry for my English, it's not my native language. :oops:
User avatar
Forum_espada_clan
Registered User
Posts: 13
Joined: Mon May 16, 2011 8:19 pm
Location: Ukraine
Contact:

Re: Topic description box size

by watisnf.nl » Fri Dec 30, 2011 2:18 pm

I'm testing this modification, I was wondering the same. How the increase the box size and description characters.


EDIT:

The text box is now bigger, and I can use more lines. But I can't user more characters :(
Dutch Translator | Looking for, Dutch extensions translations
User avatar
watisnf.nl
Registered User
Posts: 607
Joined: Sat Mar 13, 2010 12:53 pm
Location: The Netherlands
Name: David
Contact:

Re: Topic description box size

by Oyabun1 » Fri Dec 30, 2011 10:25 pm

The data type of the topic_desc column the MOD adds is varchar(255) which allows a maximum of 255 characters for a topic description.

If you run this SQL query

Code: Select all

ALTER TABLE phpbb_topics MODIFY topic_desc text
where phpbb_ is your table prefix, that will change the data type and allow up to 3000 characters to be used in each topic description.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill
Contact:

Re: Topic description box size

by watisnf.nl » Mon Jan 02, 2012 6:05 pm

Thanks for you response, I'm one step further. I can use more characters, but they are not all displayed in viewforum.php. I think I found the solution for that in functions_posting.php.

This:

Code: Select all

$data['topic_desc'] = (isset($data['topic_desc'])) ? truncate_string($data['topic_desc'], 100, 255, false) : '';


To this:

Code: Select all

$data['topic_desc'] = (isset($data['topic_desc'])) ? truncate_string($data['topic_desc'], 3000, 3000, false) : '';


Is that ok??
Dutch Translator | Looking for, Dutch extensions translations
User avatar
watisnf.nl
Registered User
Posts: 607
Joined: Sat Mar 13, 2010 12:53 pm
Location: The Netherlands
Name: David
Contact:

Re: Topic description box size

by Oyabun1 » Mon Jan 02, 2012 9:41 pm

That should work. The truncate_string function is defined in includes/functions_content.php.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill
Contact:

Re: Topic description box size

by watisnf.nl » Tue Jan 03, 2012 5:40 pm

Oyabun1 wrote:That should work. The truncate_string function is defined in includes/functions_content.php.


What are you trying to say whit:

The truncate_string function is defined in includes/functions_content.php

That I can change something in [b]includes/functions_content.php
instead of includes/functions_posting.php ?


It works the way I want now, so I'm happy :mrgreen: Thanks for your help
Dutch Translator | Looking for, Dutch extensions translations
User avatar
watisnf.nl
Registered User
Posts: 607
Joined: Sat Mar 13, 2010 12:53 pm
Location: The Netherlands
Name: David
Contact:

Re: Topic description box size

by Oyabun1 » Tue Jan 03, 2012 8:40 pm

watisnf.nl wrote:That I can change something in [b]includes/functions_content.php instead of includes/functions_posting.php ?
No, just that there are several lines of comments above where it is defined that explain the function a bit.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill
Contact:

Re: Topic description box size

by watisnf.nl » Mon Jan 23, 2012 4:10 pm

Hi Oyabun1,

Many thanks for your help so far, it works fine for me except one thing. When I want to edit a topic the description field is shown empty, how can I change that. It's ridicules to add a description every time I edit a topic.

Whit the original code it's working, but whit mine it don't. I think they problem is in posting_editor.html

I Have

Code: Select all

<!-- IF S_DESC_TOPIC -->
      <dl style="clear: left;">
         <dt><label for="desc">{L_TOPIC_DESC}:</label></dt>
         <dd><textarea name="desc" id="desc" rows="8" cols="176" style="height: 5em" value="{TOPIC_DESC}" class="inputbox autowidth" /></textarea></dd>
      </dl>
   <!-- ENDIF -->


Original is:

Code: Select all

<!-- IF S_DESC_TOPIC -->
      <dl style="clear: left;">
         <dt><label for="desc">{L_TOPIC_DESC}:</label></dt>
         <dd><input type="text" name="desc" id="desc" size="45" maxlength="100" tabindex="2" value="{TOPIC_DESC}" class="inputbox autowidth" /></dd>
      </dl>
   <!-- ENDIF -->
Dutch Translator | Looking for, Dutch extensions translations
User avatar
watisnf.nl
Registered User
Posts: 607
Joined: Sat Mar 13, 2010 12:53 pm
Location: The Netherlands
Name: David
Contact:

Re: Topic description box size

by watisnf.nl » Fri Jan 27, 2012 8:58 pm

Problem solved, I had some help form somebody on the Dutch support site. The problem is solved whit the following code:

Code: Select all

    <!-- IF S_DESC_TOPIC -->
          <dl style="clear: left;">
             <dt><label for="desc">{L_TOPIC_DESC}:</label></dt>
             <dd><textarea name="desc" id="desc" rows="8" cols="176" style="height: 5em" class="inputbox autowidth">{TOPIC_DESC}</textarea></dd>
          </dl>
       <!-- ENDIF -->
Dutch Translator | Looking for, Dutch extensions translations
User avatar
watisnf.nl
Registered User
Posts: 607
Joined: Sat Mar 13, 2010 12:53 pm
Location: The Netherlands
Name: David
Contact:

Re: Topic description box size

by gussie » Mon Aug 11, 2014 3:50 am

lifesux wrote:Just installed this in about 30 mins with the bbcode parsing aswell and works like a dream so thankyou so much for sharing. :mrgreen:

Hi Claire, how did you enable the BBcode parsing?

I would like to allow some HTML tags here (so my moderators can add links, maybe do simple HTML Tables, or put some advertising code - Google Ads or BroadstreetAds Selfies). Is this adjustment done in the modification or on a board-wide basis?

I plan to limit access to the topic description to Supermods or a special group.
Res tantum valet quantum vendi potest
Do not hire Christian Bullock - he will not finish the job and he will not return your money.
User avatar
gussie
Registered User
Posts: 92
Joined: Wed Nov 27, 2002 1:26 am
Contact:

Re: Topic description box size

by gussie » Tue Aug 12, 2014 8:30 am

I was able to use Oyabun1's and watisnf.nl's approaches to increase the maximun number of characters I can use in my Topic Description box.

I would like to be able to use HTML or BBCode in that section. When I have copy and pasted into the topic description, the text in Viewtopic does not have any formatting (not even carriage returns). Go back to edit the description, the carriage returns are still there :)

What do I need to change so that the Topic Description will work like the regular editing window?
Res tantum valet quantum vendi potest
Do not hire Christian Bullock - he will not finish the job and he will not return your money.
User avatar
gussie
Registered User
Posts: 92
Joined: Wed Nov 27, 2002 1:26 am
Contact:

Re: Topic description box size

by gussie » Thu Aug 21, 2014 9:13 am

Res tantum valet quantum vendi potest
Do not hire Christian Bullock - he will not finish the job and he will not return your money.
User avatar
gussie
Registered User
Posts: 92
Joined: Wed Nov 27, 2002 1:26 am
Contact: