vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Forum Home Enhancements - Link Private Forums on Homepage to Thread instead of Error Message (https://vborg.vbsupport.ru/showthread.php?t=293408)

addamroy 12-28-2012 11:00 PM

Link Private Forums on Homepage to Thread instead of Error Message
 
1 Attachment(s)
I wanted to try this for my own forum and figured I'd share it here.

This mod will let you link private forums on forumhome to a specific thread for non paid members, instead of the 'you do not have permission to view' error message.

This is to increase revenue for your forum, by sending your forum visitors and members to your offer (a thread) when they try to access private content, instead of that annoying error page.

This is a really simple mod achievable via one simple template edit.

STEP 1 - Find the forumhome_forumbit_level2_post template via edit templates > Forum Home Templates.

Find the code below
Code:

<a href="{vb:link forum, {vb:raw forum}}">
You need to add some chunks of code around this to make this work.

Replace it with
Code:

<vb:if condition="$forum[forumid] == XXX">
<vb:if condition="$show['guest']">
<a href="{vb:link forum, {vb:raw forum}}">
<vb:elseif condition="!is_member_of($bbuserinfo, 1,2,3)" />
<a href="http://www.yourwebsite.com/your-thread-here">
<vb:else />
<a href="{vb:link forum, {vb:raw forum}}">
</vb:if>
<vb:else />
<a href="{vb:link forum, {vb:raw forum}}">
</vb:if>

Replace each instance of 1,2,3 above with the usergroup ids that DO HAVE ACCESS to your private forum.

Replace each instance of XXX with the forum id of the forum you want to link to a thread.

And naturally, replace http://www.yourwebsite.com/your-thread-here with the URL to the thread you want your private forum to link to.

Now members who don't have access to your private section, will be sent to a thread of your choice instead of seeing the no permission error message page. This should send more traffic to your offer page promoting your paid subscription resulting in more revenue for your website.


Check out my other Template Modifications for 4.x!

[Postbit-Legacy Hack] Attractive User Info Boxes for Posts

Sidebar Anywhere Enhancement - Custom Blocks Per Forum or Page

Change Thread Title Color for Specific Forums on Homepage

Change Background Color for Specific Forums on Homepage

Change Title Color of Specific Forums on Homepage

Thread Starter Image in Postbit for OP

CUSTOM BUTTONS that look like your forum!

Custom User Rank Box in Posts

ProFifaLeagues 12-29-2012 11:22 PM

Very clever Idea and much better then the Standard Msg!
Thanks mate nice one

AURFSCAN 12-30-2012 02:31 AM

good idea and simple.. :)

also this should be in the template mods section

addamroy 01-04-2013 09:04 PM

Thanks guys, definitely doing the trick for me.

addamroy 03-16-2014 12:16 PM

Updated with more improved code.

Make sure to mark as installed and rate :)


All times are GMT. The time now is 07:23 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01046 seconds
  • Memory Usage 1,724KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete