I need to implement a payment gateway for viewing a thread, I was able configure till the image as attached. but htere I need to include payment details for the person to pay, after paying he can see the thread, I need this function for multiple forum threads too...
How do i do it. I have installed woo commerce too....
In the next register link I need to add pay now. how do i do it
Regards,
Vijey
You should customize wpForo template file and insert different content for different forums by forum IDs. The forum IDs can be found in Dashboard > Forums > Forums admin page. Please follow the instruction below:
1. Create /wpforo/ folder in your current active WordPress theme, if you have a child theme then create it in the child theme folder.
2. Copy wp-content/plugins/wpforo/wpf-themes/classic/topic.php file and paste it in the newly created /wpforo/ folder of the WordPress active theme.
3. Open the topic.php file which is located in the new folder and find this part (at the end of the file):
<p class="wpf-p-error">
<?php if(is_user_logged_in()): ?>
<?php echo apply_filters('wpforo_no_forum_access_message_for_users', wpforo_phrase("Your user level does not have appropriate permission to view the content", false)); ?>
<?php else: ?>
<?php echo apply_filters('wpforo_no_forum_access_message_for_guests', wpforo_phrase("You do not have permission to view the content", false) . '<br>'. wpforo_get_login_or_register_notice_text()); ?>
<?php endif; ?>
</p>
4. Change it to this:
<p class="wpf-p-error">
<?php if(is_user_logged_in()): ?>
<?php echo apply_filters('wpforo_no_forum_access_message_for_users', wpforo_phrase("Your user level does not have appropriate permission to view the content", false)); ?>
<?php else: ?>
<p><?php echo apply_filters('wpforo_no_forum_access_message_for_guests', wpforo_phrase("You do not have permission to view the content", false) . '<br>'. wpforo_get_login_or_register_notice_text()); ?></p>
<?php $ForumID = (int)wpfval(WPF()->current_object, 'forum', 'forumid'); ?>
<?php if( $ForumID === 5 ): ?>
<p>[Buy Now] button for forum ID #5</p>
<?php elseif( $ForumID === 8 ): ?>
<p>[Buy Now] button for forum ID #8</p>
<?php elseif( $ForumID === 10 ): ?>
<p>[Buy Now] button for forum ID #10</p>
<?php endif; ?>
<?php endif; ?>
</p>
You should add different content for different forums. I've added examples for Forum ID 5, 8 and 10. These are just examples. You should remove the ones you don't need and change the forum IDs to match your forum IDs.
Hi,
Thanks a lot for the help, I did the below...
I copied the entire folder, from the plugins folder named : wpforo, and pasted in in the wordpress root folder.
I changed the code mentioned from step 3 to step 4....
But I am unable to find the forum Id in the topic. - in my url I found in the url as ::: foro-forums&id=10&action=edit
But Its not working properly.... I did some mistake... Please advice.
Regards,
Vijey
I am attaching a screenshot, I am unable to follow the link... Dashboard > Forums > Forums admin page.
Unable to see the admin page..
copied the entire folder, from the plugins folder named : wpforo, and pasted in in the wordpress root folder.
Why have you copied the entire folder? Please never do so, you should only copy the template file you want to customize, so please remove all copied folders and files and only leave the wp-content/plugins/wpforo/wpf-themes/classic/topic.php file.
I am attaching a screenshot, I am unable to follow the link... Dashboard > Forums > Forums admin page.
The Dashboard is your Dashboard, the Forum is the Forum Menu, the Forum > Forum is the Forum sub menu of the Forum menu. So just go to Forums > Forums admin page and find Forum IDs: