Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by Zamtil (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 06-22-2001 Last Update: Never Installs: 0
 
No support by the author.

Although I'm not quite ready for a release, I thought I'd announce this hack and get some feedback while I'm still in the development stages.

What does it do? Well, take a look first: http://www.noows.com/showthread.php?s=&threadid=1042

It allows you to associate a predefined fill-in-the-blanks form with a forum. Every thread can have form data associated with it, much like every thread can have a poll. Actually, with this hack, every thread can have both!

In my case, I run a small guild/gaming site where players of EverQuest want to display their in-game character information. Many players have multiple characters, etc, which really doesn't make extending the membership profiles easy or practical.

How does it work? ... Create a new thread/post as usual, associate a poll if the user wants. Once submitted, the thread starter or forum moderators, will have access to an 'edit form' button (same style/position as the existing 'new thread'/'post reply' buttons in the header/footer of every thread).

By clicking on the 'edit form' button, the user is presented with a fill in-the-blanks form.

formprefix field gets added to the forum table.

A new table, called {formprefix} gets added to your vBulletin database. (in my case, 'eqchar')

formid field gets added to the thread table.

When the user wants to edit a form, form.php processes form_edit_{eqchar}. For those viewing the thread, showthread.php processes form_show_{eqchar}.

Most of the work with this hack will be customizing the form_edit_ and form_show_ templates, as well as your table. Of course, once released I'd hope others would develop and share templates/table structures to truely make this a plug & play hack.

Your custom table must contain an integer field named 'id'.
After that, fields are labled as followed: text_{yourname}, num_{yourname}, and sel_{yourname}. Text type is self-explanatory. Num type ensures the user entered numeric data, or sets value to 0. Sel type is for drop down box selections. It's just a text field, but some extra processing is done to set the selector ("selected") to the current db value if the form is edited.

These same db field names are used as $formvars[text_{yourname}] within your templates to display the database values.

I'll probably add options for radio buttons and checkboxes. I seriously doubt I'll support binaries, as posts support this just fine.

Sorry for the default theme look, will change eventually. I just migrated from PHP-Nuke - what can PHPNuke do that vBulletin doesn't do better? I'm already looking into writing a SIMPLE home page/weblog for vBulletin. I want one-two files that I can drop in on top of vBulletin and go.

Show Your Support

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

Comments
  #22  
Old 07-03-2001, 07:19 PM
Zamtil
Guest
 
Posts: n/a
Default

Quote:
Originally posted by chilliboy
Hi Zamtil,

From what you have said I guess this hack is going to require adding numerous addition fields to existing table am I correct in this??

foreach($HTTP_POST_VARS AS $key => $value)
{
$Custom_Field = substr_count($key , $Custom_Check);
if($Custom_Field)
{
$key = str_replace($Custom_Check , "", $key);

$Custom_Data .= $Custom_Field_Seporater . $Values_Seporater . $key . $Values_Seporater . $value;
}
}
Nah, only change to EXISTING tables is a custom field (formprefix)in the forum table and (formid) in the thread table.

All the custom data is stored in your OWN table called (formprefix).
I then use code like you used above to convert database fields into PHP variables.

I've had a couple variations on this code, and the original did what you're suggesting - pack the data. But, on my site, I wrote a custom search engine for filtering/displaying the custom table. It can't be searched by vBulletin, but it's still a pretty clean interface, IMHO.

My search: http://www.noows.com/eqprofiles.php

Bit of SQL for custom table:

CREATE TABLE eqchar (
id int(11) NOT NULL auto_increment,
text_name varchar(60) NOT NULL default '',
sel_server varchar(30) NOT NULL default '',
text_guild varchar(100) default '',
sel_religion varchar(20) default '',
num_level smallint(8) default '0',
sel_class varchar(15) NOT NULL default '',
sel_race varchar(15) NOT NULL default '',
sel_sex varchar(8) default '',
num_hp int(11) NOT NULL default '0',
num_ac int(11) NOT NULL default '0',
num_atk int(11) NOT NULL default '0',

The text_, sel_, and num_ prefixes determine how I handle/display/basic error check the data. 'eqchar' is my formprefix for forumid 84 & 69. Every thread in those forums then references an 'id' in the 'eqchar' table. Clear as mud? =)
Reply With Quote
  #23  
Old 07-03-2001, 07:33 PM
chilliboy
Guest
 
Posts: n/a
Default

Sounds and I look forward to it.
Reply With Quote
  #24  
Old 07-13-2001, 07:30 PM
buda
Guest
 
Posts: n/a
Default

Very Very Cool Zamtil.

Just One question, when can we get our hands on this?

Reply With Quote
  #25  
Old 07-25-2001, 05:48 AM
VirtueTech VirtueTech is offline
 
Join Date: Oct 2001
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any word on this release yet....I'm very anxious.
Reply With Quote
  #26  
Old 07-31-2001, 01:15 PM
iaewedar
Guest
 
Posts: n/a
Default

Heyas Zamtil...just wanted to check in with you to see if you had decided on releasing this one bro. Great work
Reply With Quote
  #27  
Old 08-02-2001, 06:17 PM
Yozsef
Guest
 
Posts: n/a
Default

Hey bro, release this already, it works like a champ on your site.
Reply With Quote
  #28  
Old 08-20-2001, 05:19 PM
water water is offline
 
Join Date: Oct 2001
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any news? would love to see this released

:water
Reply With Quote
  #29  
Old 11-29-2001, 09:18 PM
venti venti is offline
 
Join Date: Nov 2001
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Zamtil,

This is exactly the thread Ive been looking for. I also have an EQ guild site, and am VERY interested in this hack. Can you please share this hack? If so, Id be very grateful.

Venti
The Honorable Few
~Veeshan

www.thehonorablefew.com/forums
Venti@thehonorablefew.com
Reply With Quote
Reply


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:48 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.07422 seconds
  • Memory Usage 2,271KB
  • Queries Executed 23 (?)
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
  • (1)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
  • (2)pagenav_pagelink
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (3)postbit_onlinestatus
  • (9)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_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
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_imicons
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete