Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)

Reply
 
Thread Tools Display Modes
  #1  
Old 09-25-2001, 01:55 PM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Heh, I'm suddenly requesting hacks on a frenzy, eh?


Ah well, this one's for the Infogrames North America board again.


Suppose, we have a forum there, the Wheel of Time Book Forum, where there are on-topic threads, roleplaying threads, and off-topic threads. Now, we would like to see a prefix used in a similar way as currently "Poll: ", "Sticky: " and "Announcement: " are used, but then have the options "WoT: ", "RP: ", and "OT: " and have those options as three radio buttons somewhere in the New Thread template/page.

This way, a user can post a thread, point out which type it is, and then that type will show up as a prefix in the same way Poll etc. do, now.

Also, this should only be visible on the WoT-specific templates, so that those three options don't show up on forums that AREN'T using the WoT Styleset.

Oh and it'd be best if none of the three prefixes is turned on by default, and that if the user doesn't select one, no prefix is used, either.


Is this possible?
Reply With Quote
  #2  
Old 09-25-2001, 05:52 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Umm, this can be done very easily, but only if the type isn't editable.

If you want it to be, I think it'll involve some more comprehensive hacking.
Reply With Quote
  #3  
Old 09-25-2001, 10:29 PM
beatbox
Guest
 
Posts: n/a
Default

I'd prefer the options in all forum's - as it would probably require less hacking, not to mention detailed stuff is not needed for me.
Reply With Quote
  #4  
Old 09-26-2001, 05:24 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by FireFly
Umm, this can be done very easily, but only if the type isn't editable.

If you want it to be, I think it'll involve some more comprehensive hacking.
Reply With Quote
  #5  
Old 09-26-2001, 06:47 AM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by FireFly
Umm, this can be done very easily, but only if the type isn't editable.

If you want it to be, I think it'll involve some more comprehensive hacking.
Reply With Quote
  #6  
Old 09-26-2001, 06:57 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok.

Add something like this in your newreply and newthread templates, right after the Title row:
Code:
<tr bgcolor="{secondaltcolor}">
	<td bgcolor="{secondaltcolor}"><normalfont><b>Thread type:</b></normalfont></td>
	<td bgcolor="{secondaltcolor}">
		<select name="threadtype">
			<option value="WoT">WoT</option>
			<option value="RP">RP</option>
			<option value="OR">OT</option>
		</select>
	</td>
</tr>
Now, in newreply.php add this:
PHP Code:
      $title $threadtype.": ".$title
right BEFORE this:
PHP Code:
      $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(htmlspecialchars($postusername))."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','$visible')"); 
In newthread.php, add this:
PHP Code:
      $title $threadtype.": ".$title
right BEFORE this:
PHP Code:
      $DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastposter,dateline,iconid,visible,attach) VALUES (NULL,'".addslashes(htmlspecialchars($subject))."','".time()."','$forumid','1','0','".addslashes($postusername)."','$bbuserinfo[userid]','".addslashes($postusername)."','".time()."','$iconid','$visible','$attachcount')"); 
That's it. Should work.
Reply With Quote
  #7  
Old 09-26-2001, 07:22 AM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome, just one quick Q: this will ONLY work and show up in the templates in which I add that first piece, and it won't do -anything- to the newreply/newthread pages in all other templates?
Reply With Quote
  #8  
Old 09-26-2001, 07:25 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oops you're right.

Use this:
PHP Code:
if ($threadtype) {
  
$title $threadtype.": ".$title;

NOT this:
PHP Code:
$title $threadtype.": ".$title
Reply With Quote
  #9  
Old 09-26-2001, 07:30 AM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There we go, awesome, thanks!


Now if I can just fix the massive problem I have on my server right now (nothing works anymore *cries* Blah, stupid .htaccess is messing up! )


I'll tell you if I ever come across a bug or so!
Reply With Quote
  #10  
Old 09-26-2001, 08:07 AM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Heh, I just tested it, and, well.. the selector works. Buuuuuuuuuuuuuuut it doesn't quite put a prefix in front of the thread title on the forum index. Help?
Reply With Quote
Reply

Thread Tools
Display Modes

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 10:05 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06699 seconds
  • Memory Usage 2,264KB
  • Queries Executed 11 (?)
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
  • (1)bbcode_code
  • (6)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (9)postbit_onlinestatus
  • (10)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete