vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=34)
-   -   BB| Messenger 1.5 (https://vborg.vbsupport.ru/showthread.php?t=66989)

C.Birch 07-08-2004 10:00 PM

BB| Messenger 1.5
 
Please press install if you install this hack

Support Can Not Be Given For This Hack

BB|Messenger is a user to user messenger system for vb3 that runs off your user database.

This hack as been made for my own forums and has not been tested on any other forums, so its very likely that errors might be found on other system set up's.

To Install:

upload all the files in the same way that they are in side the zip.

once all files are upload load the page http://www.yourdomain.com/bbmessenger/
note that the address before bbmessenger/ will be the path to the folder on your site.

Follow the install page and your all done.

The only other thing that needs doing is the editing of the address's in the marquee.php file that you upload to your forums root.

Find:

PHP Code:

 echo "<tr>\n";
    echo 
"<td width=\"$marquee_width\" style=\"border-bottom: 1px inset #000000; background-color: #4C6CA4\" onMouseover=\"this.style.backgroundColor='#607DAE';\" onMouseOut=\"this.style.backgroundColor='#4C6CA4';\">\n";
    echo 
"<font size=1 face=\"Verdana, Arial, sans-serif, Helvetica, Times\">\n";
    echo 
"<b><a href=\"http://community.ultimate-music.net/showthread.php?s=&threadid=" $latestthread['threadid'] . "\" target='_blank'>" $latestthread['title'] . "</a></b><br>\n";
    echo 
"Started by: <a href=\"http://community.ultimate-music.net/member.php?s=&action=getinfo&username=" $latestthread['postusername'] . "\" target='_blank'>" $latestthread['postusername'] . "</a><br>\n";
    echo 
"Last Post by: <a href=\"http://community.ultimate-music.net/member.php?s=&action=getinfo&username=" $latestthread['lastposter'] . "\" target='_blank'>" $latestthread['lastposter'] . "</a><br>\n";
    echo 
$numreplies;
    echo 
"\n</font>\n";
    echo 
"</td>\n</tr>\n\n"

and edit it to meet your own needs.

User linking to the messenger

put a link anywhere you like on your forums linking to /bbmessenger/index.php

How To's

To edit the colours edit the css in the files in the style folder.

Support

Can not be given via my self due to work load please do not e-mail or pm asking for help in anyway because the reply will more and likely be no, this does not stop user's from helping each other with probs in this topic and if a fix or addon is made i will update the zip with it up on the asking of doing so.

Fix's

1) check your vBulletin cookies Prefix in vb's config file is set to bb like below:

// Prefix that all vBulletin cookies will have
// For example
$cookieprefix = 'bb';

if not set it to the above, if setting it to the above gives you errors with other hacks follow the steps on page 3 for editing messengers cookie call's.

this fix's the login error.

2) https://vborg.vbsupport.ru/showpost....&postcount=164 Zip will get updated when next version is out.

C.Birch 07-09-2004 11:05 AM

Install Screen

C.Birch 07-09-2004 11:06 AM

Launch Screen

C.Birch 07-09-2004 11:06 AM

Messenger Windows

M1th 07-09-2004 11:23 AM

First to say thanks for the amazing hack! :) Well done dude!

C.Birch 07-09-2004 11:25 AM

hope it still works because the files i just pulled from off a old site due to me having to do a total format of my pc.

so if anythings missing from it let me know.

C.Birch 07-09-2004 11:25 AM

Quote:

Originally Posted by M1th
First to say thanks for the amazing hack! :) Well done dude!

thanx

NuclioN 07-09-2004 11:31 AM

Can't open it. The link to /forums/bbmessenger/index.php shoots right back to the loginscreen.

M1th 07-09-2004 11:46 AM

so far so good. One thing I'm wondering though... How much of a bandwidth this would eat for a board of size of about 400 online at the same time (on average).

C.Birch 07-09-2004 11:54 AM

Quote:

Originally Posted by M1th
so far so good. One thing I'm wondering though... How much of a bandwidth this would eat for a board of size of about 400 online at the same time (on average).

no idea because it was just made for my own use. but the mesaages just go to a temp table in the database and there removed from it soon the message is send to the other user.


NuclioN abit more info would be nice eg what are you trying to do, install or load the messenger it self.

nexialys 07-09-2004 11:56 AM

an easy setting would be to have a permission based messenger, so users with permission are displayed only... ;)

NuclioN 07-09-2004 11:57 AM

After the install you see this: "BB|Messenger is now ready for use
Click Here To Load BB|Messenger"

When i click on Load BB|Messenger it asked to login. Altough i was loggedin already, i've logged out and again logged in and tried again.
Then i see this:
"Click here to goto the login page
Once you have logged into the forum, load BB|Messenger again. "

??

C.Birch 07-09-2004 11:58 AM

Quote:

Originally Posted by NuclioN
After the install you see this: "BB|Messenger is now ready for use
Click Here To Load BB|Messenger"

When i click on Load BB|Messenger it asked to login. Altough i was loggedin already, i've logged out and again logged in and tried again.
Then i see this:
"Click here to goto the login page
Once you have logged into the forum, load BB|Messenger again. "

??


im guessing a cookie prob of some type.

C.Birch 07-09-2004 12:00 PM

Quote:

Originally Posted by nexialys
an easy setting would be to have a permission based messenger, so users with permission are displayed only... ;)

only user's that have the messenger loaded show up as online anyway.

nexialys 07-09-2004 12:04 PM

oh... ok then... good thing... btw, would be good also to have that permission thing, so only selected users/groups can access it...

i may be interested to a minimalist version where only admins can be chatting, so users can see the messenger, but can only chat with admins... this would make a real "Live Support"... isn't it ?! this can be easily done once the system integrate with vB permissions.

NuclioN 07-09-2004 12:05 PM

Maybe the cookie prefix is the problem but i realy don't know how to fix this.

nexialys 07-09-2004 12:06 PM

hum.. another suggestions... would be cool to have a seperate page for the Buddy List, so we see when our friends are online... this can be done like the module that display the News...

these suggestions btw are not only for C.Birch, any coder can do these... (i may...)

C.Birch 07-09-2004 12:09 PM

Quote:

Originally Posted by nexialys
hum.. another suggestions... would be cool to have a seperate page for the Buddy List, so we see when our friends are online... this can be done like the module that display the News...

these suggestions btw are not only for C.Birch, any coder can do these... (i may...)

you mean split up the top part? because it already shows if your bubbys are online or offline at the top in the Offline Buddies and Online Buddies bits, this information is pulled from your bubby list in your user cp.


NuclioN pass also because the hack was made that long ago i have no idea where stuff is without takeing hours to look at all the files.

NuclioN 07-09-2004 12:14 PM

I hope someone can look to the code again to let it work with vb3. :( :)

nexialys 07-09-2004 12:17 PM

yeah, i just thought it would be better to have it seperate in the bottom, like the Latest Threads, so you load that part only when needed... or it takes more resources.

btw, each block can be added per prefs, like Latest News, Buddies, so if we don't want to use them, we just click to close them... because i don't see the use of the latest threads, we already have the forum for that... but some may need it.

ranger2kxlt 07-09-2004 12:18 PM

I like Nex.... idea of only allowing to talk with admins or mods...gives the site a "live support" touch.

nexialys 07-09-2004 12:19 PM

Nuclion... it's working perfectly on a vB3... don't say it's not working just because your situation is not ok... yes the code may need some tweaks, but as C.Birch will not give more support, i suggest you wait and see if someone else have the same bug as you do... someone will have an answer.,

nexialys 07-09-2004 12:21 PM

btw Nuclion, did you filled this: $VAR["vbulletinlicenceid"] ?! the cookie will not work if you don't enter your license number in the proper file, because it is said so...

in sources/boardmodule/vb3.inc.php

...

M1th 07-09-2004 12:25 PM

The only problem I see with adding permissions to it is the fact that the index.php file is in the /messenger/ directory.

I tried to add a permission check by adding this to the bbmessenger/index.php file:


PHP Code:

 require_once('../global.php');
 
  
//permissions check
 
if (!($permissions['adminpermissions'] & ISMODERATOR))
 {
     
print_no_permission();
 } 

BUT, it wont work since the global.php file also needs an init.php but it's located in the includes/ dir.

So as you can see, we have a directory problem here.

nexialys 07-09-2004 12:29 PM

simple:
Code:

chdir('../');
require_once('global.php');

  //permissions check
if (!( $permissions['adminpermissions'] & ISMODERATOR))
{
    print_no_permission();
}

problem with this suggestion is that it will close the chat for non admin, so you can't chat with them. i may come with a suggestion later, where admins and mods are listed, but no other... users are not listed but can chat with shown persons...

M1th 07-09-2004 12:35 PM

True, but is there a way to end the "chdir('../');" call after the permission check? cuz it wil interfere with other calls later in the code.

NuclioN 07-09-2004 12:35 PM

Quote:

Originally Posted by nexialys
btw Nuclion, did you filled this: $VAR["vbulletinlicenceid"] ?! the cookie will not work if you don't enter your license number in the proper file, because it is said so...

in sources/boardmodule/vb3.inc.php

...

