https://www.icyphoenix.com/viewtopic.php?f=35&t=4004
-----------------------------------
tc1967uk
Sat 05 Apr, 2008 20:28

Recent Topics - Number Of Forums To Exclude
-----------------------------------
In an old version of IP, you could edit templates/common/acp/board_config_queries.tpl and change the value from:

maxlength=[b]"255"[/b] size="40" name="last_msgs_x" value="{LAST_MSGS_X}" />

to whatever value you wanted, so you could exclude as many forums as you like.  However, in IP 1.2.0.27, the board_config_queries.tpl file is not there.  Can anyone advise me where to change this value please?


-----------------------------------
xmenfile
Sat 05 Apr, 2008 22:12

Re: Recent Topics - Number Of Forums To Exclude
-----------------------------------
well here is my post that KasLimon helped me this far, so it may help you.
http://www.icyphoenix.com/viewtopic.php?f=21&t=3781


-----------------------------------
tc1967uk
Wed 09 Apr, 2008 07:54

Re: Recent Topics - Number Of Forums To Exclude
-----------------------------------
Thanks xmenfile, but I can't find the line that I need to edit anywhere.

Does anyone know where to find the code: [b]last_msgs_x[/b], so I can amend the maxlength?


-----------------------------------
moreteavicar
Wed 09 Apr, 2008 12:20

Re: Recent Topics - Number Of Forums To Exclude
-----------------------------------
Hi, all fields are generated via a common input field creation loop. The file to edit is not a template file, but ip_root/adm/admin_board_extend.php

You will find the lines:
[code linenumbers=false]		
                case 'VARCHAR':
		case 'HTMLVARCHAR':
			$input = '<input type="text" name="' . $field_name . '" maxlength="255" size="45" class="post" value="' . $config[$field_name] . '" />';
			break;[/code]

last_msgs_x is of type VARCHAR, and the case for 'VARCHAR' means it takes the input of 'HTMLVARCHAR', so you can see the maxlength="255" which you can adjust. This just means, though, that if you change it here, you change it for all VARCHAR and HTMLVARCHAR input fields. 
[b]
[size=14]But:[/size][/b]
1) I do not know why you need a longer input field - do you have >80 forums you wish to exclude (accounting for double digit forum IDs)?
2) You cannot store more than 255 chars anyway, because your config DB table is configured to accept up to 255 chars, not more. You can of course run an sql alter table query to change that.

You are entering the forum IDs - their numbers, and not the forum names, aren't you?


-----------------------------------
moreteavicar
Wed 09 Apr, 2008 12:29

Re: Recent Topics - Number Of Forums To Exclude
-----------------------------------
Sorry, I think I know what you want to do - you actually want to increase the size of the input box, not the maxlength?

e.g. change size="45" from my last post to size="what you want". 

NB The fact that it is size="45" doesn't stop you entering in 255 chars, you just have to move horizontally across input field... ;)


-----------------------------------
tc1967uk
Wed 09 Apr, 2008 15:12

Re: Recent Topics - Number Of Forums To Exclude
-----------------------------------
Hi moreteavicar

No, I'm not using the forum names, and yes I do have more than 80 forums to exclude (when my forum is ready to go public anyway).  Can you advise a novice on how to do this please?


-----------------------------------
moreteavicar
Wed 09 Apr, 2008 18:19

Re: Recent Topics - Number Of Forums To Exclude
-----------------------------------
[quote user="tc1967uk" post="27513"]and yes I do have more than 80 forums to exclude (when my forum is ready to go public anyway).  [/quote]  :shock: Wow, thats great that Icy will get such a big use ;)

OK, For your database, it depends on your MySQL server as to what you can increase a varchar to. For version > 5.02, you can have varchar 65,535, older versions are limited to 255, but in general you can change varchar to text anyway. 

I was going to give you the SQL commands to use, but I'm not quite sure off the top of my head for altering char length, so instead here is a straight forward way to do this in phpmyadmin (use cpanel version rather than the one in Icy phoenix ACP).

1) Select the config table from the left frame of phpmyadmmin (you might have to select the DB from a list first). 
2) You should be looking at the structure for config table. Observe definition for the config_value row. In the install schema it is created as varchar(255), somewhere along the lines my server seems to automatically turn it into unlimited text. I don't know if this will be the same for you. If there is no limit (no varchar255) then nothing to do. Otherwise:
3) Select the pencil (edit) icon in the config_value row. In the column with "type" - you can change this from varchar to text, then remove the 255 completely from the next column (can be blank).

Then, just edit the maxlength="255" to whatever you want. Actually, I might be wrong but I think maxlength="255" can be removed completely, as there doesn't look like anything in the scripts which checks the length of the field (as usually the browser limits the length of the input string).


