ToolTab to URL

Developer Networks
Developer Networks
@developer-networks
11 years ago
566 posts
Trying to finish up a module and could use some help with this one.

I need to take the user to a set url in the tools tab. Im trying to figure out the right way to do this.

i have tried
[code] jrCore_register_module_feature('jrCore', 'tool_view', 'myPhpbb', 'ACPLogin', 31); // 31 = 'ACPLogin' (ACP Login)[code]

and i get to myphpbb/ACPLogin however i need to go to an actual hard coded location like /forums/?=acplogin.php


Thanks

would i put a part in the language file with a link to the url like '31' would be '{$jamroom_url}/forums/?3940jfACPLogin.php'

updated by @developer-networks: 01/19/14 04:53:10PM
brian
@brian
11 years ago
10,148 posts
You need to use the full URL for the location - i.e.

jrCore_register_module_feature('jrCore', 'tool_view', 'myPhpbb', "{$_conf['jrCore_base_url']}/forums/?=acplogin.php", 31);

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Developer Networks
Developer Networks
@developer-networks
11 years ago
566 posts
Thank you but that takes me to another hurdle with the routing system.

It is adding /phpbb/ to the url... I am trying to get outside the module and get on to the phpbbforums from the link inside of my module.

I have decided to put it inside the tools tab for the module for the administrator to use only.


What i am trying to do here is create a button to allow the jamroom administrator to login to the phpbb forums ACP. So i figured inside the module under the tools tab this would be the best place to add that.

Am i doing this wrong? Will the JR routing system not let me go to a url outside of my module?

Thanks
updated by @developer-networks: 12/19/13 09:58:03AM
brian
@brian
11 years ago
10,148 posts
Yeah - it will route you anywhere you want to go - you can put in the full URL you want to use. If it is a sub directory of your Jamroom (recommended), then the method I outlined will work.

If you need the user to be able to define the URL, you could always make it an option in config.php and just reference that in your init.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Developer Networks
Developer Networks
@developer-networks
11 years ago
566 posts
 jrCore_register_module_feature('jrCore', 'tool_view', 'myPhpbb', "{$_conf['jrCore_base_url']}/forum/ucp.php?mode=login&admin=1", 123);


This Is the code im running here just as you suggested. However. When clicking on the tab in the myPhpbb module it takes me to this url every time.

http://music-wall.com/myphpbb//forum/ucp.php?mode=login&admin=1

I am trying to get to this URL:

http://music-wall.com/forum/ucp.php?mode=login&admin=1

I have tried this in multiple ways in to keep it from adding myPhpbb to the url but having trouble.




updated by @developer-networks: 12/19/13 10:32:24AM
brian
@brian
11 years ago
10,148 posts
What is your base URL for the Jamroom install?


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Developer Networks
Developer Networks
@developer-networks
11 years ago
566 posts
music-wall.com jamroom is installed to the root of this directory

the phpbb forums was installed to music-wall.com/forum/

nested inside of Jamroom


updated by @developer-networks: 12/19/13 10:35:06AM
brian
@brian
11 years ago
10,148 posts
Double check you have not added a trailing slash to the URL config in data/config/config.php.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Developer Networks
Developer Networks
@developer-networks
11 years ago
566 posts
no that looks good. could the jrForum be holding up the routing system calling /forum ? im not sure but could this be confusing the routing system?


maby this is the problem when i try calling this /forum directory from inside myPhpbb module.


And the jrForum is currently disabled.

updated by @developer-networks: 12/19/13 10:48:02AM
brian
@brian
11 years ago
10,148 posts
Yeah - it could be, especially if you are doing this as a master admin. Go into the jrForum module -> Info and change the module URL to something like "jrforum" - even though it is disabled, the URL is still registered so you can access the info tab as a master admin.

Let me know if that works.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Developer Networks
Developer Networks
@developer-networks
11 years ago
566 posts
solution was
jrCore_register_module_feature('jrCore', 'tool_view', 'myPhpbb', "../forum/ucp.php?mode=login&admin=1", 1);
brian
@brian
11 years ago
10,148 posts
If the "forum" directory is in JR directory, my first one should have worked - we do the same thing in the developer module for adminer.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Developer Networks
Developer Networks
@developer-networks
11 years ago
566 posts
I really appreciate your help here. You have helped me out a lot and got me able to figure it out off what you showed me.

Thank you.

Tags