Support Forum

Cyrillic titles are displaying only 20 characters correctly in SELECT FORUM dropdown

19 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

There is a fix coming for this in the next update if you can wait that long…
Or I can point you to some changes you could make as a temporary fix while you wait for that.

VZ Vadym Zosyak
Vadym Zosyak
Member

Please, point me where I could fix it myself. Thanks.

YS Yellow Swordfish
Yellow Swordfish
Member

File: simple-press/forum/content/sp-common-view-functions.php

Function: sp_QuickLinksTopic() about half way through the file – it is a big file!

Locate the line of code:

sp_create_name_extract($spPost->forum_name, 20)

and change the 20 to 40 and save.

File: simple-press/sp-api/sp-api-common-dislay.php

Function: sp_render_group_forum_select() first function in the file.

Locate the line of code:

sp_create_name_extract($forum->forum_name, 20)

and again – change the 20 to 40.

The problem was that we overlooked that some languages – like yours – are multi-byte languages. This is changes in the next update to be user-definable from the theme templates.

GI giorgiokatr
giorgiokatr
Member

i located the php files but there was not even the 20

it was

sp_create_name_extract($spPost->forum_name)

i made it

sp_create_name_extract($spPost->forum_name, 40)

but same problem!

no big deal i will wait for the update!

YS Yellow Swordfish
Yellow Swordfish
Member

Please try 80.
40 was an error. it is 40 by default and you need it longer.

GI giorgiokatr
giorgiokatr
Member

there is nothing in the code… not 20 not 40…

i will try 80

GI giorgiokatr
giorgiokatr
Member

ok 80 worked

now to fix the new recently updated topics drop down?

GI giorgiokatr
giorgiokatr
Member

ok found it its in common view

sp_create_name_extract($spPost->topic_name, 80)

thanks!

MP Mr Papa
Mr Papa
Member

okay, cool…  like we said, we have it modded up in next version too…

GI giorgiokatr
giorgiokatr
Member

hi i see that you replaced the number of characters with $length

is it somewhere in settings to change because i get the $ again in long post names!

MP Mr Papa
Mr Papa
Member

you have lost me..  are you saying you had actually modified core code?  bad idea as you lose changes on updates…  and all those functions in that file are called from your theme…  you put the number of chars you want to truncate the title to in the template functions usage… and you can tell it not to shorten at all…

not sure what you mean by $…

GI giorgiokatr
giorgiokatr
Member

no i did not modified core code

i see the diamond symbol in the quick links dropdown.

so i must change the number of characters where exactly?

i have the problem like the image in the first page

MP Mr Papa
Mr Papa
Member

so you didnt make the changes in post 4 – 9???  then confused as to what issue was, and what you did to solve it before that you said is now broke…  so perhaps explain the issue?

GI giorgiokatr
giorgiokatr
Member

yes i made those changes but that was then (16-08-2012)

now after many updates i dont see any number but the value $length

i mean instead of

sp_create_name_extract($forum->forum_name, 20)

i see

sp_create_name_extract($spPost->forum_name, $length)

i guess my changes were overwrited after an update.

but now i have the problem as the image in the first post.

so i guess i have to set that length somewhere or am i wrong?