vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   vB Popup Messaging Utility v.0.1 (https://vborg.vbsupport.ru/showthread.php?t=26044)

s.molinari 08-20-2001 10:00 PM

Hello all,

Well I did it, my first real hack. I don't know what the rule on this is but I'll be honest and say I used alot of original vB code to make this. I don't believe in reinventing the wheel and the code in vB is so good it makes it very easy to modify.

This hack will give Admins and Mods the ability to alert users with a small message. This message works similiar to the PM popup. It also has the ability to send one user a number of messages. Each message will be denoted by the person who sent the message.

If you are not competent with Mysql and the inner workings of vB and your not sure if you need this utility I would recommend not installing it.

I consider this to be a Beta since I only tested it on my local dev computer. I would really appreciate some "experienced" users testing this hack to let me know where I've made mistakes.

If someone is real hack happy he/she they could change the hack and add the thing listed on my todo list below. If not I'll get to adding them sooner or later.

Anyhow, have fun. I'll be answering your questions here in this forum.

Scott

Demo Screenshots


To do list:
1. Add option to send a message to online users only(good for telling them that the board will be closing before it's closed:))
2. Timestamping the messages. Probably not a bad idea.
3. Checking that messaging is on before messages get stored in
db. Would save Mods the embarassment.;)
4. Add wild card function '*' to search for user names.

If you have more ideas as to how I could improve this hack feel free to post your ideas here!.

fxpersonline 08-21-2001 07:01 PM

nice hack but i aint gonna try it out i want my board working lol

ps. could we have a screenshot please.

s.molinari 08-21-2001 07:08 PM

Quote:

Originally posted by fxpersonline
nice hack but i aint gonna try it out i want my board working lol

ps. could we have a screenshot please.

It will work.:)

I'll see what I can do about the screen shots.

Scott

s.molinari 08-21-2001 08:03 PM

Screenshots now available. See above.

Scott

fxpersonline 08-21-2001 08:13 PM

those screenshots are f**king **** u cant see anything will u imporve them plz

Steve Machol 08-21-2001 08:28 PM

fxpersonline, please show some respect. Scott has gone through a lot of work to provide this. The least you could do is ask politely. Language and attitudes like this are likely to get you added to many people's 'Ignore' list.

Also, could you please enter your customer info into your user profile? See my sig for details. Thanks.

water 08-21-2001 10:05 PM

I second that, great hack that I'm sure was quite a job to make so there's no need for the attitude :)

btw. I get a more that good enough impression from the provided screeenshots.

:water

Bane 08-22-2001 12:43 AM

Well done Scott :)

butty 08-22-2001 12:58 AM

good work scott thats pretty wild that :D

maverick1236 08-22-2001 01:04 AM

ive installed-but how do i send a message??

i always miss the simple things..lol

tx

butty 08-22-2001 01:56 AM

it should be in your control panel under users

s.molinari 08-22-2001 08:56 AM

Quote:

Originally posted by fxpersonline
those screenshots are f**king **** u cant see anything will u imporve them plz
Hello,

That's a give off. Quality for size. The jpeg is 100KB. I didn't want it any bigger. So it stays as is.

Scott

s.molinari 08-22-2001 09:00 AM

Quote:

Originally posted by Maverick1236
ive installed-but how do i send a message??

i always miss the simple things..lol

tx

Make sure you follow the directions in the install file. There are some lines of code wich you need to add in both the mod and admin CPs. You must also resave your board options. If you don't you can send messages but the users will not get them.

Scott

s.molinari 08-22-2001 04:53 PM

uh. Did 2 people delete their posts or is there something wrong here? I just got 2 mails that there were new posts but there were none. What's up wit dat?

Scott

Lordmusic 08-22-2001 09:56 PM

Odd, it doesn't seem to be working. I edited global.php in my base directory, ran the install file, deleted the install file, uploaded the other files, and added the $ command and tried sending it to the administrators. It said it was sent, yet I don't see anything and I was an admin. Please assist.

Delhaze 08-22-2001 10:48 PM

Its working fine for me.

I've only done a very basic test so far.

Should the install file be deleted after install?

polgas 08-23-2001 02:01 AM

Got it working.

Although you need to avoid referring to line nos. when doing the change. Some of us might have other hacks installed which would make it difficult for us to follow the line nos.

Other than that, GREAT and SIMPLE HACK!

:)

s.molinari 08-23-2001 04:55 AM

Quote:

Originally posted by Lordmusic
Odd, it doesn't seem to be working. I edited global.php in my base directory, ran the install file, deleted the install file, uploaded the other files, and added the $ command and tried sending it to the administrators. It said it was sent, yet I don't see anything and I was an admin. Please assist.
Did you resave your board options? All you need to do is go to Options->change options->save options in the Admin CP. This then saves the options along with the checkmessages variable. If you didn't do this the option to send messages is basically "off".

Scott

s.molinari 08-23-2001 04:56 AM

Quote:

Originally posted by Delhaze
Its working fine for me.

I've only done a very basic test so far.

Should the install file be deleted after install?

It would be wise. It's not needed for the utility to work.

Scott

s.molinari 08-23-2001 06:09 AM

I've added 2 new things on my todo list:

1. Timestamping the messages. Probably not a bad idea.
2. Checking that messaging is on before messages get stored in
db. Would save Mods the embarassment.

Scott

Lordmusic 08-23-2001 07:58 AM

I know what it was. Can you please not post the line #'s for I have installed hacks before and hence it did not work for me. I need to know what items to put it above and below and I am sure other users would appreciate this. Thanks.

s.molinari 08-23-2001 09:31 AM

Line numbers are the easiest to reference. If you know you have hacks (more lines) then you can probably assume that the lines that I quoted won't be correct. My suggestion. Take a look at the original script and see where the lines are and what's around them, then find the same place in your hacked up script.

Scott

Operations 08-23-2001 01:14 PM

Stille the Same Problem like Lordmusic has bevor

but i have update Cp
i have controlled all stats and for sure i have make it by hand now..

but no error message and no popup :/

normaly its not so hard ;)

but something is wrong... can u get me a clue what could be?

but i?m looking forward nice hack :)

s.molinari 08-23-2001 02:27 PM

Hello All,

Due to popular demand (and the load of PMs I've gotten) I have now done one better. Instead of just improving my demo screenshots I have added a real life demo on my test board.

Go here!

I have made 10 test accounts.

User name: test1 (through 10)
password:test

Login to the board, then send yourself a message. It's that easy.

Please don't forget to logout when your finished.

Scott

p.s. I didn't do a mod demo because it's basically the same thing as the admin, just with a few less options for user selection.

Operations 08-23-2001 05:04 PM

@Molinari sorry all done i am such a idiot had a misstype in my board ;)

aehmmm works great now nice work :)

GB 08-23-2001 09:46 PM

I installed the hack and it does not work. I saved my options in my cp once I finished installing the hack.

Your reference to line numbers in each php file are really a pain in the butt. It would make it alot easier if you made some sort of reference as to what code it should go below or above instead of line numbers...

Operations 08-23-2001 10:22 PM

Template "Headinclude"

</style>
$headnewmsg
$headnewpm<font color="#6F6660"></font>

bewteen style and $headnewpm

in the global.php after
PHP Code:

$headnewpm='';
if (
$checknewpm and $bbuserinfo['userid']!=and $bbuserinfo['pmpopup']==2) {
  if (
$noshutdownfunc) {
    
$DB_site->query("UPDATE user SET pmpopup=1 WHERE userid=$bbuserinfo[userid]");
  } else {
    
$shutdownqueries[]="UPDATE LOW_PRIORITY user SET pmpopup=1 WHERE userid=$bbuserinfo[userid]";
  }
  
$newpmmsg=1;
  eval(
"\$headnewpm = \"".gettemplate('head_newpm')."\";");


add
PHP Code:

if ($checkmessages and $bbuserinfo['userid']!=and $bbuserinfo['messagepopup']==2) {
   
$popupmessages $DB_site->query("SELECT * FROM popupmsgs WHERE userid=$bbuserinfo[userid]  ORDER BY nummessages DESC");
   while (
$popmsg $DB_site->fetch_array($popupmessages)) {
        
$popmessage .= "Von:$popmsg[sender]\\n";
        
$popmessage .= "Nachricht:$popmsg[message]\\n\\n";
        
$DB_site->query("DELETE FROM popupmsgs WHERE nummessages=$popmsg[nummessages] AND userid=$bbuserinfo[userid]");
   }
  
$DB_site->query("UPDATE user SET messagepopup=1 WHERE userid=$bbuserinfo[userid]");
  eval(
"\$headnewmsg = \"".gettemplate('head_newmsg')."\";");


this code follows
PHP Code:

$header='';
$footer='';

// parse header ##################
eval(gettemplate('phpinclude',0,0)); 


the both addings in the /mod/index.php and /admin/index.php are simply Links an can be created somewhere in the Nav
but basicly they are after
PHP Code:

<a href="email.php?s=<?php echo $session[sessionhash]; ?>&action=genlist"> Generate mailing list </a><br>

in the admin/index.php

and after

PHP Code:

<a href="user.php?s=<?php echo $session[sessionhash]; ?>&action=find"> View </a>|

in the mod/index

thats all start install.php and update cp and it works..
:)

s.molinari 08-24-2001 06:06 AM

Quote:

Originally posted by GB
I installed the hack and it does not work. I saved my options in my cp once I finished installing the hack.


You should have finishwd installing the hack and then save your options.

Quote:


Your reference to line numbers in each php file are really a pain in the butt. It would make it alot easier if you made some sort of reference as to what code it should go below or above instead of line numbers...

I don't understand what's so difficult. If you know you have hacks then you know the line numbers aren't correct for your scripts. So you should look at an original script. Look at the line number and see for yourself where you should add the code in your hacked script. It has to be easier for both of us when I write line numbers. What would you say if I did do what you want, like Operations did above(thank you very much Operations), and it just so happened that the code I mention is also hacked in your script, then you would never find the spot to where the code should be placed. Nah I'll stick to my line numbers. Sorry!

The other point to make is, if you have a clue as to how to program in PHP, then you should be able to see right away where the code belongs. If your not proficient in PHP programming then you really aught not to be playing around with hacks. Especially ones that change the form of the database like mine. That's why I said in the install, "Only continue if you know what your doing!"

Scott

Operations 08-24-2001 06:12 AM

Np Molinari... (just @work go with it ;) )

Quote:

That's why I said in the install, "Only continue if you know what your doing!"
Thats why Newbes delete files.. format harddisks, destroy CdR?s

they think they know what they do.. ;)

@GB... what happend whith the Hack.. do U got an Error?
works it but no message appear, did you have manually controlled the script?

(@molinari sorry for posting.. but so i can learn this php language a little bit better...)

Lordmusic 08-24-2001 08:37 AM

I don't know what is wrong but I have tried this hack over and over. I installed the install script 2ce which frigged things up i am sure.

I added the $ command where it should be.

I also followed Operations directions in case I did it wrong.

It tells me the messages were sent, but nothing is seen. Please let me know.

s.molinari 08-24-2001 08:42 AM

Did you resave your board options?

joecrow 08-24-2001 08:44 AM

same here bro

Operations 08-24-2001 08:48 AM

Quote:

Did you resave your board options? All you need to do is go to Options->change options->save options in the Admin CP. This then saves the options along with the checkmessages variable. If you didn't do this the option to send messages is basically "off".

Scott
like he say its off if anything else is right
it must be this.. but u can easy looking

just enter phpmyadmin and go to
Table setting and search for
Code:

19  | Allow Popup messaging?  | checkmessages |  1 |  This function allows Admins and Mods to send quick private messages to users.  | yesno
If value is 1 its aktivated and something else is wrong if its 0 its deaktivated.. change it there oder in the cp to 1 and it works..

water 08-24-2001 09:21 AM

i know this a shot in the dark....

is there some way to make the message appear without the user refreashing or even visitng the forums? could this be done with with cookies and checking procediures & persistant login or something?

Operations 08-24-2001 09:25 AM

this should be a joke or not?

i didnt suppose that so what is working...

how should this working?
you can not make a pop up whithout a script
he must reload the site to get the pop up.. if he is not on the site.. no pop up..

s.molinari 08-24-2001 09:36 AM

Quote:

Originally posted by water
i know this a shot in the dark....

is there some way to make the message appear without the user refreashing or even visitng the forums? could this be done with with cookies and checking procediures & persistant login or something?

No, it's not possible. The internet is a network of non interconnected computers. There are servers and clients. A client is you and your browser. Only when you request an internet page does the server know you want something from it. And only then can it send the info back to you. Of course there are the chat relay systems, but then we're getting into a whole other ballpark.;)

Scott

water 08-24-2001 10:09 AM

it is not a joke and as i clearly stadet it was a shot in the dark, my point exactly what you stated, what i was asking, or tried to ask, was : is there a way to acheive this without the user activly going to the page, but have the software do it in some way.

:water

Operations 08-24-2001 10:11 AM

:) sorry for my hard answer at your last post but..
but now..

on a vbulletin Forum definitly NOT

this exactly enough? ;)


Edit: But u can try it like an instant messager system.. but in that case u could take ICQ.. goes faster :)

GB 08-24-2001 01:15 PM

Same things happens to me. It tells me the message was sent but no message!

Operations 08-24-2001 01:19 PM

Quote:

Originally posted by Operations

like he say its off if anything else is right
it must be this.. but u can easy looking

just enter phpmyadmin and go to
Table setting and search for
Code:

19  | Allow Popup messaging?  | checkmessages |  1 |  This function allows Admins and Mods to send quick private messages to users.  | yesno
If value is 1 its aktivated and something else is wrong if its 0 its deaktivated.. change it there oder in the cp to 1 and it works..

what tells u the phpmyadmin?
what is your status?


All times are GMT. The time now is 04:48 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.03852 seconds
  • Memory Usage 1,849KB
  • 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
  • (5)bbcode_php_printable
  • (11)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