Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Template Modifications

Reply
 
Thread Tools
Guests may only view first page of thread Details »»
Guests may only view first page of thread
Version: 1.00, by D|ver D|ver is offline
Developer Last Online: Jul 2013 Show Printable Version Email this Page

Version: 3.5.2 Rating:
Released: 01-03-2006 Last Update: Never Installs: 45
Template Edits
 
No support by the author.

i use a small template modification in my forums, so that guests may only view the first page of a thread. otherwise they will get a (error) message
maybe someone want to use this, too


in the following,
XX is the number of posts shown in a thread
(i think default was 25)
you need to replace this 2 times in the first 2 lines according to your posts/page

postbit legacy
add to the very beginning:
Code:
<if condition="$post[postcount] > XX and !$bbuserinfo['userid']">
<if condition="$post[postcount]%XX == 1">
<!-- Start Error Message -->
<if condition="$show['spacer']">
    $spacer_open
    <div id="edit$post[postid]" style="padding:0px 0px $stylevar[cellpadding]px 0px">
    <if condition="!$post['islastshown']"><!-- this is not the last post shown on the page --></if>    
</if>
<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr><td class="alt1" id="td_post_$post[postid]">
<div><b>Guests may only view the first page of a thread. You need to register to get full access. <a href="register.php" rel="nofollow">Click here to register.</a>
</b></div>
</td></tr>
</table>
<if condition="$show['spacer']">
    </div>
    $spacer_close
</if>
<!-- End Error Message -->
<else /></if><else />
and add to the end of the template:
Code:
</if>
this modification saves traffic and it should increase your registrations rate

its my first release to please be kind

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 01-04-2006, 05:40 PM
sensimilla sensimilla is offline
 
Join Date: Dec 2004
Location: Poland
Posts: 555
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great hack! keep up the good work
Reply With Quote
  #3  
Old 01-04-2006, 07:00 PM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah well done!
Reply With Quote
  #4  
Old 01-05-2006, 12:45 PM
Robru Robru is offline
 
Join Date: Aug 2005
Location: Netherlands
Posts: 368
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*installed*
Reply With Quote
  #5  
Old 01-05-2006, 01:35 PM
NuclioN's Avatar
NuclioN NuclioN is offline
 
Join Date: Aug 2002
Posts: 955
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this have an effect on the Google adsense bot's that are scanning your threads?
Reply With Quote
  #6  
Old 01-05-2006, 03:19 PM
D|ver's Avatar
D|ver D|ver is offline
 
Join Date: Feb 2003
Posts: 177
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well i tried to set rel="nofollow" attributes for all other pages than page 1
so i think it wouldn't affect them at all
Reply With Quote
  #7  
Old 01-05-2006, 08:07 PM
hollyboy's Avatar
hollyboy hollyboy is offline
 
Join Date: Mar 2004
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It would be interesting to have the same hack that does the same but for the first post
Reply With Quote
  #8  
Old 01-06-2006, 10:54 PM
D|ver's Avatar
D|ver D|ver is offline
 
Join Date: Feb 2003
Posts: 177
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hollyboy
It would be interesting to have the same hack that does the same but for the first post
here i found a solution for this

in postbit_legacy replace:
PHP Code:
<!-- message --> 
<
div>$post[message]</div
<!-- / 
message --> 
with:
PHP Code:
<!-- message --> 
<
div><if condition="$post[postcount] > 1 and !$bbuserinfo['userid']"
$vbphrase[guest_no_posts
<else /> 
$post[message
</if></
div
<!-- / 
message --> 
then create a customguest_no_posts phrase
Reply With Quote
  #9  
Old 01-07-2006, 07:02 AM
hollyboy's Avatar
hollyboy hollyboy is offline
 
Join Date: Mar 2004
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by D|ver
here i found a solution for this

in postbit_legacy replace:
PHP Code:
<!-- message --> 
<
div>$post[message]</div
<!-- / 
message --> 
with:
PHP Code:
<!-- message --> 
<
div><if condition="$post[postcount] > 1 and !$bbuserinfo['userid']"
$vbphrase[guest_no_posts
<else /> 
$post[message
</if></
div
<!-- / 
message --> 
then create a customguest_no_posts phrase
thank u for looking for it, but with that code I get a message for every reply given saying "guest can only read first post" so if there are 100 replies I get 100 of those messages by each members who replied in the topic.

It would be better to get only 1 message
Reply With Quote
  #10  
Old 01-10-2006, 12:52 PM
Emmy2 Emmy2 is offline
 
Join Date: Jan 2004
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why are all the quotes (") in the code in the first box coming out as &quot; ????

I actually tried to install this with just copying the code (without looking at it too closely) and nearly sent my server into septic shock! Once I replaced all the &quot; with normal quotes it all worked, but it's very odd it's posted that way, and that no one else has commented on it.

but other than that, I love the concept of this and it's working well on my forum.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:22 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05166 seconds
  • Memory Usage 2,307KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (4)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete