Tim Wheatley
03-18-2002, 06:29 PM
Basically I just want people to be able to reply to announcements so I can cut down on sticky threads.
But what I'd like to happen is:
I create a new forum called Forum Announcements.
Someone posts an Announcement, this is posted by an auto poster (or the anncment poster) automatically into that forum.
People can click reply when viewing the anncment and their reply goes into the relevant thread.
.....or something with those functions would be great... :)
Xenon
10-06-2002, 07:59 PM
wow, what an old thread ;)
hmm, creating a new thread whenever an announcement has been created wouldn't be hard.
you've just to copy out some parts (where the first post and the thread is inserted into the db) of newthread.php and insert em into your announcement.php
for the replyingpart you have to add a field to announcementtable called threadid and fill it with the thread id of the new created thread..., then you just have to add a link to this newreply.php into the announcmentpostbit
Xenon
10-08-2002, 12:34 PM
*ggg*
ok here you go
run this query:
ALTER TABLE `announcement` ADD `threadid` INT(9) UNSIGNED DEFAULT '0' NOT NULL;
open admin(mod)/announcement.php find $DB_site->query("INSERT INTO announcement(announcementid,title,userid,startdate ,enddate,pagetext,forumid,threadid) VALUES (NULL,'".addslashes($title)."','$bbuserinfo[userid]',UNIX_TIMESTAMP('".addslashes($startdate)."'),UNIX_TIMESTAMP('".addslashes($enddate)."'),'".addslashes($pagetext)."','$parentid','$threadid')");
before add:
$forumid=XX;
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,p ostusername,postuserid,lastposter,dateline,iconid, visible,attach) VALUES (NULL,'".addslashes(htmlspecialchars($title))."','".time()."','$forumid','1','0','".addslashes($bbuserinfo['username'])."','$bbuserinfo[userid]','".addslashes($bbuserinfo['username'])."','".time()."','0','1','0')");
$threadid=$DB_site->insert_id();
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,at tachmentid,pagetext,allowsmilie,showsignature,ipad dress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes($bbuserinfo['username'])."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($pagetext)."','1','0','','0','1')");
$postid=$DB_site->insert_id();
indexpost($postid,1);
replace the forumid=xx with the correct anouncementforumid you want.
then open your announcementbit template and add a link to newreply.php?s=$session[sessionhash]&threadid=$announcement[threadid]
normally this should work, if not, just ask ;)
Tim Wheatley
10-09-2002, 06:39 PM
Woohoo! (said in best homer simpson voice) thank you, I'll go give it a shot right now. :D:D
Tim Wheatley
10-09-2002, 07:03 PM
It works, first class job my friend. :up:
I only installed it on admin/annoucement.php not mod/...
Reason being, we host forums for others folks who keep their forums invisible to other users, we don't want their annous to be visible to everyone, but as I've only applied it to the admin one, this works great, what I've also done is:
in annoucement.php changed:
maketextareacode("Announcement","pagetext","",10,50);
to:
maketextareacode("Announcement<p><font color=\"red\">WARNING: This text is duplicated into posts in the announcement forum. Please use the moderator CP announcement link if you do not wish to do this.</font></p>","pagetext","",10,50);
Thanks very much for your help. :up:
See below:
Xenon
10-09-2002, 09:31 PM
you're welcome :)
also wise decicion about the warning.. :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.