Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-26-2005, 01:20 PM
Rich's Avatar
Rich Rich is offline
 
Join Date: Mar 2004
Location: U.S.A
Posts: 921
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Whats wrong with this code?

Hello,

This code isn't working as expected. I am not familiar with 3.5, so I am not certain what is wrong with it. This was a 3.0.X modification and I am trying to implement it on my 3.5 board.

How it is SUPPOSED to work:

Shows the guest a message - that works

Once registered, if they haven't confirmed their email, it will show an "Unconfirmed" message.

Once confirmed, it will show a new box at the top telling them they haven't posted yet and encourages them to post a welcome message in the "intro" forum.

I haven't been able to locate where I got this modification, so I couldn't contact the original author for advice. Here is the code:

Code:
<if condition="$show['guest']"> 
<!-- guest welcome message --> 
<br />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr> 
<td class="alt1" colspan="6">
     <phrase 1="faq.php?$session[sessionurl]" 2="register.php?$session[sessionurl]">$vbphrase[first_visit_message]</phrase>
     $vbphrase[welcome_ads]
</td>
</tr>
</thead>
</table>
<!-- / guest welcome message -->
<else /> 
<if condition="!is_member_of($userinfo, 3)">
<!-- / unconfirmed user message -->
<br />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr> 
<td class="alt1" colspan="6">
   $vbphrase[welcome_unconfirmed]
   $vbphrase[welcome_ads]
</td>
</tr> 
</thead>
</table>
<!-- / unconfirmed user message -->
<else />
<if condition="$bbuserinfo[postcount] == 0">
<!-- never posted message -->
<br />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr>
   <td class="alt1" colspan="6">
     <phrase 1="$bbuserinfo[username]">$vbphrase[welcome_neverposted]</phrase>
       $vbphrase[welcome_ads]
</td>
</tr>
</thead>
</table> 
<!-- / never posted message -->
</if></if></if><br />
I have been testing it, and it freezes on the "Unconfirmed Message". Even when confirmed, it stays on the unconfirmed message. I removed that section, and it then freezes on the first "Post Message" even after several posts have been made.

I know that this is a quick fix for those of you that know the 3.5 code. I have been researching it and looking at other modifications, but I can't see what the problems are.

Any help would be greatly appreciated.
Reply With Quote
  #2  
Old 09-26-2005, 01:26 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<if condition="is_member_of($bbuserinfo, 3)">, as you want to show that for Users in Usergroup ID 3, right?

<if condition="$bbuserinfo[postcount] == 0"> should be <if condition="!$bbuserinfo[lastpost]"> or <if condition="!$bbuserinfo[posts]"> (if you only want it to disappear for counted posts)
Reply With Quote
  #3  
Old 09-26-2005, 03:30 PM
Rich's Avatar
Rich Rich is offline
 
Join Date: Mar 2004
Location: U.S.A
Posts: 921
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,

Thanks Kirby. Here is my dilemma. I must be doing something wrong, I don't know.

I have decided to do everything by usergroup id and promotions. I have created the following promotions:

Registered Users - are at zero posts
Registered Users 1 - 1 post
Registered Users 2 - 2 posts
Registered Users 3 - 35 posts (gets sigs)

So, if I am correct, Registered users (usergroup id 2) would be promoted to registered 1 after they make 1 post (usergroup id 10)

After 2 posts, they go to registered 2 (usergroup id 9)

After 35 posts, they would go to registered 3 (usergroup id 11)

This is what my code now says:

Code:
<if condition="$show['guest']"> 
	<!-- guest welcome message --> 
	<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
	<thead>
	<tr> 
	<td class="alt1" colspan="6">
	    <phrase 1="faq.php?$session[sessionurl]" 2="register.php?$session[sessionurl]">$vbphrase[first_visit_message]</phrase>
	     $vbphrase[welcome_ads]
	</td>
	</tr>
	</thead>
	</table>
	<!-- / guest welcome message -->
<else />
<if condition="is_member_of($bbuserinfo, 2)">
<!-- never posted message -->
<br />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr>
   <td class="alt1" colspan="6">
     <phrase 1="$bbuserinfo[username]">$vbphrase[welcome_neverposted]</phrase>
       $vbphrase[welcome_ads]
</td>
</tr>
</thead>
</table> 
<!-- / never posted message -->
<else />
<if condition="is_member_of($bbuserinfo, 10)">
<!-- never posted message -->
<br />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr>
   <td class="alt1" colspan="6">
     <phrase 1="$bbuserinfo[username]">$vbphrase[welcome_postedone]</phrase>
       $vbphrase[welcome_ads]
</td>
</tr>
</thead>
</table> 
<!-- / never posted message -->
</if>
</if>
</if>
<br />
I am still stuck with the "never posted message" after they posted! I don't understand why. They should be seeing the second message after they made their first post I would have thought.
Reply With Quote
Reply


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 02:25 AM.


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.04712 seconds
  • Memory Usage 2,192KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete