Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-13-2011, 07:24 AM
LostForWords LostForWords is offline
 
Join Date: Mar 2010
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Form in new posting pages that provides variables to use in postbit

This is a rather odd request I expect yet arguably relatively simple - unfortunately I'm awful at anything more complex than basic HTML design so PHP is beyond me. I would need this mod for V 3.8 and whilst I'd love it if I could have it free, I would be willing to pay for the mod so do get in contact.

A little background information:

I'm creating a creative writing site with a variety of different roleplaying games. For each game I dedicate a whole set of subforums with a unique skin. We then provide custom profile fields for members to fill out for their character in said game. We use these profile fields to code the postbit - so it looks like the member is logged into a different character account when they post (For example replacing the username with profilefield7 [which is the player's character's name] for example).

This works fantastically, however when members want more than one character then we have to create second, third, fourth accounts for them so they can play in the game across the different characters. I'd rather avoid doing this. It means people's post counts get split across accounts and we'll have loads of "character" accounts which we really don't want.

Basically the mod I have in mind would consist of a drop down menu in the new posting templates (new thread, edit and new reply to be precise). Members can select one of four options through this drop down. The postbit would be coded to look differently depending on what drop-down selection the player choses.

So for example: Profilefield10 and profilefield11 has the character name and character avatar of the first character and profilefield12 and profile13 has the same of the second character. A player has filled in all necessary profile fields and wants to make a post with their second character. They make their post and in the drop down menu select the second option - when they enter their post, only profilefield12 and profilefield13 are displayed in the postbit.

Basically within the postbit I'd need some sort of <if> variable which would probably look something like this: (Please excuse my poor comprehension of PHP - I hope I can illustrate what I mean enough so that you can understand).

<if post-dropdownmenu selected First Choice / 1 > <display profilefield10> <display profilefield11> </if> <if post-dropdownmenu selected Second Choice / 2 <display profilefield12> <display profilefield13> </if>

If you see what I mean?

Now I think this is achievable. vB is a great piece of kit and fully moddable so I'd love to get some help with this, even if it's just a point in the right direction.

It doesn't need to be complex. It doesn't need to change across forums. It doesn't need to know what the character names are. All it needs is a selection of 'one' 'two' 'three' and 'four' which creates a variable which can be read within the postbit and it can appear according to how the dropdown has selected.
Reply With Quote
  #2  
Old 06-16-2011, 04:14 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This would be a pretty involved mod but the user of custom profile fields simplifies it somewhat. The fact you want a drop down box wold mean adding a new field to the post table in the database, which is a line I never crossed for mods I've made, but in theory not that hard.

But of course my mind is programmed to look for alternatives to database alteration at any cost so let me bring this possibility up...

Your users have 4 different "names..." If these names are stores in a custom profile field what if each user had to start (or end) each post they make with 1 of the 4 names.

Then a php plugin could read the post, extract which of the 4 usernames it matches, and set a variable from 1 to 4.

Then in the postbit template you'd have all your possible postbuts enclosed in IF conditions...

Code:
<if condition="$postbittype == 1">
postbit 1 here
</if>

<if condition="$postbittype == 2">
postbit 1 here
</if>

<if condition="$postbittype == 3">
postbit 1 here
</if>

<if condition="$postbittype == 4">
postbit 1 here
</if>
I'm not offering to make the mod because it would be of very limited use, just trying to give some ideas since you said you were open to a point in the right direction.
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 09:55 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.04092 seconds
  • Memory Usage 2,171KB
  • Queries Executed 11 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (2)postbit
  • (2)postbit_onlinestatus
  • (2)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
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete