Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-18-2002, 06:29 PM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Annoucements Forum (with duplicates of announcements for people's replies)

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...
Reply With Quote
  #2  
Old 10-06-2002, 12:33 PM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bump
Reply With Quote
  #3  
Old 10-06-2002, 07:59 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 10-07-2002, 11:38 PM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Um... (help) LOL!
Reply With Quote
  #5  
Old 10-08-2002, 12:34 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*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
PHP Code:
  $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:
PHP Code:
      $forumid=XX;
      
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,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,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,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
Reply With Quote
  #6  
Old 10-09-2002, 06:39 PM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Woohoo! (said in best homer simpson voice) thank you, I'll go give it a shot right now.
Reply With Quote
  #7  
Old 10-09-2002, 07:03 PM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:

Code:
maketextareacode("Announcement","pagetext","",10,50);
to:

Code:
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:
Attached Images
File Type: gif anncredtext.gif (4.5 KB, 0 views)
Reply With Quote
  #8  
Old 10-09-2002, 09:31 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you're welcome

also wise decicion about the warning..
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:31 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05231 seconds
  • Memory Usage 2,270KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (1)postbit_attachment
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete