Search in support tickets

#318 – Bottom Adsmanager Menu

Posted in ‘Support’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Thursday, 05 July 2018 03:35 CEST
lcabezas
Joomla! version : 3.8.10
PHP version : 7.0.30
AdsManager version : Adsmanager 3.1.11

Our site is for members used only but we wanted Adsmanager to be open for public at-least for viewing ads only (can't post).
How can we change the links on the bottom menu of Adsmanager i.e. New Ad, My Ads and My Favorites, so that when visitors click on them it will regquire them to login rather than opening the Registration page. Similar to what "My profile" does where it tells you that you are not authorized and you need to login.

BTW, we can't turn off the Registration because this is being used by another component.

Appreciate your help.

Regards.
Custom Fields
Joomla Version
3.8.10
PHP Version
7.0.30
Product
AdsManager
Product Version
Adsmanager 3.1.11 Bronze
Tuesday, 10 July 2018 01:06 CEST
juloaadmin
Are you using Community builder ?

in lib/tools.php

you will see the redirectToLogin function

by default if you have communit builder the registration is done on registration page otherwise login page
 
Tuesday, 10 July 2018 16:49 CEST
lcabezas
Thanks for the reply.

Yes, we do use Community Builder.
I have seen the file but doesn't exactly know what to change.
Appreciate if you can advise which line to edit and what to put. Basically, we just wanted that when a visitor clicks on New Ad, My Ads and My Favorites, it will redirect to login page and not on Register.

Not a programmer.

Regards.
Monday, 16 July 2018 16:19 CEST
loic
Hello,

In the file lib/tools.php, function redirectToLogin(), replace the line
$app->redirect(JRoute::_("index.php?option=com_comprofiler&task=registers"));


by

$app->redirect( JRoute::_("index.php?option=com_users&view=login&return=$returnurl",false));


Best regards.
 

Please rate this ticket

Help us improve our support services by rating this ticket from one to five stars, according to how much you are satisfied from the handling of this ticket, one being not satisfied and five being very satisfied.