Topic-icon Redirect to CB?

Active Subscriptions:

None
13 years 3 months ago #6720 by bbgobie
Redirect to CB? was created by bbgobie
Hi, trying to get this plugin to redirect to the CB profile page instead of the standard one. Just can't seem to figure out the right task/layout/view to use.

The normal part of the url for this is
index.php?option=com_comprofiler&task=userDetails
Any help would be greatly appreciated.

Thanks
The topic has been locked.
Active Subscriptions:

None
13 years 3 months ago #6727 by bbgobie
Replied by bbgobie on topic Redirect to CB?
Oops... Guess I was tired last night. Used view= instead of task in my redirect so it wasn't working.

If anyone else is having issues, I'm using:
//for redirect variables
$editTask="userDetails";
$editProfileOption = "com_comprofiler";
$editProfileSaveTask = "saveUserEdit";

//had to change else if to this
else if(!($option == $editProfileOption && $view == $editProfileView && $layout == $editProfileLayout && $task==$editTask))

//for the redirect line
$app->redirect("index.php?option=com_comprofiler&task=$editTask",JText::_("Update Your Password")

thanks for the module. We'll probably be adding the ability to accept logout clicks, as well. Since if for whatever weird reason they don't want to change their password (in our case they will have to update some required fields) they can logout so other users of the computer can't see their info.
The topic has been locked.
Support Specialist
13 years 3 months ago #6733 by alzander
Replied by alzander on topic Redirect to CB?
Thanks for posting your change, we appreciate your contribution!

The logout option is a good idea, I guess I didn't realize that logout was prevented. Good luck, and glad you're enjoying the plugin.
The topic has been locked.
Active Subscriptions:

None
13 years 3 months ago #6735 by bbgobie
Replied by bbgobie on topic Redirect to CB?
Looking at how the logout normally works, I don't think you could get it working from just within this plugin.

Anyways, here is how I ended up doing it. The idea is if your task is to logout, you still want to keep your last visit date to the 0000.... time but you wouldn't want to force a redirect to your change password page.

In the forcepasswordchange plugin, I added an extra if, around the lines that start with $lang =& JFactory::getLanguage(); and end with whatever redirect you were using.

if ($task!=$logoutTask){
}

Finally, you need to modify the core joomla user plugin.
in /plugins/user/joomla.php around line 85
Change it to use this if

if ($my->lastvisitDate!="0000-00-00 00:00:00"){
$my->setLastVisit();
}

Thanks for your great plugin!
The topic has been locked.
Active Subscriptions:

None
13 years 2 months ago #6969 by trijulio
Replied by trijulio on topic Redirect to CB?
Hi, and thanks for the info.

the exact code didnt work for me, i made a few changes to get it to work, im not programer, but it work, lol

//haved to change the else if
else if(!($option == $editProfileOption && $task == $editTask))

//and a few thing in the redirect
$app->redirect(
"index.php?option=".$editProfileOption."&task=".$editTask."&Itemid=123",
$this->params->get("message", "You must update your password before continuing to use the site.")

i think, it becouse im using ajoomla version 1.5.22
i hope this work
have a nice day :)
Julio PopĆ³catl
www.AquienAguas.com
The topic has been locked.