Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons

Reply
 
Thread Tools
vbulletin-xml-rpc-server for instant Desktop Notification Details »»
vbulletin-xml-rpc-server for instant Desktop Notification
Version: 2.00, by sf.nsuers sf.nsuers is offline
Developer Last Online: Apr 2014 Show Printable Version Email this Page

Category: Integration with vBulletin - Version: 3.7.x Rating:
Released: 10-20-2008 Last Update: 12-08-2008 Installs: 110
DB Changes Uses Plugins Auto-Templates
Re-useable Code Additional Files  
No support by the author.

Let's take a look at following screen-shots first.









Yeah.. these look like Gmail Notifer application which is actually vbulletin-desktop-notifier application. As a forum admin, you might want to offer such application to your members.



== Video tutorials ==
Editing
Uploading
Installation

You can use vBulletin Desktop Notifier as dekstop client or free to build your own following API-DOC .



== Demo watch video ==
I'm offering demo in my forum. Here're the steps.

Download vbulletin-desktop-notifier and install in your machine.

Run vbulletin-desktop-notifier and login using
username: priti
password: 123456

Create a new thread at Demo vbulletin-xml-rpc-server threads or reply to existing thread.

You'll see notification in your desktop within few seconds.

Request: Please do not change password for user Priti. If somehow the login does not work you can try by creating a temporary user.



== Coming up next ?.. ==
Based on feedback I'm listing few of the enhancements that will be part of upcoming releases.
  • [S]Server Compatibility check script[/S]
  • [S]Options to select forum ids in User CP[/S]
  • Display avatar of the person who made post in the notification window
  • [S]Unread private message notification[/S]
  • [S]Support for PHP4[/S]


Alfa1 came up with these ideas
which hopefully will be integrated sooner or later in future releases:

- friends coming online

Which of the following events does this notifier alert to:
Member notifications:
- profile messages awaiting approval
- requests to join your social groups
- invitations to join social groups
- unread picture comments
- picture comments awaiting approval
- group messages awaiting approval

Moderator notifications:
- post awaiting approval
- threads awaiting approval
- events awaiting approval
- attachments awaiting approval
- members awaiting approval
- blogs awaiting approval
- blog comments awaiting approval
- profile comments awaiting approval
- group comments awaiting approval
- pictures awaiting approval
- picture comments awaiting approval

== Ongoing Discussions ?.. ==
discussions on release-02 starts here

== HOT FIX [release 2.0]?.. ==
Rename all files in system/application/models directory into lowercases. i.e:
Forum.php => forum.php
Settings.php => settings.php
Token.php => token.php
User.php => user.php

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #52  
Old 10-22-2008, 04:30 PM
ZomgStuff ZomgStuff is offline
 
Join Date: Feb 2007
Posts: 469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've got it figured out, for those who don't use prefix's for their tables here are the two changes
forum.php
PHP Code:
<?php
/**
 * forum.php
 * 
 * This file contains user relevant functions. 
 * 
 * @author  Sword^Fish <swordfish@nsuers.com>
 * @version 1
 * @since   Release 1
 * @package vbulletin-xml-rpc-server
 * 
*/
require_once("server.php");

/**
 * returns detail of latest thread
 *
 * @global Database $GLOBALS['DB']  database connection object
 * @param  string   $args[0] token
 * @return array
 * @todo   check usergroup permission
*/

function forum_latest_thread($method_name$args$app_data)
{
    
    
$obj_token = new Token($args[0]);
    
/* check: token is assigned to an user */
    
if($obj_token->userid == null)
    {        
        return array(
'faultCode'   => $GLOBALS['VBULLETIN_XML_RPC_ERROR_DB']['SERVICE_TOKEN_INVALID']['code'],
                     
'faultString' => $GLOBALS['VBULLETIN_XML_RPC_ERROR_DB']['SERVICE_TOKEN_INVALID']['string']);    
        
    } 
    
/* check: token is alive (not expired) */
    
if($obj_token->is_alive == 0)
    {        
        return array(
'faultCode'   => $GLOBALS['VBULLETIN_XML_RPC_ERROR_DB']['SERVICE_TOKEN_EXPIRED']['code'],
                     
'faultString' => $GLOBALS['VBULLETIN_XML_RPC_ERROR_DB']['SERVICE_TOKEN_EXPIRED']['string']);        
    }     
    
    
/* we shall use this token, so increase  usages counter */        
    
$obj_token->update_count($obj_token->token);
                
    
/* prepare query string */            
    
$query="SELECT 
                f.forumid AS forum_id, f.title AS forum_name,
                t.threadid AS topic_id, t.title AS topic_title,
                p.postid AS post_id, p.dateline AS post_time,
                u.userid AS user_id, u.username
            FROM thread t, forum f, post p, user u 
            WHERE   t.threadid = p.threadid
                AND f.forumid  = t.forumid
                AND p.postid   = t.lastpostid 
                AND p.userid   = u.userid                 
            ORDER BY t.lastpostid DESC LIMIT 1"
;
                
    
/* run query string */
    
$rows $GLOBALS['DB']->run($query);

    if(
$rows)
    {
        return 
$rows[0];
    }    
    return array(
'faultCode'   => $GLOBALS['VBULLETIN_XML_RPC_ERROR_DB']['SERVICE_FAIL']['code'],
                 
'faultString' => $GLOBALS['VBULLETIN_XML_RPC_ERROR_DB']['SERVICE_FAIL']['string']);    
}
?>
user.php
PHP Code:
<?php
/**
 * user.php
 * 
 * This file contains user relevant functions.
 * 
 * @author  Sword^Fish <swordfish@nsuers.com>
 * @version 1
 * @since   Release 1
 * @package vbulletin-xml-rpc-server
*/

require_once("server.php");

/**
 * authenticates a user and returns user id
 * Check for valid username and password.
 * Username must be associated with a registered account in vBulletin database.
 * User account must be verified one. 
 *
 * @global Database $GLOBALS['DB']  database connection object
 * @param  string $args[0] username
 * @param  string $args[1] password
 * @return mixed  returns int userid or array on login failure
 * @todo   check for verified account
 * @todo   check for banned account
*/

function user_login($method_name$args$app_data)
{    
    
    
//checkpost: valid username
    
if(_is_valid_username($args[0]) == false)
    {
        return array(
'faultCode'   => $GLOBALS['VBULLETIN_XML_RPC_ERROR_DB']['USER_SERVICE_USERNAME_DNE']['code'],
                     
'faultString' => $GLOBALS['VBULLETIN_XML_RPC_ERROR_DB']['USER_SERVICE_USERNAME_DNE']['string']);                
    }
    
/* TODO: checkpost: email verified */
    
    /* TODO: checkpost: userid is not in banned group */
    
    /* checkpost: valid password */
    
$GLOBALS['DB']->set_entity("user"," ");    
    
$resource $GLOBALS['DB']->fetch(array("userid"), 
                                         
$filter = array("username LIKE '{$args[0]}'",
                                                      
" AND ",
                                                      
"password LIKE MD5(CONCAT(MD5('" $args[1] . "'), salt))"),
                                      
null,
                                      
0,
                                      
1);    

    if(
$resource/* valid query returned valid user id */
    
{
        
        
/* create token */
        
$token $GLOBALS['OBJ_TOKEN']->create($resource[0]['userid']);     
        if(
$token/* return token string */
        
{            
            return (string)
$token;
        } else {
            return array(
'faultCode'   => $GLOBALS['VBULLETIN_XML_RPC_ERROR_DB']['SERVICE_TOKEN_GENERATION']['code'],
                         
'faultString' => $GLOBALS['VBULLETIN_XML_RPC_ERROR_DB']['SERVICE_TOKEN_GENERATION']['string']);
        }
                
    } elseif(
$resource === false) { /* query error */
        
return array('faultCode'   => $GLOBALS['VBULLETIN_XML_RPC_ERROR_DB']['SERVICE_FAIL']['code'],
                     
'faultString' => $GLOBALS['VBULLETIN_XML_RPC_ERROR_DB']['SERVICE_FAIL']['string']);        
        
    }
    
/* login is invalid */    
    
return array('faultCode'   => $GLOBALS['VBULLETIN_XML_RPC_ERROR_DB']['USER_SERVICE_LOGIN']['code'],
                 
'faultString' => $GLOBALS['VBULLETIN_XML_RPC_ERROR_DB']['USER_SERVICE_LOGIN']['string']);        
}

/**
 * verifies userid existence
 *
 * @global Database $GLOBALS['DB']  database connection object
 * @param  int      $userid         userid
 * @return boolean 
*/
function _is_valid_username($username)
{
    
$GLOBALS['DB']->set_entity("user"," ");
    return 
$GLOBALS['DB']->check_record($username'username');
}

?>
Reply With Quote
  #53  
Old 10-22-2008, 05:16 PM
River_rush River_rush is offline
 
Join Date: Mar 2004
Location: Basingstoke
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by River_rush View Post
Hi, i am getting

com.nsuers.vbulletin_xml_rpc_client.ServiceError
at com.nsuers.vbulletin_xml_rpc_client.VbulletinXmlRp cJClient.require_token(VbulletinXmlRpcJClient.java :97)
at com.nsuers.vbulletin_xml_rpc_client.ForumServ.get_ latest_tread(ForumServ.java:33)
at Notifier$AutoCheck.run(Notifier.java:213)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)

in the error log and no messages via the notifier other than its running

also what command do i run to uninstall the sql code from this should I require too please?
Hi did you see this post please/? I should add that if I put your forum details in it works ok!
Reply With Quote
  #54  
Old 10-22-2008, 05:32 PM
ZomgStuff ZomgStuff is offline
 
Join Date: Feb 2007
Posts: 469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A recommendation I would add is to display the avatar of the person who made the post in the pop-up.
Reply With Quote
  #55  
Old 10-22-2008, 05:41 PM
sf.nsuers sf.nsuers is offline
 
Join Date: Mar 2008
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by River_rush View Post
Hi did you see this post please/? I should add that if I put your forum details in it works ok!
yes.. I've updated MOD description and mentioned possible reasons for getting such errors. Please make sure you're running php5 and php is compiled with xmlrpc-epi lib.
Reply With Quote
  #56  
Old 10-22-2008, 05:42 PM
sf.nsuers sf.nsuers is offline
 
Join Date: Mar 2008
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ZomgStuff View Post
A recommendation I would add is to display the avatar of the person who made the post in the pop-up.
C00L! Thanks for this idea. added in TODO list.
Reply With Quote
  #57  
Old 10-22-2008, 05:53 PM
ZomgStuff ZomgStuff is offline
 
Join Date: Feb 2007
Posts: 469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sf.nsuers View Post
C00L! Thanks for this idea. added in TODO list.
A couple other reommendations here.
1) Forum checking. Currently all people using it will get notifications from any new post in any forum, including those that they do not have access to.

Should be something simple along the lines of
PHP Code:
fetch_permissions($row["forumid"]) & $vbulletin->bf_ugp_forumpermissions['canview'
2) Have a link to go directly to the new post in the pop-up, and also having the option to right click the tasktray icon as well...

3) Don't display latest messages made by yourself. After you make your own post it will tell you that there's a new message by you several seconds later.

5) Add support for private-messages

6) Add support for new registrations.

I'd be willing to co-author this mod with you if you would like, I see a lot of potential in this. I'd be able to work more on the back-end of the PHP, SQL, and vBulletin integration than the Java portion. PM me if you'd be interested.
Reply With Quote
  #58  
Old 10-22-2008, 07:33 PM
Darkstarproject Darkstarproject is offline
 
Join Date: May 2008
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Love this mod!

Is there a way you can make it notify for a new PM ?
Reply With Quote
  #59  
Old 10-22-2008, 08:07 PM
WarLion's Avatar
WarLion WarLion is offline
 
Join Date: Jun 2006
Posts: 165
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is a shame i dont have php5 i have to unistall
Reply With Quote
  #60  
Old 10-23-2008, 12:04 AM
River_rush River_rush is offline
 
Join Date: Mar 2004
Location: Basingstoke
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sf.nsuers View Post
yes.. I've updated MOD description and mentioned possible reasons for getting such errors. Please make sure you're running php5 and php is compiled with xmlrpc-epi lib.
I will have to uninstall this then as lunarpages (a major host) is still running PHP Version 4.4.9
Reply With Quote
  #61  
Old 10-23-2008, 12:05 AM
sf.nsuers sf.nsuers is offline
 
Join Date: Mar 2008
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ZomgStuff View Post
A couple other reommendations here.
1) Forum checking. Currently all people using it will get notifications from any new post in any forum, including those that they do not have access to.

Should be something simple along the lines of
PHP Code:
fetch_permissions($row["forumid"]) & $vbulletin->bf_ugp_forumpermissions['canview'
2) Have a link to go directly to the new post in the pop-up, and also having the option to right click the tasktray icon as well...

3) Don't display latest messages made by yourself. After you make your own post it will tell you that there's a new message by you several seconds later.

5) Add support for private-messages

6) Add support for new registrations.

I'd be willing to co-author this mod with you if you would like, I see a lot of potential in this. I'd be able to work more on the back-end of the PHP, SQL, and vBulletin integration than the Java portion. PM me if you'd be interested.
excellent! I'll PM you about project hosting details by tonight. :-D
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:24 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04977 seconds
  • Memory Usage 2,372KB
  • Queries Executed 27 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_php
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete