4.2.4 Developer Can extra fields somehow be disabled for non registered users at the "viewlisting" stage? What I had done via the admin panel was disable viewing of phone numbers and added the extra fields "phone #" and "contact name" thus giving users the final decision if they wanted or needed certain information available. Since there is no way of managing these extra field in the admin area....is there a way to add code to the "viewlisting.tpl" or "viewlisting.php" that maybe only logged in registered member can see these fields? Whether it be for security reasons or listing an item for a friend. (they don't want people calling their # for their friends item) I am giving these extra options. What I want to be able to do is disable the viewing of these extra fields ONLY to non-registered viewers or users who are not logged in. I'm hoping for them to register or log in if they see an item they want to buy. Thus building my membership. Thanks, Randy
Put a test of the user around the block which displays the extrafields - you will find that test in a recent thread a few days ago. The test is already used in the layout.tpl file to display the username etc at the top of the template.
I have no clue what that means?? What is a test of the user? Only thing I thought might have worked was to put this Code: {if $smarty.session.username<>'' || $smarty.cookies.username<>""} {foreach from=$extrafields item=extras} <tr> <td><strong>{$extras.title}:</strong></td> <td> {if isset($extras.value)} {foreach key=key item=item from=$extras.value} {$item}<br /> {foreachelse} {$extras.value} {/foreach} {/if} </td> </tr> {/foreach} {* End Extra Fields *} {/if} but that didn't work. I looked through the forums and couldn't find anything....... if you could lead me to the post or in the right direction that would be super. Holding my hand is always better. Thanks
I got it just before you posted, thanks for making me dig....makes me remember and learn this stuff. Thanks again!! Soon as I finish my tweaking I'll be getting your mod.