vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   New Post Parts (https://vborg.vbsupport.ru/showthread.php?t=49179)

ULTIMATESSJ 02-21-2003 10:24 PM

New Post Parts
 
1 Attachment(s)
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 ;)

Dean C 02-22-2003 10:57 AM

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

ULTIMATESSJ 02-24-2003 01:26 PM

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

Dean C 02-24-2003 03:26 PM

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

ULTIMATESSJ 02-24-2003 05:52 PM

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

Dean C 02-25-2003 03:25 PM

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

ULTIMATESSJ 02-26-2003 04:00 PM

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

ULTIMATESSJ 03-15-2003 06:54 PM

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?


All times are GMT. The time now is 06:30 AM.

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.01037 seconds
  • Memory Usage 1,731KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete