Welcome to Geeklog, Anonymous Sunday, October 01 2023 @ 03:52 am 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_
12
14
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.
12
11
Quote
Status: offline
romantaran
Forum User
Junior
Registered: 03/19/05
Posts: 34
Location:Russia

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!

6
11
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.
11
13
Quote
Status: offline
romantaran
Forum User
Junior
Registered: 03/19/05
Posts: 34
Location:Russia



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>
11
8
Quote
Status: offline
romantaran
Forum User
Junior
Registered: 03/19/05
Posts: 34
Location:Russia
I'll think of it.

7
16
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.
12
12
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.


I'll correct it in the next version.
14
10
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.
9
18
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.
13
9
Quote
All times are EDT. The time is now 03:52 am.
- 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