News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Updated

Started by momscomfycouch, February 25, 2012, 01:41:02 PM

Previous topic - Next topic

momscomfycouch

I just updated to SMF 2.0, everything went fairly well however, if I enable the custom smiley's option so that members can use the large file of smileys as they have in the past, ALL of the posts go blank - I've searched and searched the site and tried to figure this out myself, but I can't come up with anything.  I'm new at this, and would appreciate any help or guidance anyone can give me.

thanks,
Chris

hcfwesker

Did you re-install the custom smileys after upgrading?  some files get overwritten when upgrading.  they may still appear to look normal, but wont function properly if not reinstalled.

momscomfycouch

Hi, yes, the smileys were all installed and appear in the default folder - the smileys show up, but the words do not - signatures still show if they are graphic based, but any text when that function is selected is blank

Kermit

Any error messages in the error logs ?
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

NanoSector

Hi,

Did you actually reinstall them after upgrading?
Because if not they may cause problems.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

momscomfycouch

This is what is showing in the error log

1395:    

   

if (empty($modSettings['smileys_dir']) || !is_dir($modSettings['smileys_dir'] . '/' . $smileyPath))
1396:    

   

   

fatal_lang_error('smiley_set_unable_to_import');
1397:    
1398:    

   

$smileys = array();
1399:    

   

$dir = dir($modSettings['smileys_dir'] . '/' . $smileyPath);
1400:    

   

while ($entry = $dir->read())
1401:    

   

{
1402:    

   

   

if (in_array(strrchr($entry, '.'), array('.jpg', '.gif', '.jpeg', '.png')))
1403:    

   

   

   

$smileys[strtolower($entry)] = $entry;
1404:    

   

}
1405:    

   

$dir->close();
1406:    
1407:    

   

// Exclude the smileys that are already in the database.
1408:    

   

$request = $smcFunc['db_query']('', '
1409:    

   

   

SELECT filename
1410:    

   

   

FROM {db_prefix}smileys
1411:    

   

   

WHERE filename IN ({array_string:smiley_list})',
1412:    

   

   

array(
1413:    

   

   

   

'smiley_list' => $smileys,
1414:    

   

   

)
==>1415:    

   

);
1416:    

   

while ($row = $smcFunc['db_fetch_assoc']($request))
1417:    

   

   

if (isset($smileys[strtolower($row['filename'])]))
1418:    

   

   

   

unset($smileys[strtolower($row['filename'])]);
1419:    

   

$smcFunc['db_free_result']($request);
1420:    
1421:    

   

$request = $smcFunc['db_query']('', '
1422:    

   

   

SELECT MAX(smiley_order)
1423:    

   

   

FROM {db_prefix}smileys
1424:    

   

   

WHERE hidden = {int:postform}
1425:    

   

   

   

AND smiley_row = {int:first_row}',
1426:    

   

   

array(
1427:    

   

   

   

'postform' => 0,
1428:    

   

   

   

'first_row' => 0,
1429:    

   

   

)
1430:    

   

);
1431:    

   

list ($smiley_order) = $smcFunc['db_fetch_row']($request);
1432:    

   

$smcFunc['db_free_result']($request);
1433:    
1434:    

   

$new_smileys = array();
1435:    

   

foreach ($smileys as $smiley)

momscomfycouch

this is the other error that I got

2493:    

   

   

// The non-breaking-space is a complex thing...
2494:    

   

   

$non_breaking_space = $context['utf8'] ? ($context['server']['complex_preg_chars'] ? '\x{A0}' : "\xC2\xA0") : '\xA0';
2495:    
2496:    

   

   

// This smiley regex makes sure it doesn't parse smileys within code tags (so doesn't parse the :D smiley)
2497:    

   

   

$smileyPregReplacements = array();
2498:    

   

   

$searchParts = array();
2499:    

   

   

for ($i = 0, $n = count($smileysfrom); $i < $n; $i++)
2500:    

   

   

{
2501:    

   

   

   

$smileyCode = '<img src="' . htmlspecialchars($modSettings['smileys_url'] . '/' . $user_info['smiley_set'] . '/' . $smileysto[$i]) . '" alt="' . strtr(htmlspecialchars($smileysfrom[$i], ENT_QUOTES), array(':' => '&#58;', '(' => '&#40;', ')' => '&#41;', '$' => '&#36;', '[' => '&#091;')). '" title="' . strtr(htmlspecialchars($smileysdescs[$i]), array(':' => '&#58;', '(' => '&#40;', ')' => '&#41;', '$' => '&#36;', '[' => '&#091;')) . '" class="smiley" />';
2502:    
2503:    

   

   

   

$smileyPregReplacements[$smileysfrom[$i]] = $smileyCode;
2504:    

   

   

   

$smileyPregReplacements[htmlspecialchars($smileysfrom[$i], ENT_QUOTES)] = $smileyCode;
2505:    

   

   

   

$searchParts[] = preg_quote($smileysfrom[$i], '~');
2506:    

   

   

   

$searchParts[] = preg_quote(htmlspecialchars($smileysfrom[$i], ENT_QUOTES), '~');
2507:    

   

   

}
2508:    
2509:    

   

   

