Hi there.
I updated my forum from 2.0.17 to 2.0.18, but there's a file I'm not being able to edit correctly in order to make it work in 2.0.18.
The file is ManageSmileys.php and the changes the update asks are:
'function' => create_function('$rowData', '
global $txt;
if (empty($rowData[\'hidden\']))
return $txt[\'smileys_location_form\'];
elseif ($rowData[\'hidden\'] == 1)
return $txt[\'smileys_location_hidden\'];
else
return $txt[\'smileys_location_popup\'];
'),
'class' => 'windowbg',
),
'function' => function($rowData) use ($txt)
{
if (empty($rowData['hidden']))
return $txt['smileys_location_form'];
elseif ($rowData['hidden'] == 1)
return $txt['smileys_location_hidden'];
else
return $txt['smileys_location_popup'];
},
'class' => 'windowbg',
),
The problem is I have a different line due to a mod and I can't get it work. If I edit it, I get a blank page when visiting the Smileys panel in admin section.
What I have is this:
'function' => create_function('$rowData', '
global $txt, $modSettings;
if (empty($rowData[\'hidden\']))
return $txt[\'smileys_location_form\'];
elseif ($rowData[\'hidden\'] == 1)
return $txt[\'smileys_location_hidden\'];
else
return $txt[\'smileys_location_popup\'] . \' (\' . $txt[\'tabbed_smileys_tab\']. \': \' . (!empty($modSettings[\'tabbed_smileys\'][\'popup\'][$rowData[\'smiley_row\']+1]) ? $modSettings[\'tabbed_smileys\'][\'popup\'][$rowData[\'smiley_row\']+1] : ($txt[\'additional_smileys\'] . \' \' . $rowData[\'smiley_row\']+1)) . \')\';
'),
'class' => 'windowbg',
),
Any help on how to change the line that starts with return $txt[\'smileys_location_popup\'] ?
I'm pretty sure is something simple, but I don't know what it is.
Thanks.
tabbed smiley mod
https://www.simplemachines.org/community/index.php?topic=417533.msg4080830#msg4080830
try using this....
'function' => function($rowData) use ($txt)
{
if (empty($rowData['hidden']))
return $txt['smileys_location_form'];
elseif ($rowData['hidden'] == 1)
return $txt['smileys_location_hidden'];
else
return $txt['smileys_location_popup'] . ' (' . $txt['tabbed_smileys_tab']. ': ' . (!empty($modSettings['tabbed_smileys']['popup'][$rowData['smiley_row']+1]) ? $modSettings['tabbed_smileys']['popup'][$rowData['smiley_row']+1] : ($txt['additional_smileys'] . ' ' . $rowData['smiley_row']+1)) . ')';
},
'class' => 'windowbg',
),
It worked flawlessly and without errors. :)
Thank you,
Kindred!
Quote from: Kindred on March 27, 2021, 10:18:38 AM
try using this....
'function' => function($rowData) use ($txt)
{
if (empty($rowData['hidden']))
return $txt['smileys_location_form'];
elseif ($rowData['hidden'] == 1)
return $txt['smileys_location_hidden'];
else
return $txt['smileys_location_popup'] . ' (' . $txt['tabbed_smileys_tab']. ': ' . (!empty($modSettings['tabbed_smileys']['popup'][$rowData['smiley_row']+1]) ? $modSettings['tabbed_smileys']['popup'][$rowData['smiley_row']+1] : ($txt['additional_smileys'] . ' ' . $rowData['smiley_row']+1)) . ')';
},
'class' => 'windowbg',
),
you forgot the modsettings kindred ;)
if you follow the link I posted, I posted the fix there and also noted while it is "fixed" there are still some errors in the logs so it still needs something fixed but I don't know what/where
but it at least works