vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   vbPager log - simulate MSN,ICQ... (https://vborg.vbsupport.ru/showthread.php?t=129546)

Renmiri 10-19-2006 10:00 PM

vbPager log - simulate MSN,ICQ...
 
I won't be upgrading this to 3.6 anytime soon, but I'll try to give as much support as I can to 3.5.4 users :D

~~~Note!!!! Recently (July 07) the vbPagerHack has been declared vulnerable to some kind of attack. I therefore am closing this mod too. As far as I know, my hack is harmless and has no vulnerability but it is pretty useless without the rest of vbPager so I'm closing it. It will no longer be supported, although if you need some help uninstalling my mod I will be glad to help

This plugin works in conjunction with the vbPager Hack. Which does add to your database. So, as with all hacks, be sure TO BACK UR DATABASES UP before installing vbPager!!!! And backup them again before adding this hack just to keep this healthy habit going :p

My forums have Role Play areas and RPG Inferno, and during battles and RPG posting we like to talk to each other when we are online. My problem is that I have some forum users that connect from school, college or work and aren't allowed to use MSN. I had installed Shoutbox to allow those members to talk to others. But a shoutbox full of "bwahaha, I pwned you!" or "f**! you killed my player!" and other friendly banter exchanged during battles was getting.. tacky.

vbPager was a godsend because now members can chat in private. To make it even better I tried to make it more like the MSN (or other IM) we all are used to.

To make it resemble MSN, I added a continuous "Pager Log" to the "Pager Buddies" and the "newpager" screens, which lists your and your friends page to you in like an inbox or in MSN like order respectively.

Known bugs:
1) The log does not mark messages as read, i.e. you will get the popup page even if you read it before on the log.
2) The log mixes ALL your conversations so if you are chatting with 2 people both chats will be in the log (But version 1 lets you see which message # the sender was replying to)

I'm Working on:
[s] Customizable pager avatars[/s] Meh, too hard :rolleyes:
Fixing bug 2
You guys are welcome to add on to it or develop it further.

Fixed Bugs:
Improved performance
Previous version showed deleted posts :ermm:
Used to display name of hidden users on page history
Added a useless new user profile field, which made install difficult

================================================== ======
To get this pager log all you need is 2 plugins (conveniently packed in the XML file attached), 2 template changes and 1 new template. No need for step 5 anymore!!! :)

Steps:
1) Download and install the pagerlogv12.xml plugin


2) Modify the pager_newpager template:

Replace the entire template with the code on the pager_newpager11.txt file


3) Add a new template pagerlogbit with the code below as content:

Code:

<if condition="$vboptions['vbpager_active'] AND $bbuserinfo['userid']">
$pagerinfo[receiptid] <if condition="$pagerinfo['readtime']==0">*<else /> </if>  <a href="#" onclick="window.open('pager.php?do=buddylist&amp;puserid=$pagerinfo[fromuserid]','pagerbuddylist','statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,width=$vboptions[vbpager_width],height=$vboptions[vbpager_height]'); return false;"><if condition="$pagerinfo['username']<>$vbphrase['n_a']">$pagerinfo[fromusername]<else />***</if></a> - $pagerinfo[msgdate]: $pagerinfo[message]<br />
</if>

4) Modify the PAGERBUDDY template:

Find
Quote:

</if>
</if>
</if>
<!-- Do not remove this vB Pager copyright notice -->
<div align="center">
<div class="smallfont" align="center">
$vbphrase[pager_copyright_text]
</div>
<!-- Do not remove this vB Pager copyright notice -->
</body>
</html>
REPLACE IT with

Code:

</if>
</if>
<h2>Pager log</h2>
(* = Unread, *** = hidden user)
<div class="alt1">$pagerlogD</div>
</if>
<!-- Do not remove this vB Pager copyright notice -->
        <div align="center">
        <div class="smallfont" align="center">
        $vbphrase[pager_copyright_text]
        </div>
<!-- Do not remove this vB Pager copyright notice -->
</body>
</html>


================================================== ======
Upgrading from 1.1 to 1.2
Steps
1) Modify the pagerlog plugin:

Find the plugin under "parse_templates". Replace the entire plugin code with the code on the pagerlog12.txt file

After that you should be all set. No need to change templates. Pager queries will only be run if there's unread pages.

================================================== ======
Upgrading from 1.0 to 1.2
Steps
1) Modify the pager_newpager template:

Replace the entire template with the code on the pager_newpager11.txt file

2) Modify the pagerlog plugin:

Find the plugin under "parse_templates". Replace the entire plugin code with the code on the pagerlog12.txt file

