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

Reply
 
Thread Tools Display Modes
  #1  
Old 09-29-2004, 02:48 AM
traderx's Avatar
traderx traderx is offline
 
Join Date: Jul 2003
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Showing a user in a Phrase

Hello...

First off... I am totally lost to php, so pls bear with me

I have installed this hack from Ted S.

What is does is will post a message for people not reg'd/vistors, another one waiting activation, another message after your activation (to congrats... remind to post) and another one if you have been gone for X amount of days.

If uses Phrase, and it is what is in these Phrases that the user will see.

Example
welcome_postmoreoften
Code:
Hello {1} it appears that you have not posted on our forums in several weeks, why not take a few moments to ask a question, help provide a solution or just engage in a conversation with another member in any one of our over 200 forums.  A few popular destinations include our <A 
href="/f2.html">Basic Scuba</A> forums, our <A href="/f51.html">Off Topic</A> and our <A href="/f42.html">Scuba Clubs</A> which now number over two dozen.
What what I can tell, is that by adding the {1} would post the username.... but when I do that, I get:

Hello %1$s it appears that you have not posted on our forums in several weeks, why not take a few moments to ask a question,
help provide a solution or just engage in a conversation with another member in any one of .......

Am I miss understand this or did I do something wrong. I so.... what can I do to correct this, or what is the correct "thing" to put in there.

Any help would be great, and thanks in advance
Coll
Reply With Quote
  #2  
Old 09-29-2004, 12:49 PM
Tekton Tekton is offline
 
Join Date: Jun 2004
Location: Wisconsin
Posts: 362
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can you just put '$bbuseirfo[username]' in there?

Also, over 200 forums??
Reply With Quote
  #3  
Old 09-29-2004, 01:47 PM
traderx's Avatar
traderx traderx is offline
 
Join Date: Jul 2003
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Tekton
can you just put '$bbuseirfo[username]' in there?

Also, over 200 forums??
I have tried that..... but it doen'st work.... It just post it's self

I don't have 200 forums... ted does.... I just posted the whole as created by Ted

I know that it can be done.... Teds does.

Any other ideas
Reply With Quote
  #4  
Old 09-29-2004, 02:43 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As i said, just hardcode the text and dont bother with the phrase. if $bbuserinfo[username] still doesnt work after directly putting it into the template, theres a good chance youll need to make a few minor edits to makeit work
Reply With Quote
  #5  
Old 09-30-2004, 02:10 AM
traderx's Avatar
traderx traderx is offline
 
Join Date: Jul 2003
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zachery
As i said, just hardcode the text and dont bother with the phrase. if $bbuserinfo[username] still doesnt work after directly putting it into the template, theres a good chance youll need to make a few minor edits to makeit work
I guess I was totally not understanding what the site said.

What exactly would I have to do in order for this to happen for I can have the users name if/when that phrase pops up.

Coll
Reply With Quote
  #6  
Old 09-30-2004, 02:36 AM
nexialys
Guest
 
Posts: n/a
Default

this is a simple feature... use this example:

PHP Code:
$message construct_phrase($vbphrase['welcome_postmoreoften'], $bbuserinfo['username']); 
this have to be used where you create the phrase to be sent to the user.

also.. the more you add variables to the function construct_phrase, the more {1}, {2} etc... you have. the scheme is:
PHP Code:
$result construct_phrase($vbphrase['thephrase'], {1}, {2}, {3}); 
..good luck! - btw, good hack to release when you know how to deal with it!
Reply With Quote
  #7  
Old 09-30-2004, 03:05 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by traderx
I guess I was totally not understanding what the site said.

What exactly would I have to do in order for this to happen for I can have the users name if/when that phrase pops up.

Coll
type the text into the template, and dont bother with a phrase...
Reply With Quote
  #8  
Old 09-30-2004, 04:14 AM
nexialys
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Zachery
type the text into the template, and dont bother with a phrase...
you, english man, with your rude manners...
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 09:45 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.06454 seconds
  • Memory Usage 2,232KB
  • 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
  • (1)bbcode_code
  • (2)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (6)postbit_onlinestatus
  • (8)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