Almost done the thing check it out
102 2004-11-19 03:14
Re: Пометка новых сообщений (9 replies, posted in Archive)
2 Death Angel: ??, ???? ????? ????, ??? ???? ?????? ??? ???, ????? ??????? ?? ????????? ??? + ??????????? ???????? ???????????? ??? ????? ?????? ? ???????????? ??????.
103 2004-11-05 20:14
Re: Improved New Message 1.0 (17 replies, posted in PunBB 1.2 modifications, plugins and integrations)
viewtopic.php
-----8<------
~110 line
if (!$cookie['is_guest'])
$result = $db->query('SELECT t.subject, t.closed, t.sticky, t.num_replies, t.last_post_id, t.last_post, f.id, f.forum_name, f.moderators, f.closed AS forum_closed, f.admmod_only, s.user_id AS is_subscribed FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON t.forum_id=f.id LEFT JOIN '.$db->prefix.'subscriptions AS s ON (s.topic_id=t.id AND s.user_id='.$cur_user['id'].') WHERE t.id='.$id.' AND t.moved_to IS NULL') or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error());
else
$result = $db->query('SELECT t.subject, t.closed, t.sticky, t.num_replies, t.last_post_id, t.last_post, f.id, f.forum_name, f.moderators, f.closed AS forum_closed, f.admmod_only, 0 FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON t.forum_id=f.id WHERE t.id='.$id.' AND t.moved_to IS NULL') or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error());
~118 line
list($subject, $closed, $sticky, $num_replies, $last_post_id, $last_post, $forum_id, $forum_name, $moderators, $forum_closed, $admmod_only, $is_subscribed) = $db->fetch_row($result);
+++ before $footer_style =.... add
// Create/Update topic view session
if($cur_user['last_visit'] < $last_post)
setcookie('puntopic_'.$last_post_id, time(), (time()+$pun_config['o_timeout_visit']), $cookie_path, $cookie_domain, $cookie_secure);
------------->8--------
viewforum.php
~165? line
---if (!$cookie['is_guest'] && $cur_topic['last_post'] > $cur_user['last_visit'] && $cur_topic['moved_to'] == null)
+++if (!$cookie['is_guest'] && new_topic($cur_topic['last_post_id'], $cur_topic['last_post']) && $cur_topic['moved_to'] == null)
index.php
~88? line
---if (!$cookie['is_guest'] && $cur_forum['last_post'] > $cur_user['last_visit'])
+++if (!$cookie['is_guest'] && new_topic($cur_forum['last_post_id'], $cur_forum['last_post']))
include/functions.php
+++
function new_topic($id, $last_post)
{
global $cur_user;
if(isset($_COOKIE['puntopic_'.$id]))
{
if($_COOKIE['puntopic_'.$id] < $last_post)
return true;
}else
{
if($cur_user['last_visit'] < $last_post)
return true;
}
return false;
}
104 2004-11-05 20:08
Re: Пометка новых сообщений (9 replies, posted in Archive)
viewtopic.php
-----8<------
~110 ??????
if (!$cookie['is_guest'])
$result = $db->query('SELECT t.subject, t.closed, t.sticky, t.num_replies, t.last_post_id, t.last_post, f.id, f.forum_name, f.moderators, f.closed AS forum_closed, f.admmod_only, s.user_id AS is_subscribed FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON t.forum_id=f.id LEFT JOIN '.$db->prefix.'subscriptions AS s ON (s.topic_id=t.id AND s.user_id='.$cur_user['id'].') WHERE t.id='.$id.' AND t.moved_to IS NULL') or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error());
else
$result = $db->query('SELECT t.subject, t.closed, t.sticky, t.num_replies, t.last_post_id, t.last_post, f.id, f.forum_name, f.moderators, f.closed AS forum_closed, f.admmod_only, 0 FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON t.forum_id=f.id WHERE t.id='.$id.' AND t.moved_to IS NULL') or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error());
~118 ?????? list($subject, $closed, $sticky, $num_replies, $last_post_id, $last_post, $forum_id, $forum_name, $moderators, $forum_closed, $admmod_only, $is_subscribed) = $db->fetch_row($result);
+++ ????? $footer_style =.... ?????????
// Create/Update topic view session
if($cur_user['last_visit'] < $last_post)
setcookie('puntopic_'.$last_post_id, time(), (time()+$pun_config['o_timeout_visit']), $cookie_path, $cookie_domain, $cookie_secure);
------------->8--------
viewforum.php
~165? ??????
---if (!$cookie['is_guest'] && $cur_topic['last_post'] > $cur_user['last_visit'] && $cur_topic['moved_to'] == null)
+++if (!$cookie['is_guest'] && new_topic($cur_topic['last_post_id'], $cur_topic['last_post']) && $cur_topic['moved_to'] == null)
index.php
~88? ??????
---if (!$cookie['is_guest'] && $cur_forum['last_post'] > $cur_user['last_visit'])
+++if (!$cookie['is_guest'] && new_topic($cur_forum['last_post_id'], $cur_forum['last_post']))
include/functions.php
+++
function new_topic($id, $last_post)
{
global $cur_user;
if(isset($_COOKIE['puntopic_'.$id]))
{
if($_COOKIE['puntopic_'.$id] < $last_post)
return true;
}else
{
if($cur_user['last_visit'] < $last_post)
return true;
}
return false;
}
105 2004-10-18 06:07
Re: Integrating punbb into my site (13 replies, posted in PunBB 1.2 show off)
))
News | Forum | School | Resource | ??? | Statistics
News | Forum | School | Resource | Our Net | Statistics
right-down there are service modules for users stats/login, list of forums, poll , our university faculties + schedule, banned list etc..
Hm... btw i wouldn't say russian is so hard to study
106 2004-10-15 06:36
Topic: Integrating punbb into my site (13 replies, posted in PunBB 1.2 show off)
so its in deep development, but already there is smth to look at
http://dev.hostel.nstu.ru/pun/index.php
107 2004-10-15 01:28
Re: heh (4 replies, posted in PunBB 1.2 bug reports)
the code from the first post. but in this forum it doesn't work
hmm.. now it doesnt work in my one too....
strange... solar activity ?
108 2004-10-14 12:14
Re: heh (4 replies, posted in PunBB 1.2 bug reports)
this code in 1.1.5 made my forum ugly, but here it seems fixed
btw, i fixed this
preg_match('#\[quote=("|"|\'|)(.*)\\1\]#sU', $text, $matches);
i replaced with
preg_match('#\[quote=("|"|\'|)([0-9a-zA-z?-??-?\,\ \.]{1,30})\\1\]#sU', $text, $matches);
110 2004-10-08 07:36
Re: setting up a webserver, need some help please. (4 replies, posted in Programming)
so would you like to run apache+php+mysql or IIS+php+mysql/mssql ?
if first -its quite simple. contact with me in ICQ, i can help you
111 2004-10-02 08:51
Re: Punbb + javascript (1 replies, posted in Programming)
you may see more at
http://dev.hostel.nstu.ru/pun/viewtopic.php?pid=61#61
112 2004-10-02 07:20
Topic: Punbb + javascript (1 replies, posted in Programming)
i have a script, in separate file
function pastequote(){
if(document.postform.req_message) document.postform.req_message.value += txt}
function copyquote(Name){
txt=''
if (document.getSelection) txt=document.getSelection()
else if (document.selection) txt=document.selection.createRange().text
txt='[quote='+Name+']'+txt+'[/quote]\n'}
document.onkeydown = keyDown;
window.onkeypress = keyDown;
function keyDown(DownEvents){
var tt = document.getElementById("postform");
if (document.all)
{
var k=window.event.keyCode;
if (window.event.srcElement.className=='post_text')
{
if (window.event.ctrlKey && k==13)
// document.postform.submit(); - tried this too
tt.submit();
return;
}
}
else
{
var k=DownEvents.which;
if (DownEvents.target.className=='post_text')
{
if (DownEvents.ctrlKey && k==13)
{
// document.forms.postform.submit(); - tried this too
tt.submit();
return;
}
}
}
}
I have
<form id="postform" name="postform" ........> ...<textarea name="post_text">....
This should submit my form if ctrl+enter pressed
So, the code above doesn't work? can anybody help me ?
113 2004-10-01 17:18
Re: Improved New Message 1.0 (17 replies, posted in PunBB 1.2 modifications, plugins and integrations)
it isnt working for me
114 2004-10-01 05:22
Re: Improved New Message 1.0 (17 replies, posted in PunBB 1.2 modifications, plugins and integrations)
hm. so no definite answer ?
115 2004-09-25 06:09
Re: Improved New Message 1.0 (17 replies, posted in PunBB 1.2 modifications, plugins and integrations)
hi all, where can i get this mod now ?
116 2004-07-13 10:00
Re: Mambo integration (50 replies, posted in PunBB 1.2 modifications, plugins and integrations)
Would you need the login and registration to work on both Mambo and PunBB, or would it be sufficient if I implemented it in Mambo?
Great idea, and it would be VERY nice, if you make it! now i'm using mambo and punbb as external forum.. though i have not enough PHP knowledge to integrate them..
117 2004-06-27 06:25
Re: Bug with [ img ] tag (24 replies, posted in PunBB 1.2 bug reports)
hmmm... smth is wrong with your code... it works fine with single image, but sux with series of them... i'll see it through
118 2004-06-24 06:16
Re: Bug with [ img ] tag (24 replies, posted in PunBB 1.2 bug reports)
just for now , i've done such thing
$message = preg_replace('#\[img\]((f)tp://)([^\?&=\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#si', '<img src="$1' . eregi_replace('\?.*|&.*', '', str_replace(' ', '%20', '$3')) . '" border="0" align="top" alt="< ??????? ??????????? > ">', $message);
$message = preg_replace('#\[img\]((ht)tp://)([^\?&=\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#si', '< <a href="$1' . eregi_replace('\?.*|&.*', '', str_replace(' ', '%20', '$3')) . '" target="_blank"><b>?????? ?? ??????? ???????????</b></a> >', $message);
119 2004-06-23 09:11
Re: Bug with [ img ] tag (24 replies, posted in PunBB 1.2 bug reports)
1) Add a list of _permitted_ image file types, jpg/jpeg/gif/png/etc
then in the post submission look for [ img ] tags that don't match up.2) Check it during the bbcode->html conversion - though I think 1 is better since it is done once rather than every time a post is viewed.
3) More specific - check the img url for login.php and deny it (assuming login.php is the only place action=out can work).
I'd rather not have a blanket ban on images sent from a .php page since I've several graph generation scripts that use such urls.
1) is not a solution. a can rename my file so evilcode.jpg
2) --||--
3) is not a solution, because i can use not only this url, but also smth like this evilcode.js
yeah... rather hard problem, isnt ?
the only solution i see - is to upload images to server, then check its mime-type... by it will slow down the server greatly.... + it will do MUCH traffick...
120 2004-06-22 10:06
Re: Bug with [ img ] tag (24 replies, posted in PunBB 1.2 bug reports)
Nice one!
Evil trick!
yeah.. i know
121 2004-06-22 05:53
Re: Bug with [ img ] tag (24 replies, posted in PunBB 1.2 bug reports)
122 2004-06-22 05:46
Re: Bug with [ img ] tag (24 replies, posted in PunBB 1.2 bug reports)
check it out, i've just made a post, in test forum, topic testing
123 2004-06-22 05:44
Topic: Bug with [ img ] tag (24 replies, posted in PunBB 1.2 bug reports)
like this [ img ] http://punbb.org/forums/login.php?action=out [ img ]
124 2004-05-18 11:33
Re: marking topic as read, when entering it (2 replies, posted in Feature requests)
thx
125 2004-05-18 10:34
Topic: marking topic as read, when entering it (2 replies, posted in Feature requests)
or tell me how to make this most efficient ?