Log in

View Full Version : Postbit - Profile Field


familyhistory
09-23-2008, 04:56 PM
Hi All,

I have a slight modification where a user profile field has been added below each signature in postbit:
$post[signature]
$post[field8]

But....
On a special forum I want to post Research Information (with HTML) where the signatures AND the $post[field 8] information spoils the post. I have turned off the Signature but the other is still there.

Can anyone advise how to change this please?

Best regards to all, :)
Dave

Lynne
09-23-2008, 07:18 PM
Can you post images of the problem? I really don't get a clear picture of how a field can "spoil" a signature.

familyhistory
09-24-2008, 08:55 AM
Hi Lynne,

Thanks for the reply.

The profile field is not spoiling the signature (I am happy with that!) its that its spoiling a special forum where posts are for Research information. Here is a simple post with the profile field at the bottom:

Cheshire


Here are the research details for the County of Cheshire

....
(This is the profile field)
<----- www.familyhistory.uk.com member researching ancestor names: ----->
Brown, Chadbourne, Holmes, Pears, Robinson, Watchorn,
________________________________________________


Now coming to think about it. Maybe I could put this Profile Field actually inside the signature. Then we could remove the signature at the post or remove from that forum.
Where would I put this code for the signature? $post[field8] ?

Thanks,
Dave

Lynne
09-24-2008, 03:50 PM
If you want to add it into the signature, this is what you want to look for in the postbit (or postbit_legacy, whichever you use):

$template_hook[postbit_signature_start]

<if condition="$post['signature']">
<!-- sig -->
<div>
__________________<br />
$post[signature]
</div>
<!-- / sig -->
</if>

$template_hook[postbit_signature_end]
So, it looks like you could even use a Template Hook (https://vborg.vbsupport.ru/showthread.php?t=147447&highlight=template+hook) for it.

familyhistory
09-28-2008, 08:39 PM
Thanks Lynne,

Sorted it. Thanks for your help. The only problem is if they have no signature, the field ($post[field8]) will not show........ How could I get it to show even if the signature is blank?

Another question Lynne on the same field.

This $post[field8] is a number of names each member is researching, for example mine is:
Admin Hallam, Wilson, Harris, Crowder, Lane, Crisp, Naylor, Downs

Is there anyway of adding a separate VBulletin page to display all members and their names ($post[field8]) (with an alphabetical search menu similar to what we see in memberlist.php) - basically the same as memberlist!

Thanks again,
Dave

Lynne
09-28-2008, 10:29 PM
Thanks Lynne,

Sorted it. Thanks for your help. The only problem is if they have no signature, the field ($post[field8]) will not show........ How could I get it to show even if the signature is blank?
Don't put it within the <if> statement.

Another question Lynne on the same field.

This $post[field8] is a number of names each member is researching, for example mine is:
Admin Hallam, Wilson, Harris, Crowder, Lane, Crisp, Naylor, Downs

Is there anyway of adding a separate VBulletin page to display all members and their names ($post[field8]) (with an alphabetical search menu similar to what we see in memberlist.php) - basically the same as memberlist!

Thanks again,
Dave
Sure there is a way. The information is in the database, so there is always a way to grab it out of the database and do something with it. It's just a matter of how involved that is. Depending on the database structure and exactly what you want done, it could be super simple or a bit more complicated. It also depends on how familiar you are with writing queries and php pages.

familyhistory
10-01-2008, 09:01 AM
Thanks again Lynne. That sorted it.

Now to have a go at displaying that field.

Could I just copy and edit memberlist.php (calling it something else!) and show the fields against each member there?

All I would need is the Username, Field, PM (Contact),

Regards and thanks,
Dave

Lynne
10-01-2008, 03:48 PM
You could try copying memberlist.php to something like memberlist2.php and see if you can get it how you want. You may have to copy some templates and change the template name in that page if you need to. I actually do this sort of thing all the time on my forum when I'm working on something new and don't want to screw up the original.

familyhistory
10-01-2008, 10:07 PM
Yep! I will try that Lynne - Thanks

Going back the that field, I have a forum (id=88) that I need to not show anything, apart from the actual post. Obviously when posting un-ticking "show your Signature", but that field was showing STILL ....../

So I added a if condition as follows:
<if condition="$forumid == 88"> <p> html follows...forum 88 </p>
<else />
<div align="center" class="time"><----- www.familyhistory.uk.com (http://www.familyhistory.uk.com) member researching ancestor names: -----><br />
$post[field8]<br />
________________________________________________
<br />
</if>
But it will not work! Can you see what's wrong with the code please, :)

many thanks,
Dave

Lynne
10-01-2008, 10:30 PM
Try one of these in place of $forumid:
$forum[forumid]
$foruminfo[forumid]
$thread[forumid]
$threadinfo[forumid]
$GLOBAL[forumid]