Support Forums - Classified Ads Script Osclass
Osclass Market
Download Osclass
Documentation
Home
Help
Search
Login
Register
Don't show the message submission form for a category
Support Forums - Classified Ads Script Osclass
Osclass theme support
Beta Osclass Theme
Don't show the message submission form for a category
Match all words
Match any words
Most relevant results first
Largest topics first
Smallest topics first
Most recent topics first
Oldest topics first
Advanced
Print
Pages: [
1
]
2
kriskoyk
399 posts
Don't show the message submission form for a category
«
on:
June 01, 2023, 06:34:43 PM »
Is it possible not to display the form for submitting a message to the advertiser for a certain post category? And if so, how can it be done?
Logged
MB Themes
Support team
18744 posts
Only quality matters
Download Osclass
Re: Don't show the message submission form for a category
«
Reply #1 on:
June 05, 2023, 11:08:08 AM »
<?php if(osc_item_category_id() != 1234) { ?>
.... contact form button ...
<?php } ?>
Logged
To get fast support, we need following details:
Detail description, URL to reproduce problem, Screenshots
kriskoyk
399 posts
Re: Don't show the message submission form for a category
«
Reply #2 on:
June 05, 2023, 07:25:33 PM »
I had duplicated this code but it doesn't work. Like this <?php if(!osc_category_id()==1234) { ?> ---...-----<?php } ?> also, but that doesn't work either
Logged
kriskoyk
399 posts
Re: Don't show the message submission form for a category
«
Reply #3 on:
June 06, 2023, 09:00:24 AM »
The code you suggested does not hide the button in any category
Logged
MB Themes
Support team
18744 posts
Only quality matters
Download Osclass
Re: Don't show the message submission form for a category
«
Reply #4 on:
June 06, 2023, 01:22:30 PM »
I belive you've not kept 1234 there.
Logged
To get fast support, we need following details:
Detail description, URL to reproduce problem, Screenshots
kriskoyk
399 posts
Re: Don't show the message submission form for a category
«
Reply #5 on:
June 06, 2023, 02:59:14 PM »
Of course, I have put my own id
Logged
MB Themes
Support team
18744 posts
Only quality matters
Download Osclass
Re: Don't show the message submission form for a category
«
Reply #6 on:
June 07, 2023, 08:40:33 AM »
Why you used osc_category_id instead of propsed osc_item_category_id function?
Logged
To get fast support, we need following details:
Detail description, URL to reproduce problem, Screenshots
kriskoyk
399 posts
Re: Don't show the message submission form for a category
«
Reply #7 on:
June 07, 2023, 09:27:29 AM »
I used what you suggested
<?php if(osc_item_category_id()!=231) { ?>
but also this
<?php if(!osc_item_category_id()==231) { ?>
to no avail.
Logged
MB Themes
Support team
18744 posts
Only quality matters
Download Osclass
Re: Don't show the message submission form for a category
«
Reply #8 on:
June 07, 2023, 11:56:42 AM »
If you use
<?php if(osc_item_category_id()!=231) { ?>
...something...
<?php } ?>
and put some code here
and item category id is 231
then this code will not be visible on that item.
Logged
To get fast support, we need following details:
Detail description, URL to reproduce problem, Screenshots
kriskoyk
399 posts
Re: Don't show the message submission form for a category
«
Reply #9 on:
June 07, 2023, 12:12:55 PM »
I put exactly what you suggest
<?php if(osc_item_category_id()!=231) { ?>
...something...
<?php } ?>
I want it to be invisible but it doesn't work. Unfortunately, the button is visible in all categories
Logged
kriskoyk
399 posts
Re: Don't show the message submission form for a category
«
Reply #10 on:
June 07, 2023, 12:23:13 PM »
This is the full code that I use to make the button invisible in category 231 but it doesn't work. The button is visible:
<?php if(osc_item_category_id()!=231) { ?>
<a href="<?php echo bet_fancy_url('contact'); ?>" class="open-form contact btn mbBg" data-type="contact"><i class="fa fa-envelope-o"></i> <?php _e('Apply and send CV', 'beta'); ?></a>
<?php } ?>
Logged
MB Themes
Support team
18744 posts
Only quality matters
Download Osclass
Re: Don't show the message submission form for a category
«
Reply #11 on:
June 07, 2023, 02:16:32 PM »
Then osc_item_category_id() != 231
Logged
To get fast support, we need following details:
Detail description, URL to reproduce problem, Screenshots
kriskoyk
399 posts
Re: Don't show the message submission form for a category
«
Reply #12 on:
June 07, 2023, 03:38:29 PM »
You suggest the same code again I tried it and it doesn't work
Logged
MB Themes
Support team
18744 posts
Only quality matters
Download Osclass
Re: Don't show the message submission form for a category
«
Reply #13 on:
June 07, 2023, 04:32:26 PM »
try intval(osc_item_category_id()) != 231
If that does not work, you must go to PHP team and report them that 1 != 1 does not work anymore.
Logged
To get fast support, we need following details:
Detail description, URL to reproduce problem, Screenshots
kriskoyk
399 posts
Re: Don't show the message submission form for a category
«
Reply #14 on:
June 07, 2023, 11:18:45 PM »
No, it didn't work. If there is another way, let's continue the effort for a solution, otherwise we give up the effort.
Logged
Print
Pages: [
1
]
2