$smileyPregSearch = '~(?<=[>:\?\.\s' . $non_breaking_space . '[\]()*\\\;]|^)(' . implode('|', $searchParts) . ')(?=[^[:alpha:]0-9]|$)~e' . ($context['utf8'] ? 'u' : '');
2510:    

   

}
2511:    
2512:    

   

// Replace away!
==>2513:    

   

$message = preg_replace($smileyPregSearch, 'isset($smileyPregReplacements[\'$1\']) ? $smileyPregReplacements[\'$1\'] : \'\'', $message);
2514:    }
2515:    
2516:    // Highlight any code...
2517:    function highlight_php_code($code)
2518:    {
2519:    

   

global $context;
2520:    
2521:    

   

// Remove special characters.
2522:    

   

$code = un_htmlspecialchars(strtr($code, array('<br />' => "\n", "\t" => '

   

', '&#91;' => '[')));
2523:    
2524:    

   

$oldlevel = error_reporting(0);
2525:    
2526:    

   

// It's easier in 4.2.x+.
2527:    

   

if (@version_compare(PHP_VERSION, '4.2.0') == -1)
2528:    

   

{
2529:    

   

   

ob_start();
2530:    

   

   

@highlight_string($code);
2531:    

   

   

$buffer = str_replace(array("\n", "\r"), '', ob_get_contents());
2532:    

   

   

ob_end_clean();
2533:    

   

}
[nofollow]

hcfwesker

Which looks like you didn't RE-install the smiley set after you upgraded.  Cause all the paths are broken that were there, until you upgraded.  Or perhaps the smiley set you had was smf1, or whatever older version you were on, and not compatible with current version.

momscomfycouch

ok - so I've clearly done something wrong - how do I fix it?

hcfwesker

Try and re=add the custom smileys MOd to your site through the package manager

momscomfycouch

Didn't work... I guess it's not a big deal we'll just live with it - I don't know how to fix it at this point

hcfwesker

Can you link to the Smiley Set you're trying to use?

momscomfycouch

the smiley's are there - when you go in to edit them they are there - but if you set the forum to enable custom smiley's it wipes out all of the text in posted messages -

NanoSector

Quote from: momscomfycouch on February 25, 2012, 04:58:06 PM
the smiley's are there - when you go in to edit them they are there - but if you set the forum to enable custom smiley's it wipes out all of the text in posted messages -
What smiley set are you using?
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

hcfwesker

Quote from: momscomfycouch on February 25, 2012, 04:58:06 PM
the smiley's are there - when you go in to edit them they are there - but if you set the forum to enable custom smiley's it wipes out all of the text in posted messages -

Going back to my first reply here.

Quote from: hcfwesker on February 25, 2012, 02:07:04 PM
Did you re-install the custom smileys after upgrading?  some files get overwritten when upgrading.  they may still appear to look normal, but wont function properly if not reinstalled.

"but if you set the forum to enable custom smiley's"  <---- these were your words, meaning your using a custom smiley set.  Link us to the set you're using as your custom smiley set.


momscomfycouch

They are all in the Smiley default folder as they were in the prior version - I didn't add anything, but in the 1.x.x version, they showed up in the pop up and on the post form -  I'm just in over my head and we'll have to stick with what works, because I don't know how else to explain what is going on nor do I understand how to fix it I guess.  thank you for trying

hcfwesker

So far you have seemed to dodge all our questions.  which is why we cant help you, effeciently.   If it's a smiley set that is clicked to a pop-up window, then it's a custom smiley set.  and you have yet to post a link to the set you're using that you installed on smf 1.1.x

You have to understand, when upgrading, all your default smf files get overwritten, like the smileys files.  the images will appear, yes, and it weill look normal, but the edits in files are not there because of the upgrade.

Please, post a link to the set you are using.  also, be sure to check the paths to Smiley images in the Smiley admin panel.

momscomfycouch

I'm not dodging your question, I didn't have "sets" installed, all of the smiley's are in my default folder, which is where they are now, and previously I could just select the ones that I wanted to show on the post form/pop up, and kept the others hidden  - I've gone through and made sure that all of them are in the folder, but unless I have the custom smiley's button toggled on, they don't show up anywhere, but once I toggle that switch, all of the text in the messages disappears.  this is the link to my smiley's http://mumscomfycouch.com/.smileys/default [nofollow]

Aleksi "Lex" Kilpinen

If you still need help with this, please copy / paste the exact errors your forum error log shows.
Also, can you turn on the custom smileys and link us to any topic that would actually show this problem?
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

momscomfycouch

Thanks - I've given up, I spent several days trying to figure this out and just can't so we'll just have to live with the basic smiley's that are installed -

Advertisement: