vBulletin Modifications

question about store data ...

Welcome to vBHackers.com! - vBHackers Updates:

Go Back   vBulletin Modifications > General vBulletin Section > General vBulletin Support

Reply
 
LinkBack Thread Tools
Old 07-27-2005, 07:56 AM   #1
MP3
Junior Member
Join Date: Jul 2005
MP3 is on a distinguished road

Default question about store data ...

Hello

I add a new field under the title field shown up when a member going on to post new thread, and I name it "type"(see the attached file) just to give idea about any posted topic..

I add new field in the thread table and name it "type", its Type is "varchar(250)" .

Now my question; what's the required modification in the "newthread.php" or any other files just to store the enter information to the field named "Type" in the thread table?

Regards
Attached Images
File Type: jpg mod.JPG (51.6 KB, 20 views)




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 07-27-2005, 11:53 AM   #2
vBulletin Guru
Arnoud's Avatar
Join Date: Nov 2004
Real Name: Arnoud Kuipers
Location: Europe, Flanders
Arnoud is on a distinguished road

Default

You would need to edit 2 files, at multiple places.

You'll need to edit newthread.php to make it insert that data into the database, and you'd need to edit whichever file you'll want the text to show up in to query your field.

Where would you want this information to show up?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-27-2005, 06:05 PM   #3
MP3
Junior Member
Join Date: Jul 2005
MP3 is on a distinguished road

Default

On the thread itself, near the title.

In addition, I want it to be able to edit any time if there was mistake in the entered information

Regards




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-27-2005, 07:16 PM   #4
Coder
Join Date: Apr 2004
Location: UK
ShavedApe is on a distinguished road

Default

so you would need to edit, newthread.php, functions_newpost.php, showthread.php and editpost.php

in newthread it would be as simple as converting the $_POST['varname'] to $newthread['varname']
eg.
$newthread['varname'] = $_POST['varname'];

in functions_newpost you would need to edit the query that inserts post data.

in showthread off the top of my head I think it grabs all data from post table so if you extra field was added there you wouldnt need to do anything you could show it with $post[varname] in postbit template but if not youd need a query to call for it before it could be displayed.

In editpost you would need to make sure the var is called for and then set so that in editpost it will show and can therefore be edited. You would need to edit that file in at least two places.

Best advice I could give is find a hack that does a job that maybe needs to do what you want in oerder to function and then strip out the bits you dont need. Or at least use it to point you in the right direction.
You could of course just read the files I suggested to see how vb does the topic title and follow that as an example.
__________________


Feel free to ask questions here




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-28-2005, 01:05 AM   #5
vBulletin Guru
Ken Iovino's Avatar
Join Date: Mar 2004
Real Name: Ken Iovino
Location: Miami, Florida
Ken Iovino is on a distinguished road

Default

I pointed you to ExtremeTims hack called thread describtions. That should work




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-28-2005, 06:14 AM   #6
MP3
Junior Member
Join Date: Jul 2005
MP3 is on a distinguished road

Default

thanks aloot sir




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
n00b question: how do i run a script ondareal General vBulletin Support 2 03-20-2006 05:53 PM
Newbie Question theinstallguy General vBulletin Support 6 07-07-2005 08:14 AM
Where are the UCash Store addons? deb0 vBulletin Modification Requests 1 12-15-2004 07:03 PM


All times are GMT -3. The time now is 06:31 PM.


SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. (Patent Pending)