Customizing SMF > Now Available

[Tip&trick] Vb postbit

<< < (3/8) > >>

ormuz:

--- Quote from: ccbtimewiz on August 26, 2008, 04:05:33 PM ---Try out this:


--- Code: ---echo '<div class="memdetails">', DisplayFieldPosts(), '</div>';
--- End code ---

--- End quote ---

That was my first try, and it works! But if the custom field is empty, it show the div too... Any ideas?

ccbtimewiz:

--- Quote from: ormuz on August 26, 2008, 07:00:10 PM ---
--- Quote from: ccbtimewiz on August 26, 2008, 04:05:33 PM ---Try out this:


--- Code: ---echo '<div class="memdetails">', DisplayFieldPosts(), '</div>';
--- End code ---

--- End quote ---

That was my first try, and it works! But if the custom field is empty, it show the div too... Any ideas?

--- End quote ---

Yes.

if( DisplayFieldPosts() = true ) { echo '<div class="memdetails">', DisplayFieldPosts(), '</div>'; }

babjusi:

--- Quote from: Eliana Tamerin on August 26, 2008, 09:31:59 AM ---You could if you arranged the styling in CustomProfile.php.

--- End quote ---

Maybe, I am not familiar with the mod in question.

Eliana Tamerin:

--- Quote from: ormuz on August 26, 2008, 07:00:10 PM ---
--- Quote from: ccbtimewiz on August 26, 2008, 04:05:33 PM ---Try out this:


--- Code: ---echo '<div class="memdetails">', DisplayFieldPosts(), '</div>';
--- End code ---

--- End quote ---

That was my first try, and it works! But if the custom field is empty, it show the div too... Any ideas?

--- End quote ---

No need to do anything more, the user figured it out.

babjusi:
This has been released as a mod now

http://custom.simplemachines.org/mods/index.php?mod=1371

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version