Advertisement:

Couple of issues

Aloittaja fgoc, maaliskuu 14, 2008, 07:58:57 IP

« edellinen - seuraava »

fgoc

I've just swapped hosts (which was hard enough work!) managed to get everything working again with the help of this excellent support section, so many thanks!

couple of issues I'm having difficulty resolving though:

1. My sub category boards no longer go bold when there is a new post in them. The new post icon goes the correct mid shade when the post is in the sub category though. Any ideas?

2. I can't get the £ sign (GBP Pound UK currency sign) to appear in posts. The forum that was active on the old hosts (v1.1.2) I THINK was English-utf8 - this forum (v1.1.4) I have as just English. If I change the current forum to utf8, will this resolve the problem?

More info:
forum url: www.fgoc.co.uk/forum
SMF 1.1.4
Tiny Portal 0.9.8
Lots of mods (30 ish)
Server info:
Apache version                   2.2.8 (Unix)
MySQL version                   4.1.22-standard
PHP version                   5.2.5
Perl version                   5.8.8
Kernel version                   2.6.9-55.ELsmp
cPanel Version                   11.18.3-RELEASE_21703                                                                                                                                                                             
                                                                                                                                                                                              Current forum was installed using Fantastico via the cPanelII interface and then the required sql db files imported in from the old 1.1.2 forum

Many thanks in advance.

Paul
               

Jade Elizabeth

RE 1) When you moved host, did you check that everything was okay with the repair settings tool?
You can get it here, just upload it and run it, make sure everything is good/change it and save, and then delete it when you're done :).

Also, any errors in the log?

RE 2) I think that depends on the fonts on the computer? I may be horribly wrong, so don't go by my word lol.

If you are using an old version, you really should upgrade. There could be all sorts of holes in the old software. If you want to keep your forum safe you should definitely keep it up to date...
http://docs.simplemachines.org/index.php?topic=463.0
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Sarge

#2
Since you used Fantastico to install SMF, I think you won't be able to see English-utf8 in Admin > Server Settings > "Default Forum Language" -- you will probably see two languages there with the same name: English. So maybe your forum is, in fact, using English-utf8 but you just can't see it. Try switching to the other English.

If it doesn't work, perhaps it's because of that Fantastico bug: Fantastico installs SMF with UTF-8 as the default character set even if the database tables are not created using utf8.

The scenario:
1. Your database and tables are in latin1, or in some other character set different from utf8. You can verify that in phpMyAdmin. latin1 is the default charset (character set) and latin1_swedish_ci is the default collation in many MySQL server configurations, although more and more MySQL servers are now using utf8 and utf8_general_ci, respectively.

2. Regardless of whether the character set used in the database is utf8 (with the collation usually being utf8_general_ci) or some other charset, Fantastico installs SMF so that the forum interprets the database data as UTF-8 -- you can verify that by going to SMF Admin > Forum Maintenance and looking at the operation after "Empty out unimportant logs." If it reads "Convert HTML-entities to UTF-8 characters" then SMF is using UTF-8.

If your database and database tables are not using utf8, but SMF is using UTF-8, the solution is simple: Delete global_character_set from the smf_settings table.

Note: utf8 is the name used for the MySQL implementation of the UTF-8 standard.

Also... if SMF is using UTF-8, switch your forum language to English-utf8 (or some other language, but with the -utf8 extension), otherwise use a non-utf8 language (Admin > Server Settings > "Default Forum Language"). But as I mentioned above, Fantastico marks both English and English-utf8 as English. If one of the "Englishes" doesn't work, switch to the other one. I think (but I'm not sure) that Fantastico sets English-utf8 as the default language in SMF.

[edit]
If deleting global_character_set and/or switching the language don't help, check out these topics:
Pound symbol acts as escape character
How to get a pound sign

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Lainaa
<H> I had zero posts when I started posting

fgoc

Lainaus käyttäjältä: Alundra - maaliskuu 14, 2008, 10:02:21 IP
RE 1) When you moved host, did you check that everything was okay with the repair settings tool?
You can get it here, just upload it and run it, make sure everything is good/change it and save, and then delete it when you're done :).

Also, any errors in the log?

RE 2) I think that depends on the fonts on the computer? I may be horribly wrong, so don't go by my word lol.

If you are using an old version, you really should upgrade. There could be all sorts of holes in the old software. If you want to keep your forum safe you should definitely keep it up to date...
http://docs.simplemachines.org/index.php?topic=463.0

Hi Thanks for the reply,

I ran the repair settings tool when I swapped hosts and all went well :)

I have lots of errors, but they are all related to the arcade ::) I'll sort this issue out separately.

Anyone else know why my sub categories (child boards) don't go bold anymore?

Jade Elizabeth

is the style.css okay? Did it move to the new host right?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

fgoc

#5
Lainaus käyttäjältä: Sarge - maaliskuu 15, 2008, 04:50:38 AP
Since you used Fantastico to install SMF, I think you won't be able to see English-utf8 in Admin > Server Settings > "Default Forum Language" -- you will probably see two languages there with the same name: English. So maybe your forum is, in fact, using English-utf8 but you just can't see it. Try switching to the other English.

If it doesn't work, perhaps it's because of that Fantastico bug: Fantastico installs SMF with UTF-8 as the default character set even if the database tables are not created using utf8.

The scenario:
1. Your database and tables are in latin1, or in some other character set different from utf8. You can verify that in phpMyAdmin. latin1 is the default charset (character set) and latin1_swedish_ci is the default collation in many MySQL server configurations, although more and more MySQL servers are now using utf8 and utf8_general_ci, respectively.

2. Regardless of whether the character set used in the database is utf8 (with the collation usually being utf8_general_ci) or some other charset, Fantastico installs SMF so that the forum interprets the database data as UTF-8 -- you can verify that by going to SMF Admin > Forum Maintenance and looking at the operation after "Empty out unimportant logs." If it reads "Convert HTML-entities to UTF-8 characters" then SMF is using UTF-8.

If your database and database tables are not using utf8, but SMF is using UTF-8, the solution is simple: Delete global_character_set from the smf_settings table.

Note: utf8 is the name used for the MySQL implementation of the UTF-8 standard.

Also... if SMF is using UTF-8, switch your forum language to English-utf8 (or some other language, but with the -utf8 extension), otherwise use a non-utf8 language (Admin > Server Settings > "Default Forum Language"). But as I mentioned above, Fantastico marks both English and English-utf8 as English. If one of the "Englishes" doesn't work, switch to the other one. I think (but I'm not sure) that Fantastico sets English-utf8 as the default language in SMF.

[edit]
If deleting global_character_set and/or switching the language don't help, check out these topics:
Pound symbol acts as escape character
How to get a pound sign


Right, that's a lot of info to try and take in.

my admin section is saying "Convert the database and data to UTF-8" so does this mean that SMF isn't in utf8 mode?

phpmyadmin is saying 
MySQL charset:  UTF-8 Unicode (utf8)
MySQL connection collation: utf8_general_ci

Am i right in saying that I need to convert the database and data to utf8 to match the sql charset and collation?

Edit:
Forgot to add that my Forum Language is set to just English. In the languages drop down I also have English British utf8. This sounds like a promising option to take to get my £ sign back. will converting to utf8 in the maintenance section and then selecting this language option sort it?

2nd edit
I also have English-utf8 as an option in the language list???

3rd edit
I've tried changing the languages to the other utf-8 ones - english-utf8 fills the top of my forum with about 12 lines of weird characters and english-british-utf8 makes most of the menu and admin menu items disappear  :o

fgoc

#6
Lainaus käyttäjältä: Alundra - maaliskuu 15, 2008, 06:46:55 AP
is the style.css okay? Did it move to the new host right?

Do you know which part of the css would control the "bold style on new post" bit?

edit:

I've found this bit in the BoardIndex.template file:

