31
DaBoyz
Re: Simple Link
  • 2004/1/9 0:27

  • DaBoyz

  • Just popping in

  • Posts: 79

  • Since: 2002/8/8 1


unfortunately no because I use it on a module in development ...

But you just have to copy the code in a file and include it in a function to use it .... but include also the XOOPS_ROOT_PATH.'/class/xoopsformloader.php' file ...

I just test to add more than one button but that doesn't work for the moment ... a subtil error must exit ... ... but that disactived also the first button ...



32
DaBoyz
Simple Link
  • 2004/1/9 0:12

  • DaBoyz

  • Just popping in

  • Posts: 79

  • Since: 2002/8/8 1


class XoopsFormButtonLink extends XoopsFormElement {

    
/**
    * Value
    * @var        string
    * @access    private
    */

    
var $_value;

    
/**
    * Constructor
    *
    * @param    string    $caption    Caption
    * @param    string    $name
    * @param    string    $value
    * @param    string    $link        Link on click
    */

    
function XoopsFormButtonLink($caption$name$value=""$link=""){
        
$this->setCaption($caption);
        
$this->setName($name);
        
$this->setValue($value);
        
$this->setLink($link);
    }

    
/**
    * Get the initial value
    *
    * @return    string
    */

    
function getValue(){
        return 
$this->_value;
    }

    
/**
    * Set the initial value
    *
    * @return    string
    */

    
function setValue($value){
        
$this->_value $value;
    }

    
/**
    * Get the initial link
    *
    * @return    string
    */

    
function getLink(){
        return 
$this->_link;
    }

    
/**
    * Set the initial value
    *
    * @return    string
    */

    
function setLink($link){
        
$this->_link $link;
    }

    
/**
    * prepare HTML for output
    *
    * @return    string
    */

    
function render(){
        return 
"<input type='button' class='formButton' name='".$this->getName()."'  id='".$this->getName()."' value='".$this->getValue()."'".$this->getExtra()." onclick="document.location='".$this->getLink()."' />";
    }
}


With this you could had a button that only be a link but I use it with this (for example):

[...]
$buttons->addElement(new XoopsFormButtonLink('','','RETURN','index.php'));
$form->addElement($buttons);
$form->display();


Display just a button to return at the index.php page ...



33
DaBoyz
Re: Invision Power Board User Database -> Xoops User Database
  • 2004/1/8 10:01

  • DaBoyz

  • Just popping in

  • Posts: 79

  • Since: 2002/8/8 1


You can also have a look here.



34
DaBoyz
Re: How to copy 'news' module ?
  • 2004/1/7 11:57

  • DaBoyz

  • Just popping in

  • Posts: 79

  • Since: 2002/8/8 1


That's already exist ... perhaps look in the download area ?



35
DaBoyz
Re: $eh->show("xxxx") ???
  • 2004/1/7 2:07

  • DaBoyz

  • Just popping in

  • Posts: 79

  • Since: 2002/8/8 1


Perhaps it could have been more simple to point the class/module.errorhandler.php file but how can I use it :

- include file to do (I tried with included this file but ... didn't work),
- pre-requested, ...

Thanks but still

I need it to redirect a member with the Go Back button ... to not loose all of his text ...



36
DaBoyz
Re: Comments
  • 2004/1/1 23:17

  • DaBoyz

  • Just popping in

  • Posts: 79

  • Since: 2002/8/8 1


Edit account => Comments Display Mode



37
DaBoyz
Re: $eh->show("xxxx") ???
  • 2003/12/31 12:32

  • DaBoyz

  • Just popping in

  • Posts: 79

  • Since: 2002/8/8 1


Ok, but could you explain how to use it because for the moment, I use only "or die(mysql_error())" ... ?



38
DaBoyz
$eh->show("xxxx") ???
  • 2003/12/31 11:24

  • DaBoyz

  • Just popping in

  • Posts: 79

  • Since: 2002/8/8 1


Could you explain which is the goal of this and how to use it ?



39
DaBoyz
Re: WebSlave Project - a project managment tool
  • 2003/12/31 10:29

  • DaBoyz

  • Just popping in

  • Posts: 79

  • Since: 2002/8/8 1


I changed some code (suppression of '&' in red) and the warning messages disappeared :

function sortTasksBySubTasks([color=FF0000]&[/color]$project) {        
    if (isset(
$project['tasks'])) {
        
$new_array = array();
        foreach (
$project['tasks'] as $key => $value) {
            if (isset(
$value['parent_id']) and $value['parent_id'] == '0') {
                
$withoutChild $value;
                if (
$value['children'] != NULL) {
                    
$withoutChild['children'] = 1;
                }
                else {
                    
$withoutChild['children'] = NULL;
                }
                
$new_array[] = $withoutChild;
                if (
$value['children'] != NULL) {
                    
addSubTasks([color=FF0000]&[/color]$new_array$value);
                    
                }
            }
        }
        if (
count($new_array) < 1) {
            foreach (
$project['tasks'] as $key => $value) {
                if (isset(
$value['parent_id'])) {
                    
$withoutChild $value;
                    if (
$value['children'] != NULL) {
                        
$withoutChild['children'] = 1;
                    }
                    else {
                        
$withoutChild['children'] = NULL;
                    }
                    
$new_array[] = $withoutChild;
                    if (
$value['children'] != NULL) {
                        
addSubTasks([color=FF0000]&[/color]$new_array$value);
                        
                    }
                }
            }
        }
        
$project['tasks'] = $new_array;
    }
}

and
function addSubTasks($array$parent) {
    foreach (
$parent['children'] as $value) {
        
$withoutChild $value;
        if (
$value['children'] != NULL) {
            
$withoutChild['children'] = 1;
        }
        else {
            
$withoutChild['children'] = NULL;
        }
        
$array[] = $withoutChild;
        if (
$value['children'] != NULL) {
            
$this->addSubTasks([color=FF0000]&[/color]$array$value);
        }
    }
}



40
DaBoyz
Re: WebSlave Project - a project managment tool
  • 2003/12/31 10:20

  • DaBoyz

  • Just popping in

  • Posts: 79

  • Since: 2002/8/8 1


WarningCall-time pass-by-reference has been deprecated argument passed by value; If you would like to pass it by referencemodify the declaration of [runtime function name](). If you would like to enable call-time pass-by-referenceyou can set allow_call_time_pass_reference to true in your INI fileHoweverfuture versions may not support this any longerin ...moduleswsprojectclassfunctions.php on line 215

Warning
Call-time pass-by-reference has been deprecated argument passed by value; If you would like to pass it by referencemodify the declaration of [runtime function name](). If you would like to enable call-time pass-by-referenceyou can set allow_call_time_pass_reference to true in your INI fileHoweverfuture versions may not support this any longerin ...moduleswsprojectclassfunctions.php on line 232

Warning
Call-time pass-by-reference has been deprecated argument passed by value; If you would like to pass it by referencemodify the declaration of [runtime function name](). If you would like to enable call-time pass-by-referenceyou can set allow_call_time_pass_reference to true in your INI fileHoweverfuture versions may not support this any longerin ...moduleswsprojectclassfunctions.php on line 259


What can I do exactly to correct this on Xoop 2.5.0.1 ?




TopTop
« 1 2 3 (4) 5 6 7 »



Login

Who's Online

183 user(s) are online (120 user(s) are browsing Support Forums)


Members: 0


Guests: 183


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits