Welcome to Geeklog, Anonymous Saturday, August 31 2024 @ 11:37 pm EDT
Geeklog Forums
Privmessages module & forum
Status: offline
kemal
Forum User
Regular Poster
Registered: 04/05/05
Posts: 103
Location:Turkey
Hi,
how can i activate to "pm" on forum..sanpshoot is here
and how can i activate to "send pm" on profiles ( like send mail)
_KEMAL_
how can i activate to "pm" on forum..sanpshoot is here
and how can i activate to "send pm" on profiles ( like send mail)
_KEMAL_
15
17
Quote
Status: offline
romantaran
Forum User
Junior
Registered: 03/19/05
Posts: 34
Location:Russia
I have "send pm" link in userlist.php. Here is the code:
<?php
/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
// | Geeklog 1.3 |
// +---------------------------------------------------------------------------+
// | userlist.php |
// | Lists the registered users of a Geeklog site. |
// | |
//
// You can change the number of users displayed per page by adjusting the
// value $limit = 50; below accordingly ...
require_once ("lib-common.php");
function listusers($curpage)
{ global $_TABLES, $_CONF, $LANG01, $LANG04;
$limit = 50; // this is the number of users listed per page
$retval = COM_startBlock($LANG01[17]);
$retval .= ' <table width="100%" border="0">' . LB;
$retval .= '<tr><td><b>' . $LANG04[2] . '</b></td><td><B>Ôîòî</B></td><td><b>' . $LANG04[3] . '</b></td></tr>' . LB;
$num_pages = ceil(DB_getItem($_TABLES['users'],'count(*)','uid > 1') / $limit);
$offset = ($curpage - 1) * $limit;
$sql = "SELECT uid,username,fullname,email,photo FROM {$_TABLES['users']} WHERE uid > 1 LIMIT $offset,$limit";
$result = DB_query($sql);
$nrows = DB_numRows($result);
for ($i = 0; $i < $nrows; $i++) {
$A = DB_fetchArray($result);
$retval .= '<tr><td><a href="' . $_CONF['site_url']
. '/users.php?mode=profile&uid=' . $A['uid'] . '">'
. $A['username'] . '</a></td><td valign="bottom">';
if (!empty($A['photo']) AND $_CONF['allow_user_photo'] == 1) {
$retval .= ' <a href="' . $_CONF['site_url'] . '/users.php?mode=profile&uid=' . $A['uid'] . '"><img src="' . $_CONF['layout_url'] . '/images/smallcamera.gif" border="0" alt=""></a>';
}
$retval .= '</td><td>' . $A['fullname']
. '</td><td><a href="' . $_CONF['site_url']
. '/profiles.php?uid=' . $A['uid']
. '">' . $LANG04[81] .'</a></td><td><a href="privmessages/compose.php?to_uid=' . $A['uid'] . '">Private message</a></td></tr>' . LB;
}
$retval .= '</table>' . LB;
if ($num_pages > 1) {
$retval .= '<p>' . COM_printPageNavigation ($PHP_SELF, $curpage, $num_pages) . '</p>';
}
$retval .= COM_endBlock();
return $retval;
}
// MAIN
$display = COM_siteHeader ('menu');
if (empty ($_USER['username'])) { // prevent anon users from viewing the list
/* The following will only work in Geeklog 1.3.6rc1 and up
$display .= COM_startBlock($LANG_LOGIN[1]);
$login = new Template($_CONF['path_layout'] . 'submit');
$login->set_file (array ('login'=>'submitloginrequired.thtml'));
$login->set_var ('login_message', $LANG_LOGIN[2]);
$login->set_var ('site_url', $_CONF['site_url']);
$login->set_var ('lang_login', $LANG_LOGIN[3]);
$login->set_var ('lang_newuser', $LANG_LOGIN[4]);
$login->parse ('output', 'login');
$display .= $login->finish ($login->get_var('output'));
$display .= COM_endBlock();
*/
// poor man's solution for Geeklog up to 1.3.5sr2
$display .= COM_startBlock($LANG04[21]);
$display .= 'Sorry, to view the list of members of this site, you need to be a member yourself. Please register or log in.';
$display .= COM_endBlock();
} else {
if (empty($page)) {
$page = 1;
}
$display .= listusers($page);
}
$display .= COM_siteFooter ();
echo $display;
?>
Create userlist.php with this code, place it in public_html directory and place somewhere a link to this file.
Text Formatted Code
<?php
/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
// | Geeklog 1.3 |
// +---------------------------------------------------------------------------+
// | userlist.php |
// | Lists the registered users of a Geeklog site. |
// | |
//
// You can change the number of users displayed per page by adjusting the
// value $limit = 50; below accordingly ...
require_once ("lib-common.php");
function listusers($curpage)
{ global $_TABLES, $_CONF, $LANG01, $LANG04;
$limit = 50; // this is the number of users listed per page
$retval = COM_startBlock($LANG01[17]);
$retval .= ' <table width="100%" border="0">' . LB;
$retval .= '<tr><td><b>' . $LANG04[2] . '</b></td><td><B>Ôîòî</B></td><td><b>' . $LANG04[3] . '</b></td></tr>' . LB;
$num_pages = ceil(DB_getItem($_TABLES['users'],'count(*)','uid > 1') / $limit);
$offset = ($curpage - 1) * $limit;
$sql = "SELECT uid,username,fullname,email,photo FROM {$_TABLES['users']} WHERE uid > 1 LIMIT $offset,$limit";
$result = DB_query($sql);
$nrows = DB_numRows($result);
for ($i = 0; $i < $nrows; $i++) {
$A = DB_fetchArray($result);
$retval .= '<tr><td><a href="' . $_CONF['site_url']
. '/users.php?mode=profile&uid=' . $A['uid'] . '">'
. $A['username'] . '</a></td><td valign="bottom">';
if (!empty($A['photo']) AND $_CONF['allow_user_photo'] == 1) {
$retval .= ' <a href="' . $_CONF['site_url'] . '/users.php?mode=profile&uid=' . $A['uid'] . '"><img src="' . $_CONF['layout_url'] . '/images/smallcamera.gif" border="0" alt=""></a>';
}
$retval .= '</td><td>' . $A['fullname']
. '</td><td><a href="' . $_CONF['site_url']
. '/profiles.php?uid=' . $A['uid']
. '">' . $LANG04[81] .'</a></td><td><a href="privmessages/compose.php?to_uid=' . $A['uid'] . '">Private message</a></td></tr>' . LB;
}
$retval .= '</table>' . LB;
if ($num_pages > 1) {
$retval .= '<p>' . COM_printPageNavigation ($PHP_SELF, $curpage, $num_pages) . '</p>';
}
$retval .= COM_endBlock();
return $retval;
}
// MAIN
$display = COM_siteHeader ('menu');
if (empty ($_USER['username'])) { // prevent anon users from viewing the list
/* The following will only work in Geeklog 1.3.6rc1 and up
$display .= COM_startBlock($LANG_LOGIN[1]);
$login = new Template($_CONF['path_layout'] . 'submit');
$login->set_file (array ('login'=>'submitloginrequired.thtml'));
$login->set_var ('login_message', $LANG_LOGIN[2]);
$login->set_var ('site_url', $_CONF['site_url']);
$login->set_var ('lang_login', $LANG_LOGIN[3]);
$login->set_var ('lang_newuser', $LANG_LOGIN[4]);
$login->parse ('output', 'login');
$display .= $login->finish ($login->get_var('output'));
$display .= COM_endBlock();
*/
// poor man's solution for Geeklog up to 1.3.5sr2
$display .= COM_startBlock($LANG04[21]);
$display .= 'Sorry, to view the list of members of this site, you need to be a member yourself. Please register or log in.';
$display .= COM_endBlock();
} else {
if (empty($page)) {
$page = 1;
}
$display .= listusers($page);
}
$display .= COM_siteFooter ();
echo $display;
?>
Create userlist.php with this code, place it in public_html directory and place somewhere a link to this file.
16
15
Quote
Status: offline
romantaran
Forum User
Junior
Registered: 03/19/05
Posts: 34
Location:Russia
![Exclamation Exclamation](http://www.geeklog.net/images/smiles/icon_exclaim.gif)
1. Open: public_html/forum/include/gf_showtopic.php
2. Find:
Text Formatted Code
if (function_exists(msg_send)) {$pm_link = 'HREF="' .$_CONF['site_url'] . '/messenger/index.php?action=newpm&toname=' . $showtopic['name'] . ';">';
$pm_linkimg = '<img src="' .$imgset. '/pm.gif" border="0" align="absmiddle" alt="' .$LANG_GF01['PMLink']. '" TITLE="'.$LANG_GF01['PMLink'].'">';
$topictemplate->set_var ('pmlink', $pm_link);
$topictemplate->set_var ('pmlinkimg', $pm_linkimg);
$topictemplate->set_var ('LANG_pm', $LANG_GF01['PMLink']);
}
3. Replace it with:
Text Formatted Code
$pm_link = 'HREF="' .$_CONF['site_url'] . '/privmessages/compose.php?to_uid=' . $showtopic['uid'] . '">';
$pm_linkimg = '<img src="' .$imgset. '/pm.gif" border="0" align="absmiddle" alt="' .$LANG_GF01['PMLink']. '" TITLE="'.$LANG_GF01['PMLink'].'">';
$topictemplate->set_var ('pmlink', $pm_link);
$topictemplate->set_var ('pmlinkimg', $pm_linkimg);
$topictemplate->set_var ('LANG_pm', $LANG_GF01['PMLink']);
4. Send privmessages!
![Wink Wink](http://www.geeklog.net/images/smiles/icon_wink.gif)
9
14
Quote
Status: offline
romantaran
Forum User
Junior
Registered: 03/19/05
Posts: 34
Location:Russia
Look at it in my site: http://eikon.org.ru. But it's avialable only for registered users. You can send pm for "user" or "Ðîìàí", maybe I'll send a reply.
16
16
Quote
Status: offline
romantaran
Forum User
Junior
Registered: 03/19/05
Posts: 34
Location:Russia
![Exclamation Exclamation](http://www.geeklog.net/images/smiles/icon_exclaim.gif)
![Exclamation Exclamation](http://www.geeklog.net/images/smiles/icon_exclaim.gif)
![Exclamation Exclamation](http://www.geeklog.net/images/smiles/icon_exclaim.gif)
The easiest way to add "send private message" link to user's profile!
For "Professional" theme. Replace public_html/layout/professional/users/profile.thtml file with the file in archive.
You can make a similar in your theme. I've just added to the profile.thtml the following line:
Text Formatted Code
<tr valign="top"> <td align="right"><b>Private message:</b></td><td><a href="{site_url}/privmessages/compose.php?to_uid={user_id}">Send</a></td> </tr>The main thing is the link:
Text Formatted Code
<a href="{site_url}/privmessages/compose.php?to_uid={user_id}">Send</a>
15
11
Quote
Status: offline
romantaran
Forum User
Junior
Registered: 03/19/05
Posts: 34
Location:Russia
I'll think of it.
![Banging your head Banging your head](http://www.geeklog.net/images/smiles/banghead.gif)
10
19
Quote
Status: offline
romantaran
Forum User
Junior
Registered: 03/19/05
Posts: 34
Location:Russia
Well.Try this:
1. Open forum/memberlist.php. Find
$pm_link = "href="{$pmplugin_link}">";
2. Replace with:
3. Open forum/include/gf_showtopic.php. Find
$pm_link = "href="{$pmplugin_link}">";
4. Replace with:
I don't have new forum installed and I don't tested this hack. I just looked into the code. Tell me if it doesn't work.
1. Open forum/memberlist.php. Find
$pm_link = "href="{$pmplugin_link}">";
2. Replace with:
Text Formatted Code
$pm_link = "href=\"{$_CONF['site_url']}/privmessages/compose.php?to_uid={$siteMembers['uid']}\">";3. Open forum/include/gf_showtopic.php. Find
$pm_link = "href="{$pmplugin_link}">";
4. Replace with:
Text Formatted Code
$pm_link = "href=\"{$_CONF['site_url']}/privmessages/compose.php?to_uid={$showtopic['uid']}\">";I don't have new forum installed and I don't tested this hack. I just looked into the code. Tell me if it doesn't work.
15
15
Quote
Status: offline
romantaran
Forum User
Junior
Registered: 03/19/05
Posts: 34
Location:Russia
That is not the bug, that is the feature.
I'll correct it in the next version.
![Laughing Laughing](http://www.geeklog.net/images/smiles/icon_lol.gif)
![Laughing Laughing](http://www.geeklog.net/images/smiles/icon_lol.gif)
I'll correct it in the next version.
19
15
Quote
Status: offline
romantaran
Forum User
Junior
Registered: 03/19/05
Posts: 34
Location:Russia
Quote by kemal: how can i remove or change privmesseages' backgorund color??
What background color? Can you post or send me a screenshot?
[QUOTE= kemal]And how can i make advanced editor for compose (like geeklog's story editor 1.4..0.rc1)[/QUOTE]
Give me some days to think.
12
21
Quote
Status: offline
romantaran
Forum User
Junior
Registered: 03/19/05
Posts: 34
Location:Russia
Colors of the table you can change in config.php:
$table_color = array(
1 => '#efefef',
2 => '#dee3e7',
3 => '#c7d0d7',
);
As to your question about advanced editor - it seems to me it is not possible to use geeklog's rich text editor in privmessages module. Probably I'll find an alternative.
$table_color = array(
1 => '#efefef',
2 => '#dee3e7',
3 => '#c7d0d7',
);
As to your question about advanced editor - it seems to me it is not possible to use geeklog's rich text editor in privmessages module. Probably I'll find an alternative.
16
11
Quote
All times are EDT. The time is now 11:37 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content