Jump to the post that solved this thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 10 Years, 2 Months, 1 Week ago Name and location displayed in postbit
#1
Solved: 10 Years, 2 Months, 1 Week ago
Hello,

I'll try to explain this the best I can. Here is what I'm looking to do.

I have added 2 custom profile details: Firstname and Location.

In postbit, I would it to show Firstname from Location.

eg: Benjamin from United Kingdom

Of course if the user has NOT entered these details, then this will NOT show. It doesn't matter if the user has only entered location.

eg: from United Kingdom

And nor does it matter if user only enters Firstname.

eg: Benjamin

But of course I wouldn't want it to show "Benjamin from"

Would be great if someone could point me in the right direction on how to go about this.

Many thanks in advance!
#2
Solved: 10 Years, 2 Months, 1 Week ago
Install Template Conditionals and use this in your postbit template:

<if $post['fidX'] then>
	{$post['fidX']}
</if>

<if $post['fidY'] then>
	from {$post['fidY']}
</if>

Where X and Y are the IDs of the first name and location custom profile fields, respectively.
#3
Solved: 10 Years, 2 Months, 1 Week ago
Thanks Fabio, it worked great but the only issue I'm facing is the following message on my integrated homepage.

Quote:Fatal error: Cannot redeclare class phptpl_templates in /home/neochatc/public_html/boards/inc/plugins/phptpl.php(70) : eval()'d code on line 26

Nevermind, fixed it! Smile
#4
Solved: 10 Years, 2 Months, 1 Week ago
Can you post the code you have used?
Thanks, Polarbear541
#5
Solved: 10 Years, 2 Months, 1 Week ago
Which one polarbear?
#6
Solved: 10 Years, 2 Months, 1 Week ago
(2012-07-21, 07:20 PM)Knerba Wrote: Which one polarbear?

Don't worry you seem to have fixed it Toungue Must've missed that part of the post ^_^.
Thanks, Polarbear541
#7
Solved: 10 Years, 2 Months, 1 Week ago
Hijacking thread for abit ...
I was using this in postbit_author_user
Quote: {$lang->postbit_posts} {$post['postnum']}<br />
%%TYL_NUMTHANKEDLIKED%%<br />
{$lang->postbit_joined} {$post['userregdate']}
{$post['replink']}{$post['warninglevel']}
<if $post['fid1'] then>
{$post['fid1']}
</if>

Got error code:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /forum/inc/functions_post.php(399) : eval()'d code on line 6

A little help here?

EDIT: Nevermind, forgot to install conditional plugin ... Fixed ! Big Grin Thanks
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)