REGISTER or LOGIN to have the annoying ads removed.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Notification when message in Guestbook
#1
Notification when someone write in my Guestbook (Guestbook PlugIn) can someone make this or tell me step by step how to do it
**Translater and Beta Tester Game Section 1.2**
I´m allso using Mybb 1.4
#2
You want PM or email?
#3
labrocca Wrote:You want PM or email?

PM will be great
**Translater and Beta Tester Game Section 1.2**
I´m allso using Mybb 1.4
#4
Try this function...see if it works for you. It's untested.

Code:
function mybb_central_send_pm($subject, $fromid, $toid, $message)
{
    global $user, $db, $mybb;

        require_once MYBB_ROOT."inc/datahandlers/pm.php";

        $pmhandler = new PMDataHandler();

        $pm = array(
            "subject" => $db->escape_string($subject),
            "message" => $db->escape_string($message),
            "icon" => -1,
            "fromid" => intval($fromid),
            "toid" => intval($toid),
            "do" => '',
            "pmid" => ''
        );

    
        $pm['options'] = array(
            "savecopy" => "no",
            "saveasdraft" => 0,
            "signature" => "no",
            "disablesmilies" => "no",
        );

        $pm['saveasdraft'] = 0;
        $pmhandler->admin_override = 1;
        $pmhandler->set_data($pm);

        if($pmhandler->validate_pm())
        {
            $pmhandler->insert_pm();

        }
}
#5
What do i do with the code ??? is it a PlugIn ?
**Translater and Beta Tester Game Section 1.2**
I´m allso using Mybb 1.4
#6
It's a function. You use it like this:

mybb_central_send_pm($subject, $fromid, $toid, $message);

I haven't looked at the guestbook plugin yet so I can't say where it should go. Do you know any php?
#7
No i dont know any php and when i need something i need a plugin to activate :o)
**Translater and Beta Tester Game Section 1.2**
I´m allso using Mybb 1.4
#8
Overwrite the original gb.php (root) with the attached one. Tested this on MyBB 1.2.13.

Message + Subject + FromID (=1) can be changed in the file;
Default Values:
Code:
// MESSAGE
$message = "You've Got A New Entry In Your Guestbook From {$mybb->user['username']} <br /><br /> Go to Your Guestbook: <a href=\"gb.php?act=view&amp;uid={$id}\">Click</a>";
// SUBJECT
$subject = "New GuestBook Entry";
// FROM ID
$fromid = 1;


Attached Files
.php   Less than 1 minute ago">gb.php (Size: 4.93 KB / Downloads: 2)
#9
thank you VERY VERY mutch but url link dosent work

The code use You've Got A New Entry In Your Guestbook From MulleMek <br /><br /> Go to Your Guestbook: <a href="gb.php?act=view&amp;uid=1">Click</a> and the link dosent work
**Translater and Beta Tester Game Section 1.2**
I´m allso using Mybb 1.4
#10
You have HTML set to yes in PM's ?

Edit:

Else you need to change it in a BBCode
Code:
[url] ... [/url]


Possibly Related Threads...
Thread Author Replies Views Last Post
Exclamation Put the icon in the column of last message? Zero 8 6,588 Oct 04, 2008, 03:06 PM
Last Post: labrocca
  LeX-: Notification after moderating thread DamYan 9 6,501 Aug 11, 2008, 10:04 AM
Last Post: LeX-

Forum Jump:


Users browsing this thread: 1 Guest(s)