How to make a usercp module?

yhoon

New Member
Dec 17, 2018
23
5
3
24
Hello everyone, I am trying to make a ucercp module to convert WCoins to GoblinPoints for version 1.0.9.8.
But it turns out that by touching the option from the usercp, it does not open anything and redirects me back to "localhost / webengine /" when it would have to send me to "localhost / webengine / usercp / exchanger" I have done it based on another module that already comes with the web, but I do not know what I missed Can you help me? Thanks in advance. And sorry for my bad English
 

Mon

Administrator
Developer
Nov 8, 2018
185
45
28
You only need to create the php file.

For example, if you want the module url to be yoursite.com/usercp/exchanger

you have to create the file "exchanger.php" inside the "/modules/usercp/" folder.

and that's it!
 

yhoon

New Member
Dec 17, 2018
23
5
3
24
I have done it, but it is not displayed, and it redirects to the main index of the web.
 

yhoon

New Member
Dec 17, 2018
23
5
3
24
How is the trend to be done?


Code:
RewriteEngine on
#    Force HTTPS
#    Uncomment the lines below to force users to use a secure
#    connection.

    #RewriteCond %{HTTPS} !=on
    #RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#
#

RewriteCond %{REQUEST_URI} !^/admincp/$ [NC]
RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/([a-zA-Z0-9\/]+)/?$ index.php?page=$1&subpage=$2&request=$3 [QSA]
RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/?$ index.php?page=$1&subpage=$2 [QSA]
RewriteRule ^([a-zA-Z0-9]+)/?$ index.php?page=$1 [QSA]
 

Mon

Administrator
Developer
Nov 8, 2018
185
45
28
You don't need to edit the htaccess, just do what i said.
 

Mon

Administrator
Developer
Nov 8, 2018
185
45
28
Can you upload a screenshot of your website? Adding new modules to WebEngine 1.0.8 is as simple as just creating a new file.

In WebEngine 2.0 you need to add the module to the database as well, so my theory is that you are using WebEngine 2.0.
 

Mon

Administrator
Developer
Nov 8, 2018
185
45
28
You seem to have a modified version of the CMS, plus using XAMPP which is not compatible with the CMS.
 

yhoon

New Member
Dec 17, 2018
23
5
3
24
You seem to have a modified version of the CMS, plus using XAMPP which is not compatible with the CMS.
It works perfectly on xampp. I have also uploaded it to the webhosting and it does not show the index of the module that said ...
 

yhoon

New Member
Dec 17, 2018
23
5
3
24
I have made a module for another CMS, in php. How can I adapt it to the WebEngine? Since I have seen that it uses several files when doing the module, as for example the .php goes in the folder "modules / usercp" in this case. And there's also an .html in the "views" folder. My question is how can I adapt my unique .php to the webengine?
 

Mon

Administrator
Developer
Nov 8, 2018
185
45
28
You will need more PHP knowledge to do such thing, it's not just a matter of copying files into WebEngine and expecting it to work.