vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Showing a user in a Phrase (https://vborg.vbsupport.ru/showthread.php?t=69979)

traderx 09-29-2004 02:48 AM

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

Tekton 09-29-2004 12:49 PM

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

Also, over 200 forums??

traderx 09-29-2004 01:47 PM

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

Zachery 09-29-2004 02:43 PM

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

traderx 09-30-2004 02:10 AM

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

nexialys 09-30-2004 02:36 AM

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!

Zachery 09-30-2004 03:05 AM

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...

nexialys 09-30-2004 04:14 AM

Quote:

Originally Posted by Zachery
type the text into the template, and dont bother with a phrase...

you, english man, with your rude manners... ;) ;)


All times are GMT. The time now is 09:00 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.01162 seconds
  • Memory Usage 1,735KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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