Individual/custom News messages in specific cPanels
Does anyone know if there is a way to use a cPanel/News (like) feature that would put notices in different member's cPanels?
For example, suppose we wanted a custom message to be exhibited in the left news/message area, but just for xyz.com and for no other account.
Possible, somehow?
Thanks.
-
We have wrote our own script which is reading /etc/cpbackup-userskip.conf and if username is here then he will see warning about that his backup is disabled. This script is located at /usr/local/cpanel/Cpanel/ In the template file it should be right after:
If you are changing a file from default theme, please do not forget to exclude, otherwise it would be replaced during cpanel updates.0 -
Okay, thanks very much. I kind of get the concept. So let's say the script placed after displaynews() would "look for" the presence of a file named .memberaccess in that account's sub-web area. Okay, so IF found then the script would read the top most line of the .memberaccess (which would be a URL), into an href link variable. So that, when the link is clicked, it would go to that member's, member access, URL, which was listed in the .memberaccess file. I know I am going beyond the scope of the original question, and I greatly appreciate your pointing me in the right direction. The only thing I am a little hazy on, is how to reference the addy in the DOT file, which resides in the sub-web area of the same account. Not too sure what the path would be like from the news bar to their own sub-web. Perhaps something like: If found /home/$user/.memberaccess Then... Thanks again. 0 -
Ok, so we have the following: 1. Create a script (e.g. /usr/local/cpanel/Cpanel/SomeModule.pm): package Cpanel::SomeModule; use Cpanel::AcctUtils::Owner (); my $user = $Cpanel::CPDATA{'USER'}; my $filename = "/home/$user/.memberaccess"; if (-e $filename) { print <
2. Then connect the module to a theme ( /usr/local/cpanel/base/frontend/x3/branding/index.html ):
to[COLOR="#FF0000">
Should work, I hope :)0 -
Hey, wow, thanks iakela! If this works I am going to leave you something in my will. Would you like some cats? How about a chocolate factory, or two? :) 0 -
[quote="iakela, post: 1572242">Should work, I hope :)
Thank you for updating us with the solution that you have implemented. Feel free to keep us updated on the outcome.0 -
You are welcome! The code is pretty raw, but I guess you can start from that. 0
Please sign in to leave a comment.
Comments
6 comments