Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons

Reply
 
Thread Tools
Custom Thread Fields Details »»
Custom Thread Fields
Version: 1.3.0, by harmor19 harmor19 is offline
Developer Last Online: May 2023 Show Printable Version Email this Page

Category: New Posting Features - Version: 3.6.4 Rating:
Released: 10-07-2006 Last Update: 05-03-2007 Installs: 221
DB Changes Uses Plugins Template Edits
 
No support by the author.

What you can do with this hack is add multiple fields when someone creates a new thread. You can specify what fields can go in which forums.

To add, edit, or delete a custom field go into your ACP
Forums & Moderators --> Threads Field Manager

################## Updates ##################
1.0.0 - Initial Release
1.1.0 - Fixed bug
1.2.2 - Added the ability to add a field to multiple forums more easily
1.3.0 - Fixed some crucial bugs
1.4.0 - Added more features
################## Updates ##################

If you have installed this add-on on your board please click Install to the bottom right of this post
You are not permitted to redistribute this add-on on any site.
If you feel this add-on deserves Mod of the Month please click to nominate it

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #62  
Old 11-01-2006, 09:08 PM
category category is offline
 
Join Date: Jul 2005
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

he gave up there is a similar mod for 3.5.2 that works for 3.6.0
Reply With Quote
  #63  
Old 11-01-2006, 11:27 PM
paul41598's Avatar
paul41598 paul41598 is offline
 
Join Date: Jun 2004
Location: MI
Posts: 732
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 !
Reply With Quote
  #64  
Old 11-02-2006, 04:53 PM
Greek76's Avatar
Greek76 Greek76 is offline
 
Join Date: Aug 2006
Location: Planet Earth
Posts: 440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #65  
Old 11-02-2006, 06:10 PM
paul41598's Avatar
paul41598 paul41598 is offline
 
Join Date: Jun 2004
Location: MI
Posts: 732
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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..
Reply With Quote
  #66  
Old 11-02-2006, 07:10 PM
boywonder boywonder is offline
 
Join Date: Mar 2006
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #67  
Old 11-03-2006, 01:15 PM
tekstylez tekstylez is offline
 
Join Date: Aug 2006
Location: Philly
Posts: 129
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am getting the following code when posting a new thread
Quote:
<br /><br />
----------------------------------------<br />

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

Is there a fix for this?
Reply With Quote
  #68  
Old 11-03-2006, 08:16 PM
LaCN LaCN is offline
 
Join Date: Feb 2005
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #69  
Old 11-04-2006, 02:57 AM
taydu taydu is offline
 
Join Date: Oct 2006
Posts: 103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #70  
Old 11-04-2006, 08:12 AM
jaks jaks is offline
 
Join Date: Dec 2004
Location: Toronto
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #71  
Old 11-04-2006, 03:48 PM
LaCN LaCN is offline
 
Join Date: Feb 2005
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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'];
Reply With Quote
Reply

Thread Tools

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 04:22 PM.


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.05105 seconds
  • Memory Usage 2,324KB
  • Queries Executed 27 (?)
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
  • (2)bbcode_code
  • (2)bbcode_php
  • (10)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_postinfo_query
  • fetch_postinfo
  • 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