1
C6_chus
Error Using XoopsPrivmessage Class
  • 2008/1/4 9:13

  • C6_chus

  • Just popping in

  • Posts: 10

  • Since: 2006/9/12


Hy,

I writing a little module for XOOPs 2.2.5 and I would like to send a PM on an special event.

I´m trying to use the XOOPS class XoopsPrivmessage so I declare the class and use it. But somehow I die on the event of writing the message to the database.

That’s the way I call the class and create a PM:
...
    
$pm_handler =& xoops_gethandler 'privmessage'); 
            
$pm =& $pm_handler->create();
            
$pm->setVar("subject""testsubject");
            
$pm->setVar("msg_text""text in message");
            
$pm->setVar("to_userid"12);
            
$pm->setVar("from_userid"44);
            
$pm->setVar("from_delete"0);
            if (!
$pm_handler->insert($pm)) {echo "error sending pm";die;}
...

I die on this step of the XoopsPrivmessage class in kernel\privatemessage.php:

    $this
->db->query($sql)
 if (!
$result $this->db->query($sql)) {
            return 
false;


It looks like I need to load a further class so I can write the message to the db. But I think I got the database class loaded.

These are my classes loaded in the moment I get the error.

[0] => stdClass [1] => __PHP_Incomplete_Class [2] => Directory [3] => swfshape [4] => swffill [5] => swfgradient [6] => swfbitmap [7] => swftext [8] => swftextfield [9] => swffont [10] => swfdisplayitem [11] => swfmovie [12] => swfbutton [13] => swfaction [14] => swfmorph [15] => swfsprite [16] => domnode [17] => domdocument [18] => domparser [19] => domdocumenttype [20] => dtd [21] => domelement [22] => domattribute [23] => domcdata [24] => domtext [25] => domcomment [26] => domprocessinginstruction [27] => domnotation [28] => domentity [29] => domentityreference [30] => domnamespace [31] => XPathContext [32] => XPathObject [33] => XsltStylesheet [34] => protector [35] => xoopssecurity [36] => xoopserrorhandler [37] => xoopslogger [38] => xoopsobject [39] => xoopsobjecthandler [40] => xoopspersistableobjecthandler [41] => criteriaelement [42] => criteriacompo [43] => criteria [44] => mytextsanitizer [45] => xoopsdatabasefactory [46] => database [47] => xoopsdatabase [48] => xoopsmysqldatabase [49] => xoopsmysqldatabasesafe [50] => xoopsmysqldatabaseproxy [51] => xoopsconfighandler [52] => xoopsconfigoption [53] => xoopsconfigoptionhandler [54] => xoopsconfigitem [55] => xoopsconfigitemhandler [56] => xoopslocal [57] => xoopsmemberhandler [58] => xoopsuser [59] => xoopsguestuser [60] => xoopsuserhandler [61] => xoopsgroup [62] => xoopsgrouphandler [63] => xoopsmembership [64] => xoopsmembershiphandler [65] => xoopsprofile [66] => xoopsprofilehandler [67] => xoopsprofilefield [68] => xoopsprofilefieldhandler [69] => xoopssessionhandler [70] => xoopsmodule [71] => xoopsmodulehandler [72] => xoopsgroupperm [73] => xoopsgrouppermhandler [74] => xtheme [75] => smarty [76] => xoopstpl [77] => xoopsblock [78] => xoopsblockhandler [79] => xoopsblockinstance [80] => xoopsblockinstancehandler [81] => xoopsprivmessage [82] => xoopsprivmessagehandler




Would be very nice if someone could give me a hand on this.

Kindly Regards,
José



2
C6_chus
Re: Would like to hide a block depending on its content
  • 2007/11/1 13:30

  • C6_chus

  • Just popping in

  • Posts: 10

  • Since: 2006/9/12


Thanks a lot guys. I think your tips will be of a great help so far.
To avoid confusions, in my case I have to process the block to know it is empty.

May thanks again.

;)



3
C6_chus
Would like to hide a block depending on its content
  • 2007/11/1 1:36

  • C6_chus

  • Just popping in

  • Posts: 10

  • Since: 2006/9/12


Hy I would like to hide a block depending on its content.

Lest say I maid a vwar block for including nextactions of the vwar script (event script) in a block.
I would like that if there are no upcoming events that the block isn’t shown at the web site. At the moment. If the block returns no events I have an empty block with title. I would like to hide the complete block when it is empty there a no events.

Is there any xoopsoption or variable within a block I can set to hide a block so it is not shown?


I not sure if its the right forum, sorry if i missed.

Many thanks for your help.

;)



4
C6_chus
Re: Wrong permissions - Lost pass registration mail.
  • 2007/4/11 9:09

  • C6_chus

  • Just popping in

  • Posts: 10

  • Since: 2006/9/12


First of all Thanks a lot.
I did that and the option selected is right, or well the one I want. "Requieres user activation (recomended).

My problem is when the users clicks on the link in the activation mail an login prompt pops up and he has to login. But he has not activated his account yet.

