I noticed in my functions_editor.php, the code is different from what I was asked to find in the instructions. My actual code is as below:
Code:
$smilies = $vbulletin->db->query_read_slave("
SELECT smilieid, smilietext, smiliepath, smilie.title,
imagecategory.title AS category
FROM " . TABLE_PREFIX . "smilie AS smilie
LEFT JOIN " . TABLE_PREFIX . "imagecategory AS imagecategory USING(imagecategoryid)
ORDER BY imagecategory.displayorder, imagecategory.title, smilie.displayorder
");
}else{
$nabn = explode(" ", $vbulletin->userinfo['smilie']);
$smilies= $vbulletin->db->query_read_slave("SELECT smilieid,smilietext,title,smiliepath FROM " . TABLE_PREFIX . "smilie AS smilie WHERE smilieid IN (" . implode(",", $nabn) . ")");
eval('$vbcode_smilies_editfav = "' . fetch_template('vbcode_smilies_editfav') . '";');
}
// get total number of smilies
$totalsmilies = $vbulletin->db->num_rows($smilies);
When I replaced it with
Code:
############### FAVORITE SMILIES #################
global $permissions;
if (($vbulletin->userinfo['favsmilies']) AND ($vbulletin->options['favsmiliesactive']) AND ($permissions['favsmiliepermissions'] & $vbulletin->bf_ugp_favsmiliepermissions['canusefavsmilies'])) {
$show['favsmilies'] = true;
$favsmilies = str_replace(" ", ", ", $vbulletin->userinfo['favsmilies']);
$smilies = $vbulletin->db->query_read_slave("
SELECT smilieid, smilietext, smiliepath, smilie.title,
imagecategory.title AS category
FROM " . TABLE_PREFIX . "smilie AS smilie
LEFT JOIN " . TABLE_PREFIX . "imagecategory AS imagecategory USING(imagecategoryid)
WHERE smilieid IN ($favsmilies)
ORDER BY imagecategory.displayorder, imagecategory.title, smilie.displayorder
");
$favsmtotal = $vbulletin->db->num_rows($smilies);
$smilietotal = $vbulletin->db->query_first("SELECT COUNT(*) as total FROM " . TABLE_PREFIX . "smilie");
$totalsmilies = $smilietotal['total'];
}
else {
$smilies = $vbulletin->db->query_read_slave("
SELECT smilieid, smilietext, smiliepath, smilie.title,
imagecategory.title AS category
FROM " . TABLE_PREFIX . "smilie AS smilie
LEFT JOIN " . TABLE_PREFIX . "imagecategory AS imagecategory USING(imagecategoryid)
ORDER BY imagecategory.displayorder, imagecategory.title, smilie.displayorder
");
$totalsmilies = $vbulletin->db->num_rows($smilies);
}
############### /FAVORITE SMILIES ################
A parse error message appeared.
May I know what to do?
Thanks