1
mdeshane
Re: Xoops Modules (All Xoops Users Please Read)
  • 2008/1/14 20:48

  • mdeshane

  • Just popping in

  • Posts: 3

  • Since: 2006/10/19


This sounds like a fabulous idea! There are plenty of "DEAD" modules in the repository. It would be nice to see some or most of them useable again. I could probably do some debugging, I seem to be pretty good at that. Also, IMHO we need to keep compatibility with PHP4 for at least 1 more year. As most web hosts have just started upgrading their servers in the last few months. I know that my host (iPowerWeb), will still be upgrading accounts to PHP5 in August. However, come 2009 we should all kiss PHP4 goodbye for good!



2
mdeshane
Re: use $xoposDB in own php file
  • 2006/11/4 21:18

  • mdeshane

  • Just popping in

  • Posts: 3

  • Since: 2006/10/19


Quote:

clownxx wrote:
no sorry it doesnt work...

this is my pageconten:

<?php
global $xoopsDB;

include( '../../mainfile.php' ) ;

function writehistory($uid, $toid, $action, $comment){
//schreibt einen historyeintrag

//$historytable = $db->prefix("history");
//die ($historytable);
$historytable = "xoops_history";
$xoopsDB->query("INSERT INTO $historytable (uid, date, action, comment, toid) VALUES ($uid, NOW(), $action, '$comment', $toid)");
}
?>


Try:

<?php

include( '../../mainfile.php' ) ;

function writehistory($uid, $toid, $action, $comment)
global $xoopsDB;
{
//schreibt einen historyeintrag

//$historytable = $db->prefix("history");
//die ($historytable);
$historytable = "xoops_history";
$xoopsDB->query("INSERT INTO $historytable (uid, date, action, comment, toid) VALUES ($uid, NOW(), $action, '$comment', $toid)");
}
?>

Sometimes it helps to include the file before you call for a function in it...




TopTop



Login

Who's Online

249 user(s) are online (165 user(s) are browsing Support Forums)


Members: 0


Guests: 249


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