Another problem is when a user wants to reset hes password cause he forgot it. When he clicks on tha confimation link in the confirmation mail, he recieves a login prompt to complete the process. Well he cant login cause he doesnt know his password.



5
C6_chus
Wrong permissions - Lost pass registration mail.
  • 2007/4/10 15:34

  • C6_chus

  • Just popping in

  • Posts: 10

  • Since: 2006/9/12


I’ve have somehow wired permissions configuration on my website and now I need to know how is the standard setup.

When some of my users request a new password (url/user.php#lost) and receices a confirmation mail (url /lostpass.php?email=mailname@mail.com&code=xxxxxx) or if the user is new and receives a user validation mail (url/modules/profile/activate.php?op=actv&id=xxx&actkey=xxxxxx) he needs to authenticate.

I don’t know what or when I changed the settings, but I’m pretty sure it got something to do with the access permissions to that module. But I’m not sure, if it’s the system module or the extended profiles module, and additionally I do not know where to change the settings.

So I better ask you.

Thanks in advance, hope someone can give me a hand on this.



6
C6_chus
Re: Include Sites in Xoops?
  • 2007/3/3 22:51

  • C6_chus

  • Just popping in

  • Posts: 10

  • Since: 2006/9/12


Thanks a lot. I will hace a look at it.

Nevertheless I modified framebrowser to get it to work on safe mode on.



7
C6_chus
Include Sites in Xoops?
  • 2007/2/12 15:43

  • C6_chus

  • Just popping in

  • Posts: 10

  • Since: 2006/9/12


Hy all,

Im looking for an module or hack (or whatever) that permits me to integrate websites in my XOOPS portal.

I´m using now the php hack framebrowser but I cant longer use it. I show you 2 examples on my web site. Hope that way its easier to understand.
With framebrowser
"http://www.charlieatsix.com/framebrowser.php?urlnav=http://www.charlieatsix.com/ts2/ts2.php"
The normal php site.
"http://www.charlieatsix.com/ts2/ts2.php"

Perhaps someone knows about something similar, or a module to use. Cause I cant use framebrowser cause of an server change anymore.

Would be gratefull If someone gives me a hand on this.

Thanks in advance.



8
C6_chus
Variables in a system block dummy
  • 2006/11/17 13:02

  • C6_chus

  • Just popping in

  • Posts: 10

  • Since: 2006/9/12


I’m trying to create an own block to show content of a page in a block.
What Im trying to do exactly is to show the content of the vwar-script nexactions.php in a block.
Well I managed this by creating an custom system block in blocks section selecting php – script and using an “include ‘http://www.blabla.org/nextactions.php.’;”
So this works perfectly.
But now my problem.
I want to make en if in this script accessing to the $_COOKIE variable. If your logged in to vwar show content if not show vwar login.
I´ve changed the nextactions.php script and if I open the script directly over the browser it works perfectly. www.blabla.org/nextactions.php.
But in the block, it seams that I´m out of the variable scope. And I can’t access to the $_COOKIE variable. If I include an print_r($_COOKIE); in the script in the block it shows an empty array( ) directly I get all info in the $_COOKIE.
I´ve been testing a while and it seems to be a problem with the include, cause if I don’t do an URL include it seems to work, and I can access the $_COOKIE, but the if do that the whole script stops to work.

So here is where I need some help.
Someone know how I can pass a variable to that include?
I tried to register another variable as global in the block but I can’t access it from the script.
Perhaps I can re-import the cookie in the nextactions.php script but Im not sure how to do it.

Would be nice if I would get an hand on this.

Thanks in advance.



9
C6_chus
Re: How do I get UID in a foreign block
  • 2006/11/8 16:09

  • C6_chus

  • Just popping in

  • Posts: 10

  • Since: 2006/9/12


Well, yes I forgott to mention.

If I open the script from outside a block as normal site, it works fine as I can use all vars in $GPC and function $xoopsUser works.

It just doesent work in the block.

For example simple script.
<?php
print_r
($_COOKIE);
?>

Opened from outside I works fine an prints hole array, starting with Array ( [forum_read] =>

Same script form whithin the block.
Array ( )



10
C6_chus
How do I get UID in a foreign block
  • 2006/11/8 14:15

  • C6_chus

  • Just popping in

  • Posts: 10

  • Since: 2006/9/12


Hy all,

first of all I want to thank you that you read my post and are willing to help me .

I´m trying to make an block for my clan site where I'm in the need of the uid of the current user.
My problem is that the block is an "system_block_dummy" that includes an php from an vwar app (nextactions.php).

I not sure how to get the uid of the current user, i tried to get the cookie but seams like cookie is somehow reseted cause I get now data from it.
Later i tried to get it with "$xoopsUser->getVar" but seems somehow that object $xoopsUser doesent exist. If included mainfile and common.php but didnt realy help.

Think Im doing something completly wrong.




TopTop



Login

Who's Online

225 user(s) are online (141 user(s) are browsing Support Forums)


Members: 0


Guests: 225


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