Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post 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="255" 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?
 



 
tc1967ukSend private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post 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
 



 
xmenfileSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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: last_msgs_x, so I can amend the maxlength?
 



 
tc1967ukSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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: [Download] [Hide] [Select]
        
                case 'VARCHAR':
        case 'HTMLVARCHAR':
            $input = '<input type="text" name="' . $field_name . '" maxlength="255" size="45" class="post" value="' . $config[$field_name] . '" />';
            break;


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.

But:

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?
 



 
moreteavicarSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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...
 



 
moreteavicarSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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?
 



 
tc1967ukSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Recent Topics - Number Of Forums To Exclude 
 
tc1967uk wrote: [View Post]
and yes I do have more than 80 forums to exclude (when my forum is ready to go public anyway).  
   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).
 



 
moreteavicarSend private message  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events