Jump to content

Change URLs generated for clientareahome widgets


CodeCo

Recommended Posts

Heya everyone,

I'm currently working on cleaning up the URL structure to be a lot more SEO friendly (clientarea.php?action=services to /client/services). One issue I've come across is that I can't seem to find how I would go about changing the URL structure of generated URLs for things such as the recent tickets list within the client area home. 

For example, I need to change the links for the highlighted part in the following image from /viewticket.php?tid=441355&c=fOjtLlGW to /ticket/441355/fOjtLlGW.

 TDCeExux.png

If someone could point me in the direction on how I could change URLs that WHMCS uses for the internally generated stuff, I'd greatly appreciate it.

Link to comment
Share on other sites

On 24/10/2018 at 15:21, CodeCo said:

If someone could point me in the direction on how I could change URLs that WHMCS uses for the internally generated stuff, I'd greatly appreciate it.

with no access to the source code for these homepage panels, you effectively have two internal options - both using action hooks...

  1. take the existing array, manipulate the URLs and return the array back to the template.
  2. recreate the panel from scratch - querying the database for the correct info and outputting it as you want it.

the choice really depends on what is easier for you - if you can manipulate the strings /viewticket.php?tid=441355&c=fOjtLlGW to /ticket/441355/fOjtLlGW via PHP, then loop through the array and just edit the existing panel URLs... if you can't, then create it from scratch by querying the tbltickets database table and creating the other variables... plenty examples of doing that in the community.

an example of looping through an existing panel array - in this case, Recent News...

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