Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
February 13, 2012, 12:21:16 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter
hier
und auf unserer
neuen Webseite
.
149699
Posts in
21103
Topics by
7538
Members
Latest Member:
ionline
WebsiteBaker Community Forum
English
Modules
(Moderator:
Argos
)
PM Messanger
Pages: [
1
]
2
3
...
5
Go Down
Author
Topic: PM Messanger (Read 12152 times)
crnogorac081
AddOn Development
Offline
Posts: 1680
PM Messanger
«
on:
September 03, 2009, 10:08:09 PM »
Proudly present you my first independant project:
PM Messanger
. This is the first time I ever coded anything totally by myself, so I feel very proud
This module allows registered users to send PM messages between each other..
> Special thanks to:
-
aldus
,
thorn
,
FrankH
Current version: 2.2
> Requires:
=> Module requires Jquery-min script from /include/ folder
> Features:
+ Module
works both with WB 2.7 and 2.8.x
+ Supports EN, DE, FR, SE, No and NLlanguages
+ Allows only
ONE
username to view/manage backend
+ You can use a Droplet for frontend info, like:
Inbox: 5 new[3 unread]
+ Auto sugestion for "TO: " field
+ User images next to username in suggestion*
(like Facebook)
+ You can send PM via direct link,
if you want to integrate this into some other module (like JK Forum..or any other..like Pumpi requested):
Code:
<?php
echo
'<a href="'
.
WB_URL
.
PAGES_DIREC TORY
.
'/messages*'
.
PAGE_EXTENSION
.
'?action=Send&to=Pumpi#pm_messages" class="nyroModal" />
<img src="'
.
WB_URL
.
'/modules/pmmessages/images/replay.png" alt="send message" />
</a>'
;
?>
More info can be found
Here
* On install, folder /users is created in /MEDIA folder with defult image admin.jpg (if it doesnt already exist) for admin and noimg.png if image for user doesnt exist..
User images must be named: username.jpg (or uses these extensions with order: jpeg, jpg, gif, png)
Zip file contains a DROPLET (droplet.txt file, also accessible via link in module info), which allow you to put the message like:
Inbox: 5 new[3 unread]
anywhere.. My idea is to put this below "welcome back administrator" - text in the template..
Code: (Droplet)
$user_name = $_SESSION['USERNAME'];
global $database, $wb;
if($user_name == NULL) {
return " ";
} else {
if(!file_exists(WB_PATH .'/modules/pmmessages/languages/'.LANGUAGE .'.php')) {
require_once(WB_PATH .'/modules/pmmessages/languages/EN.php');
} else {
require_once(WB_PATH .'/modules/pmmessages/languages/'.LANGUAGE .'.php');
}
$get_new_msg = $database->query("SELECT message_id FROM ".TABLE_PREFIX."mod_pm_messages WHERE to_user='$user_name' AND message_read='0' AND fake_delete='0'");
$new_msg = $get_new_msg->numRows();
$get_unread_msg = $database->query("SELECT message_id FROM ".TABLE_PREFIX."mod_pm_messages WHERE to_user='$user_name' AND mark_unread='1' AND fake_delete='0'");
$unread_msg = $get_unread_msg->numRows();
$get_page_name = $database->query("SELECT * FROM ".TABLE_PREFIX."pages WHERE page_id='$pid'");
$p_name = $get_page_name->fetchRow();
$script = '<script type="text/javascript" src="'.WB_URL.'/modules/pmmessages/nyro/js/jquery.nyroModal-1.5.2.pack.js"></script>';
$script .= '<script type="text/javascript" src="'.WB_URL.'/modules/pmmessages/nyro/config.js"> </script>';
$script .= '<link rel="stylesheet" type="text/css" href="'.WB_URL.'/modules/pmmessages/nyro/styles/nyroModal.css" />';
$script .= '<link rel="stylesheet" type="text/css" href="'.WB_URL.'/modules/pmmessages/frontend.css" />';
$script .= '<div>';
$script .= '<a href="'.WB_URL.PAGES_DIRECTORY.$p_name['link'].PAGE_EXTENSION.'#pm_messages" class="nyroModal" />';
return $script."Inbox: ".$new_msg." new[".$unread_msg." unread]</a></div>";
}
Known bugs:
- You must change the text from the DROPLET: "Inbox", "new" and "unread" manualy -
known bug
NOTE:
When you change Moderator name, make sure that NEW Moderator has privileges to access this module in backend (to be in administrator or equivalent group)
Also, it will not work if Moderator is in multiple groups..(have no idea why
)
TO BE IN NEXT VERSION:
- Replace
this
file to add " xx characters left" on message sending..
Have fun,
Ivan
«
Last Edit: February 08, 2010, 09:04:14 PM by crnogorac081
»
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Stefek
WebsiteBaker Org e.V.
Offline
Posts: 4755
Re: PM Messanger
«
Reply #1 on:
September 03, 2009, 10:32:52 PM »
This is a very cool Module, Ivan!
I am gonna test it.
Very appreciated.
Kind Regards,
Stefek
Logged
"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
crnogorac081
AddOn Development
Offline
Posts: 1680
Re: PM Messanger
«
Reply #2 on:
September 03, 2009, 10:36:17 PM »
cool, looking for comments
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Hans>NULL
Offline
Posts: 1389
Re: PM Messanger
«
Reply #3 on:
September 04, 2009, 05:11:10 PM »
Mal ganz schnell installiert / quickly installed
DB:
Table 'db0001.wb28_mod_pm_
messages' doesn't exist
UTF-8 macht Probleme / UTF-8 causes problems:
Zeichen werden nicht richtig dargestellt / Characters are not displayed correctly
Edit: Ich vergaß die Entities, dumm gelaufen/ I forgot the entities, sorry...(s*** happens)
Anhang: Korrigierte DE -bitte noch jemand anders überprüfen / ask someone else to check other ! -nur reine Übersetzung / only pure translation)
Edit:
Da taucht noch was im Backend auf, womit ich nichts anfangen kann:
Sortiere Mitteilungen in Backend
jedannnn
dvaaaaaa
triiiiii
Quote
and I dont speak deuche
Macht nichts, das werden sicherlich die Kollegen klären
Gruß / Regards, Hans>NUL
Quote
does it work for english ?
Ja /Yes
«
Last Edit: September 04, 2009, 08:01:07 PM by Hans>NULL
»
Logged
/dev/null Ort ohne Wiederkehr
crnogorac081
AddOn Development
Offline
Posts: 1680
Re: PM Messanger
«
Reply #4 on:
September 04, 2009, 05:28:01 PM »
does it work for english ?
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
crnogorac081
AddOn Development
Offline
Posts: 1680
Re: PM Messanger
«
Reply #5 on:
September 04, 2009, 05:30:07 PM »
I said in the first post, that feature will be available in next release..
cheers
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
crnogorac081
AddOn Development
Offline
Posts: 1680
Re: PM Messanger
«
Reply #6 on:
September 04, 2009, 05:35:22 PM »
Repacked German language in the first post..Someone please check NL..
cheers
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Hans>NULL
Offline
Posts: 1389
Re: PM Messanger
«
Reply #7 on:
September 04, 2009, 06:08:47 PM »
Repacked: New and corrected version DE.php.zip
(I forgot the entities
utf-8 appears correctly)
Gruß /Regards Hans>NUL
«
Last Edit: September 04, 2009, 08:00:45 PM by Hans>NULL
»
Logged
/dev/null Ort ohne Wiederkehr
crnogorac081
AddOn Development
Offline
Posts: 1680
Re: PM Messanger
«
Reply #8 on:
September 04, 2009, 08:48:12 PM »
This message doesnt appear on english version right ?
DB:
Table 'db0001.wb28_mod_pm_
messages' doesn't exist
Updated German Language repacked again...see first post.
cheers
«
Last Edit: September 04, 2009, 08:52:07 PM by crnogorac081
»
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Hans>NULL
Offline
Posts: 1389
Re: PM Messanger
«
Reply #9 on:
September 04, 2009, 08:57:05 PM »
Quote
DB:
Table 'db0001.wb28_mod_pm_
messages' doesn't exist
Unfortunately, the same problem
(local/Windows & Linux/Apache PHP as CGI
installed in German and English)
Regards, Hans>NUL
«
Last Edit: September 04, 2009, 09:02:15 PM by Hans>NULL
»
Logged
/dev/null Ort ohne Wiederkehr
crnogorac081
AddOn Development
Offline
Posts: 1680
Re: PM Messanger
«
Reply #10 on:
September 04, 2009, 09:08:03 PM »
I ll check it asap.. I probably missed table prefix somewhere
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
crnogorac081
AddOn Development
Offline
Posts: 1680
Re: PM Messanger
«
Reply #11 on:
September 04, 2009, 09:18:57 PM »
Quote from: Hans>NULL on September 04, 2009, 05:11:10 PM
Quote
does it work for english ?
Ja /Yes
So it works in english, and not in German , right
Or it doesnt work in English and German becouse of this error:??
Quote
DB:
Table 'db0001.wb28_mod_pm_
messages' doesn't exist
And when this error is happening, when you do what ?
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Hans>NULL
Offline
Posts: 1389
Re: PM Messanger
«
Reply #12 on:
September 04, 2009, 09:21:16 PM »
It doesnt work in English and German
Quote
And when this error is happening, when you do what ?
after the installation and calling the page
The table is not created during installation
Oha,
wb28koh_mod_pm_modu
le
wb28koh_mod_pm_sett
ings
exist. It is probably not the prefix
Regards, Hans>NUL
«
Last Edit: September 04, 2009, 09:42:30 PM by Hans>NULL
»
Logged
/dev/null Ort ohne Wiederkehr
crnogorac081
AddOn Development
Offline
Posts: 1680
Re: PM Messanger
«
Reply #13 on:
September 04, 2009, 09:50:30 PM »
file updated in first post, please try again Hans
thanks thorn
, it would never cross my mind to see there
as I sad, my coding experience is 0 , now is v0,01
cheers
--- UPDATE:
thanks to thorn, few more programming errors were corrected. File in first post is just re-updated
«
Last Edit: September 04, 2009, 10:00:46 PM by crnogorac081
»
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Hans>NULL
Offline
Posts: 1389
Re: PM Messanger
«
Reply #14 on:
September 04, 2009, 10:04:41 PM »
wonderful
It works fine
Regards, Hans>NUL
Logged
/dev/null Ort ohne Wiederkehr
crnogorac081
AddOn Development
Offline
Posts: 1680
Re: PM Messanger
«
Reply #15 on:
September 04, 2009, 10:08:02 PM »
cool
Please test for security issues
I tried to protect it from security holes, but...maybe I missed something
cheers
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Hans>NULL
Offline
Posts: 1389
Re: PM Messanger
«
Reply #16 on:
September 04, 2009, 10:15:44 PM »
Have currently no access to the Vulnerability Scanner. Not until next week
Regards, Hans>NUL
Logged
/dev/null Ort ohne Wiederkehr
crnogorac081
AddOn Development
Offline
Posts: 1680
Re: PM Messanger
«
Reply #17 on:
September 04, 2009, 10:21:15 PM »
all files for frontend must be loaded in view.php and for backend in modify.php
and for individual files, acces is prevented with if (!defined('WB_PATH')) die...
Loged in user can read only his messages.. I dont know if there is anything more that I missed..
but, feel free to nuke it
cheers
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
crnogorac081
AddOn Development
Offline
Posts: 1680
Re: PM Messanger
«
Reply #18 on:
September 04, 2009, 10:51:44 PM »
Few more smal bugs were found, please reinstall the module in the first post.
cheers
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Hans>NULL
Offline
Posts: 1389
Re: PM Messanger
«
Reply #19 on:
September 04, 2009, 11:11:03 PM »
One last bug fixed (language file), sorry
Regards, Hans>NUL
«
Last Edit: September 05, 2009, 12:46:57 PM by Hans>NULL
»
Logged
/dev/null Ort ohne Wiederkehr
Stefek
WebsiteBaker Org e.V.
Offline
Posts: 4755
Re: PM Messanger
«
Reply #20 on:
September 05, 2009, 01:50:21 AM »
Hello Ivan.
Now it works and I had a brief look on this.
It's very interesting.
A good start for a "community module" (?)
One thing which could be improved is:
when I write a massage and there is no recipient (if I write for example "Flora" and there is no Flora in the Database) all my inputs gets lost.
Kind Regards,
Stefek
Logged
"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
crnogorac081
AddOn Development
Offline
Posts: 1680
Re: PM Messanger
«
Reply #21 on:
September 05, 2009, 01:58:34 AM »
Yea it could be a start for serious mini community module (like mini facebook or something)
if there is no Flora user in data base, you get redirected to send page again
I hope you dont plan to write a novel in pm
) did you tried to hit back button ? (I didnt tested that
)
cheers
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
crnogorac081
AddOn Development
Offline
Posts: 1680
Re: PM Messanger
«
Reply #22 on:
September 05, 2009, 02:05:58 AM »
Quote from: Hans>NULL on September 04, 2009, 11:11:03 PM
One last bug fixed (language file), sorry
Regards, Hans>NUL
updated to the first post
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Pumpi
Offline
Posts: 556
Re: PM Messanger
«
Reply #23 on:
September 05, 2009, 08:11:39 PM »
Hi,
verry cool Module i must tro try in the next time
i have an other script than higslide you can use it is an Jquery photo gallery and contain iframes orf flash its verry nice
http://www.no-margin-for-errors.com/projects/prettyPhoto-jquery-lightbox-clone/
Logged
My Module for Websitebaker - Foldergallery 1.17
crnogorac081
AddOn Development
Offline
Posts: 1680
Re: PM Messanger
«
Reply #24 on:
September 05, 2009, 08:45:23 PM »
I will try it..I also dont like to pay for commercial licence
when its possible to find free solution
cheers
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Pages: [
1
]
2
3
...
5
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
-----------------------------
English
-----------------------------
=> Help & Support
-----------------------------
General
-----------------------------
=> WebsiteBaker Website Showcase
-----------------------------
English
-----------------------------
=> Modules
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
-----------------------------
General
-----------------------------
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
-----------------------------
General
-----------------------------
=> Security Announcements
-----------------------------
Deutsch (German)
-----------------------------
=> Hilfe/Support
-----------------------------
General
-----------------------------
=> Documentation
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
=> Module & Snippets
-----------------------------
English
-----------------------------
=> Archive (posts up to 2007)
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Deutsch (German)
-----------------------------
=> jQuery
=> Tutorials
=> Templates & Design
-----------------------------
English
-----------------------------
=> jQuery
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
===> Suggestions
-----------------------------
Deutsch (German)
-----------------------------
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
===> Vorschläge
-----------------------------
English
-----------------------------
===> Software bugs
-----------------------------
Deutsch (German)
-----------------------------
===> Softwarefehler
=====> Module / Extensions
-----------------------------
English
-----------------------------
=====> Modules / Extensions
-----------------------------
Deutsch (German)
-----------------------------
===> Erfahrungs und Testberichte
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...