Redirect to CB?

Redirect to CB?

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

bbgobie
useravatar
Offline
3 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: 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.

bbgobie
useravatar
Offline
3 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: 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.

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
23659 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: 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!

bbgobie
useravatar
Offline
3 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: 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 current/smile
Julio Popócatl
www.AquienAguas.com

trijulio
useravatar
Offline
1 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.
There are 0 guests also viewing this topic
There are 0 users also viewing this topic

Board Info

Board Stats
 
Total Topics:
11407
Total Polls:
0
Total Posts:
48071
Posts today:
2
User Info
 
Total Users:
47248
Newest User:
kafeti
Members Online:
1
Guests Online:
922

Online: 
relso
Social Stream
Refer and Earn

Like our extensions? You're not alone! That's why they're used on tens of thousands of websites. Now you can earn 20% of any sale you refer to SourceCoast.com.

We provide excellent documentation, well laid out sales pages and great support. All you need to do is spread the word and we'll take care of the rest.

Learn About Our Affiliate Program