HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   Developers' Forum (
-   -   Problems on creating new module (

bruno_floyd 26th August 2010 16:27

Problems on creating new module
Hi guys,

I'm trying to creat a new module following the instructions based on this tutorial:

I created the DB Table of the new module on my own at the main account accoding to the model used on the other tables... and did all the steps, changing what is concerned to my new module instead of "help".

I'm able to select the new module for the admin, but when I login again and click on the link of the it, I got the following error on a alertbox:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="" xml:lang="en" lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../themes/default/css/central.css" rel="stylesheet" type="text/css" />
<div class="uniForm">
<div id="errorMsg">

Does anybody knows what's going on?
Thanks guys! :)

till 26th August 2010 16:36

Which ISPConfig version do you use?

bruno_floyd 26th August 2010 16:50

Last release...

I installed on a computer for testing. I creat a new table at the DB and uploading the files I created to the ISPConfig directory and testing...

bruno_floyd 31st August 2010 17:46

I had success on creating my new module and so on...

Now I'm trying to setup the admin and user permissions. How can I set a button, for exemple the "delete entry" button to only appear when the logged account is from the Admin?

Thks guys!

till 31st August 2010 20:14

This should work in all templates:


<tmpl_if name="is_admin">
.... your html code here ....

bruno_floyd 2nd September 2010 15:41

Thanks till!

It worked! :)

I have another question if you allow me...

I'm trying to get a valeu from the DB, doing this:

$sql = $app->db->query("SELECT groupid FROM sys_group WHERE client_id = ".$this->dataRecord['indicou_id']);

$group = $app->db->queryOneRecord($sql);

And then update "sys_groupid" from my table "indicacao":

$app->db->query("UPDATE indicacao SET sys_groupid = ".$group." WHERE indicacao_id = ".$this->id);

These lines are in the function onAfterInsert()... and when I execute another stuff from my code in that section they are executed, but not the update above. Could you help?

Thanks again!

bruno_floyd 9th September 2010 01:30

Can you help me till?

sorry about disturbing ya!

till 9th September 2010 11:35

The code to get the group has to look like this:

$group = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".$this->dataRecord['indicou_id']);

bruno_floyd 14th September 2010 17:02

I could not store the value from the DB to my $group variable...

Is this the right way to get a value from the Db and put into the variable?

Thanks again till!

till 15th September 2010 16:34

$group is a hash array, it is not a single value.

All times are GMT +2. The time now is 23:51.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.