Important security update, please update to Osclass 3.7.4
At Osclass we have changed our Privacy Policy and Terms of Use in order to adapt them to the new General Data Protection Regulation (GDPR). We want you to know what user data we store, what we need them for, and who we share them with in each specific case. Furthermore, we are making it even easier for you to exercise your right to manage your own data.
Our goal is that you enjoy the best possible experience with our website. As the GDPR comes into force, legislation requires us that you grant us permission—both to us and our partners—to store cookies in your browser. Remember you can find more information about what we do with your data by clicking here.
I accept Osclass SL’s Terms of Use and Cookies Policy and grant them permission to manage my data.
@gildenThis is a good idea. Thank youLuca
Can I set different output of the announcements, one for companies look for other users?Well, that would be in full display of listings was for example, and different styles, or other fields, or elements on the page have been designed differently?
Yes, you could do it by setting a specific CSS rule for example, and styling it in a different way. Or you can change the html completely with a PHP if statement.
<?phpif(isset($user['b_company']) && $user['b_company'] == 1) { // show code for company} else { // show code for regular user}?>
I am writing by heart, but maybe something like:Code: [Select]<?phpif(isset($user['b_company']) && $user['b_company'] == 1) { // show code for company} else { // show code for regular user}?>
<? phpif (isset ($ user ['b_company']) && $ user ['b_company'] == 1) { echo "1"} Else { echo "0"}?>
Hi Phill,It is more than likely not working because $user is not defined. Try this<?phpif(isset(osc_user_field('b_company')) && osc_user_field('b_company') == 1) { // show code for company} else { // show code for regular user}?>Jay
Change the if statement like thisif(osc_user_field('b_company') == 1) {Then the error will go away.Jay
It is more than likely not working because $user is not defined. Try this