public static function assignTag($action, $task) { $doc = JFactory::getDocument(); $doc->addStyleSheet(JNEWS_URL_ADMIN . 'cssadmin/jnews.css'); $mailing = new stdClass(); if ($GLOBALS[JNEWS . 'level'] > 2) { $mailing->delay_max = JRequest::getInt('delay_max', 0, 'request'); $mailing->notify_id = JRequest::getInt('notify_id', 0, 'request'); $mailing->cat_id = JRequest::getVar('cat_id', 0, 'request'); } jNews_TagsHTML::menuTags($mailing); switch ($task) { case 'datetime': jNews_TagsHTML::datetimeTags(); break; case 'subscription': jNews_TagsHTML::subscriptionTags(); break; case 'subscriber': jNews_TagsHTML::subscriberTags(); break; case 'mod': //joomla module if ($GLOBALS[JNEWS . 'level'] > 1) { $link = jNews_Tools::completeLink('option=' . JNEWS_OPTION, false, false, true); $forms['main'] = " <form action='{$link}' method='post' name='adminForm' id=\"adminForm\"> "; jNews_TagsHTML::modTags($forms); } else { echo 'This functionality in only available for Plus and PRO version.'; } break; case 'content': //joomla content $linkTagg = jNews_Tools::completeLink('option=' . JNEWS_OPTION, true, false, true); $forms['main'] = "<form action=" . $linkTagg . " method='post' name='adminForm' id=\"adminForm\">"; jNews_TagsHTML::contentTags($forms); break; case 'smart': //smart news if ($GLOBALS[JNEWS . 'level'] > 2) { jNews_Autonews::selectCat($mailing); } else { echo 'This functionality in only available for PRO version.'; } break; case 'smartk2': //smart k2 if ($GLOBALS[JNEWS . 'level'] > 2) { jNews_Autonews::selectCatK2($mailing); } else { echo 'This functionality in only available for PRO version.'; } break; case 'site': $link = jNews_Tools::completeLink('option=' . JNEWS_OPTION, false, false, true); $forms['main'] = " <form action='{$link}' method='post' name='adminForm' id=\"adminForm\">"; jNews_TagsHTML::siteTags($forms); break; case 'lyften': //for lyften blog jNews_TagsHTML::lyftenblog(); break; case 'deals': //for lyften blog jNews_TagsHTML::deals(); break; case 'jomsocial': jNews_TagsHTML::jomsocialTags(); break; case 'share': // jomsocial jNews_TagsHTML::shareTags(); break; case 'k2content': jNews_TagsHTML::k2contentTags(); break; case 'virtuemartproduct': $linkTagg = jNews_Tools::completeLink('option=' . JNEWS_OPTION, true, false, true); $forms['main'] = "<form action=" . $linkTagg . " method='post' name='adminForm' id=\"adminForm\">"; jNews_TagsHTML::virtuemartproduct($forms); break; default: $link = jNews_Tools::completeLink('option=' . JNEWS_OPTION, false, false, true); $forms['main'] = " <form action='{$link}' method='post' name='adminForm' id=\"adminForm\">"; jNews_TagsHTML::subscriptionTags($forms); } return true; }