vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   New Posting Features - Custom Thread Fields (https://vborg.vbsupport.ru/showthread.php?t=128587)

category 11-01-2006 09:08 PM

he gave up there is a similar mod for 3.5.2 that works for 3.6.0

paul41598 11-01-2006 11:27 PM

I composed a fix for everyone. Hopefully should work for everyone like it did me.

When in doubt, leave it up to me to fix da bugs ;)


If you don't wanna re-import the XML then goto your plugin manager

FIND: newthread_post_start

Code:

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

replace with:

Code:

if($forms['required'] == 1)
    {
      $forumids = explode(",", $forms['forumid']);
        if(in_array($foruminfo['forumid'], $forumids))
          {
      if(empty($value))
      {
        eval(standard_error(fetch_error('fill_in_custom_thread_field')));
      }
          }
    }

Don't forget to check out my addons for this hack here and here !

Greek76 11-02-2006 04:53 PM

Make sure "Allow Overwrite" is "No" and click "Import" is what you say , but if the original one is on it wont let you import the product with out overwriting the original file. So what I did was edit the code with you quoted up above. I also added the Custom thread field add on and all I see is just text boxes after the Required field...


Add a New Custom Field
Enter the Forum IDs for the field to be placed in
Seperate each ID with a comma, Use -1 to include all forum IDs
Title:
Required

When I click save I get this database error....

Quote:

Database error in vBulletin 3.6.2:

Invalid SQL:

UPDATE custom_thread_forms SET
forumid = '37',
title = 'For Sale',
required = '1',
prefixed = '0',
opentag = '',
closetag = '',
textboxsize = '0',
textboxmax = '0',
textboxdesc = ''
WHERE custom_formid = 1;

MySQL Error : Unknown column 'prefixed' in 'field list'
Error Number : 1054

paul41598 11-02-2006 06:10 PM

you know what though, which I failed to mention. My addon is the code from the original hack version. You cant enter in extra forum id's seperated by columns, etc. I've never wrote my addon to reflect the most recent update of this hack with is more than 1 forum id.

So dont use my addon basically..

boywonder 11-02-2006 07:10 PM

Is there any way that the fields names can form additional top columns in the list of threads ( eg so you could have "Thread Title", "Custom Field 1" "Custom Field 2", Last Post, Replies etc) - with the entries for the fields listed below (and ideally sortable) as entries in the new thread columns?

This would be fantastic!

tekstylez 11-03-2006 01:15 PM

I am getting the following code when posting a new thread
Quote:

<br /><br />
----------------------------------------<br />

----------------------------------------<br />

Is there a fix for this?

LaCN 11-03-2006 08:16 PM

Quote:

Originally Posted by tekstylez
I am getting the following code when posting a new thread
Quote:

<br /><br />
----------------------------------------<br />

----------------------------------------<br />
Is there a fix for this?

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:
Quote:

$vbulletin->GPC['message'] = $vbulletin->GPC['message'] . "<br /><br />
----------------------------------------<br />
$custom_message
----------------------------------------<br />";
replace it with:
Quote:

$vbulletin->GPC['message'] = $vbulletin->GPC['message'] . "


----------------------------------------
$custom_message
----------------------------------------
";
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:

Quote:

if(in_array($foruminfo['forumid'], $forumids))
{
$custom_message .= "<b>".$forms['title']."</b>: $value<br />";
}
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 ;)

taydu 11-04-2006 02:57 AM

great mod harmor19,

How do i make the text of the custom field appear before the actual post content?

Currently you have

The content of the post here

----------------------------
Custom field text area
----------------------------

How do I make it

----------------------------
Custom field text area
----------------------------

The content of the post here

jaks 11-04-2006 08:12 AM

Is there a way to produce these tags individually like the custom profile fields works? I need to merge 2 fields wrapped in an if statment dependant on the first. I don't Need titles/questions before the fields either. It's so my members can add a proper html link without having to have HTML rights. I'll install if there is a way to do that.

Nice to see someone started a new one since the Extra Fields one went bye bye. :)

LaCN 11-04-2006 03:48 PM

Quote:

Originally Posted by taydu
great mod harmor19,

How do i make the text of the custom field appear before the actual post content?

Currently you have

The content of the post here

----------------------------
Custom field text area
----------------------------

How do I make it

----------------------------
Custom field text area
----------------------------

The content of the post here

Easy, go to the relevant plugin, I mentioned 2 posts above urs.
then:
change:
Quote:

$vbulletin->GPC['message'] = $vbulletin->GPC['message'] . "<br /><br />
----------------------------------------<br />
$custom_message
----------------------------------------<br />";
into:
Quote:

$vbulletin->GPC['message'] = "<br />
----------------------------------------<br />
$custom_message
----------------------------------------<br /><br />" . $vbulletin->GPC['message'];


All times are GMT. The time now is 10:52 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.01270 seconds
  • Memory Usage 1,760KB
  • 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
  • (2)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete