Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
1 + 9 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     
assign('audios', $audiodata); function audioLoader(){ global $xoopsDB; $audios =array(); $q=1; $query = $xoopsDB->queryF(' SELECT * FROM ' . $xoopsDB->prefix('audios')); while($myrow = $xoopsDB->fetchArray($query) ) { $audios[$q]['id'] = $myrow['id']; $audios[$q]['title'] = $myrow['title']; $audios[$q]['play'] = $myrow['play']; $audios[$q]['source'] = $myrow['source']; $audios[$q]['type'] = $myrow['type']; $audios[$q]['size'] = $myrow['size']; $audios[$q]['download'] = $myrow['download']; $q++; } return $audios; } i am following kaotik tutorial it is givng me this error Fatal error: Call to a member function assign() on a non-object in please help[/quote]" />

Re: HI i am trying to assign data to template but it giving me error please help
by culex on 2009/6/21 9:42:36

You might want to take a look at this :)
https://xoops.org/modules/newbb/viewtopic.php?topic_id=68116&forum=68&post_id=309457
Re: HI i am trying to assign data to template but it giving me error please help
by baloch on 2009/6/21 9:01:12

How do i use assign template in admin section?
HI i am trying to assign data to template but it giving me error please help
by baloch on 2009/6/21 8:50:22

require('../../../mainfile.php');
global $xoopsOption,$xoopsUser,$xoopsTpl;


include_once "adminheader.php";
$xoopsOption['template_main'] = 'audio_adminindex.html';

//Display the admin menu
xoops_module_admin_menu(0,_AM_AU_ADMENU0);

/**
* To use this as a template you need to write code to display
* whatever it is you want displaying between here...
*/

$audiodata = audioLoader();
$xoopsTpl->assign('audios', $audiodata);
function audioLoader(){
global $xoopsDB;
$audios =array();
$q=1;
$query = $xoopsDB->queryF(' SELECT * FROM ' . $xoopsDB->prefix('audios')); while($myrow = $xoopsDB->fetchArray($query) )
{
$audios[$q]['id'] = $myrow['id'];
$audios[$q]['title'] = $myrow['title'];
$audios[$q]['play'] = $myrow['play'];
$audios[$q]['source'] = $myrow['source'];
$audios[$q]['type'] = $myrow['type'];
$audios[$q]['size'] = $myrow['size'];
$audios[$q]['download'] = $myrow['download'];
$q++;
}
return $audios;



}

i am following kaotik tutorial

it is givng me this error
Fatal error: Call to a member function assign() on a non-object in

please help

Who's Online

110 user(s) are online (87 user(s) are browsing Support Forums)


Members: 0


Guests: 110


more...

Donat-O-Meter

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

Latest GitHub Commits