Fork me on GitHub
Get XOOPS XOOPSXOOPS FAQFAQ ForumsForums NewsNews ThemesThemes ModulesModules
New Posts New Topics All Posts All Forums Index General Modules Themes Development International XOOPS.org

Search

Nominate XOOPS!

Learn XOOPS Core

Donat-O-Meter

Make donations with PayPal!
Stats
Goal: $100.00
Due Date: Aug 31
Gross Amount: $25.00
Net Balance: $23.97
Left to go: $76.03

Donations
Anonymous ($25)Aug-11

Local Support

Advertisement

XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

- 2 2.5 2.6 3.0 4 6 2013 Abuse Android AntiHarvesting AntiMalUser AntiSpam API Apple Battlefield Blocks Bootstrap Captcha cell cent chronolabs CHUNG Clicks content CĂN demo download Dresses facebook Fat Food for free Gateway Google Guide herre Home Honeypot HP html5 Human HỘ iPhone jQuery List Loss mobile module modules Monster new newbb news NHÀ online PARK Payment phone PHP Prevention profile project Protector publisher RESIDENCE responsive review Rights rmcommon Room security Sentry site Smartphone Smarty Smoking Solution Spam stem Studio support tag tags tdmcreate The Theme themes User userlog web weight Wishcraft xoops Xortify XPayment ZendFramework

New Users

Registering user

# 137682

jrmybell

Welcome to XOOPS!

Forum Index


Board index » All Posts

Bottom   Previous Topic   Next Topic

(1) 2 3 4 ... 29752 »


#1 Posted on: Today 15:01 Re: How to stop Spamming
Quote:

Mamba wrote:
Quote:
These registrations are NOT making it to my database, but I am getting an email for each attempt.

The simplest thing is to set in preferences "Notify by email when a new user is registered?" to "No", and you don't have to deal with it anymore.

Quote:
As to why the Captcha is not doing it's job, I suspect it's because the Captcha is rendered in Text.

The text with math question is much more effective than image. Most spammers are using OCR, so it is easier to scan it than to answer math question.

Did you test your installation that the Captcha is working? Did you try to register yourself?




Really? During my own registration, the text question looked quite vulnerable to me as well... I'm learning already!

Top

JamesHavey
Just popping in
Just popping in
Joined:
Today 14:39
From United States
Group:
Registered Users
Posts: 2
(Show More) (Show Less)
Topic | Forum


#2 Posted on: Today 14:59 Re: How to stop Spamming

Quote:
As to why the Captcha is not doing it's job, I suspect it's because the Captcha is rendered in Text.

The text with math question is much more effective than image. Most spammers are using OCR, so it is easier to scan it than to answer math question.

Did you test your installation that the Captcha is working? Did you try to register yourself?[/quote]

Really? During my own registration, the text question looked quite vulnerable to me as well... I'm learning already!

Top

JamesHavey
Just popping in
Just popping in
Joined:
Today 14:39
From United States
Group:
Registered Users
Posts: 2
(Show More) (Show Less)
Topic | Forum


#3 Posted on: Today 14:17 Re: emails
Hello,
I just joined and concerned about same thing. Great to find this and I'm going back to my profile to recheck if I did right!

Thank you!!

Top

JohnBorne
Just popping in
Just popping in
Joined:
Today 14:07
From US
Group:
Registered Users
Posts: 1
(Show More) (Show Less)
Topic | Forum


#4 Posted on: 8/18 11:54 Re: TDMCreate 1.91 alpha 1 for Testing
Quote:
goffy wrote: tdmcreate 1.91
download from github, 11.08.2014 12:50
Xoops 2.5.7.
...
4) deleting a table does not delete the corresponding items in tdmcreate_fields

5) I started to translate to german, but there are a lot of not used defines, maybe should some be use in future, i dont know. I wait for Beta version to make a translation



Point 4) Instead, the problem is with your code because if We go to edit the fields of table, were added or subtracted fields number, but empty.

Your code is to delete the data fields in the database.

This code should be revised.

Point 5) Great !!!

Top

timgno
Module Developer
Module Developer
Joined:
2007/6/21 13:54
From Italy
Group:
Registered Users
Posts: 1245
(Show More) (Show Less)
Topic | Forum


#5 Posted on: 8/18 7:34 Re: TDMCreate 1.91 alpha 1 for Testing
tdmcreate 1.91
download from github, 11.08.2014 12:50
Xoops 2.5.7.


1) you can select "Table: Main Field" for each field

2) if you are on tab "tables", than select a module and click than on "Edit fields" for a specific table, you do not get the field edit mode.
change \templates\admin\tdmcreate_tables.tpl line 86 from
<a href="fields.php?op=edit&field_tid=<{$table.id}>" title="<{$smarty.const._EDIT}>">
into
[code]<a href="fields.php?op=edit&field_tid=<{$table.id}>&field_mid=<{$table.mid}>" title="<{$smarty.const._EDIT}>">

or change fields.php, because there is a module id neccessary in line 242

3) you create a new table and define 4 fields for this table. if yo later change the number of fields, e.g. you say now 5, you get only 4 fields in editing mode of table fields

following code of class/fields.php can solve this problem - all changes are marked with 'goffy'
/*
*  @Class TDMCreateFields
*  @extends XoopsObject 
*/
class TDMCreateFields extends XoopsObject

    
/**
     * @var mixed
     */
    
private $tdmcreate null;    
    
    
/*
    *  @public function constructor class
    *  @param null
    */
    
public function __construct()
    {
        
$this->tdmcreate TDMCreate::getInstance();        
        
$this->initVar('field_id'XOBJ_DTYPE_INT);
        
$this->initVar('field_mid'XOBJ_DTYPE_INT);
        
$this->initVar('field_tid'XOBJ_DTYPE_INT);
        
$this->initVar('field_numb'XOBJ_DTYPE_INT);    
        
$this->initVar('field_name'XOBJ_DTYPE_TXTBOX);        
        
$this->initVar('field_type'XOBJ_DTYPE_TXTBOX);
        
$this->initVar('field_value'XOBJ_DTYPE_TXTBOX);
        
$this->initVar('field_attribute'XOBJ_DTYPE_TXTBOX);
        
$this->initVar('field_null'XOBJ_DTYPE_TXTBOX);
        
$this->initVar('field_default'XOBJ_DTYPE_TXTBOX);
        
$this->initVar('field_key'XOBJ_DTYPE_TXTBOX);        
        
$this->initVar('field_element'XOBJ_DTYPE_TXTBOX);
        
$this->initVar('field_parent'XOBJ_DTYPE_INT);
        
$this->initVar('field_inlist'XOBJ_DTYPE_INT);
        
$this->initVar('field_inform'XOBJ_DTYPE_INT);
        
$this->initVar('field_admin'XOBJ_DTYPE_INT);        
        
$this->initVar('field_user'XOBJ_DTYPE_INT);    
        
$this->initVar('field_block'XOBJ_DTYPE_INT);    
        
$this->initVar('field_main'XOBJ_DTYPE_INT);    
        
$this->initVar('field_search'XOBJ_DTYPE_INT);    
        
$this->initVar('field_required'XOBJ_DTYPE_INT);        
    }
    
    
/**
     * @param string $method
     * @param array  $args
     *
     * @return mixed
     */
    
public function __call($method$args)
    {
        
$arg = isset($args[0]) ? $args[0] : null;
        return 
$this->getVar($method$arg);
    }
    
    
/*
    *  @static function &getInstance
    *  @param null
    */
    
public static function &getInstance()
    {
        static 
$instance false;
        if (!
$instance) {
            
$instance = new self();
        }
        return 
$instance;
    }
    
    
/*
    *  @private function getHeaderForm
    *  @param mixed $action
    */
    
private function getHeaderForm($action false)
    {
        if (
$action === false) {
            
$action $_SERVER['REQUEST_URI'];
        }
        
        
$isNew $this->isNew();
        
$title $isNew sprintf(_AM_TDMCREATE_FIELDS_NEW) : sprintf(_AM_TDMCREATE_FIELDS_EDIT);
        
        
$form = new TDMCreateThemeForm(null'form'$action'post'true);
        
$form->setExtra('enctype="multipart/form-data"');            
                        
        
// New Object HtmlTable           
        
$form->addElement(new TDMCreateFormLabel('<table border="0" cellspacing="1" class="outer width100">'));
        
$form->addElement(new TDMCreateFormLabel('<thead class="center">'));    
        
$form->addElement(new TDMCreateFormLabel('<tr class="head"><th colspan="9">'.$title.'</th></tr>'));
        
$form->addElement(new TDMCreateFormLabel('<tr class="head width5">'));                
        
$form->addElement(new TDMCreateFormLabel('<td>'._AM_TDMCREATE_FIELD_ID.'</td>'));
        
$form->addElement(new TDMCreateFormLabel('<td>'._AM_TDMCREATE_FIELD_NAME.'</td>'));                                                        
        
$form->addElement(new TDMCreateFormLabel('<td>'._AM_TDMCREATE_FIELD_TYPE.'</td>'));
        
$form->addElement(new TDMCreateFormLabel('<td>'._AM_TDMCREATE_FIELD_VALUE.'</th>'));
        
$form->addElement(new TDMCreateFormLabel('<td>'._AM_TDMCREATE_FIELD_ATTRIBUTE.'</th>'));
        
$form->addElement(new TDMCreateFormLabel('<td>'._AM_TDMCREATE_FIELD_NULL.'</th>'));
        
$form->addElement(new TDMCreateFormLabel('<td>'._AM_TDMCREATE_FIELD_DEFAULT.'</th>'));
        
$form->addElement(new TDMCreateFormLabel('<td>'._AM_TDMCREATE_FIELD_KEY.'</th>'));
        
$form->addElement(new TDMCreateFormLabel('<td>'._AM_TDMCREATE_FIELD_PARAMETERS.'</th>'));    
        
$form->addElement(new TDMCreateFormLabel('</tr></thead>'));    
        
$form->addElement(new TDMCreateFormLabel('<tbody>'));        
        
//        
        
return $form;
    }
    
    
/*
    *  @public function getFormNew
    *
    *  @param integer $field_mid
    *  @param integer $field_tid
    *  @param integer $field_numb
    *  @param string $f_name
    *  @param mixed $action
    */
    
public function getFormNew($field_mid null$field_tid null$field_numb null$f_name null$action false)
    {
        
// Header function class
        
$fields_form TDMCreateFields::getInstance();
        
$form $fields_form->getHeaderForm($action);
        
//
        
$table_obj $this->tdmcreate->getHandler('tables')->get($field_tid); //changed by goffy
        
$table_autoincrement $table_obj->getVar('table_autoincrement'); //added by goffy
        //
        
$class 'even';
        for(
$i 1$i <= $field_numb$i++) {
            
$class = ($class == 'even') ? 'odd' 'even';
            
//replaced creation of new line by new function - goffy
            
$this->getFormNewLine($form$class$i$field_mid$field_tid$f_name$table_autoincrement);
        }                        
        
// Footer form
        
return $fields_form->getFooterForm($form);
    }
    
    
/*
    *  @public function getFormNewLine - goffy
    *
    *  @param mixed $form
    *  @param mixed $class
    *  @param integer $i
    *  @param integer $field_mid
    *  @param integer $field_tid
    *  @param mixed $f_name
    *  @param integer $table_autoincrement
    */
    
public function getFormNewLine($form$class$i$field_mid$field_tid$f_name$table_autoincrement)
    {
        
$form->addElement(new XoopsFormHidden('field_id['.$i.']''new'));    
        
$form->addElement(new XoopsFormHidden('field_mid'$field_mid));
        
$form->addElement(new XoopsFormHidden('field_tid'$field_tid));
                        
        
$form->addElement(new TDMCreateFormLabel('<tr class="'.$class.'">'));
        
// Index ID
        
$form->addElement(new TDMCreateFormLabel('<td class="center">'.$i.'</td>'));
        
// Field Name
        
$this_field_name = (!empty($f_name) ? $f_name '_' '');
        
$field_name = new XoopsFormText(_AM_TDMCREATE_FIELD_NAME'field_name['.$i.']'15255$this_field_name);            
        
$form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_name->render().'</td>'));
        
