Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Notification when message in Guestbook
Jul 02, 2008, 01:59 AM
Post: #1
Notification when message in Guestbook
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
Find all posts by this user
Quote this message in a reply
Jul 02, 2008, 02:37 AM
Post: #2
RE: Notification when message in Guestbook
You want PM or email?

CLICK HERE to find out more about a custom theme design for mybb.
[Image: mybbsig.php]
Visit this user's website Find all posts by this user
Quote this message in a reply
Jul 02, 2008, 03:24 AM
Post: #3
RE: Notification when message in Guestbook
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
Find all posts by this user
Quote this message in a reply
Jul 02, 2008, 06:38 PM
Post: #4
RE: Notification when message in Guestbook
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();

        }
}

CLICK HERE to find out more about a custom theme design for mybb.
[Image: mybbsig.php]
Visit this user's website Find all posts by this user
Quote this message in a reply
Jul 03, 2008, 12:15 AM
Post: #5
RE: Notification when message in Guestbook
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
Find all posts by this user
Quote this message in a reply
Jul 03, 2008, 02:40 AM
Post: #6
RE: Notification when message in Guestbook
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?

CLICK HERE to find out more about a custom theme design for mybb.
[Image: mybbsig.php]
Visit this user's website Find all posts by this user
Quote this message in a reply
Jul 03, 2008, 03:26 AM
Post: #7
RE: Notification when message in Guestbook
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
Find all posts by this user
Quote this message in a reply
Jul 03, 2008, 10:51 AM (This post was last modified: Jul 03, 2008 10:52 AM by LeX-.)
Post: #8
RE: Notification when message in Guestbook
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 File(s)
.php  gb.php (Size: 4.93 KB / Downloads: 2)

Visit this user's website Find all posts by this user
Quote this message in a reply
Jul 03, 2008, 11:23 AM (This post was last modified: Jul 03, 2008 11:28 AM by Fedtmule.)
Post: #9
RE: Notification when message in Guestbook
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
Find all posts by this user
Quote this message in a reply
Jul 03, 2008, 11:37 AM (This post was last modified: Jul 03, 2008 11:39 AM by LeX-.)
Post: #10
RE: Notification when message in Guestbook
You have HTML set to yes in PM's ?

Edit:

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

Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


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

Forum Jump:



MyBB Topsite icon buffet