It appears twice in the file. Is this number that one on top of each php file or your actual vb licence number when you login in the vbulletin.com member area?

Polo 07-09-2004 12:39 PM

wow, this hack looks nice!

nexialys 07-09-2004 12:51 PM

Quote:

Originally Posted by NuclioN
It appears twice in the file. Is this number that one on top of each php file or your actual vb licence number when you login in the vbulletin.com member area?

no, it's the number of your license... usually is like: L000000. you see it on top of all your files, like:
Code:

<?php
/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 3.0.3 - Licence Number L000000

btw, the autodetect may work this out, but sometimes it's not working great... did you hacked your board in some way ?!

NuclioN 07-09-2004 01:01 PM

It's a clean installed vb 303 with only the vbadvanced portal. After entering that code the problem remains. :(

C.Birch 07-09-2004 01:11 PM

link to your install would be nice that way we can see if its a user end prob or server side. eg if it loads for me on your site then its user side. if i get the same probs then its server side.

NuclioN 07-09-2004 01:36 PM

<a href="http://www.cyberty.nl/forums/" target="_blank">http://www.cyberty.nl/forums/</a> right above the footer is the link

C.Birch 07-09-2004 01:59 PM

Quote:

Originally Posted by NuclioN
http://www.cyberty.nl/forums/ right above the footer is the link


ok it defo looks like cookies

try the following:

in vb3.inc.php

find:
PHP Code:

// Returns an array of user details, or false depending on whether user's cookies are valid.
function boardmodule_user_authentication()
{
    global 
$VAR;
    if (!isset(
$_COOKIE["bbuserid"]) OR !ereg("^[0-9]*$"$_COOKIE["bbuserid"]))
    {
        return 
PERM_LOGGED_OUT;
    }
    if (!isset(
$_COOKIE["bbpassword"]) OR !ereg("^[0-9A-Fa-f]*$"$_COOKIE["bbpassword"]))
    {
        return 
PERM_LOGGED_OUT;
    } 

and replace with:

PHP Code:

// Returns an array of user details, or false depending on whether user's cookies are valid.
function boardmodule_user_authentication()
{
    global 
$VAR;
    if (!isset(
$_COOKIE["vbuserid"]) OR !ereg("^[0-9]*$"$_COOKIE["vbuserid"]))
    {
        return 
PERM_LOGGED_OUT;
    }
    if (!isset(
$_COOKIE["vbpassword"]) OR !ereg("^[0-9A-Fa-f]*$"$_COOKIE["vbpassword"]))
    {
        return 
PERM_LOGGED_OUT;
    } 

close all windows and remove all cookies and temp ineternet files and try again.

because my vb cookies save as bbpassword and so on where yours are saveing as vbpassword

C.Birch 07-09-2004 02:01 PM

heres a pic of how your cookie names are not the same as mine or vb.org's

NuclioN 07-09-2004 02:08 PM

Gives this error on top:

Notice: Undefined index: bbuserid in /bbmessenger/sources/boardmodule/vb3.inc.php on line 93
SQL ERROR: SELECT userid, username, usergroupid, membergroupids, password, salt, pmunread as unreadpms FROM user WHERE userid= LIMIT 1 [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 1]
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /bbmessenger/sources/boardmodule/vb3.inc.php on line 94

Maybe i must change the cookie prefix in config.php?

C.Birch 07-09-2004 02:12 PM

no in vb3.inc.php

find:

$user = db_query("SELECT userid, username, usergroupid, membergroupids, password, salt, pmunread as unreadpms FROM {prefix}user WHERE userid=" . $_COOKIE["bbuserid"] . " LIMIT 1");

replace with:

$user = db_query("SELECT userid, username, usergroupid, membergroupids, password, salt, pmunread as unreadpms FROM {prefix}user WHERE userid=" . $_COOKIE["vbuserid"] . " LIMIT 1");

C.Birch 07-09-2004 02:14 PM

there might be other parts in other files that might need the cookie call's editing from the bb ones to vb ones so it works with your cookies.

NuclioN 07-09-2004 02:14 PM

Ok it works :) Tnx for your help C. Birch. It's a great addon.

C.Birch 07-09-2004 02:16 PM

or you could just edit:

// Prefix that all vBulletin cookies will have
// For example
$cookieprefix = 'bb';

in vb's config.php as you said but that might kill your vbadvanced so it be best to edit messenger to work with your setup.

Acido 07-09-2004 02:24 PM

Instaled and Working 100/100 :D

Great work !

Features suggested for next versions:

1) Ignore User
2) Set usergroups permisions

Thanx for this excellent hack !


All times are GMT. The time now is 07:35 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.01570 seconds
  • Memory Usage 1,847KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (4)bbcode_php_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete