#1 WordPress forum plugin created by gVectors Team

wpForo – WordPress Forum Plugin
  • Home
  • Forum
  • Migrate to wpForo
  • Addons
  • Addons Demo
  • Documentation

Forum

Home | Forum

wpDiscuz - WordPress Comment Plugin
  • Forums
  • Members
  • Recent Posts
Forums
Main Support Forums
How-to and Troubles...
Register and pay to...
 
Share:
Share
Tweet
Share
Notifications
Clear all

Script [Solved] Register and pay to see a thread

Page 1 / 2 Next
    Last Post
RSS

vijeyraghavan
Posts: 17
 vijeyraghavan
Topic starter
March 11, 2021 5:49 am
(@vijeyraghavan)
Active Member
Joined: 1 year ago

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

 

 hlpworld.olvdigitalsolutions.com_.png
Topic Tags
paid access message for paid access paid topic buy now
29 Replies
Robert
Posts: 8967
Robert - Twitter
 Robert
Admin
March 11, 2021 10:16 am
(@robert)
Support Team
Joined: 6 years ago

@vijeyraghavan,

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.

In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.

Reply
BerndG liked
vijeyraghavan
Posts: 17
 vijeyraghavan
Topic starter
March 11, 2021 11:30 am
(@vijeyraghavan)
Active Member
Joined: 1 year ago

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

This post was modified 1 year ago by vijeyraghavan
Reply
vijeyraghavan
Posts: 17
 vijeyraghavan
Topic starter
March 11, 2021 12:43 pm
(@vijeyraghavan)
Active Member
Joined: 1 year ago

I am attaching a screenshot, I am unable to follow the link...  Dashboard > Forums > Forums admin page.

 

Unable to see the admin page..

 Screenshot_2021-03-11-Forums-‹-HLP-world-—-WordPress.png
Reply
Robert
Posts: 8967
Robert - Twitter
 Robert
Admin
March 11, 2021 7:19 pm
(@robert)
Support Team
Joined: 6 years ago
Posted by: @vijeyraghavan

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.

 

Posted by: @vijeyraghavan

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:

In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.

Reply
2 Replies
vijeyraghavan
 vijeyraghavan
(@vijeyraghavan)
Joined: 1 year ago

Active Member
Posts: 17
March 12, 2021 6:53 am
Reply toRobertRobert

@robert

Thanks Robert,

I did as per your guidance and I was able to achieve what i needed, But I am not getting the payment link of the payment button.

As per your guidance, I used the below code, I am not getting any payment button for that course... Need guidance.

I am attaching the screenshot for your reference.

 

<?php elseif( $ForumID === 10 ): ?>
<p>[Buy Now] button for forum ID #10</p>
 Opera-Snapshot_2021-03-12_122229_hlpworld.olvdigitalsolutions.com_.png
Reply
Robert
 Robert
Admin
(@robert)
Joined: 6 years ago

Support Team
Posts: 8967
Robert - Twitter
March 12, 2021 7:11 am
Reply tovijeyraghavanvijeyraghavan
Robert

@vijeyraghavan,

Please show a screenshot of the file system, so I can see where and what file have you used. Also, show me the screenshot of the whole code you got in the file.

And make sure you've deleted all caches before checking.

Also, please leave a direct link to that thread.

In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.

Reply
Page 1 / 2 Next
  All forum topics
  Previous Topic
Next Topic  
Related Topics
  • ¿How to put paid access to wpforo?
    1 year ago
Topic Tags:  paid access (2), message for paid access (1), paid topic (1), buy now (1),

Forum Search

Join Us!

Download wpForo plugin
on WordPress.org

wpForo Addons

wpforo-private-messages wpforo-advanced-attachments-128x128 wpforo-embeds-128x128 wpForo User Custom Fields addon wpForo – Blog Cross Posting addon wpForo Ads Manager wpForo – WooCommerce Memberships Integration wpForo Emoticons wpForo – Tenor GIFs Integration
View all Addons »

Recent Topics

  • Costume text and image on every forum

    By Vijiki, 6 hours ago

  • Forum topics and pages not indexing

    By Vijiki, 14 hours ago

  • Can't send confirmation email from topics when suscribe for new topic

    By gilbau, 18 hours ago

  • Can't add shortcodes to wpForo

    By avorai, 18 hours ago

  • New Feature H1 title for tags

    By annushka, 1 day ago

  • File in antisapm protection not deleted

    By pesimist57, 2 days ago

Topic Tags

  • translation49
  • css49
  • plugin conflict48
  • seo45
  • new features44
  • buddypress42
  • ultimate member40
  • avatar40
  • forum40
  • moderation38
  • login38
  • registration36
  • threaded layout35
  • cache33
  • editor32
  • menu32
  • shortcode31
  • spam29
  • phrases28
  • forum accesses28
View all tags (2162)

Recent Posts

  • RE: Show Likers with their avatar

    No, I don't use any such function. The reason I asked i...

    By fawp, 5 hours ago

  • Costume text and image on every forum

    Is there a way I can add text or image on forum pages ...

    By Vijiki, 6 hours ago

  • RE: Can't send confirmation email from topics when suscribe for new topic

    @gilbau, wpForo uses WordPress wp_mail() function. wp...

    By Robert, 12 hours ago

  • RE: Forum topics and pages not indexing

    So all is ok from wpForo site. I have nothing to add he...

    By Robert, 12 hours ago

  • RE: Can't add shortcodes to wpForo

    @avorai, Again, I don't see any relation of this issu...

    By Robert, 13 hours ago

  • RE: Can users be in multiple forums?

    @monimair, wpForo has secondary usergroups function so...

    By Chris, 15 hours ago

  • RE: H1 title for tags

    Hi @annushka, Your suggestion has been added to our t...

    By Chris, 15 hours ago

Share:
Share
Tweet
Share
  Forum Statistics
20 Forums
9,755 Topics
49.4 K Posts
4 Online
43.5 K Members

Latest Post: Show Likers with their avatar Our newest member: sportstototopcom09 Recent Posts Unread Posts Tags

Forum Icons: Forum contains no unread posts Forum contains unread posts

Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Powered by wpForo | Copyright © 2016-2022 gVectors Team
Copyright Registration Service - Click here for more information or to register work
wpForo is Registered with the IP Rights Office
Copyright Registration Service

Ref: 4477265538
  • Home
  • Forum
  • Migrate to wpForo
  • Addons
  • Addons Demo
  • Documentation