1
einherjer
Replacment for myxoopstree (and general xoopsformloader questions)?
  • 2005/1/27 22:18

  • einherjer

  • Just popping in

  • Posts: 30

  • Since: 2002/11/8


Hi,

i am playing around with the xoopsformloader and need help with drop down menue and delete Buttons.

e.g. in the core module MyDownloads, Function modCat there is a drop down menu with the structure of main and sub categorys and a delete (and cancel) button:

function modCat()

{

    global 
$xoopsDB$HTTP_POST_VARS$myts$eh$mytree;

    
$cid $HTTP_POST_VARS["cid"];

    
xoops_cp_header();

    echo 
"<h4>"._MD_DLCONF."</h4>";

        echo
"<table width='100%' border='0' cellspacing='1' class='outer'>"

           
."<tr class="odd"><td>";

    echo 
"<h4>"._MD_MODCAT."</h4><br />";

    
$result=$xoopsDB->query("SELECT pid, title, imgurl FROM ".$xoopsDB->prefix("mydownloads_cat")." WHERE cid=$cid");

    list(
$pid,$title,$imgurl) = $xoopsDB->fetchRow($result);

    
$title $myts->makeTboxData4Edit($title);

    
$imgurl $myts->makeTboxData4Edit($imgurl);

    echo 
"<form action=index.php method=post>"._MD_TITLEC."<input type=text name=title value="$title" size=51 maxlength=50><br /><br />"._MD_IMGURLMAIN."<br /><input type=text name=imgurl value="$imgurl" size=100 maxlength=150><br />

    <br />"
._MD_PARENT."&nbsp;";

    
$mytree->makeMySelBox("title""title"$pid1"pid");

    echo 
"<input type='hidden' name='cid' value='$cid'>

    <input type=hidden name=op value=modCatS><br />

    <input type=submit value=""._MD_SAVE."">

    <input type=button value="
._MD_DELETE." onClick="location='index.php?pid=$pid&cid=$cid&op=delCat'">";

    echo 
"&nbsp;<input type=button value="._MD_CANCEL." onclick="javascript:history.go(-1)" />";

    echo 
"</form>";

    echo
"</td></tr></table>";

    
xoops_cp_footer();

}


What would be the correct usage of xoopsformselect and xoopsformbutton to have the same functionality?

Maybe someone could "translate" the above function so that a php/xoops newb like me could see the difference?

Thanks

Login

Who's Online

248 user(s) are online (155 user(s) are browsing Support Forums)


Members: 0


Guests: 248


more...

Donat-O-Meter

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

Latest GitHub Commits