Jump to content

Admin view only?!?


Recommended Posts

Admin specific huh? Hmm...I know this works really well, and I love using these tags in the .tpl files, but this is only relevent to registered users... not admins.

 

{if $loggedin}
only logged in users see this
{else}
if you are logged out you see this
{/if}

 

Maybe if you added {debug} to top of your .tpl file, you can inspect the popup and see if they have "admin specific" stuff that you could extend upon. This would be my hopefuly guess:

 

{if $loggedin.admin}
only admin stuff
{/if}

 

http://docs.whmcs.com/Administrators_and_Permissions

https://developers.whmcs.com/hooks-reference/output/

https://developers.whmcs.com/hooks-reference/admin-area/

Link to comment
Share on other sites

Admin specific huh? Hmm...I know this works really well, and I love using these tags in the .tpl files, but this is only relevent to registered users... not admins.

 

{if $loggedin}
only logged in users see this
{else}
if you are logged out you see this
{/if}

 

Maybe if you added {debug} to top of your .tpl file, you can inspect the popup and see if they have "admin specific" stuff that you could extend upon. This would be my hopefuly guess:

 

{if $loggedin.admin}
only admin stuff
{/if}

 

http://docs.whmcs.com/Administrators_and_Permissions

https://developers.whmcs.com/hooks-reference/output/

https://developers.whmcs.com/hooks-reference/admin-area/

 

Your not far off, the smarty variable is actually

 

$adminLoggedIn

 

I dont want to use IF Statements as someone could still access the .tpl file to get the information.

 

I am looking to create a page for my administrators where they can find other site login information which as you can image is sensitive info and I don't want just anyone being able to view this info.

 

I am thinking of creating a table in the db, and having the page pull the data from the database.

Link to comment
Share on other sites

perhaps you should be looking to use an Addon Module instead - that will likely be more secure and part of the admin area...

 

https://developers.whmcs.com/addon-modules/

 

Addon modules allow you to create both admin pages and hooks to extend WHMCS further.

Addon Modules can consist of just an admin page, just hooks, or both. They are all managed through the Setup > Addon Modules interface.

Link to comment
Share on other sites

perhaps you should be looking to use an Addon Module instead - that will likely be more secure and part of the admin area...

 

https://developers.whmcs.com/addon-modules/

 

hehe I was trying to create this within my realm of knowledge. I dont know a whole lot about creating addon modules and I know this would be more of a custom thing and getting help will be tricky (dont really want to hire someone). I will see what I can come up with.. Please bare with me if I have a lot of questions..

Link to comment
Share on other sites

I am looking to create a page for my administrators where they can find other site login information which as you can image is sensitive info and I don't want just anyone being able to view this info.

I am thinking of creating a table in the db, and having the page pull the data from the database.

that's not necessarily a bad idea and I can see the logic behind it...

 

how much information are you talking about showing? e.g is it short/brief enough that it can be output as an admin widget on the admin homepage?? that way you don't need additional pages/modules and you'll know they'd need to be logged in as an admin (with correct permissions) to view the output... they'd also be no template to protect as the widget would be generated by the hook.

 

hehe I was trying to create this within my realm of knowledge. I dont know a whole lot about creating addon modules and I know this would be more of a custom thing and getting help will be tricky (dont really want to hire someone).

feeling a little frugal, Jason?! :)

Link to comment
Share on other sites

I am going to attempt the module approach. See what I can come up with. I would prefer it to be a separate page then a widget. the homepage now is already cramped with garbage I don't need to add more to it.

 

All I am looking at outputting to the page is

 

Website:

Username:

email:

password:

 

All the information would be stored in a table in the database.

I don't want a admin section where the information is added, this will be done manually by editing the database, as once I have it setup I will just have to edit the passwords every month.

 

But then I also got thinking.. a feature that would be nice is the ability to set who can view which login based on permissions. but i feel that is way to complicated for me and could be a future update to this potential module.

 

I came across this sample module also, I am going to take a look at it and see what I can do with it.

https://github.com/WHMCS/sample-addon-module

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated