Jump to content

purathal

Member
  • Posts

    5
  • Joined

  • Last visited

About purathal

purathal's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. My WHMCS version is 7.7.1. I changed the Friendly URLs and it doesn't make any difference with https://whmcs.domain.com/announcements.php URL as that particular link always shows the text "There are no announcements to display." Though it may not be the best course of action, I am OK with setting up a URL redirect for to fix the above issue either through .htaccess and/or through a hook. Please let me know how you recommend that I go about it and how to do it, where the above link should redirect users to https://whmcs.domain.com/index.php/announcements For the last part, yes I was referring to the WHMCS client area. Please let me know the hook to delete the "announcements" from the current location (listed under "Support" drop-down ) and add it as a new link on the top navbar.
  2. The main site is WordPress based and we paid WHMCS Integration service (the actual WHMCS people) to do the WHMCS client area integration/customization. Under "General Settings -> Template" it is currently selected to use a custom theme name. I don't know if the custom template was based on "Six" template or not. Anyways, as a test switching to "Six" template within the admin panel now, also produces the same behavior as described before with announcements under the Client Area. I am referring to "Announcements" buttons anywhere within the Client Area. As an example, attached screenshot might also help (screenshot pulled from the actual sample site/url link you provided but the idea is the same under our site too). Not sure what to look for or edit under the custom template file to fix this issue. Alternatively, please let me know how to setup the hook to redirect the links. Something new - How can I get the "Announcement" button to show up on the top bar? Like the second attached screenshot. Currently mine is hidden under Top Bar -> Support -> Announcement. Thank you.
  3. Hi, I removed all the hooks. I will revisit the hooks part after we sort out the below issue. I did the following: WHMCS Admin Panel -> Support -> Announcements -> Add New Announcement -> I create a test announcement and set it to published -> Save Changes. I then log onto the WHMCS Client Area (using a test client account) - > The above Announcement I posted now shows up under the "Recent News" box located within the home page panel. Under the Client Area if I visit the URL https://whmcs.domain.com/index.php/announcements I can view the announcements I posted. However, if I visit the URL https://whmcs.domain.com/announcements.php it simply shows me the text "There are no announcements to display.". So, my question is why the above behavior? Because, if I enable the "Announcements" buttons (it doesn't matter whether for "logged on users" or "not logged on users") that button's hyperlink is always https://whmcs.domain.com/announcements.php. So, do I have to setup a a URL rewrite where visiting/clicking the above URL will automatically will redirect to https://whmcs.domain.com/index.php/announcements page so users can actually see the posted announcements? Currently the under Admin Panel -> General Settings -> Friendly URLs -> currently set to use "Friendly index.php" I understand the above setting would cause the behavior https://whmcs.domain.com/index.php/announcements format but I am just little puzzled to understand why https://whmcs.domain.com/announcements.php shows no announcements and all the "Announcements" button by default link to https://whmcs.domain.com/announcements.php . So, without a redirect to https://whmcs.domain.com/index.php/announcements it seem to be useless.
  4. Thank you! The redirection works. However, I still have a couple of issues that you might be able to help me with... 1) I still don't see the "Announcement" link/button show up on the top navigation bar for logged on users. It is hidden from the non-logged on users as expected. There are couple other hooks in place so I am not sure if they are all conflicting with each other. Below are three different hooks I got so far... Pleaes let me know what I need to do to make the "Announcement" button show up on the top nav bar. Maybe something to do with the header template file? <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) { if (!is_null($primaryNavbar->getChild('Support'))) { $primaryNavbar->getChild('Support')->removeChild('Announcements'); $primaryNavbar->getChild('Support')->removeChild('Network Status'); $primaryNavbar->getChild('Support')->removeChild('Knowledgebase'); $primaryNavbar->getChild('Support')->removeChild('Downloads'); } }); ?> <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) { if (!is_null($primaryNavbar->getChild('Network Status'))) { $primaryNavbar->removeChild('Network Status'); } if (!is_null($primaryNavbar->getChild('Announcements'))) { $primaryNavbar->removeChild('Announcements'); } if (!is_null($primaryNavbar->getChild('Knowledgebase'))) { $primaryNavbar->removeChild('Knowledgebase'); } if (!is_null($primaryNavbar->getChild('Contact Us'))) { $primaryNavbar->removeChild('Contact Us'); } }); ?> *******And, finally this below one from your previous post.******* <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) { if (!is_null($primaryNavbar->getChild('Network Status'))) { $primaryNavbar->removeChild('Network Status'); } if (!is_null($primaryNavbar->getChild('Announcements'))) { $primaryNavbar->removeChild('Announcements'); } }); 2) I published a test announcement and I see it listed under the "Recent News" box shown on the homepage of the Client Area. I hover over and it shows me the URL in the form of https://whmcs.domain.com/index.php/announcements/3/Test-Announcement.html . Clicking on it sure enough shows me the actual announcement and with your above hook visiting the above URL redirects to the login page. Now, the issue is if I click on the actual "Announcement" button anywhere within the Client Area it takes me to the page with the URL https://whmcs.domain.com/announcements.php and it shows the text "There are no announcements to display." I am a bit confused with the above behavior. Why can't see the announcements when simply visiting the URL https://whmcs.domain.com/announcements.php instead of what appears to be a SEO friendly URL above? Thank you again.
  5. Hello, How to make an announcement page private to registered members only instead of making it publicly accessible for all? This condition can also apply for all announcements, not just one. I don't see any option to do this within GUI, any workaround using custom Hooks? As an example, the announcement page URL looks like this: https://domain.com/whmcs/index.php/announcements/myannouncement.html Is there a way check to see if the the URL string has the keyword "announcements" and redirect to login page if the user is already not logged? Many Thanks.
×
×
  • 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