Jump to content

Add Link To Header In Panel


BigGainz

Recommended Posts

1 minute ago, BigGainz said:

If I wanted to modify this section circled in the screenshot to add a 4th link there, where would I find that html file in the install?  Ive been digging but cant seem to find it.

if it were Blend, it would be in /admin/templates/blend/header.tpl - so check if your admin template has a header.tpl template and take a look in there....

Link to comment
Share on other sites

7 minutes ago, brian! said:

if it were Blend, it would be in /admin/templates/blend/header.tpl - so check if your admin template has a header.tpl template and take a look in there....

Awesome!  You were right on!  Hopefully last question to do with this.  From the picture above it looks like 

                $sidebarstats.orders.pending - would be the number associated with the items in the list
                $_ADMINLANG.stats.pendingorders - would be the name of the list

Since im adding a totally new wrinkle to this (Pending Services) how would I go about finding what the correct variable would be for the number and name, or where would I go to declare them myself?

Link to comment
Share on other sites

8 minutes ago, BigGainz said:

Since im adding a totally new wrinkle to this (Pending Services) how would I go about finding what the correct variable would be for the number and name, or where would I go to declare them myself?

the value should be {$sidebarstats.services.pending} and the language string { $_ADMINLANG.stats.pendingservices}

Link to comment
Share on other sites

Just now, brian! said:

the value should be {$sidebarstats.services.pending} and the language string { $_ADMINLANG.stats.pendingservices}

            <a href="clientshostinglist.php?status=Pending">
                <span class="stat">{$sidebarstats.services.pending}</span>
                {$_ADMINLANG.stats.pendingservices}

 

That did the trick!  Thank you!

Link to comment
Share on other sites

  • 2 months later...
On 10/16/2019 at 11:14 AM, brian! said:

the value should be {$sidebarstats.services.pending} and the language string { $_ADMINLANG.stats.pendingservices}

How were you able to figure this out?  Im now trying to add one for todolist and i was able to link it easily but havent figured out how to pull the name and count yet.

Link to comment
Share on other sites

14 hours ago, BigGainz said:

How were you able to figure this out?

too many years of knowing which variables/array are available on an admin area page... 😉

15 hours ago, BigGainz said:

Im now trying to add one for todolist and i was able to link it easily but haven't figured out how to pull the name and count yet.

out of the box, the stats array wouldn't contain those values about todo items...

you would need a simple hook to query the table to get the value - i've PM'd you a basic hook to do that, and it will give you a {$todostats} variable which  you can use in the admin area template to show how many to do items there are that are not completed... as written, it gets the total for everyone, to get a total for the current logged in admin, you can just uncomment the line in the hook that i've commented out.

and then with regards to the language files, it's just a case of working your way through english.php (or your own language) to see if an appropriate string already exists for your need - if not, either use a Language Overrides or just hardcode it in the template.

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