Hi guys! just one question, I've been testing with that new version and I wonder if regular users could see he button placed on the topic page "Add to frontpage". I can see it while logged as admin, but not as regular user. Is something to change in the permissions or it has to be tone codding? Thanks in advance.
Only those with "tp_settings" permission are allowed to.
Are you thinking to let normal users promote topics..?
yes! thats what I want. Well, in fact, no admin groups (mods, users) that only can promote, but no admin settings. thanks for the quick reply :)
Hi Bloc, I guess there's something to do with that code.
I found it in TPmodules.php, on /Sources.
}
// promoting topics
elseif($tpsub=='publish')
{
if(!isset($_GET['t']))
redirectexit('action=forum');
$t = is_numeric($_GET['t']) ? $_GET['t'] : 0;
if(empty($t))
redirectexit('action=forum');
isAllowedTo('tp_settings');
$existing = explode(",",$context['TPortal']['frontpage_topics']);
if(in_array($t,$existing))
unset($existing[array_search($t, $existing)]);
else
$existing[] = $t;
$newstring = implode(",",$existing);
if(substr($newstring,0,1)==',')
$newstring = substr($newstring,1);
tp_query("UPDATE " . $tp_prefix . "settings SET value = '" . $newstring . "' WHERE name='frontpage_topics'", __FILE__, __LINE__);
redirectexit('topic='. $t . '.0');
}
Yes..but you will need an interface to select who can promote. I'll see if that can be added as a feature.
oks! :-\ thanks, anyway! :)