vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Sneak Preview: Forms/Profiles for Forums (https://vborg.vbsupport.ru/showthread.php?t=21017)

chilliboy 06-26-2001 08:19 AM

Can you not just drop these from the template? I haven't checked but I thought almost everything was optional via templates. I'm sure you could also do a work around using phpinclude (which means you not buggering source code).

I'm trying to do quite a lot of stuff from phpinclude, which if you know what variables are available to you, can be pretty useful. I'm still trying to find out if I can get the 'name' of the $styleid available to use in phpinclude (which would be dam useful!!!!).

Say you didn't want to use a different replacement set, or template set for you character profiles: Maybe you could just set a new style set for that forum which uses the same temp/rep set.
Call it something like "CharaterProfile" if you had this as a variable to reference in phpinclude you could do something like:

if ($styleid[name]?? == "CharaterProfile")
{
$Varible_for_Edit_GIF = $styleid[name] . "edit.gif";
}

(First you may need to pass the styleid to submit.php - but you can do this via appending &styleid=X in the template - or you could just append your own varibiable - which if present runs another script in phpinclude etc etc)

or something along those lines. If you get away from useing the 'replacement sets' to alter 'replacement variable' and set them from phpinclude you have a lot more flexibility. You can run switch() statements relating to forum: name, number, styleid etc etc then create you replaceables as variable to drop into templates.

Hope this may help you in what you are after - or maybe I'm on the wrong track.

PS - Anyone know with variable holds or how I could get hold of the NAME of styleid in phpinclude I'd be really greatful.

Cheers

Zamtil 06-27-2001 03:50 PM

As I started to get this ready for release, I realized my 'eqchar' form and table were too long for a simple example. So, for those following this thread, here's your opportunity! I'm looking for ideas for a simple, general purpose form. I'd like to keep this to 5-10 fields MAXIMUM, so people aren't overwelmed when it comes to customizing the SQL and templates.

At least one field should use a drop down selector. Please provide values for the selector.

ToraTora! 06-27-2001 09:46 PM

sure thing. I will have a example for you later tonight.
Im going to leave out the posting addys and such, but it will give you a basic idea of what i was thinking of.

ToraTora! 06-28-2001 12:32 AM

http://vmudwnload.tripod.com/vbexample.html

Now, keep in mind none of the functions work other than the reset. :)

We are currently searching server options, so i wasnt able to get everything patted down for posting links, or testing it fully out in PhP land, plus Im not completely sure how you have the hack set up for posting anyways..(my guess is postpoll..some of new thread...vbform...etc...so its a basic shell, hanging on good ol tripod...lol..

Take a look and see what you think.

make sure you have your other browser window the (one that pops up when you click on the link) on full view to get a better picture of how it should look. Tripod has a way of making things look screwed up..I did the code on Arachnophilia, and had it all nice and neat, and "beautified". I dropped it into tripods HTML..and it litterally butchered it...lol...

chilliboy 06-29-2001 09:04 AM

Any news Zamtil?

Zamtil 06-29-2001 09:59 PM

Quote:

Originally posted by chilliboy
Any news Zamtil?
My forums got slammed the last couple days.. some game server down time, everyone headed for the boards. Anyways, I'm going to release my image gallery hack tonight.. packaging it up now. I'll try to do forms sometime this weekend.

ToraTora! 06-29-2001 10:04 PM

was that stat cateragory suggestion useful? lol
I dont know why i made it up to tell you the truth, due in part a person will be able to select what they want added in there anyways...

The select option will be used though correct?

VirtueTech 07-01-2001 12:05 PM

Firstly let me say this is a great idea.

It would be great if somehow the process was cut in half. Allowing admins to designate profile forums and then instead of the user having to start a new thread then go and click on "Edit Form" if the script new that the new thread was in the "Profile Forum" to just bring up the "Edit Form" template instead.

I think the process of having to do the two things will confuse some users.

However, this hack is greatly needed and will certainly help in many ways. Thanks Zamtil :)

Zamtil 07-03-2001 06:17 PM

Quote:

Originally posted by VirtueTech
Firstly let me say this is a great idea.

It would be great if somehow the process was cut in half. Allowing admins to designate profile forums and then instead of the user having to start a new thread then go and click on "Edit Form" if the script new that the new thread was in the "Profile Forum" to just bring up the "Edit Form" template instead.

Yeah I'm not real happy with the creation process either. I really don't want to hack up 3-4 vBulletin files though, and try to make it a guided process: New Thread->New Poll->New Form.

On the other hand, most of my users want to use the message body for attaching pictures or doing their own weblog, so skipping the message creation part altogether isn't practical.

I haven't forgotten about this hack, but with all the problems people had getting my Image Gallery hack to work over the weekend, I'm a little gunshy about getting this one ready. I considered the ImageGallery hack the simple one to install, and I think I wrote 20 messages troubleshooting it over the weekend. =(

chilliboy 07-03-2001 07:01 PM

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??

If this is so - and is one of the reasons why it is difficult to install and probably require a fair bit of time 'bug fixing' - then one way of significantly cutting down the required fields would be to do something like this:

When you are creating a 'customised field' in a submit form you prefix the variable 'name' with 'custom'. So as an example I would have :

variable name: Custom_Name , variable value: some holiday
variable name: Custom_Introduction, variable value: blah blah
variable name: Custom_Description, variable value: blah blah
variable name: Custom_Available Dates variable value: July5
variable name: Custom_Cost variable value: ?500
variable name: Custom_Contact variable value: e-mail@home.com

$Custom_Check = "custom";
$Custom_Field_Seporater = "field split here";
$Values_Seporater = "values split here";


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;
}
}
// You now have all the custom fields as a string with certain 'seporaters' which can be used to get the information back in the required format for processing later. The string $Custom_Data then gets put in the 'additional content' field in the table.

To get the information back you can do something like this:

// Get the string from the 'additional content' field then:

$Fields_and_values = explode($Custom_Field_Seporater, $Custom_Data);
foreach ($Fields_and_values AS $Extract_Info)
{
$Data = explode($Values_Seporater, $Extract_Info);
$Custom_Field [$Data[1]] = $Data[2];
$Custom_Field [$Data[1]][name] = $Data[1]
}

I should now have an array $Custom_Field which holds the names and values of my custom defined fields which I can put into my related template as variables to be parsed.

This way obviously limits on search capabilities and stuff, but significantly reduces the problems you would have with adding lots of new table field and associated problems. Its also pretty flexible as all the 'custom' data is only ever stored in one field, you don't have to bother with adding new fields to a table everytime you want to add something another value into your
submit form. You may be able to move quite a lot of the 'hacking' into the phpinclude file, which would also be helpful for upgrades etc.

As I don't know how your code works for this I may be barking up the wrong tree, but I thought I'd give you my input in the off chance it would be of use.

Cheers


All times are GMT. The time now is 01:21 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.03319 seconds
  • Memory Usage 1,751KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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