After that you should be all set. You won't need that new field you added before so you can either leave it, delete it or change it to be invisible to the user

================================================== ======
Version 1.2
Improved perfrmance by only running queries when the user has unread pager messages.

Version 1.1
Took off the custom avatar thingie. No need to add fields to the database anymore

Version 1.0
Almost identical to MSN except avatars are on the left side (alterable on template pager_newpager if you like tables :p I hate them so I didn't bother)

Fixed a lot of problems with "hidden user" page. Now they don't show in history.

Added a "Replying to message#" to the pager reply window to alleviate the problem with bug #2

Version 0.9
Much simpler, faster performance. But... barely usable, keep the window open and just keep clicking "Reload" to get the new stuff. Replying is still done at the popup windows, but you can also click on the user name linky on the log.

To get v 0.9 dowload and install pagelog.xml and only alter the template PAGERBUDDY and use this simpler pagerlogbit

Code:

<if condition="$vboptions['vbpager_active'] AND $bbuserinfo['userid']">
<div class="smallfont"> $pagerinfo[receiptid] - <a href="#" onclick="window.open('pager.php?do=buddylist&amp;puserid=$pagerinfo[fromuserid]','pagerbuddylist','statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,width=$vboptions[vbpager_width],height=$vboptions[vbpager_height]'); return false;">$pagerinfo[fromusername]</a> - $pagerinfo[msgdate]: $pagerinfo[message]</div>       
</if>


ChavMagnet 10-20-2006 04:45 PM

1st Woot! Nice hack will install later

vbreal 10-20-2006 05:33 PM

cool

Renada 10-20-2006 05:37 PM

Thank you Renmiri :) - appreciated.

EasyTarget 10-21-2006 05:09 AM

nice addition. do you know if it's compatible with 3.6?

Renmiri 10-21-2006 06:07 AM

Quote:

Originally Posted by EasyTarget
nice addition. do you know if it's compatible with 3.6?

Is vbPager ? If it is, then mine should work as well.

Renmiri 10-21-2006 06:11 AM

This is an "undocumented feature" of vbPager inherited by my hack: If you post as anonymous and allow replies, make sure you do not reply to the user's reply to the anonymous message or you will "blow your cover" :surprised: . See example attached :)

Ziki 10-21-2006 07:48 AM

Will install as soon as those other bugs are fixed :D

Renmiri 10-21-2006 10:17 AM

Quote:

Originally Posted by Ziki
Will install as soon as those other bugs are fixed :D

I am working on custom avatars for the pager screens but after that I have to get back to RL. So don't expect a fix from me for bugs 1 and 2 anytime soon. I'm sorry, but...

The good news is that version 1.0 it is quite fun and usable as it is, to chat with one person at a time. Try it on my forum: you will see, you will barely notice it is not MSN :classic: (yeah, yeah, no smilies and sound or webcam but the basic chatting is pretty much the same, except that vbPager closes the darn window after each message :ermm: )

PS: I have 2 accounts set up to test my add on hack: guest1 and guest2. You can have one open on firefox as guest1, and another open on IE as guest2, so you can test the "chat" between 2 users. PM me for the passwords if you want to see how it works. :D

EasyTarget 10-21-2006 02:06 PM

Quote:

Originally Posted by Renmiri
Is vbPager ? If it is, then mine should work as well.

yeah, vbpager is.. I'll add this and see how it goes. thanks again.

Ntfu2 10-21-2006 04:58 PM

No worky

Invalid SQL:
SELECT field21 as avatar FROM vb3_userfield WHERE userid=12 LIMIT 1;

MySQL Error : Unknown column 'field21' in 'field list'
Error Number : 1054

Renmiri 10-21-2006 10:50 PM

Quote:

Originally Posted by Ntfu2
No worky


Invalid SQL:
SELECT field21 as avatar FROM vb3_userfield WHERE userid=12 LIMIT 1;

MySQL Error : Unknown column 'field21' in 'field list'
Error Number : 1054

STEP 5

5) Getting fancy with Avatars:
To get the avatar of the pager receiver you need to do the following:
5.1 - Add a custom user text field on admin CP. (See blue screen cap)Write the number of your new field down.
5.2 - Edit the first line of the pagelog plugin (on the parse_templates section). Change $field="21" ; to $field="x" ; where x is your custom user text field number (9 or whatever)
5.3 - Edit the new pager_newpager template and replace it with your field name (field9 or whatever)

**Note: Step 5 now allows receivers to have their custom avatar. Soon it will allow senders to use custom avatars (version 1.1)

See the blue screen shot to ee how to fill up the user profile field screen

legion! 10-22-2006 02:46 AM

i did this and it messed my whole database up if yall install thia hack be sure TO BACK UR DATABASES UP!!!!

Renmiri 10-22-2006 04:21 PM

Quote:

Originally Posted by legion!
i did this and it messed my whole database up if yall install thia hack be sure TO BACK UR DATABASES UP!!!!

Huh ?

My hack just reads the database. It doesn't add any fields but the custom user profile field.

Are you talking about vbPager ?
Yes, vbPager DOES change the database and there's a big warning at the install page about backing up your database.

Meh, backups are good precaution in any case. I'll add to the instructions above.

SnapOff Racing 10-24-2006 05:11 AM

Quote:

Originally Posted by legion!
i did this and it messed my whole database up if yall install thia hack be sure TO BACK UR DATABASES UP!!!!

messed mine up too...but if you edit the PLUGIN'S code itself, as instructed and change it to the profile field you created, it works perfect.

nice hack, i like it...just not the fact it doesnt pick up on your default avatar from the forum.

Renmiri 10-24-2006 12:40 PM

Quote:

Originally Posted by SnapOff Racing
nice hack, i like it...just not the fact it doesnt pick up on your default avatar from the forum.

Oh really ?
Easy enough to fix :D
I'll post an update with it soon. The custom avatar code is refusing to work still :( so I might as well post the code with default avatar.
Done!

It shouldn't cause any more SQL errors, even for people who didn't do step 5

SnapOff Racing 10-24-2006 08:29 PM

Quote:

Originally Posted by Renmiri
Oh really ?
Easy enough to fix :D
I'll post an update with it soon. The custom avatar code is refusing to work still :( so I might as well post the code with default avatar.
Done!

It shouldn't cause any more SQL errors, even for people who didn't do step 5

you mean you uploaded a new .zip with an upgraded .xml that we need to import?

Renmiri 10-25-2006 05:46 PM

Quote:

Originally Posted by SnapOff Racing
you mean you uploaded a new .zip with an upgraded .xml that we need to import?

===================
Upgrading from 1.0 to 1.1
===================
Steps
1) Modify the pager_newpager template:

Replace the entire template with the code on the pager_newpager11.txt file

2) Modify the pagerlog plugin:

Find the plugin under "parse_templates". Replace the entire plugin code with the code on the pagerlog11.txt file

After that you should be all set. You won't need that new field you added before so you can either leave it, delete it or change it to be invisible to the user

vbreal 11-01-2006 01:23 AM

yo i don't want that pager number or know what pager nuber i am replying to in the pager window. how can i remove that. if u in a pager window with someone. all u really care about is the time the page was sent and the messages. great hack btw i always forget what i have said the next day ha ha

vbreal 11-01-2006 02:52 AM

yo its giving me the wrong avatars for the message. i see why u got the pager number now. what's the point in this mod if it doesn't give u the correct person u replying to.

Renmiri 11-03-2006 02:33 AM

Quote:

Originally Posted by vbreal
yo its giving me the wrong avatars for the message. i see why u got the pager number now. what's the point in this mod if it doesn't give u the correct person u replying to.

Really ?
Which one is wrong ? The sender avatar or your avatar ?

Also, for now this doesn't work so well when you are not talking to just one person. If you are talking to 2 people at the same time you will get only the avatar of the person who paged you last, I think. :confused:


Eventually I am going to put a different version for chatting with more than one person but... It works for one on one private talk though

MissKalunji 11-03-2006 08:53 AM

very interesting

i know you said you wont be porting it but n e one testing this on 3.6?

Renmiri 11-04-2006 11:35 AM

Quote:

Originally Posted by MissKalunji
very interesting

i know you said you wont be porting it but n e one testing this on 3.6?

I lost one of my admins so upgrading my forums to 3.6 is a daunting task right now.
I think someone upthread has installed it

Thanks for the compliment! :D

MissKalunji 11-04-2006 11:41 AM

Ok then i'll install it and test it can u tell me real quick

wich tables does it alter?
Thanks

Renmiri 11-04-2006 11:51 AM

Quote:

Originally Posted by MissKalunji
Ok then i'll install it and test it can u tell me real quick

wich tables does it alter?
Thanks

Mine does not alter any tables, just reads it. But vbPager does. Do you have vbPager already ?

MissKalunji 11-04-2006 12:52 PM

yeah i do

MissKalunji 11-04-2006 12:56 PM

arf doesnt work

Quote:

Fatal error: Call to undefined function: vbpager_pagertoday() in /home/xxxxx/public_html/forum/pager.php on line 959

MissKalunji 11-04-2006 01:06 PM

ok the window looking the right way BUT its showing the log (in the private message) for EVERYONE not for the current conversation

edit :p realised you know its a bug

MissKalunji 11-04-2006 01:11 PM

whats that for : pagerlogv11.txt?

Renmiri 11-05-2006 12:51 AM

Quote:

Originally Posted by MissKalunji
ok the window looking the right way BUT its showing the log (in the private message) for EVERYONE not for the current conversation

edit :p realised you know its a bug

I am working on it but I just got shorthanded at my forum so it may take a while :(

Quote:

Originally Posted by MissKalunji
whats that for : pagerlogv11.txt?

Ignore it, it is for people who are upgrading from my previous version.

I works on 3.6 ? Weeee!!!! :)

Lionel 11-05-2006 10:38 AM

excuse me, but this seems to add 31 queries on every page

my homepage shootup to 90 queries. I disabled this plugin, went down to 59
i renabled, back to 90

Renmiri 11-07-2006 05:27 AM

Really ? My forum is so tiny it never was an issue :confused: Was that in addition to the queries added by vBpager ?

I will look into making it less resource intensive. Meanwhile there are a couple of things you can do:
- Set the pager refresh limit to a higher amount. Mine refreshes every 300 seconds or 5 minutes.
- Take the vbPager code out of the navbar and footer templates and put it on FORUMHOME instead (but that takes away the assurance that users will now they were paged within minutes of the page).

MissKalunji 11-07-2006 11:54 AM

Quote:

Originally Posted by Lionel
excuse me, but this seems to add 31 queries on every page

my homepage shootup to 90 queries. I disabled this plugin, went down to 59
i renabled, back to 90

Thats a vbpager problem not this hack....

Probably the refresh time that u put up i basically put it to 0 only when u load a new page that it loads up because refreshing all the time kills a server....

BUT i just wanted the look....caz the original pager looked dry

but 59 queries? thats a lot!

Lionel 11-07-2006 12:48 PM

Quote:

Originally Posted by MissKalunji
Thats a vbpager problem not this hack....


I doubt it. This hack is uninstalled and vbpager is still there. My queries have not moved. Once I enable this hack, up to 90, so why would it be the pager?

MissKalunji 11-07-2006 01:16 PM

Quote:

Originally Posted by Lionel
I doubt it. This hack is uninstalled and vbpager is still there. My queries have not moved. Once I enable this hack, up to 90, so why would it be the pager?

because i had this problem...you can even check in the vbpager thread...

That hack only changes the LOOK and feel nothing else....It shouldnt be adding queries perhaps only on the vbpager buddy list since it shows the logs there instead of in the history....

he perhaps added 2 plugins if im not mistaken


p.s where do u get 90 queries? when you open the pager buddy list and see the logs?

Lionel 11-07-2006 01:18 PM

Once this hack is enabled, the microstats at the bottom of page displays 90 queries. I had just tested the hack, which was great, pity, and there were about that amount in the log. So every time you open a page, the log appears to perform a query foreach entry.

MissKalunji 11-07-2006 01:20 PM

Quote:

Originally Posted by Lionel
Once this hack is enabled, the microstats at the bottom of page displays 90 queries. I had just tested the hack, which was great, pity, and there were about that amount in the log. So every time you open a page, the log appears to perform a query foreach entry.


Thats what im asking....

When u open the Buddy List where the history shows

or on ANY page of the board?

Renmiri 11-07-2006 07:56 PM

Quote:

Originally Posted by MissKalunji
Thats what im asking....

When u open the Buddy List where the history shows

or on ANY page of the board?

I can set the plugin to just query the paging history if pager is called (it isn't right now). This should drastically decrease the number of queries.

I just need to test it a bit

Ok, Lionel, can you test this version ? I works fine here but I have a tiny forum

Just replace the entire pagerlog plugin that is on the parse_templates hook with the text on the file below. It should drastically reduce queries.

MissKalunji 11-07-2006 07:57 PM

Did you figure out Why all the history showing in the Conversation screen?

Renmiri 11-07-2006 08:17 PM

Quote:

Originally Posted by MissKalunji
Did you figure out Why all the history showing in the Conversation screen?

It should show just the last 5


All times are GMT. The time now is 08:49 AM.

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.12238 seconds
  • Memory Usage 1,850KB
  • 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
  • (3)bbcode_code_printable
  • (22)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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