vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Login/Logout on forumdisplay (https://vborg.vbsupport.ru/showthread.php?t=32027)

Inzagi 11-02-2001 12:55 PM

Hi,
I now that there already exists a kind of hack for Login/Logout on forumdisplay (at least login) on the forumdisplay template because the winner of "vB of the month" has something like this.

Ist there already an public hack for this or can someone write one?

Mark Hewitt 11-02-2001 02:34 PM

It's actually not too hard to do. I haven't got time to give the details but basically all you need to do is look at forumhome and find the variables included to put the login box on the page and then put these into the appropriate forumdisplay templates.

Next step is to find the places in index.php where these templates are called and copy that bit of code into forumdisplay and it should work!

Sinecure 11-02-2001 02:49 PM

Who's board has this hack?? Paintballcity?

Scott MacVicar 11-02-2001 05:35 PM

actually its within the styles part of your forum and its already included as standard its just commented out.

Just remove the <!-- and --> from the Header part of the Style Set.

Admin Panel > Styles > Modify > Default > Header

hope this helps :)

Inzagi 11-04-2001 04:14 PM

@ppn:
Sorry, there is no "<!--" which is not needed ..
there is only:
<!-- logo and buttons -->
<!-- toplinks -->

I don't think that deleting this ones would help anythink :)



@Sinecure:
Right,
at Paintball City this feature is included.
See here for example:
http://forums.paintballcity.com/foru....php?forumid=3



@Mark:
Quote:

It's actually not too hard to do. I haven't got time to give the details but basically all you need to do is look at forumhome and find the variables included to put the login box on the page and then put these into the appropriate forumdisplay templates.
ok I have done that before.

Quote:

Next step is to find the places in index.php where these templates are called and copy that bit of code into forumdisplay and it should work!
Do you mean forumdisplay.php or the template ?? (sorry, I am a complete newbee in php and stuff...)

Scott MacVicar 11-04-2001 05:22 PM

what i told you was correct, i'll show you exactly where it is then.

Go to styles, then the fonts/colors/etc, then the header edit box.


remove the <!-- and --> around the following
Code:

<!-- <a href="member.php?s=$session[sessionhash]&action=logout"><img src="images/top_logout.gif" alt="Logout" border="0"></a>  -->
What it should look like :

Code:

<!-- logo and buttons -->
<center>
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
  <td valign="top" align="left" background="images/menu_background.gif"><a href="index.php?s=$session[sessionhash]"><img src="images/vBulletin_logo.gif" border="0" alt="$bbtitle"></a></td>
  <td valign="bottom" align="right" nowrap background="images/menu_background.gif">
  <!-- toplinks -->
  <a href="usercp.php?s=$session[sessionhash]"><img src="images/top_profile.gif" alt="Here you can view your subscribed threads, work with private messages and edit your profile and preferences" border="0"></a>
  <a href="register.php?s=$session[sessionhash]&action=signup"><img src="images/top_register.gif" alt="Registration is free!" border="0"></a>
  <a href="calendar.php?s=$session[sessionhash]"><img src="images/top_calendar.gif" alt="Calendar" border="0"></a>
  <a href="memberlist.php?s=$session[sessionhash]"><img src="images/top_members.gif" alt="Find other members" border="0"></a>
  <a href="misc.php?s=$session[sessionhash]&action=faq"><img src="images/top_faq.gif" alt="Frequently Asked Questions" border="0"></a>
  <a href="search.php?s=$session[sessionhash]"><img src="images/top_search.gif" alt="Search" border="0"></a>
  <a href="index.php?s=$session[sessionhash]"><img src="images/top_home.gif" alt="Home" border="0"></a>

--------------------------------------------------------

  <!-- <a href="member.php?s=$session[sessionhash]&action=logout"><img src="images/top_logout.gif" alt="Logout" border="0"></a>  -->

--------------------------------------------------------

  &nbsp;
  <!-- /toplinks -->
  </td>
</tr>
</table>
<!-- /logo and buttons -->

Unless you meant the little login editbox which is on the forum home page and in that case,

open forumdisplay.php

go to the bottom and above
PHP Code:

eval("dooutput(\"".gettemplate('forumdisplay')."\");"); 

put

PHP Code:

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


then open the forumdisplay template and add $logincode below $forumdisplay[threadslist]

Inzagi 11-06-2001 07:33 PM

Quote:

Unless you meant the little login editbox which is on the forum home page and in that case,

open forumdisplay.php

go to the bottom and above
PHP Code:

eval("dooutput(\"".gettemplate('forumdisplay')."\");"); 

put

PHP Code:

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


then open the forumdisplay template and add $logincode below $forumdisplay[threadslist] [/B]

Thank you, that was exactly the thing I was looking for !!!
But, altogh the login box appears where it should appear, the login from the forumdisplay does not work ..

It says : couln'd find the site
and this URL:
http://localhost:9000/forums/member.php?location=<?=/php/php.exe/forum/forumdisplay.php%20?>?<?=s=46d0728c26506e9d173d964 58ecc6bee&forumid=2%20?>

anythink I can do ?

Inzagi 11-11-2001 02:08 PM

anyone who could help me ??

Inzagi 12-16-2001 10:32 AM

anyone ??


All times are GMT. The time now is 10:03 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.01063 seconds
  • Memory Usage 1,745KB
  • 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
  • (4)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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