// Field Type    
        
$value = ($i == 1) && ($table_autoincrement == 1) ? '2' '';        
        
$fieldtype_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE'field_type['.$i.']'$value);
        
$fieldtype_select->addOptionArray($this->tdmcreate->getHandler('fieldtype')->getList()); 
        
$form->addElement(new TDMCreateFormLabel('<td class="center">'.$fieldtype_select->render().'</td>'));
        
// Field Value    
        
$value = ($i == 1) && ($table_autoincrement == 1) ? '8' '';
        
$field_value = new XoopsFormText(_AM_TDMCREATE_FIELD_VALUE'field_value['.$i.']'520$value);
        
$form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_value->render().'</td>'));
        
// Field Attributes                        
        
$field_attributes_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE'field_attribute['.$i.']');  
        
$field_attributes_select->addOptionArray($this->tdmcreate->getHandler('fieldattributes')->getList());
        
$form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_attributes_select->render().'</td>'));
        
// Field Null            
        
$field_null_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_NULL'field_null['.$i.']');
        
$field_null_select->addOptionArray($this->tdmcreate->getHandler('fieldnull')->getList());            
        
$form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_null_select->render().'</td>'));
        
// Field Default
        
$field_default = new XoopsFormText(_AM_TDMCREATE_FIELD_DEFAULT'field_default['.$i.']'1525);
        
$form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_default->render().'</td>'));
        
// Field Key
        
$field_key_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_KEY'field_key['.$i.']');
        
$field_key_select->addOptionArray($this->tdmcreate->getHandler('fieldkey')->getList());
        
$form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_key_select->render().'</td>'));
        
// Field Void            
        
if( ($i == 1) && ($table_autoincrement == 1)) {                
            
$form->addElement(new TDMCreateFormLabel('<td>&nbsp;</td></tr>'));
        } else {            
            
// Box header row                
            
$parameters_tray = new XoopsFormElementTray('''<br />');                            
            
// Field Elements    
            
$criteria_element = new CriteriaCompo();                
            
$criteria_element->add(new Criteria('fieldelement_tid'0));                    
            
$criteria_table = new CriteriaCompo();    
            
$criteria_table->add(new Criteria('fieldelement_mid'$field_mid));            
            
$field_elements_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_ELEMENT_NAME'field_element['.$i.']');                
                
$field_elements_select->addOptionArray($this->tdmcreate->getHandler('fieldelements')->getList($criteria_element));
                
$field_elements_select->addOptionArray($this->tdmcreate->getHandler('fieldelements')->getList($criteria_table));
                unset(
$criteria_element); unset($criteria_table);                    
                
$parameters_tray->addElement($field_elements_select);
                            
            
$field_parent 0;
                
$check_field_parent = new XoopsFormCheckBox(' ''field_parent['.$i.']');
                
$check_field_parent->addOption($field_parent_AM_TDMCREATE_FIELD_PARENT );
                
$parameters_tray->addElement($check_field_parent);
                
            
$field_inlist 0;
                
$check_field_inlist = new XoopsFormCheckBox(' ''field_inlist['.$i.']'$field_inlist);
                
$check_field_inlist->addOption(1_AM_TDMCREATE_FIELD_INLIST);
                
$parameters_tray->addElement($check_field_inlist);
            
            
$field_inform 0;
                
$check_field_inform = new XoopsFormCheckBox(' ''field_inform['.$i.']'$field_inform);
                
$check_field_inform->addOption(1_AM_TDMCREATE_FIELD_INFORM);
                
$parameters_tray->addElement($check_field_inform);

            
$field_admin 0;
                
$check_field_admin = new XoopsFormCheckBox(' ''field_admin['.$i.']'$field_admin);
                
$check_field_admin->addOption(1_AM_TDMCREATE_FIELD_ADMIN);
                
$parameters_tray->addElement($check_field_admin);

            
$field_user 0;
                
$check_field_user = new XoopsFormCheckBox(' ''field_user['.$i.']'$field_user);
                
$check_field_user->addOption(1_AM_TDMCREATE_FIELD_USER);
                
$parameters_tray->addElement($check_field_user);

            
$field_block 0;
                
$check_field_block = new XoopsFormCheckBox('''field_block['.$i.']'$field_block);
                
$check_field_block->addOption(1_AM_TDMCREATE_FIELD_BLOCK);
                
$parameters_tray->addElement($check_field_block);
            
            if((
$i == 1)) {
                
$field_main 1;
                
$check_field_main = new XoopsFormRadio('''field_main['.$i.']'$field_main);
                
$check_field_main->addOption($field_main_AM_TDMCREATE_FIELD_MAINFIELD );
            } else {
                
$field_main 0;
                
$check_field_main = new XoopsFormRadio('''field_main['.$i.']');
                
$check_field_main->addOption($field_main_AM_TDMCREATE_FIELD_MAINFIELD );
            }                
            
$parameters_tray->addElement($check_field_main);            
            
            
$field_search 0;
                
$check_field_search = new XoopsFormCheckBox(' ''field_search['.$i.']'$field_search);
                
$check_field_search->addOption(1_AM_TDMCREATE_FIELD_SEARCH);    
                
$parameters_tray->addElement($check_field_search);                    

            
$field_required 0;
                
$check_field_required = new XoopsFormCheckBox(' ''field_required['.$i.']'$field_required);
                
$check_field_required->addOption(1_AM_TDMCREATE_FIELD_REQUIRED);
                
$parameters_tray->addElement($check_field_required);
            
$form->addElement(new TDMCreateFormLabel('<td><div class="portlet"><div class="portlet-header">'._AM_TDMCREATE_FIELD_PARAMETERS_LIST.'</div><div class="portlet-content">'.$parameters_tray->render().'</div></div></td></tr>'));
        }    
    }
    
    
/*
    *  @public function getFormEdit
    *
    *  @param integer $field_mid
    *  @param integer $field_tid
    *  @param mixed $action
    */
    
public function getFormEdit($field_mid null$field_tid null$action false)
    {            
        
// Header function class
        
$fields_form TDMCreateFields::getInstance();
        
$form $fields_form->getHeaderForm($action);
        
//
        
$class 'even';    
        
// Get the number of fields - goffy
        
$tablesHandler =& $this->tdmcreate->getHandler('tables');
        
$table_nbfields $tablesHandler->get($field_tid)->getVar("table_nbfields");
        
$f_name $tablesHandler->get($field_tid)->getVar("table_fieldname");

        
// Get the list of fields
        
$criteria = new CriteriaCompo();
        
$criteria->add(new Criteria('field_mid'$field_mid));
        
$criteria->add(new Criteria('field_tid'$field_tid));
        
$criteria->setSort('field_id'); //added by goffy
        
$fields $this->tdmcreate->getHandler('fields')->getObjects($criteria);
        unset(
$criteria);
        
$id 1;
        foreach(
$fields as $field)    {
            
$class = ($class == 'even') ? 'odd' 'even';
            
$field_id $field->getVar('field_id');
            if (
$id>$table_nbfields) {   //delete additional fields, if number of fields is reduced - goffy
                
$fieldsObj =& $this->tdmcreate->getHandler('fields')->get$field_id );
                
$this->tdmcreate->getHandler('fields')->delete($fieldsObjtrue);
            } else {  
                
// show field with settings
                
$form->addElement(new XoopsFormHidden('field_id['.$field_id.']'$field_id));    
                
$form->addElement(new XoopsFormHidden('field_mid'$field_mid));
                
$form->addElement(new XoopsFormHidden('field_tid'$field_tid));
                                
                
$form->addElement(new TDMCreateFormLabel('<tr class="'.$class.'">'));
                
// Index ID
                
$form->addElement(new TDMCreateFormLabel('<td class="center">'.$id.'</td>'));    
                
// Field Name
                
$field_name = new XoopsFormText(_AM_TDMCREATE_FIELD_NAME'field_name['.$field_id.']'15255$field->getVar('field_name'));            
                
$form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_name->render().'</td>'));
                
// Field Type            
                
$fieldtype_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE'field_type['.$field_id.']'$field->getVar('field_type'));
                
$fieldtype_select->addOptionArray($this->tdmcreate->getHandler('fieldtype')->getList()); 
                
$form->addElement(new TDMCreateFormLabel('<td class="center">'.$fieldtype_select->render().'</td>'));
                
// Field Value            
                
$field_value = new XoopsFormText(_AM_TDMCREATE_FIELD_VALUE'field_value['.$field_id.']'520$field->getVar('field_value'));
                
$form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_value->render().'</td>'));
                
// Field Attributes                        
                
$field_attributes_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE'field_attribute['.$field_id.']'$field->getVar('field_attribute'));  
                
$field_attributes_select->addOptionArray($this->tdmcreate->getHandler('fieldattributes')->getList());
                
$form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_attributes_select->render().'</td>'));
                
// Field Null            
                
$field_null_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_NULL'field_null['.$field_id.']'$field->getVar('field_null'));
                
$field_null_select->addOptionArray($this->tdmcreate->getHandler('fieldnull')->getList());            
                
$form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_null_select->render().'</td>'));
                
// Field Default
                
$field_default = new XoopsFormText(_AM_TDMCREATE_FIELD_DEFAULT'field_default['.$field_id.']'1525$field->getVar('field_default'));
                
$form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_default->render().'</td>'));
                
// Field Key
                
$field_key_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_KEY'field_key['.$field_id.']'$field->getVar('field_key'));
                
$field_key_select->addOptionArray($this->tdmcreate->getHandler('fieldkey')->getList());
                
$form->addElement(new TDMCreateFormLabel('<td class="center">'.$field_key_select->render().'</td>'));
                
// Field Void
                
$table_autoincrement $this->tdmcreate->getHandler('tables')->get($field_tid);
                if( (
$id == 1) && ($table_autoincrement->getVar('table_autoincrement') == 1)) {                
                    
$form->addElement(new TDMCreateFormLabel('<td>&nbsp;</td></tr>'));
                } else {            
                    
// Box header row                
                    
$parameters_tray = new XoopsFormElementTray('''<br />');                            
                    
// Field Elements    
                    
$criteria_element = new CriteriaCompo();                
                    
$criteria_element->add(new Criteria('fieldelement_tid'0));                    
                    
$criteria_table = new CriteriaCompo();    
                    
$criteria_table->add(new Criteria('fieldelement_mid'$field_mid));            
                    
$field_elements_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_ELEMENT_NAME'field_element['.$field_id.']'$field->getVar('field_element'));                
                    
$field_elements_select->addOptionArray($this->tdmcreate->getHandler('fieldelements')->getList($criteria_element));
                    
$field_elements_select->addOptionArray($this->tdmcreate->getHandler('fieldelements')->getList($criteria_table));
                    unset(
$criteria_element); unset($criteria_table);                    
                    
$parameters_tray->addElement($field_elements_select);
                                
                    
$check_field_parent = new XoopsFormCheckBox(' ''field_parent['.$field_id.']'$field->getVar('field_parent'));
                    
$check_field_parent->addOption(1_AM_TDMCREATE_FIELD_PARENT );
                    
$parameters_tray->addElement($check_field_parent);
                    
                    
$check_field_inlist = new XoopsFormCheckBox(' ''field_inlist['.$field_id.']'$field->getVar('field_inlist'));
                    
$check_field_inlist->addOption(1_AM_TDMCREATE_FIELD_INLIST);
                    
$parameters_tray->addElement($check_field_inlist);
                
                    
$check_field_inform = new XoopsFormCheckBox(' ''field_inform['.$field_id.']'$field->getVar('field_inform'));
                    
$check_field_inform->addOption(1_AM_TDMCREATE_FIELD_INFORM);
                    
$parameters_tray->addElement($check_field_inform);

                    
$check_field_admin = new XoopsFormCheckBox(' ''field_admin['.$field_id.']'$field->getVar('field_admin'));
                    
$check_field_admin->addOption(1_AM_TDMCREATE_FIELD_ADMIN);
                    
$parameters_tray->addElement($check_field_admin);

                    
$check_field_user = new XoopsFormCheckBox(' ''field_user['.$field_id.']'$field->getVar('field_user'));
                    
$check_field_user->addOption(1_AM_TDMCREATE_FIELD_USER);
                    
$parameters_tray->addElement($check_field_user);

                    
$check_field_block = new XoopsFormCheckBox('''field_block['.$field_id.']'$field->getVar('field_block'));
                    
$check_field_block->addOption(1_AM_TDMCREATE_FIELD_BLOCK);
                    
$parameters_tray->addElement($check_field_block);
                    
                    
$field_main $field->getVar('field_main'); 
                    if(
$field_main == 1) {
                        
$check_field_main = new XoopsFormRadio('''field_main['.$field_id.']'$field_main);
                    } else {
                        
$check_field_main = new XoopsFormRadio('''field_main['.$field_id.']');
                    }
                    
$check_field_main->addOption($field_main_AM_TDMCREATE_FIELD_MAINFIELD );
                    
$parameters_tray->addElement($check_field_main);            
                    
                    
$check_field_search = new XoopsFormCheckBox(' ''field_search['.$field_id.']'$field->getVar('field_search'));
                    
$check_field_search->addOption(1_AM_TDMCREATE_FIELD_SEARCH);
                    
$parameters_tray->addElement($check_field_search);            

                    
$check_field_required = new XoopsFormCheckBox(' ''field_required['.$field_id.']'$field->getVar('field_required'));
                    
$check_field_required->addOption(1_AM_TDMCREATE_FIELD_REQUIRED);
                    
$parameters_tray->addElement($check_field_required);
                    
$form->addElement(new TDMCreateFormLabel('<td><div class="portlet"><div class="portlet-header">'._AM_TDMCREATE_FIELD_PARAMETERS_LIST.'</div><div class="portlet-content">'.$parameters_tray->render().'</div></div></td></tr>'));
                }            
                
$id++;
            }
        }
        
//add missing fields - goffy
        
for ($i=$id$i<=$table_nbfields$i++) {
            
$class = ($class == 'even') ? 'odd' 'even';
            
$this->getFormNewLine($form$class$i$field_mid$field_tid$f_name0);
        }
        unset(
$id);
        
// Footer form
        
return $fields_form->getFooterForm($form);
    }    
    
/*
    *  @private function getFooterForm
    *  @param null
    */
    
private function getFooterForm($form)
    {
        
// Send Form Data
        
$form->addElement(new TDMCreateFormLabel('</tbody>'));
        
$form->addElement(new TDMCreateFormLabel('<tfoot><tr>'));
        
$form_hidden = new XoopsFormHidden('op''save');
        
$form_button = new XoopsFormButton('''submit'_SUBMIT'submit');
        
$form->addElement(new TDMCreateFormLabel('<td colspan="8">'.$form_hidden->render().'</td>'));
        
$form->addElement(new TDMCreateFormLabel('<td>'.$form_button->render().'</td>'));
        
$form->addElement(new TDMCreateFormLabel('</tr></tfoot></table>'));
        return 
$form;
    }
}
/*
*  @Class TDMCreateFieldsHandler
*  @extends XoopsPersistableObjectHandler
*/
class TDMCreateFieldsHandler extends XoopsPersistableObjectHandler 
{    
    
/*
    *  @public function constructor class
    *  @param mixed $db
    */
    
public function __construct(&$db
    {        
        
parent::__construct($db'tdmcreate_fields''tdmcreatefields''field_id''field_name');
    }
    
    
/**
     * @param bool $isNew
     *
     * @return object
     */
    
public function &create($isNew true)
    {
        return 
parent::create($isNew);
    }

    
/**
     * retrieve a field
     *
     * @param int $i field id
     *
     * @return mixed reference to the {@link TDMCreateFields} object
     */
    
public function &get($i null$fields null)
    {        
        return 
parent::get($i$fields);
    }    

    
/**
     * get IDs of objects matching a condition
     *
     * @param object $criteria {@link CriteriaElement} to match
     * @return array of object IDs
     */
    
function &getIds($criteria)
    {
        return 
parent::getIds($criteria);
    }
        
    
/**
     * insert a new field in the database
     *
     * @param object $field reference to the {@link TDMCreateFields} object
     * @param bool   $force
     *
     * @return bool FALSE if failed, TRUE if already present and unchanged or successful
     */
    
public function insert(&$field$force false)
    {        
        if (!
parent::insert($field$force)) {
            return 
false;
        }        
        return 
true;
    }        
}


I have made a new function 'getFormNewLine', because a new field can now be in function getFormNew and also in getFormEdit

4) deleting a table does not delete the corresponding items in tdmcreate_fields

5) I started to translate to german, but there are a lot of not used defines, maybe should some be use in future, i dont know. I wait for Beta version to make a translation



Top

goffy
Not too shy to talk
Not too shy to talk
Joined:
2010/12/27 7:39
From Austria
Group:
Registered Users
Posts: 127
(Show More) (Show Less)
Topic | Forum


#6 Posted on: 8/17 14:20 Re: Migrate from Xoops 1.3.10
Something you probably don't really want to hear but...

Chances are that your installation is too old to update easily.

You will spend a LOT of time trying to get it updated and you would be better off just starting from scratch to 2.5.7.

What kind of site is it, how many modules do you have installed and how much would you lose if you just started fresh?




Top

redheadedrod
Home away from home
Home away from home
Joined:
2008/2/26 10:05
From Grand Rapids, MI
Group:
Registered Users
Posts: 1263
(Show More) (Show Less)
Topic | Forum


#7 Posted on: 8/16 15:43 Re: Not seeing any changes to my templates
I had a similar problem when tuning a theme.

Changes are time by time not showed. the only way found was to empty the smarty_compile.

Top

bosco
Just popping in
Just popping in
Joined:
2004/8/5 8:12
From Montpellier, France
Group:
Registered Users
Posts: 37
(Show More) (Show Less)
Topic | Forum


#8 Posted on: 8/16 13:34 Re: Migrate from Xoops 1.3.10
Hi,

i reply a long time after, but upgrading from is not a problem. I'll try to upgrade to a recent version of xoops, because 2.0 is making some blank fields (i think it's an issue with php 5.4).

Top

bosco
Just popping in
Just popping in
Joined:
2004/8/5 8:12
From Montpellier, France
Group:
Registered Users
Posts: 37
(Show More) (Show Less)
Topic | Forum


#9 Posted on: 8/16 13:32 Re: Installation problem XOOPS 2.6.0
Hi Mamba,

sorry for later reply.

Here are the informations asked :

PHP 5.4.4-14+deb7u12
mysql Ver 14.14 Distrib 5.5.38
Debian 3.2.60-1+deb7u1 i686

It's my own home server i use for devel =)

Top

bosco
Just popping in
Just popping in
Joined:
2004/8/5 8:12
From Montpellier, France
Group:
Registered Users
Posts: 37
(Show More) (Show Less)
Topic | Forum


#10 Posted on: 8/16 6:10 Re: Not seeing any changes to my templates
I have encountered this problem. I solved it by changing my folders location xoops_data and xoops_lib. Place them outside the root. I have also renamed them.

Remember to specify the new path in the file mainfile.php.

In the Preferences Administration (Preferences> System Options> General settings), you must also remember to check "Yes" to line "Check templates for modifications?".

Top

Cesag
Moderator
Moderator
Joined:
2010/2/1 15:21
From France
Group:
Registered Users
Community Coordinator (temporary)
Posts: 743
(Show More) (Show Less)
Topic | Forum



Top
(1) 2 3 4 ... 29752 »



[Advanced Search]