Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - cyberspace

Pages: 1 ... 14 15 [16]
226
Functions / Re: Modifying email menu
« on: March 20, 2021, 12:00:58 PM »
Hi,

HTML templates of the user level interface are placed here:

/usr/local/cwpsrv/var/services/users/cwp_theme/original/

Look at the files called:

mod_email*
mod_forwarders*
mod_mail*

Most likely the modified files will be replaced by the original files once CWP is updated. So it is better to copy the theme files to another folder and modify the files there.

227
PHP / Re: ffmpeg enable shell_exec()
« on: March 19, 2021, 08:00:08 PM »
It sounds like you run some .php script and the script runs the ffmpeg binary using shell_exec() causing the error "shell_exec disabled".  Am I right ? If so do you run the script assocaited woth your website (http://domain.com/script.php) or over CWP (https://xx.xx.xx.xx.:2083/cwp_xxxxx/username/?module=somemodule) ?

Could you please provide more details about the problem ?

228
Functions / Question about hooks
« on: March 19, 2021, 05:18:50 PM »
Hi guys,

Is there some possibility to run the hooks before the account or domain name is created/added ?

I want to create a module/plugin (not sure how you call it here :) ) to block account creation and domain name/subdomain adding in case the username or domain name/subdomain is listed in some list managed by the server administrator so the users won't be able to add the domain names like "gmail.com", "hotmail.com", etc as the main domain names or addons of their accounts .

Thanks.

229
Functions / Re: CWP account hooks NOT WORK!!
« on: March 19, 2021, 05:08:18 PM »
Sorry for the necropost :)

Not sure if it cwp allows to print some output from the hooks. However the hooks described here:
https://wiki.centos-webpanel.com/action-hooks
work for me.

Here is a simple example (just a bit modified example provided by docs):

cat /usr/local/cwpsrv/htdocs/resources/admin/hooks/account/account_new.php

Code: [Select]

<?php
function account_new($array){
        
$fp fopen('/tmp/account_new.txt''w');
        
fwrite($fpprint_r($arrayTRUE));
        
fclose($fp);
}
?>



then create some account and review the file /tmp/account_new.txt.

Pages: 1 ... 14 15 [16]