/* Each child in each board's children has:
                            id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
                    foreach ($board['children'] as $child)
                    {
                            $child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' . $txt[330] . ': ' . $child['topics'] . ', ' . $txt[21] . ': ' . $child['posts'] . ')">' . $child['name'] . '</a>';
                            $children[] = $child['new'] ? '<b>' . $child['link'] . '</b>' : $child['protected'] ? '<span class="vob_protected">' . $child['link'] . '</span>' : $child['link'];
                    }


Which looks as though it should still be working. Any ideas why it isn't?

fgoc

Just to let you know I've sorted the issue with the child boards not going bold on new posts. There must have been a slight difference in the code on my current BoardIndex.Template file. When I copied over the section of code from my old BoardIndex.Template file, it all started working again. I can't see the difference in the code, but there must be some somewhere! Old code that works is below:

                // Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
                if (!empty($board['children']))
                {
                    // Sort the links into an array with new boards bold so it can be imploded.
                    $children = array();
                    /* Each child in each board's children has:
                            id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
                    foreach ($board['children'] as $child)
                    {
                            $child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' . $txt[330] . ': ' . $child['topics'] . ', ' . $txt[21] . ': ' . $child['posts'] . ')">' . $child['name'] . '</a>';
                            $children[] = $child['new'] ? '<b>' . $child['link'] . '</b>' : $child['link'];
                    }

                    echo '
            <tr>
                <td colspan="3" class="windowbg', !empty($settings['seperate_sticky_lock']) ? '3' : '', '">
                    <span class="smalltext"><b>', $txt['parent_boards'], '</b>: ', implode(', ', $children), '</span>
                </td>
            </tr>';
                }
            }

fgoc

back to issue 2 now:
I can get the £ sign to appear by using html bbcode [html]&pound[/html]

But still coming up with a ? when typing normally

I've installed another fresh test forum using fantastico again and this test forum doesn't have this problem. I'm therefore guessing that it's an issue with the sql db I imported from my old forum and a compatibility issue with how my new forum is set up?

MrPhil

Lainaus käyttäjältä: fgoc - maaliskuu 15, 2008, 09:47:49 AP
back to issue 2 now:
I can get the £ sign to appear by using html bbcode [html]&pound[/html]

But still coming up with a ? when typing normally

The [html] tag's use by ordinary users is prohibited, so that probably won't be useful (by the way, use the [nobbc] tag to display tags, not [code]).

Does a pound sign turn into a ? as you're typing, or only after you've saved a post, or only with old postings from the previous installation? Look at the displayed page (View > Page Source or the equivalent in your browser). What is it using for a displayed character set (<meta ... charset=...>)?

fgoc

#10
Hi,

The £ changes to a ? once the text has been posted, and it has also converted all the old posts from the previous instalation to a ? as well as messing round with other special characters - " ' etc (just on the old posts though)

source code states the charset=ISO-8859-1

MrPhil

So it sounds like SMF has been configured to run in Latin-1 (iso-8859-1), while the MySQL database is something else (UTF-8?). Your pound sign gets typed in correctly, with a single 8 bit code (xA3), and is stored into the database with that code, but... when retrieved from the database, it sounds like it's being misinterpreted (possibly as an escape code of some sort?). I'm getting in over my head here, so someone else will have to give a definitive answer.

metallica48423

The page itself is being displayed in ISO-8859-1 (latin1).

What is the collation on the database tables?  In admin > forum maintenance, do you see an option to convert to UTF8?
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

LainaaMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

Sarge

Lainaus käyttäjältä: fgoc - maaliskuu 15, 2008, 07:27:42 AP
my admin section is saying "Convert the database and data to UTF-8" so does this mean that SMF isn't in utf8 mode?


Yes, it looks like your forum is not running in UTF-8 mode. So convert to UTF-8 using the option "Convert the database and data to UTF-8" from SMF Admin > Forum Maintenance. Be sure to get a backup before doing that.

Read the UTF-8 Readme for more information.

After converting to UTF-8, switch your forum language to English-utf8. If you have mods installed, you need to make sure that text strings belonging to mods are present in the English-utf8 files -- most mods only add their strings to the English files only.

New posts should be saved and displayed correctly thereafter.

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Lainaa
<H> I had zero posts when I started posting

fgoc

After looking into the sql side of things a bit further, it transpires that the collation of the actual db files are set to latin1_swedish_ci. I have changed the main phpmyadmin page to set the MySQL connection collation to the same as db files are but still no difference.

If the page is being displayed in Latin1 and the db files are in latin1 and the forum isn't set to UTF-8, then were is this issue coming from?

Will converting to UTF-8 sort it all out still?

If any text strings beloning to mods aren't in the utf8 language files, how do I put them in there so that the mods still work?

Thanks for everyone's help with this, I know it's a pretty small thing, but I'd like to get it sorted as it's starting to wind me up now!

metallica48423

I would reccommend making the utf8 conversion as i don't believe the british pound character is supported by ISO-8859-1 (latin1)
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

LainaaMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

MrPhil

The Pound Sterling sign is xA3 in the Latin-1 encoding. I think the problem here is that there is an inconsistency in the character set somewhere (database, SMF, ...?).

fgoc

Just to make things even more confusing, someone has just sent me a PM where the £ sign appeared as £ instead of the usual ? I've been getting of late!

???

fgoc

OK I've half fixed this now.

I took the plunge and have converted the data and database to UTF-8 and I can now post £ signs. All of the other formatting issues have gone also. Thanks you all so much!!

However, if I then change the language to English-UTF8 I get a load of text appearing at the top of the forum which seems to be from the UserCP mod I have :

$txt['usercp'] = 'User CP'; $txt['usercp_account_info'] = 'My Account Information'; $txt['usercp_account_info_summary'] = 'Click here if you want to change your account related information such as username, email, password or other sensitive details.'; $txt['usercp_look_and_layout'] = 'Look & Layout Options'; $txt['usercp_look_and_layout_summary'] = 'Click here to change the way the forum looks for you, options include the  ....... etc

and a lot of the top menu items vanish along with my TinyPortal admin menu items.

With the language set to just English still though, everything is now how it should be again ???

greyknight17

Look at /Themes/default/languages/Modifications.english-utf8.php and make sure the ?> is at the very end of the file. If it's not, move it down there. Also verify that <?php is the very first line at the top ;)

Advertisement: