Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
  #61  
Old 25 Sep 2012, 21:49
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
You need to use the <a> tag for links - http://www.w3schools.com/tags/tag_a.asp and please use double-quotes in the tag, not single-quotes since the single-quotes are being used in the equation.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #62  
Old 26 Sep 2012, 08:38
omega79 omega79 is offline
 
Join Date: Sep 2012
i am just very new to all this so i have no idea how to do it ...
isn't there a way you can put a form in the pluginconfiguration where the plugin-user could type in or choose the fieldID ?

but well if needed i will probably finishing my community first and after i went live i can look into this again ...

still having headaches over other things in VBB ... have to learn alot
Reply With Quote
  #63  
Old 26 Sep 2012, 17:09
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
I already have it in a form where all you have to do is change the field id. This is an article, not a modification. If you don't know how to do it, then I suggest you try it out on your test site.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #64  
Old 02 Oct 2012, 10:08
omega79 omega79 is offline
 
Join Date: Sep 2012
okay thank you very much
it all looks very complicated if you are new to vbulletin ...
but after some time it gets more simple ...
nice work you done here
Reply With Quote
  #65  
Old 26 Feb 2013, 14:39
CentralGarrison's Avatar
CentralGarrison CentralGarrison is offline
 
Join Date: May 2012
I'm sorry if this is inappropriate to ask here, but reading through this guide it looks like the same method could be used to put custom profile fields into the user's signature. Which templates would I need to edit to force a custom field to always be displayed in a user's signature?

EDIT: Nevermind, please disregard. I found what I needed in the postbit_legacy template! Thank you!

Last edited by CentralGarrison; 26 Feb 2013 at 15:01.
Reply With Quote
  #66  
Old 23 Apr 2013, 16:13
Mysterious Ride's Avatar
Mysterious Ride Mysterious Ride is offline
 
Join Date: Feb 2008
Real name: Ebz
Originally Posted by Lynne View Post
Method 2 - Using a template_hook
I have always found it easier to just use the existing $template_hooks in the template and write a plugin to add these. In this case, there is a $template_hook right where we want it, after the user post count:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

So, we would create a plugin with these specifications:
hook location - postbit_display_complete
Title - Add User Profile Fields to Postbit Templates
Plugin is Active - Yes
Plugin PHP Code -

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Change "fieldx" to your actual field name and the green field to whatever you want. Again, notice the html I used is similar to the html used for the text above me new field. Whichever template_hook you use, you should look at the template to see what sort of html is being used around the hook so that you may use similar, proper html also.
I tried to read on how to make this a hyperlink from what others asked, but I got confused. This is the method that you posted that I want to use and what's going to be placed into the profile field is a link to profile post that the member posted for a character. What I trying to get it to look like is this:

Join Date:
Posts:
Character Profile

Even if its the whole Character Profile is the hyperlink that will take member directly to the character profile will work. I believe you said that I would have to use the <a> tag, but I'm not sure how to insert it into the code you already have.
Reply With Quote
  #67  
Old 23 Apr 2013, 16:54
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Something like:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I haven't tested it, but I think it should work.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #68  
Old 24 Apr 2013, 09:20
Mysterious Ride's Avatar
Mysterious Ride Mysterious Ride is offline
 
Join Date: Feb 2008
Real name: Ebz
That didn't work, I got this error at the top of my board. I tried just doing the regular method two you have posted, but the profile field didn't show up under the post count either.
Reply With Quote
  #69  
Old 24 Apr 2013, 17:20
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
And what was the error? And what was the *exact* code you entered into the plugin?
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #70  
Old 25 Apr 2013, 02:01
Mysterious Ride's Avatar
Mysterious Ride Mysterious Ride is offline
 
Join Date: Feb 2008
Real name: Ebz
Sorry, I tried it again and it worked perfectly. I must have not posted something right. I got the error because I left out the:

if ($post['fieldx'])
{

I thought I added it when I tried a second time, but I didn't get an error message nor did anything show up. But here's the completed code for Method 2 that works perfectly:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

The My Link can be anything anyone what's it to be.

I also adjusted the code so that it fits Method 1 and I tested it and it works great to. It still goes in the same place you said.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I included an attachment to show the end result.
Attached Images
File Type: png pb_demo.png (27.2 KB, 9 views)
Reply With Quote
  #71  
Old 22 Aug 2013, 19:22
kiddo kiddo is offline
 
Join Date: Jun 2013
So I copied the same code from Location to use for other custom profile fields. When I did this, it showed up, but the name didn't as you can see in the image below. Any help??

The custom profile field's name is PSN so for the code

{vb:rawphrase} I put {vb:rawphrase PSN}\



EDIT: FIXED IT! I just completely removed the vb:rawphrase and simply added PSN to the "MyField" part and it worked!
Attached Images
File Type: png Screenshot_5.png (3.2 KB, 11 views)
Reply With Quote
  #72  
Old 15 Feb 2014, 16:15
afmarko99's Avatar
afmarko99 afmarko99 is offline
 
Join Date: Jan 2007
Real name: Mark
Thank you very much Lynne
Reply With Quote
  #73  
Old 04 Apr 2014, 00:58
akxt660 akxt660 is offline
 
Join Date: May 2010
I want to show images in postbit, related to the selected options by the user in the Multiple Choice Menu.

The below code works just in "Single Selection Menu:

<vb:if condition="$post['fieldX']"> <img src="{vb:raw post.fieldX}.png" /> </ a> </ vb: if>

But how do I work on Multiple Choice Menus?

In the image below you can view the images, but it performed with the Single Choice Menus:



In this case the user should select four options in Multiple Choice Menu.
These images refer to flags that users rescued
Reply With Quote
  #74  
Old 04 Apr 2014, 01:08
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Real name: Chris
Did you follow all the instructions in the first post?

For Multiple-Selection Menu and Multiple-Selection Checkbox

It is a bit more complicated for these two types of selections since the options selected are stored as a binary number. If you just display the field using the method above, you will get a number, not a list of options selected. So, in order to use these types of fields, you will have to use the method below. Here is a thead that will explain the binary scheme - http://www.vbulletin.com/forum/showt...To-The-Postbit

Method 1
- Modifying the Template
Open the template and find the area you want to add it to. For instance, to add it right after the user post count, find this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And then add this underneath (this is assuming the field has 5 options):


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Change "fieldx" to your actual field name and the green field to whatever you want. Notice the html I used is similar to the html used for the text above me new field.
__________________
You can get access to my 180 mods for vB 3.6 - 4.x at The Admin Zone as well as the professional support you are used to. New vBulletin Spider Definitions, vBulletin Spiders List Hits 1000 Spiders! ​ OzzModz down. Site has had a data breach, checking how the intrusion happened. Change your PW if you use the same one on my site and others.
Reply With Quote
  #75  
Old 04 Apr 2014, 01:54
akxt660 akxt660 is offline
 
Join Date: May 2010
Yes. All ok now!

I found a problem here:
<vb:if condition="$post['fieldx']"><dt>My FieldX</dt><dd>
<vb:if condition="$post['fieldx'] & 1">Your 1rst option</vb:if>
<vb:if condition="$post['fieldx'] & 2">Your 2nd option</vb:if>

correct is:
<vb:if condition="$post['fieldx']"><dt>My FieldX</dt><dd> </vb:if>
<vb:if condition="$post['fieldx'] & 1">Your 1rst option</vb:if>
<vb:if condition="$post['fieldx'] & 2">Your 2nd option</vb:if>

I get string error because of this small problem!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

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


New To Site? Need Help?

All times are GMT. The time now is 19:06.

Layout Options | Width: Wide Color: