Commit 2cf5701e by Scott

Allow widgets on user walls/activity

parent 86f2300b
......@@ -689,7 +689,11 @@ function qa_content_prepare($voting = false, $categoryids = null)
foreach ($widgets as $widget) {
$tagstring = ',' . $widget['tags'] . ',';
if (strpos($tagstring, ",$qa_template,") !== false || strpos($tagstring, ',all,') !== false) {
$showOnTmpl = strpos($tagstring, ",$qa_template,") !== false || strpos($tagstring, ',all,') !== false;
// special case for user pages
$showOnUser = strpos($tagstring, ',user,') !== false && preg_match('/^user(-.+)?$/', $qa_template) === 1;
if ($showOnTmpl || $showOnUser) {
// widget has been selected for display on this template
$region = @$regioncodes[substr($widget['place'], 0, 1)];
$place = @$placecodes[substr($widget['place'], 1, 2)];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment