dario

Members
  • Content count

    4
  • Joined

  • Last visited

Everything posted by dario

  1. Hi all, I'm using BT Content Slider (very good extension) for showing articles preview to the visitors (not logged in) These articles are for registered visitors only. I corrected a first problem (404 page) modifing the content.php file from $item->link = JRoute::_('index.php?option=com_user&view=login'); to $item->link = JRoute::_('index.php?option=com_users&view=login'); Now the login page redirect to the home page and not to the selected article. I'd like the link to the article that was similar to the following: www.mysite.it/news/login?return=L25vdGl6aWUvMzItZ3JhbmRpLW...etc..= where "=L25vdGl6aWUvMzItZ3JhbmRpLW...etc..=" is the BASE64 encoded address of the article Can you help me? Thanks Dario
  2. Hi. Yes, your code was correct, and my code seems equals to yours. But with your code, when user logged in, the BT Content Slider shows the links with "return" parameter and Base64 article name. Clicking the link, the system redirects to the logout page.
  3. Thanks Mod for your help. I've tryed to insert your code but the modify didn't. I mean, login redirect worked properly, but when logged, all links of the component were Base64 and not human friendly. I have solved joining your previous code with the last one. This is the code: (if there are errors, please correct them) // item link $item->link = ''; if ($access || in_array($item->access, $authorised)) { // We know that user has the privilege to view the article //Item link if($use_linka && $item->urls){ $item->urls = json_decode($item->urls); $item->link = $item->urls->urla; } if(!$item->link){ $item->link = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catslug)); } } else if(!$access || !in_array($item->access, $authorised)) { if($use_linka && $item->urls){ $item->urls = json_decode($item->urls); $item->link = $item->urls->urla; } if(!$item->link){ $item->link = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catslug)); } $item->link = JRoute::_('index.php?option=com_users&view=login&return=' . base64_encode($item->link)); } Thansk for your help and Happy Christmas!
  4. Hi and thanks for your reply. I've tried to replace the code but it did not work. So I've added "s" character to the "user" and the component started to work. $item->link = JRoute::_('index.php?option=com_users&view=login&return='.base64_encode($item->link)); Last problem is that the base64_encode($item->link) is not added to the url string The url is like this: www.mysite.it/login?return= url Base64 is missing