public static function onCCK_Storage_LocationAfterDispatch(&$data, $uri = array()) { $return = '&return_o=' . substr($uri['option'], 4); if (!$uri['layout']) { $do = $data['options']->get('add', 1); $data['options']->set('add_alt_link', 'index.php?option=com_content&view=article&layout=edit&cck=1'); if ($do == 1) { JCckDevIntegration::addModalBox($data['options']->get('add_layout', 'icon'), $return, $data['options']); } elseif ($do == 2) { JCckDevIntegration::addDropdown('form', $return, $data['options']); } JCckDevIntegration::addWarning('copy'); } elseif ($uri['layout'] == 'edit' && !$uri['id']) { if ($data['options']->get('add_redirect', 1)) { JCckDevIntegration::redirect($data['options']->get('default_type'), $return); } } elseif ($uri['layout'] == 'edit' && $uri['id']) { // $isCck = JCckDatabase::loadResult( 'SELECT cck FROM #__cck_core WHERE storage_location="'.self::$type.'" AND pk='.(int)$uri['id'] ); // if ( $data['options']->get( 'edit_redirect', 0 ) || $isCck ) { // redirect // } } }
public static function onCCK_Storage_LocationAfterDispatch(&$data, $uri = array()) { $return = '&return_o=' . substr($uri['option'], 4) . '&return_v=' . $uri['view']; if (!$uri['layout']) { if ($uri['view'] != 'users') { return; } $do = $data['options']->get('add', 1); $data['options']->set('add_alt_link', 'index.php?option=com_users&view=user&layout=edit&cck=1'); if ($do == 1) { JCckDevIntegration::addModalBox($data['options']->get('add_layout', 'icon'), $return, $data['options']); } elseif ($do == 2) { JCckDevIntegration::addDropdown('form', $return, $data['options']); } } elseif ($uri['layout'] == 'edit' && !$uri['id']) { if ($uri['view'] != 'user') { return; } if ($data['options']->get('add_redirect', 1)) { JCckDevIntegration::redirect($data['options']->get('default_type'), $return . 's'); } } }
public static function onCCK_Storage_LocationAfterDispatch(&$data, $uri = array()) { $app = JFactory::getApplication(); $ext = $app->input->get('extension', ''); $exclude = $data['options']->get('exclude', ''); $extensions = explode(',', str_replace(' ', '', $exclude)); $return = '&extension=' . $ext . '&return_o=' . substr($uri['option'], 4); if (!in_array($ext, $extensions)) { if (!$uri['layout']) { $do = $data['options']->get('add', 1); $data['options']->set('add_alt_link', 'index.php?option=com_categories&view=category&layout=edit&extension=' . $ext . '&cck=1'); if ($do == 1) { JCckDevIntegration::addModalBox($data['options']->get('add_layout', 'icon'), $return, $data['options']); } elseif ($do == 2) { JCckDevIntegration::addDropdown('form', $return, $data['options']); } JCckDevIntegration::addWarning('copy'); } elseif ($uri['layout'] == 'edit' && !$uri['id']) { if ($data['options']->get('add_redirect', 1)) { JCckDevIntegration::redirect($data['options']->get('default_type'), $return); } } } }