Форум сетевых администраторов
Показаны 7 сообщений на этой странице

Форум сетевых администраторов (http://netadmin.ws/forum/index.php)
- Хаки от Netadmin или "Сделай сам" (http://netadmin.ws/forum/forumdisplay.php?forumid=65)
-- Перемещение постов между темами (http://netadmin.ws/forum/showthread.php?threadid=7129)


Помещено NKVD 22-11-2003 в 12:55:

Перемещение постов между темами

Мне нужен хак чтобы мона было переместить посты юзеров из одной темы в другую...Такой хак есть уже только пропуска на тот форум нету... http://www.vbulletin.org/forum/showthread.php?t=33630

Если кто может, скопируйте тот текст сюда или посоветуйте другой аналогичный хак плз!


Помещено Boxa 22-11-2003 в 19:21:

мыло дай

__________________
Софт || www.xxs.ru


Помещено Dodger 22-11-2003 в 21:30:

можно оботись и без хака.. просто делим тему - в одной будут все сообщения, а в другой (новой) то, которое ты хочешь перенести в другую тему. А другую темы с только что созданной с одним сообщением объединяешь. Немножко гиморно, но я не встречался с таким, чтобы такие операции приходилось проворачивать каждый день...


Помещено NKVD 22-11-2003 в 22:49:

quote:
Первоначальное сообщение от Boxa
мыло дай


smotri v pm


Помещено MCTarakan 22-11-2003 в 23:18:

Dodger
есть тут на форуме! Ищите лучше, вроде Count выкладывал!

__________________
yMC.ru - хомяк музыканта


Помещено Boxa 23-11-2003 в 08:33:

This was requested on vbulletin.com and it's a very simple hack,
which essentially combines the split and the merge admin options

Open postings.php and find (Around lines 756-757):

code:

$DB_site->query("INSERT INTO thread  (threadid,title,lastpost,forumid,open,replycount,p
ostusername,postuserid,lastpos  ter,dateline,views,iconid,notes,visible) VALUES (NULL,'".addslashes($title)."','".addslashes($threadinfo[lastpost])."','".addslashes($threadinfo[forumid])."','".addslashes($threadinfo[open])."','".addslashes($threadinfo[replycount])."','".addslashes($threadinfo[postusername])."','".addslashes($threadinfo[postuserid])."','".addslashes($threadinfo[lastposter])."','".addslashes($threadinfo[dateline])."','".addslashes($threadinfo[views])."','".addslashes($threadinfo[iconid])."','Thread split from threadid $threadid by ".addslashes($bbuserinfo['username'])." on ".vbdate($dateformat." ".$timeformat,time()).". ".addslashes($threadinfo[notes])."','".addslashes($threadinfo[visible])."')");
  	$newthreadid=$DB_site->insert_id();


Replace it with:

code:
  // move posts from one thread to another
  if(trim($movetothread)=="") {

  	$DB_site->query("INSERT INTO thread  (threadid,title,lastpost,forumid,open,replycount,p
ostusername,postuserid,lastpos  ter,dateline,views,iconid,notes,visible) VALUES (NULL,'".addslashes($title)."','".addslashes($threadinfo[lastpost])."','".addslashes($threadinfo[forumid])."','".addslashes($threadinfo[open])."','".addslashes($threadinfo[replycount])."','".addslashes($threadinfo[postusername])."','".addslashes($threadinfo[postuserid])."','".addslashes($threadinfo[lastposter])."','".addslashes($threadinfo[dateline])."','".addslashes($threadinfo[views])."','".addslashes($threadinfo[iconid])."','Thread split from threadid $threadid by ".addslashes($bbuserinfo['username'])." on ".vbdate($dateformat." ".$timeformat,time()).". ".addslashes($threadinfo[notes])."','".addslashes($threadinfo[visible])."')");
  	$newthreadid=$DB_site->insert_id();

  } else {
	// get other threadid
 	$getthreadid=intval(substr($movetothread,strpos($
movetothread,"threadid=")+9));
	if ($getthreadid==0) {
	   $getpostid=intval(substr($movetothread,strpos($mov
etothread,"postid=")+7));
	  if ($getpostid==0) {
	    // do invalid url
	    eval("standarderror(\"".gettemplate("error_mergebadurl")."\");");
	    exit;
	  }
	  $getpostid=verifyid("post",$getpostid,0);
	  if ($getpostid==0) {
	    // do invalid url
	    eval("standarderror(\"".gettemplate("error_mergebadurl")."\");");
	    exit;
	  }
	
	  $postinfo=getpostinfo($getpostid);
	  $newthreadid=$postinfo[threadid];
	} else {
	  $getthreadid=verifyid("thread",$getthreadid,0);
	  if ($getthreadid==0) {
	    // do invalid url
	    eval("standarderror(\"".gettemplate("error_mergebadurl")."\");");
	    exit;
	  }
	  $newthreadid=$getthreadid;
	}
	
  }
  // / move posts from one thread to another





Save and upload.
Open template threads_splitthread and find:

code:
$postbits


This was requested on vbulletin.com and it's a very simple hack,
which essentially combines the split and the merge admin options

Open postings.php and find (Around lines 756-757):

Code:


$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,p
ostusername,postuserid,lastpos ter,dateline,views,iconid,notes,visible) VALUES (NULL,'".addslashes($title)."','".addslashes($threadinfo[lastpost])."','".addslashes($threadinfo[forumid])."','".addslashes($threadinfo[open])."','".addslashes($threadinfo[replycount])."','".addslashes($threadinfo[postusername])."','".addslashes($threadinfo[postuserid])."','".addslashes($threadinfo[lastposter])."','".addslashes($threadinfo[dateline])."','".addslashes($threadinfo[views])."','".addslashes($threadinfo[iconid])."','Thread split from threadid $threadid by ".addslashes($bbuserinfo['username'])." on ".vbdate($dateformat." ".$timeformat,time()).". ".addslashes($threadinfo[notes])."','".addslashes($threadinfo[visible])."')");
$newthreadid=$DB_site->insert_id();


Replace it with:

Code:
// move posts from one thread to another
if(trim($movetothread)=="") {

$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,p
ostusername,postuserid,lastpos ter,dateline,views,iconid,notes,visible) VALUES (NULL,'".addslashes($title)."','".addslashes($threadinfo[lastpost])."','".addslashes($threadinfo[forumid])."','".addslashes($threadinfo[open])."','".addslashes($threadinfo[replycount])."','".addslashes($threadinfo[postusername])."','".addslashes($threadinfo[postuserid])."','".addslashes($threadinfo[lastposter])."','".addslashes($threadinfo[dateline])."','".addslashes($threadinfo[views])."','".addslashes($threadinfo[iconid])."','Thread split from threadid $threadid by ".addslashes($bbuserinfo['username'])." on ".vbdate($dateformat." ".$timeformat,time()).". ".addslashes($threadinfo[notes])."','".addslashes($threadinfo[visible])."')");
$newthreadid=$DB_site->insert_id();

} else {
// get other threadid
$getthreadid=intval(substr($movetothread,strpos($
movetothread,"threadid=")+9));
if ($getthreadid==0) {
$getpostid=intval(substr($movetothread,strpos($mov
etothread,"postid=")+7));
if ($getpostid==0) {
// do invalid url
eval("standarderror(\"".gettemplate("error_mergebadurl")."\");");
exit;
}
$getpostid=verifyid("post",$getpostid,0);
if ($getpostid==0) {
// do invalid url
eval("standarderror(\"".gettemplate("error_mergebadurl")."\");");
exit;
}

$postinfo=getpostinfo($getpostid);
$newthreadid=$postinfo[threadid];
} else {
$getthreadid=verifyid("thread",$getthreadid,0);
if ($getthreadid==0) {
// do invalid url
eval("standarderror(\"".gettemplate("error_mergebadurl")."\");");
exit;
}
$newthreadid=$getthreadid;
}

}
// / move posts from one thread to another


Save and upload.

Open template threads_splitthread and find:

Code:
$postbits


Right BEFORE it add:

code:
<tr>
	<td bgcolor="{ secondaltcolor }"><normalfont><b>OR Merge Posts into Thread:</b></normalfont></td>
	<td bgcolor="{ secondaltcolor }"><normalfont><input type="text" class="bginput" name="movetothread" size="55"></normalfont></td>
</tr>


remove the space after and before { } in the above code)
That's it

Cheers,

Bira



<< edit: you don't have to put spaces in between the {replacementvars} if you have checked 'disable smilies in this post >>

<< edit 2: ok apparently i lied...chen did you remove that here? >>

__________________
Софт || www.xxs.ru


Помещено MCTarakan 24-11-2003 в 00:07:

Boxa
а простым текстовым файлом не приаттачить было???? Кроме того тебе замечаение влепят за публикацию хака с вб.орг! Так что правь пост!

__________________
yMC.ru - хомяк музыканта


Формат времени GMT. Текущее время 09:10.
Показаны 7 сообщений на этой странице

Powered by: vBulletin Version 2.2.4
Copyright © Jelsoft Enterprises Limited 2000, 2001.