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)
-   -   vBindex (https://vborg.vbsupport.ru/showthread.php?t=37021)

NTLDR 05-14-2002 07:26 PM

In the origional index.php in your forums directory copy the code from line 138-211 (thats the lines the code were for an unhacked file at the time the hack was made).

Line 138 should have the following code on it:
PHP Code:

$activeusers ""

And line 211 should have:
PHP Code:

eval("\$loggedinusers = \"".gettemplate('forumhome_loggedinusers')."\";"); 

So you need to copy all the code between those lines.

Decoder 05-15-2002 03:16 AM

and what do i do with the copied info?

el3m3nt 05-15-2002 09:48 AM

hmm.. i don't know how to write these instructions more clear.. then they are now.

decoder, put the copied code into the new index.php (the vbindex one) where it says in the install instructions. (replace the commented text "// add here the vBulletin code of the original index.php").

:bunny: :)

rjdpa 05-21-2002 05:15 AM

How do you add it to a template set?

rjdpa 05-21-2002 10:24 PM

How would I go about installing the templates? Add a new Set? or just add them to the default list as .. "home_buddy1"... etc... after that, what files would go in my root directory? (ex. www.microsoft.com)

NTLDR 05-22-2002 09:48 AM

Quote:

Originally posted by rjdpa
How would I go about installing the templates? Add a new Set? or just add them to the default list as .. "home_buddy1"... etc... after that, what files would go in my root directory? (ex. www.microsoft.com)
Add them all to your default template set, and any other template sets you have that you wish to use vBindex with.

Your need to place the files within your forums directory, so http://www.domain.com/forum for example.

ariaforums 05-28-2002 01:03 PM

In the news bits is there anyway to limit the number of charactors displayed? ie just add dots after a certain number of charactors then perhaps a link to the news forum and actual story?

Billy Bandit 06-02-2002 03:29 PM

I read through a bunch of the posts in this thread and noticed that some users had problems with the icons not showing up correctly in for the News items on index.php (vbIndex).

I had the same problem. I downloaded the hack (v1.3) a couple days ago and am just installing it. I don't think the newsbit template has been updated with the proper code in the ZIP file.

newsbit template that comes with vbIndex 1.3 contains:
PHP Code:

<td bgcolor="{secondaltcolor}"><normalfont><img src="{imagesfolder}/icons/icon$icon.gif" border="0"> <b>$newstitle</b></normalfont></td

but it should contain:
PHP Code:

<td bgcolor="{secondaltcolor}"><normalfont>$icon<b>$newstitle</b></normalfont></td

Thanks for the great hack! I'm still messing with it...

The Piper 06-04-2002 03:17 AM

I noticed that whenever I use home.php, my records (Most users ever online and most users ever online on a day) are reset to show only the number for that same day. Is there any way to change this?

Thanks!
Paulo

NTLDR 06-07-2002 03:13 PM

If you read the thread you will find the fix I posted a few pages back ;)

The Piper 06-07-2002 07:20 PM

:dead:

Shame on me for not finding it! :)

Anyway, I'd like to thank both el3m3nt and NTLDR for all of their great support on this hack. I have finally ported all of my website to vBulletin and I'm using vbIndex to drive the main page. It is now finally online.

In case you want to check it out: All Pink Floyd Fan Network.

Thanks again for everything, guys!

Paulo

Tigga 06-08-2002 06:52 AM

Nice hack el3m3nt. :)
I'm currently working on totally redesigning my site to incorporate the features of vBulletin into it more. At first I was going to use vBhome, but I think I may switch to this one instead.
The one thing that I can not seem to figure out (and does not seem to be in either of these hacks) is how to display a users avatar with the rest of their information. I've tried to figure this out myself, but I'm not that good with php code yet. If anyone could help me with this it would be much appreciated.

NTLDR 06-08-2002 08:44 PM

Quote:

Originally posted by The Piper
Anyway, I'd like to thank both el3m3nt and NTLDR for all of their great support on this hack.
No problem, I'm glad I could help, you've done a good job with your sites home page, congrats :)

NTLDR 06-08-2002 08:46 PM

Quote:

Originally posted by PlurPlanet
The one thing that I can not seem to figure out (and does not seem to be in either of these hacks) is how to display a users avatar with the rest of their information.
Do you mean like how I have the users avartar shown on my vBindex page? If so I'll work out the code and where you need to put it in the standard vBindex file.

Tigga 06-08-2002 09:06 PM

Hi NTLDR,
I just checked out your site again and that is exactly what I am trying to do. If you could tell me what code needs to be placed in the vBindex page I would appreciate it. I'm not exactly sure of the rules about posting code from vBulletin on here, so if it would be better you could just PM or email me.
Thanks for the help! :)

The Piper 06-09-2002 05:56 PM

I just noticed that guest users see the poll in the main page but are not able to vote on it. It says "User already voted", even though I set the poll forums permissions to allow guests to vote.

Any way to change this?

Thanks!
Paulo

NTLDR 06-09-2002 06:07 PM

Quote:

Originally posted by PlurPlanet
Hi NTLDR,
I just checked out your site again and that is exactly what I am trying to do. If you could tell me what code needs to be placed in the vBindex page I would appreciate it. I'm not exactly sure of the rules about posting code from vBulletin on here, so if it would be better you could just PM or email me.
Thanks for the help! :)

Right, you need to add this code:

PHP Code:

// show avatar
// -------------------------
if ($bbuserinfo[userid]!=0) {
  
$avatarurl=getavatarurl($bbuserinfo[userid]);
  if (
$avatarurl=='') {
    
$avatarurl='images/avatars/noavatar.gif';
  }
  
$avatarimage='<a href="member.php?s='.$session[sessionhash].'&action=editavatar"><img src="'.$avatarurl.'" border="0">';
} else {
  
$avatarimage='<a href="register.php?s='.$session[sessionhash].'&action=signup"><img src="images/avatars/guestavatar.gif" border="0"></a>';


After this code in the vbindex php file:

PHP Code:

]// vBindex - start
// ------------------------- 

This code is taken from the welcome pannel hack and full credit goes to the creator of that hack.

You need to add:

Code:

$avatarimage
in the template that you want the avatar to be displayed.

NTLDR 06-09-2002 06:10 PM

Quote:

Originally posted by The Piper
I just noticed that guest users see the poll in the main page but are not able to vote on it. It says "User already voted", even though I set the poll forums permissions to allow guests to vote.

Any way to change this?

Thanks!
Paulo

Does this happen in the forum when a guest votes? As all guests have userid 0 I'm asuming when one guest votes it allows no other guests to vote, can users vote multiple times?

The Piper 06-09-2002 06:15 PM

Quote:

Originally posted by NTLDR


Does this happen in the forum when a guest votes? As all guests have userid 0 I'm asuming when one guest votes it allows no other guests to vote, can users vote multiple times?

No, I just logged in as guest and when I go to the forums, I'm allowed to vote. Pretty strange, isn't it?

BrAinZ 06-09-2002 07:06 PM

I have tried to install this hack, but can't find the relevant bit of the original index.php file :(

Instructions say find this:

PHP Code:

    $activeusers "";
    
$loggedinusers "";

   
till    
    
      $recordusers 
$maxusers[0];
      
$recorddate vbdate($dateformat,$maxusers[1]);
      
$recordtime vbdate($timeformat,$maxusers[1]);
      eval(
"\$loggedinusers = \"".gettemplate('forumhome_loggedinusers')."\";"); 

But I am using Version 2.0.3 that does not have this code.

Anyone got any ideas?

NTLDR 06-09-2002 07:21 PM

Quote:

Originally posted by BrAinZ
But I am using Version 2.0.3 that does not have this code.
I'm afraid I don't have a version as early as 2.0.3, try looking for a line that starts:
PHP Code:

$activeusers ""

or similar and copy to a line like:
PHP Code:

eval("\$loggedinusers = \"".gettemplate('forumhome_loggedinusers')."\";"); 

or similar if they exist in 2.0.3.

I would suggest that you upgrade to 2.2.6 if you can and remove many security expolits on your board.

Tigga 06-09-2002 09:41 PM

Thanks for the help NTLDR. It worked great except you forgot to end the link on this line

$avatarimage='<a href="member.php?s='.$session[sessionhash].'&action=editavatar"><img src="'.$avatarurl.'" border="0">';

It worked fine after I added </A> though. :)

JF1980 06-11-2002 10:24 PM

I installed it (with the links mod) and here it is: http://www.thrill-seekers.net/forums/home.php

Now how do I use it in http://www.thrill-seekers.net/index.php , leaving the forums index at http://www.thrill-seekers.net/forums/index.php

e.g. rename home.php to index.php and have in in my root directory, not the vb directory?

Also, I believe that this is v 1.2, how do I upgrade to 1.3?

Also, when im logged out, the page is blank!

LightBringer 06-14-2002 04:47 AM

*Fixed*

-=dm=- 06-14-2002 10:49 PM

Hi NTLDR

I have activated the rightblock, now I want, when user click on a button instead of open a new page I like it to appear in the center exact like u have on u r vBindex (with left and right blocks still there) :)
once u told me something like this "home.php?s=&mypage_blahblah" but I cant remeber :(

NTLDR 06-15-2002 08:52 PM

Hi -=dm=- the info is somewhere in this thread, but its quicker to repost then to find it ;)

You need to replace: (should be near the end of the file)

PHP Code:

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

With:

PHP Code:

if (!$page)
// no page specified
{
eval(
"dooutput(\"".gettemplate('home')."\");");
}
else
eval(
"dooutput(\"".gettemplate("$page")."\");"); 

You can change:

PHP Code:

$page 

to whatever you want in the URL so in the above code the url to get to a page would be:

Code:

x.php?s=$session[sessionhash]&page=template_name
Where:

x.php is the name of the vbindex.php file;

$session[sessionhash] is the users sessionhash where required, should be used in all links;

and template_name is the name of the template you wish to be displayed.

To create new pages just make a copy of your home template and change the main content.

If no page is specified in the url then the home template is loaded.

GuruXL 06-15-2002 11:13 PM

I don't know where the discussion is exactly but, I would like to show off my programming site now :p

A sneak peek at whats to come..

http://www.flohost.com/~guruxl/index.php

GuruXL 06-15-2002 11:23 PM

i just realized something...

All you really did was take the "Pages Via Template" Hack, add a few variables and things from other hacks, and viola, this hack...

MalaK_3araby 06-16-2002 08:21 AM

Quote:

Originally posted by NTLDR


Wrong

This will work in another directory other than your forums dir, if you use the chdir command:

PHP Code:

chdir("/path/to/forums"); 

Above:

PHP Code:

require("global.php"); 


Hiya NTLDR

i did that and it works .. but there is always a but ..
its images .. they are not showing since all ther refrence is for /images not vbb/images ...
I do not want to manually enter that since it i am using many styles. Any ideas on how to correct that and get the correct path for {imagesfolder}?

-=dm=- 06-16-2002 10:05 AM

Hi NTLDR thanx :)
this was exact what I was looking for.
now is it possible to see which page user are on, on "who is online"?

NTLDR 06-16-2002 04:35 PM

Quote:

Originally posted by GuruXL
I don't know where the discussion is exactly but, I would like to show off my programming site now :p

A sneak peek at whats to come..

http://www.flohost.com/~guruxl/index.php

You need to put the "copyright ?2000 - 2002, Jelsoft Enterprises Limited" back into the footer as you are violating the licence agreement.

NTLDR 06-16-2002 04:47 PM

Quote:

Originally posted by MalaK_3araby


Hiya NTLDR

i did that and it works .. but there is always a but ..
its images .. they are not showing since all ther refrence is for /images not vbb/images ...
I do not want to manually enter that since it i am using many styles. Any ideas on how to correct that and get the correct path for https://vborg.vbsupport.ru/images?

The solution to this really depends on how you have implimented this hack so far:

If you have added the templates to only one style set, then the one solutuion is to add a new replacement variable called {forumimages} for example and set that as forum/images and replace { images folder } (minius the space before each {}) in the templates to {forumimages}

The second option, change the path of the images to the full URL so http://www.site.com/forum/images instead of just /images

NTLDR 06-16-2002 04:51 PM

Quote:

Originally posted by -=dm=-
Hi NTLDR thanx :)
this was exact what I was looking for.
now is it possible to see which page user are on, on "who is online"?

Indeed this is posible, you need to edit the online.php for every page, I'll post the hack add-on with the changes later today for you -=dm=- I may also try and modify FireFly's admin cp locations addon so it works with this if I can.

MalaK_3araby 06-16-2002 06:50 PM

HI NTLDR ..

You are awsome.
Your answer solved alot more than my question above.

Thanks alot NTLDR.

NTLDR 06-16-2002 07:20 PM

As requested by -=dm=- is the addon for my multi-paged vBindex addon. It allows you to have a location for different pages within vBindex based on the url.

Install Instructions:
------------------------
------------------------

Open online.php

Find:

PHP Code:

    case 'online':
      
$userinfo[where] = "Viewing <a href='online.php?s=$session[sessionhash]'>Who's Online</a>";
      break; 

And add after it:

PHP Code:

// Add Location Descriptions For vBindex
    
case 'home':
          
$userinfo[where] = "Viewing <a href='home.php?s=$session[sessionhash]'>Home Page</a>";
      break;
    case 
'vbindex_PLACE1':
          
$userinfo[where] = "Viewing <a href='home.php?s=$session[sessionhash]&page=PLACE1'>Description 1</a>";
      break;
    case 
'vbindex_PLACE2':
          
$userinfo[where] = "Viewing <a href='home.php?s=$session[sessionhash]&page=PLACE2'>Description 2</a>";
      break;
//end Location Descriptions For vbIndex 

You need to change the following in the above PHP code:

PLACE1 and PLACE2 with the name of the template for the page that is shown in the url:

[code]http://forums.site.com/vbindex.php?s=&page=PLACE1[code]

Description 1 And 2: Replace with the description of the page.

Next still in online.php

Find:

[php] case 'online.php':
$userinfo[activity] = 'online';
break;[/php

And Add After It:

PHP Code:

//And Location Descriptions For vbIndex
  
case 'home.php':
        if (
$token1 == '') {
          
$userinfo[activity] = 'home';
        } else if (
$token1 == 'PLACE1') {
          
$userinfo[activity] = 'vbindex_PLACE1';
        } else if (
$token1 == 'PLACE2') {
          
$userinfo[activity] = 'vbindex_PLACE2';
        }
    break;
//end Location Descriptions For vbIndex 

Again, place PLACE1 and PLACE2 with exactly the same values as above.

Thats all that is all that is required to add the locations, the following is extra info on adding more than two extra vBindex pages to Who's Online.

Adding extra places:

in order to add more places in Who's Online you need to add a few extra lines to the above blocks of code:

In the first block you need to add:

PHP Code:

    case 'vbindex_PLACE3':
          
$userinfo[where] = "Viewing <a href='home.php?s=$session[sessionhash]&page=PLACE3'>Description 3</a>";
      break; 

Right Before:

PHP Code:

//end Location Descriptions For vbIndex 

Changing PLACE3 and Description 3 as you did above.

In the second block you need to remove the last { (the one directly before break; and add the code:

PHP Code:

        } else if ($token1 == 'PLACE3') {
          
$userinfo[activity] = 'vbindex_PLACE3';
        } 

And change PLACE3 as you did above.

NTLDR 06-16-2002 07:22 PM

Quote:

Originally posted by MalaK_3araby
HI NTLDR ..

You are awsome.
Your answer solved alot more than my question above.

Thanks alot NTLDR.

No problem, glad I could help you out and solve you problem :D

alain4ever 06-19-2002 04:20 PM

i have a small question....

can i use it on vb2.2.6??

NTLDR 06-19-2002 06:14 PM

Quote:

Originally posted by alain4ever
i have a small question....

can i use it on vb2.2.6??

Yep, it should work with all of the 2.2.x series.

LearningMan 06-21-2002 03:30 PM

Having slight problem with vbindex...

Installed Hack per Instructions. Works great...

Problem I am having is now on my main forum page, my:

Most users ever Online area. The value changes as people logoff. The date also changes as well as the time...

Everything else working fine. I names the vbindex page index.php and also the Main index for the vbb Forum 2.2.6 is home.php...

Also, my counter in the vbindex page for Posts Today starts out at 74 and goes DOWN as Members make post...

Help...

NTLDR 06-21-2002 06:24 PM

Quote:

Originally posted by LearningMan
Most users ever Online area. The value changes as people logoff. The date also changes as well as the time...
Please read the whole thread, I posted this fix quite a while ago.


All times are GMT. The time now is 10:51 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.01753 seconds
  • Memory Usage 1,892KB
  • 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
  • (20)bbcode_php_printable
  • (14)bbcode_quote_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
  • (40)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