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)

trilljester 10-16-2006 06:28 PM

What would be awesome for this mod, would be the ability for users to choose an option from a drop-down box and have that option appear in the post.

I.E. I'd love to have a simple movie/music review forum where users can select their rating of a movie with that drop down box, and it could show a summary of ratings based on people's votes.

paul41598 10-18-2006 05:38 PM

Not sure if this deserves its own thread, so I guess I'll post my addon here. Ability to have opening and closing tags for the fields

paul41598 10-18-2006 06:39 PM

Ok, last update. Sorry. Added the ability to put a display length, and max length for the text boxes. Also a description :classic:

harmor19 10-19-2006 08:10 AM

Quote:

Originally Posted by trilljester
What would be awesome for this mod, would be the ability for users to choose an option from a drop-down box and have that option appear in the post.

I.E. I'd love to have a simple movie/music review forum where users can select their rating of a movie with that drop down box, and it could show a summary of ratings based on people's votes.

I'll add it when I have the motivation.

Thank you Paul for the add-ons.

SeQual 10-19-2006 09:54 PM

Quote:

Originally Posted by SeQual
Is there a way to have a textarea instead of input box?


Tried it myself, but the normal vb message box gets all mixed up with it. :ermm:

harmor19 10-19-2006 11:20 PM

It's being coded in the next version.

Gripemaster 10-19-2006 11:36 PM

This will be a great addition to my "Flea Market" section on my forum. Excellent work! Thank you!

*Clicks Installed* ;)

SeQual 10-20-2006 06:56 AM

Quote:

Originally Posted by harmor19
It's being coded in the next version.


Cool thanks, will be a great addition :up:

Greek76 10-20-2006 09:44 PM

I have a problem. For some reason Im doing a specific forum which is 37 and it works fine. But how come its affecting three more forums which are under different id's? The reason why I know because when I attempt to post in those three forums its says please fill out required fields... What went wrong?

novalogix 10-21-2006 03:05 AM

Quote:

Originally Posted by Greek76
I have a problem. For some reason Im doing a specific forum which is 37 and it works fine. But how come its affect three more forums which are under different id's? The reason why I know because when I attempt to post in those three forums its say please fill out required fields... What went wrong?

Hey, it is a bug! I have the same problem. Harmor, pls help!:p

novalogix 10-23-2006 04:24 PM

Quote:

Originally Posted by novalogix
Hey, it is a bug! I have the same problem. Harmor, pls help!:p

Harmor,

Is there a fix coming for this?

paul41598 10-24-2006 12:36 AM

u know what I just realized is this hack works badly if a usergroup can't post HTML. all the html tags show up in the body of the thread. At least on my end

Neutral Singh 10-24-2006 01:25 AM

It would be great if it could support profile like options like drop down menu, bigger text area etc.

trilljester 10-24-2006 04:54 PM

Quote:

Originally Posted by harmor19
I'll add it when I have the motivation.

Thank you Paul for the add-ons.

Excellent! That would be a great addition. For now, I can add the custom fields for the Movie/Music review forum I'm setting up, at least that can give the users a kick in the right direction.

The drop-down thing would be awesome, thanks again.

lazyseller 10-24-2006 08:01 PM

textarea would be awesome any plans when the next version will be released ?

category 10-25-2006 09:36 PM

it uploads give me a table error

Greek76 10-26-2006 10:56 PM

So harmor how abou it have any ideas on how to stop that from happening?

murekhalir 10-27-2006 11:10 PM

I'm getting it too, so I'm uninstalling this unless theres a solution.. o.o

Greek76 10-28-2006 01:15 PM

Yes I uninstalled it as well. Its a good hack but unfortunately no answers to these problems that we are having..

novalogix 11-01-2006 06:35 AM

Harmor,

I hope you have not given up on this mod, it is very useful to the community using vBulletin. Please say something about the bug in this mod.

Thanks for your contribution.

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'];

taydu 11-05-2006 02:05 AM

please excuse me but where do I go to edit ???

Quote:

Go to ur plugins
edit: Custom Thread Forms [newthread_post_start]

ry215 11-05-2006 05:53 AM

So I downloaded the zip file from Harmor, followed the instruction...even overwrite the old cpnav_custom...

When I tried to import the xml file, it give me error message...

any help is appreciated.

harmor19 11-05-2006 10:10 AM

What was the error?

ry215 11-05-2006 05:31 PM

here is the error message....

Invalid SQL:
CREATE TABLE `d60299324custom_thread_forms` (
`custom_formid` mediumint(10) unsigned NOT NULL auto_increment,
`forumid` mediumint(10) unsigned NOT NULL default '',
`title` varchar(130) NOT NULL default '',
PRIMARY KEY (`custom_formid`)
);;

MySQL Error : Invalid default value for 'forumid'
Error Number : 1067
Date : Sunday, November 5th 2006 @ 02:28:27 PM
Script : http://www.tinhthoviet.com/forum/adm...=productimport
Referrer : http://www.tinhthoviet.com/forum/adm...?do=productadd
IP Address : 71.225.126.57
Username : nhk
Classname : vb_database

LaCN 11-05-2006 05:55 PM

Quote:

Originally Posted by taydu
please excuse me but where do I go to edit ???

in your admin panel / Manage Plugins

You see the plugin Custom Thread Forms [newthread_post_start] in there ;)

taydu 11-06-2006 05:22 AM

Thanks LaCN it work like charm

taydu 11-08-2006 08:37 AM

Please help my custom thread field doesn't goes to the new line after each custom field

custom field 1: xxx custom field 2: yyy custom field 3: zzz

I want it like this

custom field 1: xxx
custom field 2: yyy
custom field 3: zzz

Message

follow is the code from newthread_post_start

PHP Code:

$getcustomthreadfields $db->query_read("SELECT * FROM " TABLE_PREFIX "custom_thread_forms ");
  while(
$forms $db->fetch_array($getcustomthreadfields))
  {

    
$custom_formid "custom_$forms[custom_formid]";
    
$value htmlspecialchars($_POST[$custom_formid]);
    
    

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

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

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

.$vbulletin->GPC['message']; 


jaks 11-08-2006 10:25 AM

Guess my question was missed?
https://vborg.vbsupport.ru/showpost....7&postcount=69

No I haven't clicked install yet because I haven't installed yet. Just asking questions before hand to know if it will work how I want first.

taydu 11-09-2006 08:54 PM

it would be nice to not display the custom fields thread in the post if nothing is available. This way when user edit there post it won't be doublicate

field 1
field 2

if edit one

field 1
field 2
field 1
field 2

FractalizeR 11-13-2006 02:26 PM

Quote:

`forumid` mediumint(10) unsigned NOT NULL default '',
Your MySQL is running in STRICT mode. Change this line to

Quote:

`forumid` mediumint(10) unsigned NOT NULL default 0,


All times are GMT. The time now is 01:34 PM.

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.03491 seconds
  • Memory Usage 1,857KB
  • 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
  • (3)bbcode_php_printable
  • (20)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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