Advertisement:

Author Topic: (SOLVED) Show publishers web site on specific categories  (Read 1522 times)

richieboymx

  • Full Member
  • ***
  • Posts: 110
(SOLVED) Show publishers web site on specific categories
« on: May 02, 2015, 08:54:53 pm »
Hello to all the community,

As the title says, im looking to show/hide specific users contact/profile information for a specific category/categories.

Any thoughts on how to achieve this?

Thanks!
« Last Edit: May 03, 2015, 08:35:31 pm by ramutio »

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Show publishers web site on specific categories
« Reply #1 on: May 03, 2015, 12:56:03 am »
Hi,

By "category/categories", do you mean user type (Individual, Company)? ???

Regards

richieboymx

  • Full Member
  • ***
  • Posts: 110
Re: Show publishers web site on specific categories
« Reply #2 on: May 03, 2015, 01:10:08 am »
Hi teseo

I mean listing categories... though by user type may be another interesting approach. Listings under category Z (and it's subcategories) will display the web site (to name one piece of information) under contact seller information, but for categories A-Y it will not show up.

Regards,

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Show publishers web site on specific categories
« Reply #3 on: May 03, 2015, 01:39:26 am »
Ah, I thought you were referring to User Public Profile, there's no categories at play. So, you want this on Ad view, do you already have your code to show website? ??? Please copy it here...

Regards

richieboymx

  • Full Member
  • ***
  • Posts: 110
Re: Show publishers web site on specific categories
« Reply #4 on: May 03, 2015, 02:02:53 am »
Code: [Select]
<?php if( osc_user_website() !== '' ) { ?>
                    <div class="website">
                        <span class="fa-stack fa-lg">
                          <i class="fa fa-circle fa-stack-2x"></i>
                          <i class="fa fa-external-link fa-stack-1x fa-inverse"></i>
                        </span>
                        <a href="<?php echo osc_user_website(); ?>" target="_blank" rel="nofollow"><?php echo osc_user_website(); ?></a>
                    </div> 
                <?php ?>

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Show publishers web site on specific categories
« Reply #5 on: May 03, 2015, 03:12:45 pm »
Replace this:

Code: [Select]
<?php if( osc_user_website() !== '' ) { ?>
with:

Code: [Select]
<?php $catsList = array(19101102);

if( 
osc_user_website() !== '' && in_array(osc_item_category_id(), $catsList)) { ?>


Populate array $catsList with all the categories Id's for what you want to show website.

Regards

richieboymx

  • Full Member
  • ***
  • Posts: 110
Re: Show publishers web site on specific categories
« Reply #6 on: May 03, 2015, 08:35:09 pm »
@teseo

It worked perfectly! As always, thank you very much for your help.