Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 02-21-2003, 10:24 PM
ULTIMATESSJ's Avatar
ULTIMATESSJ ULTIMATESSJ is offline
 
Join Date: Nov 2001
Location: Bristol, England
Posts: 315
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default New Post Parts

Well since my last thread was left to rot, i'll post this one here, my understanding of php has somewhat improved since then, but my vBulletin knowledge by very little :sleep:, so bare with me, if you see in the attachment i made, what i want done is new fields added to the reply to thread page, but only on specific forums i want, i was thinking on using the code for the custom post prefixes hack to do this, but i'm not sure if it would work out, since i need some inside the actual thread as well, i was thinking that putting something in forumdisplay.php which leads to a new thread posting template with the new fields in would work, but i'm not too sure what i would need to be editing and where abouts i would place the code in a file, so i need help, hopefully you will all be kind enough to help me
Attached Images
File Type: jpg screen.jpg (561.5 KB, 0 views)
Reply With Quote
  #2  
Old 02-22-2003, 10:57 AM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Slynderdale is helping me out with something similar. Remember if it is based on forumid you need to edit editpost.php and newthread.php also

It's not too hard.

Add a new column to the post table and change your queries to add it in. Then use an if statement to surround it.

I'll let you know when i'm done

- miSt
Reply With Quote
  #3  
Old 02-24-2003, 01:26 PM
ULTIMATESSJ's Avatar
ULTIMATESSJ ULTIMATESSJ is offline
 
Join Date: Nov 2001
Location: Bristol, England
Posts: 315
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i know you'd have to edit forumdisplay.php (since i want certain things to be on the forumdisplay part), newreply.php, newthread.php and editpost.php, and add some new columns using phpMyAdmin, the only problem i have with it, is getting it to work with one forumid only, what code i need to put in and where abouts, vB hacking isn't my strong point
Reply With Quote
  #4  
Old 02-24-2003, 03:26 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The only part of getting it work with forumid is calling a different template for a different forum. You don't have to base the query on a forumid as you are allowed to insert blank data into a column

- miSt
Reply With Quote
  #5  
Old 02-24-2003, 05:52 PM
ULTIMATESSJ's Avatar
ULTIMATESSJ ULTIMATESSJ is offline
 
Join Date: Nov 2001
Location: Bristol, England
Posts: 315
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Mist
The only part of getting it work with forumid is calling a different template for a different forum. You don't have to base the query on a forumid as you are allowed to insert blank data into a column

- miSt
well i can add this near the top of newthread.php

Code:
if ($foruminfo[forumid]==2) {
  eval("dooutput(\"".gettemplate("newthread_submissions")."\");");
  exit;
}
but when you get into it, vbcode, smilies don't work and when you submit, nothing happens, so this won't do, i've also tried copying the start new thread section and repeating it with changes for the new templates, but they still arn't working, and i'm still not sure what to do with forumdisplay.php and editpost.php
Reply With Quote
  #6  
Old 02-25-2003, 03:25 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Getting vbcode and smilies to work with it isn't too hard. It's a matter of adding a line (or maybe two) of code above the template call. Somone will know the answer to this i'm sure..

I think it has to do with the bbcodeparse() function... I may be completely wrong though

- miSt
Reply With Quote
  #7  
Old 02-26-2003, 04:00 PM
ULTIMATESSJ's Avatar
ULTIMATESSJ ULTIMATESSJ is offline
 
Join Date: Nov 2001
Location: Bristol, England
Posts: 315
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well i just put

Code:
 $vbcode_smilies = '';
  $vbcode_buttons = '';
  if ($foruminfo[allowsmilies]) {
    if ($bbuserinfo[showvbcode] && $allowvbcodebuttons)
      $vbcode_smilies = getclickysmilies();
    eval("\$disablesmiliesoption = \"".gettemplate("newpost_disablesmiliesoption")."\";");
  } else {
    $disablesmiliesoption="";
  }
  if ($bbuserinfo[showvbcode] && $allowvbcodebuttons)
    $vbcode_buttons = getcodebuttons();
above the previous code i used, and that seems to be working now, all the vbcode and smilies are working, but i am still having that problem with the thread not submiting, i've tried adding loads of code above the vbcode part, but i always end up with parse errors, do u know what line i would need to add to get it to submit
Reply With Quote
  #8  
Old 03-15-2003, 06:54 PM
ULTIMATESSJ's Avatar
ULTIMATESSJ ULTIMATESSJ is offline
 
Join Date: Nov 2001
Location: Bristol, England
Posts: 315
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well i placed all of the added code under

// ############################### start new thread ###############################

and it worked perfectly, but a small question, one that should be easy to answer, once i've added the column in the thread table, what exactly do i have to add in newthread.php and where abouts, i have a rough idea, but i think that it needs more than one line of code to get it to work properly, also i get a mysql problem to do with postings.php, anything i got to do there?
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 02:28 AM.


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.04643 seconds
  • Memory Usage 2,246KB
  • Queries Executed 12 (?)
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
  • (1)bbcode_quote
  • (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_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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete