vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Welcome Panel [Final] (https://vborg.vbsupport.ru/showthread.php?t=33477)

carpman 08-19-2002 04:16 PM

[QUOTE]Originally posted by trilOByte


You can put whatever you like in the p_themeheader, but much of the code will need to be changed. The avatar part wont work, but there are alternative which work a little differently.

To answer your question, if you just place the welcomepanel code into p_themeheader without any changes, no it wont work.

Reverend 08-19-2002 05:52 PM

[QUOTE]Originally posted by trilOByte
Welcome $username

trilOByte 08-19-2002 07:18 PM

So you want to add the word "back" into the welcome statement, if the user is a member?

So instead of ...

Welcome user1234
Welcome

You want...

Welcome back user1234
Welcome guest

Yes, it's possible, I think you need to create a new $var though, some code hacking and a couple of new template options, one for each option. Seems like a lot of trouble for a simple syntax preference. It would need to be something along the lines of a new $welcometext and new $unregwelcomemessage, so two new templates at least.

Though there might be an easier option, I honestly dont know.

Reverend 08-19-2002 08:11 PM

Yeah i think i'll just add

"Welcome Back username" (for logged in members)

And just leave it as

"Welcome" (for guests.)

Seems a lot simpler.

Thanks trilOByte. ;)

trilOByte 08-19-2002 08:40 PM

OK, I think this works.....

Open forum/index.php (make a backup copy) and find....

PHP Code:

forumhome_pmloggedin,forumhome_welcometext

Replace that with....

PHP Code:

forumhome_pmloggedin,forumhome_welcometext,forumhome_newwelcometext,forumhome_newunregmessage


Find...

PHP Code:

// if user is know, then welcome
if ($bbuserinfo['userid']!=0) {
  
$username=$bbuserinfo['username']; 

Immediately above that add....

PHP Code:

// New Welcometext Addition.
if ($bbuserinfo['userid']!=0) {
  
$username=$bbuserinfo['username'];
  eval(
"\$newwelcometext = \"".gettemplate('forumhome_newwelcometext')."\";");
} else {
  
$welcometext "";


Find...

PHP Code:

$unregwelcomemessage='';
if (
$bbuserinfo['userid']==0) {
  eval(
"\$unregwelcomemessage = \"".gettemplate('forumhome_unregmessage')."\";");


Below that add...

PHP Code:

// New Unregelcometext Addition.
$newunregwelcomemessage='';
if (
$bbuserinfo['userid']==0) {
  eval(
"\$newunregwelcomemessage = \"".gettemplate('forumhome_newunregmessage')."\";");


Clse and save index.php

Open your templates and add a new template called...

forumhome_newunregmessage

Inside that put....

Code:

<b>Guest</b>
Add another template caqlled...

forumhome_newwelcometext

Inside that put....

Code:

back, <b>$username</b>
Then go to the forumhome template, locate the "WelcomePanel"

Find where it says Welcome and replace it with...

Code:

Welcome $newwelcometext $newunregwelcomemessage
That should do it.

I must say, it's a lot of trouble for a simple syntax modification.

Reverend 08-19-2002 09:23 PM

Yep that works perfect.Thanks.

I know it seems like a lot of trouble for a simple modification,but i think it gives members or guests a more welcoming and personal greeting.
I actually saw it on a welcome panel hack for another bulletin board software.

trilOByte 08-19-2002 11:37 PM

[QUOTE]Originally posted by Reverend

I actually saw it on a welcome panel hack for another bulletin board software.

michealo 08-23-2002 07:47 PM

great hack, works like a charm!

Tony DiMera 08-24-2002 01:42 AM

Great hack. BTW is thereanywayto have this appear on my homepage and link it to my vb as well

carpman 08-24-2002 07:13 AM

[QUOTE]Originally posted by Tony DiMera
Great hack. BTW is thereanywayto have this appear on my homepage and link it to my vb as well


All times are GMT. The time now is 09:58 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.01567 seconds
  • Memory Usage 1,750KB
  • 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
  • (3)bbcode_code_printable
  • (6)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete