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)
-   -   Get rid of "register" option if you have registered (https://vborg.vbsupport.ru/showthread.php?t=33051)

voogru 01-05-2002 02:37 AM

i made a small mod that you can replace the entire logout crap with "$vlogout"


just out this in the phpinclude (remove the old code first)

PHP Code:

if ($bbuserinfo['userid']<"1") {
    
//they're a guest
    
$register_or_controlpanel "<a href=\"register.php?s=$session[sessionhash]&action=signup\"><img src=\"{imagesfolder}/top_register.gif\" alt=\"Registration is free!\" border=\"0\"></a>";
} else {
    
//they're registered
    
$register_or_controlpanel "<a href=\"usercp.php?s=$session[sessionhash]\"><img src=\"{imagesfolder}/top_profile.gif\" alt=\"Here you can view your subscribed threads, work with private messages and edit your profile and preferences\" border=\"0\"></a>";
    
$vlogout "<a href=\"member.php?s=$session[sessionhash]&&action=logout\"><img src=\"{imagesfolder}/top_logout.gif\" alt=\"Log Out\" border=\"0\"></a>";


and then do this:

open header.php

find
Code:

  <a href="member.php?s=$session[sessionhash]&action=logout"><img src="{imagesfolder}/top_logout.gif" alt="Logout" border="0"></a>
replace with
Code:

$vlogout
this will make it so you dont have to have the logout button next to the usercp (i like mine at the end)

this is the first time i ever modded something that has to do with php so go easy on me! in a n00b!

Arathorn 01-06-2002 01:10 PM

To make this compatible with VBPortal 3, add the code in the instructions into vbp_includes.php, right under:

[QUOTE]
include("../config.php");
global $nukepath,$bbuserinfo,$nukeurl,$foot1,$foot2,$foot 3,$foot4;
global $Allow_Forum_Leftcolumn, $Forum_Default_Leftcolumn,$newsforum,$pollsforum;
chdir($nukepath . "/");

NYI Fan 01-12-2002 02:19 PM

quick, easy and definately a nice touch!
Thanks

Rose 01-12-2002 02:59 PM

I am using this hack and love it.

However, I want to add a new style to the board and change the 'register' and 'profile' buttons in a new style (other than default).

I can't get the replacements to work, I keep getting the default buttons in the new style. If I edit the top 'php parsed code' in the new style settings, it changes my default.

Is there a way I can change this and still use the hack?

Arathorn 01-13-2002 11:32 AM

The Image folder path is a variable that can be changed with each style. Create a new folder for each new set of buttons, and alter the variable ( Admin CP > Styles > at the bottom ). Make sure you keep all the image filenames exactly the same as the original files.

This should work, but someone else could probably give you a better solution.

StarBuG 01-13-2002 08:54 PM

For me it works fine in the vB THANK you!

But in the Portal (I use vBPortal 3.0 beta 8) the buttons are just gone!

I added the code in the vbp_includes.php but nothing happended!

Any suggestions?

Greetings

StarBuG

Erwin 01-14-2002 11:56 PM

The hack works for vBPortal 3 on the Forum home page, but not for the vBPortal Main Home page (following the vBPortal instructions above). Which is a big hassle. I'll see if there's a way around it.

Airwaves 02-01-2002 10:23 AM

can this be modified to put the buttons in this order for a logged out user

calender - members - faq - search - home - register

and for a logged in user

user cp - calender - members - faq - search - home - logout

and for admin or mod

admin/mod cp - user cp - calender - members - faq - search - home - logout

if someone can send me the instructions to do this that i list above, please let me know.

regards

Liam

Lionel 02-02-2002 07:03 AM

if ($thread[open]) {
$replyclose="images/comments.gif";
} else {
$replyclose="{closedthreadimage }";

but it does not work. I wanted to replace the Post Reply image in one template with another one without loosing the "closed" option

Airwaves 02-02-2002 07:46 AM

can anyone answer my question ?


All times are GMT. The time now is 06:20 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.01306 seconds
  • Memory Usage 1,737KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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