Thread: New Posting Features - Custom Thread Fields
View Single Post
  #136  
Old 06-29-2007, 03:19 PM
RedGTiVR6 RedGTiVR6 is offline
 
Join Date: Dec 2006
Location: Little Elm, TX
Posts: 817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by LaCN View Post
THat's because u prolly have html-code set to off

Go to ur plugins
edit: Custom Thread Forms [newthread_post_start]
In the big text-box with the php-code, scroll down to the bottom and find:

replace it with:

So, the <br> tages just become an enter
(make sure they are within "")




You prolly might have the same problem with the custom tags and answers..
Above that area u just fixed, find:



Change it into this:
PHP Code:
           if(in_array($foruminfo['forumid'], $forumids))
           {
               
$custom_message .= "[B]".$forms['title'].":[/B] ".$value."
"

If u want colored titles, do something like:
PHP Code:
 $custom_message .= "[B][COLOR=Navy]".$forms['title'].":[/COLOR][/B] ".$value."
"

Notice that I removed the "" from [COLOR="NAVY"]
(somehow placing a \ in front of them isn't working)


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~


I would like to see an option in type of field, like I want to have a textarea sometimes.
And also the ability for an url-field.

So u get:
._________ . .___________
|_link-field_| |_name-field_|

for example
I'm running into the same issue that prompted this fix.

Unfortunately, it appears that the plug-in has changed since this fix was posted.

Here is the current "Custom Thread Forms [newthread_post_start]" that I have installed.

PHP Code:
if($vbulletin->options['custom_thread_fields_enabled'])
{
$getcustomthreadfields $db->query_read("SELECT * FROM " TABLE_PREFIX "custom_thread_forms");
  while(
$forms $db->fetch_array($getcustomthreadfields))
  {

    
$custom_formid "custom_$forms[custom_formid]";
    
$value $vbulletin->input->clean_gpc('p'$custom_formidTYPE_STR);

    if(
$forms['required'] == && empty($value))
    {
       eval(
standard_error(fetch_error('fill_in_custom_thread_field')));
    }

    if(
$forms['fieldtype'] == 1)
    
$value nl2br($value);

    
$forumids explode(","$forms['forumid']);

    if(!empty(
$value))
    {
        if(
in_array($foruminfo['forumid'], $forumids) OR $forms['forumid'] == "-1" )
        {
           
$custom_message .= "[b]".$forms['title']."[/b]: $value<br /><br />";
           
$break "<br /><br />";
        }
    }

  }

  
$vbulletin->GPC['message'] = $vbulletin->GPC['message'] . "$break $custom_message";
 } 
Anyone have any ideas? I don't really want to allow users to use HTML code on the forums....
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01137 seconds
  • Memory Usage 1,803KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete