PDA

View Full Version : vBindex


Pages : 1 [2]

erdem
04-29-2002, 06:28 PM
hey dont get me wrong!
may be sometimes u can miss little [better wash my mouth][better wash my mouth][better wash my mouth][better wash my mouth]s!

anyway...
:lick:

indiamike
04-29-2002, 08:31 PM
Originally posted by FlyingDutchman
I need help... :(
I have installed the hack... it works perfect :) except for 2 things:

-It says 'No poll available'
-No news shows up, only the 'latest threads' and that's it

I tried everything, I DO have the variables set correctly, but it just doesn't show up!?!?!
please help me, because I REALLY want to get this hack installed :D

I wish you had a link to it so we could check it out, maybe it's just a simple fix.
The one thing I noticed that when I did this hack and created the new forums, news and polls, they don't show up unless there is a new post in them. Could it be as simple as that? Dunno?

Could you post a link, if not PM me and I will take a look. I pulled my hair trying to get this thing to work right and am pretty confident now that I know it in and out.


Mike

NTLDR
04-29-2002, 09:33 PM
Originally posted by indiamike
The one thing I noticed that when I did this hack and created the new forums, news and polls, they don't show up unless there is a new post in them. Could it be as simple as that? Dunno?
Thats correct Mike, if there isn't a poll as the Latest Thread then it will not show up at all.

Another thought is you do have $news in your home template?

neuron
04-30-2002, 01:37 AM
any fix for the poll time yet?

I got a dual amd 1800MP proc on a oc3, server load 0.03 atm, running the poll query takes 12 seconds...

there HAS to be a better way of doing it ;)

NTLDR
04-30-2002, 06:41 AM
Originally posted by neuron
any fix for the poll time yet?

I got a dual amd 1800MP proc on a oc3, server load 0.03 atm, running the poll query takes 12 seconds...

there HAS to be a better way of doing it ;)

Only takes 0.136secs to generate mine with 49 queries at the moment, thats on a dual 1GHz Itel Pentium III, server load around 0.60-0.70.

I've never had any problems with the load time, even when the page had 60 queries on it and was on an AMD K6-3 450, still didn't take that long.

FlyingDutchman
04-30-2002, 12:06 PM
I did post a news thread and a poll
of course i did

I just installed the hack, and set the variables and inserted the [better wash my mouth][better wash my mouth][better wash my mouth][better wash my mouth] from index.php to the new index.php. nothing more, because nothing more is needed... but just doesn't work

neuron
04-30-2002, 12:11 PM
guess it's becouse of database size or something...

I'll see if I can test a little to find out what it is.

Becouse that ONE query takes 12 seconds, if I take away that the rest goes in 0 sec's :)

// edit

It's the LEFT JOIN that does it, it's a major performance hit in mysql, I'll post more info if I can find a solution.

(adding indexes will probably speed it up to about 0sec per query ;) )

//edit2

if you have a fairly new mysql server (connect to it and confirm that the query works) replace the LEFT JOIN with INNER JOIN, my results on a 1.4ghz tbird, big database:

INNER JOIN:
1 row in set (0.01 sec)
LEFT JOIN:
1 row in set (50.18 sec)

output is identical of course

:)

NTLDR
04-30-2002, 02:43 PM
Originally posted by neuron
...It's the LEFT JOIN that does it, it's a major performance hit in mysql, I'll post more info if I can find a solution...

Try taking a look at the lastest version of vbPortal's code and see if the poll code has change there, I belive the code is pretty similar if not identical to that of vbPortal, so wajones may have changed the code since the realease od vBindex and it maybe more optimised now.

NTLDR
04-30-2002, 02:45 PM
Originally posted by FlyingDutchman
I did post a news thread and a poll
of course i did


I just installed the hack, and set the variables and inserted the **** from index.php to the new index.php. nothing more, because nothing more is needed... but just doesn't work

Do you have a URL or could you send me the file so I can take a look at it for you? I'm guessing that its something simple, cus it works fine for me and everyone else by the looks of it, we all make simple mistakes ;)

erdem
04-30-2002, 04:44 PM
<a href="http://www.trojanforge.net/" target="_blank">http://www.trojanforge.net/</a> -> demo... i did what i said before..

new index.php is on root and forum index.php is in forum folder..

erdem
04-30-2002, 05:31 PM
hi..

its me again..
after installing vbindex , my most user online count started to act like user online count..

how to fix?
i look into code but .. erm..
:cross-eyed:

NTLDR
04-30-2002, 05:55 PM
Originally posted by erdem
hi..

its me again..
after installing vbindex , my most user online count started to act like user online count..

how to fix?
i look into code but .. erm..
:cross-eyed:

See my post (https://vborg.vbsupport.ru/showthread.php?postid=245038#post245038) on page 16 for the fix to this.

erdem
04-30-2002, 06:15 PM
tnx!
uhmm

so is there way to use vbindex with colored online thing.. u can see at my site..

tnx!

erdem
04-30-2002, 06:20 PM
uhmm no luck!
still same..

NTLDR
04-30-2002, 06:25 PM
Did you remove or comment out all the code that was shown on the page? That fix does work, you need to wait for the number of members online to decrease to see it working, it works fine on my site now.

I'll just find the secions of code you need to edit for the coloured users on who's online.

NTLDR
04-30-2002, 06:30 PM
Isn't the who's online already coloured on your site? It seems to be working with the hack that you already have installed, unless you don't want it to look like it does in the attached image.

erdem
04-30-2002, 06:44 PM
trojanman is mod.. so it has to be in green :P

and also most user online user still go up and down like user online thing :D

NTLDR
04-30-2002, 06:54 PM
OK, you need to change in the vbindex PHP file:

This:
// pm
// -------------------------
$newpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND dateline>$bbuserinfo[lastvisit] AND folderid=0");

if ($bbuserinfo['userid']!=0) {
$username=$bbuserinfo['username'];
eval("\$logincode = \"".gettemplate('home_logout')."\";");
eval("\$buddy = \"".gettemplate('home_buddy1')."\";");

} else {
eval("\$logincode = \"".gettemplate('home_login')."\";");
$buddy = "";
}

To This

// pm
// -------------------------
$newpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND dateline>$bbuserinfo[lastvisit] AND folderid=0 $ignoreusers");

if ($bbuserinfo['userid']!=0) {
$username=$bbuserinfo['username'];
eval("\$welcome = \"".gettemplate('home_welcome')."\";");
eval("\$logincode = \"".gettemplate('home_logout')."\";");
eval("\$buddy = \"".gettemplate('home_buddy1')."\";");

} else {
eval("\$welcome = \"".gettemplate('home_unregwelcome')."\";");
eval("\$logincode = \"".gettemplate('home_login')."\";");
$buddy = "";
}

$activeusers = "";
$loggedinusers = "";
if ($displayloggedin) {
$datecut=time()-$cookietimeout;

$loggedins=$DB_site->query_first("SELECT COUNT(*) AS sessions FROM session WHERE userid=0 AND lastactivity>$datecut");
$numberguest=$loggedins['sessions'];

$numbervisible=0;
$numberregistered=0;

$loggedins=$DB_site->query("SELECT DISTINCT session.userid,username,invisible,usergroupid
FROM session
LEFT JOIN user ON (user.userid=session.userid)
WHERE session.userid>0 AND session.lastactivity>$datecut
ORDER BY invisible ASC, username ASC");
if ($loggedin=$DB_site->fetch_array($loggedins)) {
$numberregistered++;
if ($loggedin['invisible']==0 or $bbuserinfo['usergroupid']==6) {
$numbervisible++;
$userid = $loggedin['userid'];
if ($loggedin['invisible'] == 1) { // Invisible User but show to Admin
$invisibleuser = '*';
} else {
$invisibleuser = '';
}
if ($loggedin['usergroupid'] == 6 and $highlightadmin) {
$username = "<font color=FONT COLOR FOR ADMIN><b><i>$loggedin[username]</i></b></font>";
} else if (($mod["$userid"] or $loggedin['usergroupid'] == 5) and $highlightadmin) {
$username = "<font color=FONT COLOR FOR MOD><b>$loggedin[username]</b></font>";
} else {
$username = $loggedin['username'];
}
eval("\$activeusers = \"".gettemplate('forumhome_loggedinuser')."\";");
}

while ($loggedin=$DB_site->fetch_array($loggedins)) {
$numberregistered++;
$invisibleuser = '';
if ($loggedin['invisible']==1 and $bbuserinfo['usergroupid']!=6) {
continue;
}
$numbervisible++;
$userid=$loggedin['userid'];
if ($loggedin['invisible'] == 1) { // Invisible User but show to Admin
$invisibleuser = '*';
}
if ($loggedin['usergroupid'] == 6 and $highlightadmin) {
$username = "<font color=COLOR FOR ADMIN><b><i>$loggedin[username]</i></b></font>";
} else if (($mod["$userid"] or $loggedin['usergroupid'] == 5) and $highlightadmin) {
$username = ""<font color=COLOR FOR MOD><b>$loggedin[username]</b></font>";
} else {
$username = $loggedin['username'];
}
eval("\$activeusers .= \", ".gettemplate('forumhome_loggedinuser')."\";");
}
}
$DB_site->free_result($loggedins);

$totalonline=$numberregistered+$numberguest;
$numberinvisible=$numberregistered-$numbervisible;

$maxusers=explode(" ", gettemplate('maxloggedin',0,0));

Making sure you change the colours for the Admins and Mod's as directed.


Please make sure you backup your file before making this mod, the second part of the code works fine on vBindex 1.0, but hasn't been tested on 1.3. I am not responsible for the outcome.

erdem
04-30-2002, 07:06 PM
after fixing a small typo it gives a error around :

"eval("$activeusers .= "|".gettemplate('forumhome_loggedinuser')."\";"); "

error is : Warning: Unexpected character in input: '\' (ASCII=92) state=1 in and a parse error..

greetz

NTLDR
04-30-2002, 07:10 PM
For some reason it won't diaplay the code correctly and is missing a \ This is what it should be:

eval("\$activeusers .= \", ".gettemplate('forumhome_loggedinuser')."\";");

So just change that eval statement, that should get rid of the parse error.

erdem
04-30-2002, 07:29 PM
no luck... still same colors..
also most user online stuff not working.. :)

NTLDR
04-30-2002, 07:41 PM
If you PM me the vbindex file I will take a look at the code you have.

erdem
04-30-2002, 07:56 PM
also i cant make new messages table addon to vbindex..

why i want this? if u look into my forum, i am using it like file database,document database and so on..

i want to make additional 3 tables like latest files,documents and blabla

but noluck.. i create new template.. edit thread code but i didnt show anything.. any idea?

NTLDR
04-30-2002, 08:16 PM
Hi,

I PM'ed you the update file, I hope it works, incase ayone else is wondering about this and has this hack installed here is the code:

// Afterburners Colored OnlineUserHack Start
if ($loggedin['usergroupid'] == 6 and $highlightadmin) {
$username = "<b><i><font color=#ff0000>$loggedin[username]</font></i></b>"; // Color for Admin
} else if (($loggedin['usergroupid'] == 5) and $highlightadmin) {
$username = "<b><font color=#8b0000>$loggedin[username]</font></b>"; // Color for Supermod
} else if (($mod["$userid"]) and $highlightadmin) {
$username = "<b><font color=#008000>$loggedin[username]</font></b>"; // Color for Mod
} else {
$username = "<font color=#0000ff>$loggedin[username]</font>"; // Color for normal Member or "Highlight Admin" is turned of
}
eval("\$activeusers = \"".gettemplate('forumhome_loggedinuser')."\";");
}

while ($loggedin=$DB_site->fetch_array($loggedins)) {
$numberregistered++;
$invisibleuser = '';
if ($loggedin['invisible']==1 and $bbuserinfo['usergroupid']!=6) {
continue;
}
$numbervisible++;
$userid=$loggedin['userid'];
if ($loggedin['invisible'] == 1) { // Invisible User but show to Admin
$invisibleuser = '*';
}
if ($loggedin['usergroupid'] == 6 and $highlightadmin) {
$username = "<b><i><font color=#ff0000>$loggedin[username]</font></i></b>"; // Color for Admin
} else if (($loggedin['usergroupid'] == 5) and $highlightadmin) {
$username = "<b><font color=#8b0000>$loggedin[username]</font></b>"; // Color for Supermod
} else if (($mod["$userid"]) and $highlightadmin) {
$username = "<b><font color=#008000>$loggedin[username]</font></b>"; // Color for Mod
} else {
$username = "<font color=#0000ff>$loggedin[username]</font>"; // Color for normal Member or "Highlight Admin" is turned of
}
// Afterburners Colored OnlineUserHack End

Hopefull this will work ;)

I am affraid I haven't installed the addons at the moment, but I may try in the future.

erdem
05-01-2002, 03:56 PM
NTLDR tnx!

i fixed some more bugs in codes..
i think its because of my modified vbindex..

also i remove most user online update in code.. so its show only online users and not try to update muo thing..

tnx!

hmm i want to add more tables.. like newer msgs from some forums.. how to that? add new templates and codes..
like threads stuff right?

NTLDR
05-01-2002, 04:12 PM
No problem, gald I could help you out.

To the latest threads from specific forums you need to change and add in again the news code, but this will add alot of extra queries to the page and I wouldn't recommend atting to much more.

As you alrady have 50 queries on that page I wouldn't add any more, I belive around 30 is the max that you want to have for any page!

erdem
05-01-2002, 05:46 PM
hmm... anyway i will try and see what i have ;)

JoeHarrison
05-01-2002, 06:07 PM
el3m3nt,

In your English distribution, the home_threadbit template needs to be updated. I think you just missed translating one thing because it says 'Last Post 05-01-2002 05:05 PM
von Joe'. No biggie... just thought I'd metion it.

Thanks,
Joe

FlyingDutchman
05-02-2002, 05:51 AM
Originally posted by neuron
guess it's becouse of database size or something...

I'll see if I can test a little to find out what it is.

Becouse that ONE query takes 12 seconds, if I take away that the rest goes in 0 sec's :)

// edit

It's the LEFT JOIN that does it, it's a major performance hit in mysql, I'll post more info if I can find a solution.

(adding indexes will probably speed it up to about 0sec per query ;) )

//edit2

if you have a fairly new mysql server (connect to it and confirm that the query works) replace the LEFT JOIN with INNER JOIN, my results on a 1.4ghz tbird, big database:

INNER JOIN:
1 row in set (0.01 sec)
LEFT JOIN:
1 row in set (50.18 sec)

output is identical of course

:)

Were you talking to me? I mean, i have no f*cking idea were you are talking about :(
My database should be ok, and the server has 2x 800 mhz PIII... the latest threads do show up, but the news and the poll just don't :(

I can't give you guys and URL, because it's in a private network...
I really need to get this hack to work :(

NTLDR
05-02-2002, 08:26 AM
Originally posted by FlyingDutchman
I can't give you guys and URL, because it's in a private network...
I really need to get this hack to work :(

Put this into the address bar: http://urltoyourforums/vbindex.php?explain=1

Where: urltoyourforums is the URL to where the vbindex file is and vbindex.php is the vbindex file.

At the bottom of the page you will see something similar to:

Page generated in 0.22719204425812 seconds with 15 queries,
spending 0.039559841156006 doing MySQL queries and 0.18763220310211 doing PHP things.

Can you post those results here?

FlyingDutchman
05-02-2002, 09:28 AM
the result:

Page generated in 1.0316380262375 seconds with 40 queries,
spending 0.051961898803711 doing MySQL queries and 0.97967612743378 doing PHP things.

FlyingDutchman
05-02-2002, 09:43 AM
This sucks :( I got the news showing up:

$newsforum=3

I posted a thread in Forum #5 and it shows up?!?
I posted a thread in Forum #1 and set $newsforum to 1 and nothing shows up?!?

el3m3nt
05-02-2002, 03:36 PM
FlyingDutchman, perhaps something wrong with the forumpermissions? if forum #1 doesnt work.. just use a forum which works.. if theres no other solution...

JoeHarrison, thanks.. yap a little typo. ahm.. perhaps i'll release version 1.4 with some fixes.

Bad Bunny
05-04-2002, 04:37 AM
Ok...I followed the instructions, and I have an error on line 403, which just HAPPENS to be "?>" without the quotes of course.
Anyway...I don;t see how this could work since I am renaming the index file of vb...so when ever going to the root, you will be goiong to the portal. That seems...odd. never the less, I would really like to get something running like this. I guess I am jut brain dead or something.
Any help would be apreciated.

netman
05-04-2002, 04:38 AM
I am currently out of the office and will return on Tuesday, May 7th.

Frank

FlyingDutchman
05-04-2002, 05:41 AM
I finnaly got it to work... I just did a plain install of Vb and VbIndex and now it works great!
anyway, can anyone help me please with this:

I want: To show up the left-menu on the forums page
What I did: I put this line: eval("\$left = \"".gettemplate('home_left')."\";"); just at the end of index.php and added home_left to the '$templatesused-list'

I thought that it would show up now when I would include $left somewhere in the header... but it doesn't?!? what am I doing wrong? (did I edit the wrong file or something?!?)

thanks in advance for your help,

wintz
05-04-2002, 08:30 AM
Originally posted by Bad Bunny
Ok...I followed the instructions, and I have an error on line 403, which just HAPPENS to be "?>" without the quotes of course.
Anyway...I don;t see how this could work since I am renaming the index file of vb...so when ever going to the root, you will be goiong to the portal. That seems...odd. never the less, I would really like to get something running like this. I guess I am jut brain dead or something.
Any help would be apreciated.
I had the same error see Here (https://vborg.vbsupport.ru/showthread.php?s=&threadid=37021&perpage=15&display=&pagenumber=11) for what fixed it for me it might help you

NTLDR
05-04-2002, 06:48 PM
Originally posted by Bad Bunny
Ok...I followed the instructions, and I have an error on line 403, which just HAPPENS to be "?>" without the quotes of course.
Anyway...I don;t see how this could work since I am renaming the index file of vb...so when ever going to the root, you will be goiong to the portal. That seems...odd. never the less, I would really like to get something running like this. I guess I am jut brain dead or something.
Any help would be apreciated.

Bad Bunny, make sure that there is nothing after the "?>" ie make sure that the > is the last character of the file and there are no lines after it and no spaces, I think this is what is causing the problem.

TECK
05-05-2002, 12:20 AM
element, you have 57queries on your page. that means your server on the red line. everything over 40 is bad.

erdem
05-05-2002, 04:46 AM
another 57 on me :)

el3m3nt
05-05-2002, 09:12 AM
Originally posted by nakkid
element, you have 57queries on your page. that means your server on the red line. everything over 40 is bad.

nakkid, visit this link: http://partylife.ch/index.php?action=getactive&numthreads=30
you get 106 queries without any problems. the server is located in the us. so you should have the faster connection then i have :).

TECK
05-05-2002, 09:56 AM
this is incredible... i hope you know that your server is exploding only with 20-30users... at 108queries.
if i would be you, i would reduce those queries. if your site is getting busy, i guarantee you that your current host will cancel your account. you could fry their server every day at this rate. just a friendly advice.
just for fun, what is the server load you get in average? 5, 6, 7? what value? i'm curious... let me know please.

el3m3nt
05-05-2002, 02:50 PM
ehm.. about 3.5!

well.. i know nakkid.. thanks for your advice :). the point is.. that i dont expect that the site is getting busy :).
hmm.. i dont think my host would cancel my account.. first he would kill me ;). no i hope not :D. well i get this server for free.. and i'm very happy with it.. even if its not the fastest i could get :).

FlyingDutchman
05-05-2002, 02:59 PM
Originally posted by FlyingDutchman
I finnaly got it to work... I just did a plain install of Vb and VbIndex and now it works great!
anyway, can anyone help me please with this:

I want: To show up the left-menu on the forums page
What I did: I put this line: eval("\$left = \"".gettemplate('home_left')."\";"); just at the end of index.php and added home_left to the '$templatesused-list'

I thought that it would show up now when I would include $left somewhere in the header... but it doesn't?!? what am I doing wrong? (did I edit the wrong file or something?!?)

thanks in advance for your help,

nobody can help me with this?
I don't know where to go else to get some help? :(

el3m3nt
05-05-2002, 05:00 PM
ehm.. flyingdutchman..

$templateused list.. just reads the templates in a cache memory.
the home_left is already loaded in the original vbindex file. you just have to put the $left where ever you want in the 'home' template. (sorry for my english.. i just don't know to translate this correctly :()

hope this helped you. if not... just ask :).

NTLDR
05-05-2002, 05:53 PM
Originally posted by FlyingDutchman


nobody can help me with this?
I don't know where to go else to get some help? :(

I had a look, but I couldn't get this to work I'm afraid. It is either, the forums index.php or global.php that needs to be editied, take a look at the vbportal code, that may help you as it has a left menu in the forums option.

FlyingDutchman
05-06-2002, 04:42 AM
Originally posted by NTLDR


I had a look, but I couldn't get this to work I'm afraid. It is either, the forums index.php or global.php that needs to be editied, take a look at the vbportal code, that may help you as it has a left menu in the forums option.

Ok, I'll look at that then :)

Originally posted by el3m3nt


ehm.. flyingdutchman..

$templateused list.. just reads the templates in a cache memory.
the home_left is already loaded in the original vbindex file. you just have to put the $left where ever you want in the 'home' template. (sorry for my english.. i just don't know to translate this correctly )

hope this helped you. if not... just ask .

hmm, I think you don't understand me... I want it to show up on the index.php page from vB, next to my forums...

FlyingDutchman
05-06-2002, 05:15 AM
I found it out... It needs to be in global.php instead of index.php :)
now it works... :D
thx anyway for your help guys...

FlyingDutchman
05-06-2002, 05:31 AM
it's working well, except I don't know where to put the other variables and vb code... like this:

// pm
// -------------------------
$newpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND dateline>$bbuserinfo[lastvisit] AND folderid=0");

if ($bbuserinfo['userid']!=0) {
$username=$bbuserinfo['username'];
eval("\$logincode = \"".gettemplate('home_logout')."\";");
eval("\$buddy = \"".gettemplate('home_buddy1')."\";");

} else {
eval("\$logincode = \"".gettemplate('home_login')."\";");
$buddy = "";
}


i tried putting it in index.php and global.php but it doesn't work :(
I'll try to find some code in index.php where I can just insert some lines of this code... I think that should work, but I don't like searching :(

boiboi
05-06-2002, 08:59 AM
i did everything per instruction but i get a blank screen. my forums is installed in root and so is the new index.php and the old was renamed to home.php. home.php works just fine. is it the templates not showing up?

ZiRu$
05-06-2002, 08:30 PM
thanks! This hack looks good I'll install it this weekend

boiboi
05-07-2002, 02:45 AM
this is what shows up when i view source

<!-- BEGIN TEMPLATE: home -->

<!-- END TEMPLATE: home -->

NTLDR
05-07-2002, 06:22 PM
Originally posted by boiboi
this is what shows up when i view source

<!-- BEGIN TEMPLATE: home -->

<!-- END TEMPLATE: home -->

Have you created and enterd the HTML into the home template?

Bad Bunny
05-09-2002, 02:28 AM
Ok, I get a completely blank screen.
??

Disturbed
05-09-2002, 04:06 AM
you get a blank screen cos unlike vBHome this hack only works in your forums directory and not the root directory...

boiboi
05-09-2002, 04:41 PM
Originally posted by NTLDR


Have you created and enterd the HTML into the home template?

Yes I have.

NTLDR
05-09-2002, 06:08 PM
Originally posted by Disturbed
you get a blank screen cos unlike vBHome this hack only works in your forums directory and not the root directory...

Wrong

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

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

Above:

require("global.php");

Disturbed
05-09-2002, 06:15 PM
i did try that b4, but it didn't work thats why i'm using vBHome :rolleyes:

N9ne
05-09-2002, 07:06 PM
This hack sounds awesome! Easy installation, great options, I WILL DEFINITELY install this hack! Thanks El3m3nt!

Ordovicium
05-09-2002, 09:45 PM
Thanks works great on 2.2.5

The only thing: I will remove the Notpad Link on the main page, but I could not find it.

NTLDR
05-09-2002, 10:44 PM
Originally posted by Disturbed
i did try that b4, but it didn't work thats why i'm using vBHome :rolleyes:

If its set up properly it will ;)

NTLDR
05-09-2002, 10:45 PM
Originally posted by Ordovicium
Thanks works great on 2.2.5

The only thing: I will remove the Notpad Link on the main page, but I could not find it.

Its most likly to be in either home_left or home_loggedin or something similar, click on search under the templates section on the Admin CP menu and type notpad, that will find the culprit :D

FlyingDutchman
05-10-2002, 07:45 AM
home_logout is the right template ;)

Ordovicium
05-10-2002, 09:28 AM
Originally posted by FlyingDutchman
home_logout is the right template ;)

Yes, thanx. I searched all the time in home_left. And the Search-Engine didn't find it under home_logout.

el3m3nt
05-10-2002, 03:13 PM
hehe Ordovicium.. nice sig ;)

von mir aus k?nnen wir schon deutsch sprechen auf vb.org.. sofern niemand was dagegen hat? :)

FlyingDutchman
05-10-2002, 04:41 PM
Originally posted by el3m3nt
hehe Ordovicium.. nice sig ;)

von mir aus k?nnen wir schon deutsch sprechen auf vb.org.. sofern niemand was dagegen hat? :)

i have something against it!
let's all speak our own language! w00t, this place will get messy! :p :bunny:

boiboi
05-11-2002, 04:10 AM
adding chdir above required didn't work so I moved everything back inside the forums dir. now this is what appears when i view source

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>

Decoder
05-14-2002, 07:57 AM
i am completly lost here
can someone please give me a hand?


+-----------------------------------------------------------------------+
| Instructions for the new index.php |
+-----------------------------------------------------------------------+

1. Open the file and edit the variables at the top of the file.

2. Open the original vBulletin index.php and look for..

$activeusers = "";
$loggedinusers = "";

till

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

[Line 138-211] pay attention! take exactly this code! copy this code with Ctrl+C.

3. In the new index.php look for..

// add here the vBulletin code of the original index.php

and replace it with the code you took out of the original index.php above.

NTLDR
05-14-2002, 04:46 PM
Which part(s), are you stuck with?

In the file, the term "new index.php" refers to the file called index.php in the vbindex zip.

Basicly you need to copy some code from your forums/index.php file into the php file that came with vBindex. (Due to copyright reasons, which is why it hasn't already been done.)

Decoder
05-14-2002, 06:44 PM
i dont know what code to copey

"Open the original vBulletin index.php and look for..

$activeusers = "";
$loggedinusers = "";

till

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

[Line 138-211]"

this confuses me

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:
$activeusers = "";

And line 211 should have:
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
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:
<td bgcolor="{secondaltcolor}"><normalfont><img src="{imagesfolder}/icons/icon$icon.gif" border="0"> <b>$newstitle</b></normalfont></td>

but it should contain:
<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 (http://www.pinkfloydfan.net).

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
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
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 (http://forums.ukwnetwork.com/home.php?referrerid=2)? 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
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:

// 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:

]// 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:

$avatarimage

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

NTLDR
06-09-2002, 06:10 PM
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
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:

$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
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:
$activeusers = "";
or similar and copy to a line like:
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)

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

With:

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

You can change:

$page

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

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
Originally posted by NTLDR


Wrong

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

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

Above:

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

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

And add after it:

// 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:

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

And Add After It:

[php]//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:

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

Right Before:

//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:

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

And change PLACE3 as you did above.

NTLDR
06-16-2002, 07:22 PM
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
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
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.

LearningMan
06-21-2002, 08:47 PM
Thank you sir. Just overlooked it twice...

bandersen
06-21-2002, 09:41 PM
Hi, I would like to look into this... I tried to download version 1.3 in post 1, but it seems to be empty.

CannonFodder
06-22-2002, 01:07 AM
i got the blank screen fixed, but how in gods name do i submit news? it lets me do the polls, but i cant do the news!

CannonFodder
06-22-2002, 02:49 AM
okay, i got everything working - only thing i want to know now is how can i get to nav bars (on on each side) instead of just the one on the left?

CannonFodder
06-22-2002, 03:48 AM
i`m sorry, i`m such a n00b at this stuff, i dont know how to do anything... i put the right box on my vb index ($right) and it says Add here whatever you want :).
so, how do i add what ever i want there?

NTLDR
06-22-2002, 08:38 PM
You need to edit the template home_right to replace that text and have something usefull there ;)

CannonFodder
06-22-2002, 08:54 PM
yes i figured it our last night - thanks anyways!

Royal
06-23-2002, 02:07 PM
great hack

but i found an ''bug'' (not sure)

when i go to who's online and a user is at the index i get :
location
Unknown Location: /forum/main.php?

how to fix this ?

NTLDR
06-23-2002, 04:07 PM
Originally posted by Royal
great hack

but i found an ''bug'' (not sure)

when i go to who's online and a user is at the index i get :
location
Unknown Location: /forum/main.php?

how to fix this ?

Thats exactly what ir should say.

Please read the thread for info on how to change this.

Vinney
06-23-2002, 04:41 PM
mine dont work too good :(

any ideas ??

http://forum.peugeot-gti.net/home.php

SONOFSAM
06-25-2002, 12:21 PM
a few problems im having:

i installed vbindex 1.3 but still getting the problem where my private forum titles are being shown. users are unable to view the thread, but still see title.

when the users vote it takes the to the actual post on the forum, is there a way to keep the on the home page?

also, when i try to select to see more thread it takes me to my forum. how do i keep when i hit "go" to stay on the home page?

Enjoy Marcus
07-05-2002, 06:06 PM
how would i go about taking the latest threads part, and actually placing them on my forum home?

also is their a way of makign the polls random, selecting them from the polls postes in the poll forum? thanks, nice hack btw.

WoodiE
07-05-2002, 07:57 PM
well i have it installed now, but how the heck do i goto the forum itself? www.rcnitrotalk.com is where i have installed it. I cant seem to get a view of the forum as if it wasnt installed. Can I still do that or does this mod take over completly.

If i use the pull down menu I can access the forums one by one but i cant seem to see all of them at once, why not?


WoodiE

MalaK_3araby
07-07-2002, 09:11 PM
Hi there.

Great Hack i say ... me and my ppl are so happy with it.
Goof Job & Many Thanks.

I do not wnat to edit the template manually for update,
is there a way to have the right cell display contents of an external html file?

Kars10
07-11-2002, 09:00 PM
Hello guys!!
Please help im in big Trouble!! I want to install this hack (V.1.2) and there major Problems i cant fix.
I doing all in the instruction file stands, but im getting a f*** parse error "Parse error: parse error in /homepages/15/d13391396/htdocs/forum/index2.php on line 348"
i named the new index "index2.php.
Please help me, i want this hack!!!! :confused:

Steph2k
07-15-2002, 04:12 PM
Great Hack! But I do have a really teeny prob I cant figure out. In the news section, the icons aren't showing up for me.

Steph

NTLDR
07-15-2002, 05:21 PM
Originally posted by Steph2k
Great Hack! But I do have a really teeny prob I cant figure out. In the news section, the icons aren't showing up for me.

If you read through the thread you will find the fix for this.

Vinney
07-15-2002, 08:59 PM
i've got my vbhome working !! looking rather good.

i have a slight problem, i wish to add $avatarimage to my home_logout template .... but it does not work when i do so.

But it does work if i place it in the left template .... why is this ?? Why will $avatarimage work in a one template and not another ?

http://forum.peugeot-gti.net/home.php

Vinney
07-15-2002, 09:25 PM
btw, also my vbhome is running 56 queries .... is this high ... and if so, why ?

go to http://forum.peugeot-gti.net/home.php and look at the footer of the page for more info.

Cheers.

NTLDR
07-15-2002, 09:59 PM
Originally posted by Vinney
i've got my vbhome working !! looking rather good.

i have a slight problem, i wish to add $avatarimage to my home_logout template .... but it does not work when i do so.

But it does work if i place it in the left template .... why is this ?? Why will $avatarimage work in a one template and not another ?

http://forum.peugeot-gti.net/home.php

Is it vBhome or vBindex you have? If its vBhome then this is the wrong thread.

57 is a high number of queries, you want to try and keep it bellow 30 for optimal performance, if you don't have many conncurrent visitors though it doesn't matter to much.

Steph2k
07-16-2002, 08:47 PM
Hmmm. I did this but it does not seem to be working for me. Any other ideas?

Steph

Originally posted by NTLDR
OK, I have removed the folloing code from the file and at the moment it seems to be working correctly.

Either remove (or comment out each line with // ):
// today online hack by Mystics - start
if ((int)$maxusers[0] <= $totalonline) {
$time = time();
$maxloggedin = "$totalonline " . $time . " " . $maxusers[2] . " " . $maxusers[3];
$DB_site->query("UPDATE template SET template='$maxloggedin' WHERE title='maxloggedin'");
$maxusers[0] = $totalonline;
$maxusers[1] = $time;
}

$todayloggedinusers = "";
$numbertodayonline = 0;
$numbertodayonlineinvisible = 0;

$todayusers=$DB_site->query("SELECT userid, username, usergroupid, lastactivity, invisible FROM user
WHERE lastactivity > " . mktime(0,0,0,date("m"),date("d"),date("Y")) . "
ORDER BY username");
while ($todayuser=$DB_site->fetch_array($todayusers)) {
$numbertodayonline++;
if ($todayuser['invisible']==1 and $bbuserinfo['usergroupid']!=6) {
$numbertodayonlineinvisible++;
continue;
}
}

$DB_site->free_result($todayusers);

if ($bbuserinfo[usergroupid] == 6) {
$todayonline = $numbertodayonline;
} else {
$todayonline = $numbertodayonline - $numbertodayonlineinvisible;
}
//today online hack by Mystics - end

The downside to this is that you can't display the number of registered users logged in today on the vBindex page, so you also need to remove (or comment out):

<a href="online.php?s=$session[sessionhash]">Online Today</a>: <b>$todayonline</b><br>

From the template home_left

Let me know if this works for you, it seems to for me at the moment :D

NTLDR
07-17-2002, 12:00 PM
Originally posted by Steph2k
Hmmm. I did this but it does not seem to be working for me. Any other ideas?

That should do the job, its worked perfectly for me since I made that modification to my forums. I would guess that its something else that is causing the problem.

Vinney
07-17-2002, 12:43 PM
Originally posted by NTLDR


Is it vBhome or vBindex you have? If its vBhome then this is the wrong thread.

57 is a high number of queries, you want to try and keep it bellow 30 for optimal performance, if you don't have many conncurrent visitors though it doesn't matter to much.


sorry i have vbindex ...... the one on this thread. why is my vbindex running so many queries ???

NTLDR
07-17-2002, 01:03 PM
Originally posted by Vinney
sorry i have vbindex ...... the one on this thread. why is my vbindex running so many queries ???

Because of all the stuff you have displayed on the page, the only way to reduce the number of queries is to remove sections of the code, like news, latest threads, polls etc.

Spingo
07-19-2002, 09:38 AM
Great mod peoples. I have successfully got it running rather smoothly in the directory below my forums (the hack is installed in /, the forums under /forums). I just have one problem though... (of course I do, otherwise I wouldn't be writing this)

If I write a post in the news forum like:This is written on the first line.

This is written on the third line, and there is a blank line between this and the first line.it shows on the vbindex page as:This is written on the first line. This is written on the third line, and there is a blank line between this and the first line.ie., the line breaks appear in the post, but not on the vbindex page.

This is the only lil minor problem that I'm having at the moment. I've tried looking in the vbindex.php file, and from what I can see, the following three lines get the post from the database:$getnews=$DB_site->query_first("SELECT * FROM post WHERE threadid='$newsthreadid' ORDER BY postid ASC LIMIT 1");
$newstext=bbcodeparse($getnews[pagetext],$newsforum,1);
$newstext=str_replace("<br />","",$newstext);

Has anyone been able to get line breaks to appear in the vbindex page? If so, how did you do it?

Also, with the amount of codefixes and ammendments that have been made since the v1.3 release, are we likely to see v1.4 soon?

NTLDR
07-19-2002, 04:57 PM
Originally posted by Spingo
This is the only lil minor problem that I'm having at the moment. I've tried looking in the vbindex.php file, and from what I can see, the following three lines get the post from the database:

Remove this line to allow line breaks in the newsblock

$newstext=str_replace("<br />","",$newstext);

Also, with the amount of codefixes and ammendments that have been made since the v1.3 release, are we likely to see v1.4 soon?

I have no idea if el3m3nt is supporting or going to release a new version of this hack, he doesn't seem to post much in this thread, I may see about releasing a new version if he isn't going to and theres any interest.

iblis
07-23-2002, 05:17 PM
OMG! my site is SO slow with vBindex..

take a look: http://www.freakforum.nu/index.php

takes up to one minutte to load.. whats wrong?

please help, its a bussy norwegian site! ;)

NTLDR
07-23-2002, 09:28 PM
Page generated in 26.07498503 seconds (0.43% PHP - 99.57% MySQL) with 65 queries.

This is why its so slow, the main page has 65 queries on it. You will need to remove some functions from your vbindex PHP file to reduce the number of queries and thus speeding up the load time of the page.

iblis
07-24-2002, 05:21 AM
NTLDR: ahh.. thanks.. I removed the polls from index.php and the templates.. works perfect now! ;)

love this hack! :)

btw NTLDR, you know of a easy way to add the avatar on the user on the index page?

Ninth Dimension
07-24-2002, 10:20 AM
Hi all, i've just installed this hack here (http://theice.co.uk/forum/home.php) (soon to be here (http://gamevine.co.uk/forum/home.php)), and so far it's looking really good.

What I want to do, once i've moved the forum to GameVine.co.uk is use this file in the root directory rather than the forum dir, what would I need to change in order for this to be possable?

Cheers (sorry if this quistion has already been asked, but over 300 posts is a bit too much to track though)

iblis
07-24-2002, 10:39 AM
Originally posted by danielhollands
Hi all, i've just installed this hack here (http://theice.co.uk/forum/home.php) (soon to be here (http://gamevine.co.uk/forum/home.php)), and so far it's looking really good.

What I want to do, once i've moved the forum to GameVine.co.uk is use this file in the root directory rather than the forum dir, what would I need to change in order for this to be possable?

Cheers (sorry if this quistion has already been asked, but over 300 posts is a bit too much to track though)

just add:

chdir("/home/yoursite/forum");

above "require('./global.php');" in vbindex index.php file..

then add "/forum" on all the url's in the vbindex templates :)

ps: sorry for my bad english..

Ninth Dimension
07-24-2002, 11:19 AM
Hi, thank you for this, it works fantasticly (i just put in chdir("./forum"); rather than the whole path)

I do have another problem, voting on the poll does not work, I get the following error message:The action you have attempted could not be performed as your session appears to be invalid. Click the below link to attempt this action again with a new session.(Yet again, i'm sorry if this question has been answered, but like i said before, 300 posts in a little too much to read though)

Cheers again.

NTLDR
07-24-2002, 05:49 PM
Originally posted by danielhollands
I do have another problem, voting on the poll does not work, I get the following error message:(Yet again, i'm sorry if this question has been answered, but like i said before, 300 posts in a little too much to read though)

Indeed this has been fixed somewhere in this thread, I'm going to contact el3m3nt and see if I can release a new version with all the bug fixes and maybe somemore features soon.

From memory you should have this line in the home_poll template:

<input type="hidden" name="s" value="$session[sessionhash]">

Which needs to be changed to:

<input type="hidden" name="s" value="$session[dbsessionhash]">

To be able to vote correctly.

NTLDR
07-24-2002, 05:52 PM
Originally posted by iblis
btw NTLDR, you know of a easy way to add the avatar on the user on the index page?

The way I have done this is to use the welcome panel hack that is avalible for your forums and applied it to the front page, take a look at mysite for an example. Is that the kind of thing you wanted?

Ninth Dimension
07-24-2002, 07:07 PM
Thank you for the advice, i'll be looking foward to any new releases of this hack :)

NTLDR
07-24-2002, 08:49 PM
No problem ;)

I've contacted el3m3nt regarding a new (or updated) realease of this hack and am wating to hear back from him.

iblis
07-26-2002, 06:00 AM
NTLDR: I used the code from the "welcome panel" to.. but my index.php is not in the /forum directory..

so the avatar image gets broken, pointing to www.domain.com/avatar.php ..

the correct url would be www.domain.com/forum/avatar.php ..

but I cant find the <a> to fix it :(

Ninth Dimension
07-26-2002, 06:42 AM
I found the only way to solve this problem was to edit the {imagesfolder} patch in the replacements section of the admin.

Try that :)

iblis
07-26-2002, 11:24 AM
huh? /vbimages?

Grower
07-26-2002, 05:17 PM
I highly recommend everybody using this hack to install also "Thread Preview Hack". Some level of data redundancy is the only way to go with this kind of hack. Then you can remove extra queries in loop (putting query into a loop is always the worst solution and should be avoided).

For those who have installed this hack and have also "firstpostid" column in thread table here is code you can use for pulling news:

// news by nakkid (modified)
// -------------------------
$newsquery=$DB_site->query("SELECT thread.threadid,thread.title,thread.dateline,threa d.postusername,thread.postuserid,
thread.replycount,thread.iconid,post.pagetext,icon .title AS icontitle,icon.iconpath
FROM thread
LEFT JOIN post ON thread.firstpostid = post.postid
LEFT JOIN icon ON icon.iconid = post.iconid
WHERE forumid='$newsforum' ORDER BY thread.dateline DESC LIMIT $newsposts");
while ($news=$DB_site->fetch_array($newsquery)) {
$newsthreadid=$news[threadid];
$newstitle=$news[title];
$newstime=vbdate($timeformat,$news[dateline]);
$newsdate=vbdate($dateformat,$news[dateline]);
$newsusername=$news[postusername];
$newsuserid=$news[postuserid];
$comments=$news[replycount];

$newstext=bbcodeparse($news[pagetext],$newsforum,1);
$newstext=str_replace("<br />","",$newstext);

if ($news[iconid]=='0') {
$news[icontitle]="";
$news[iconpath]="https://vborg.vbsupport.ru/images/icons/icon.gif";
}

eval("\$newsbits .= \"".gettemplate('home_newsbit')."\";");
}

eval("\$news = \"".gettemplate('home_news')."\";");

Also there is an error on first few lines where templatesused string is filled (missing commas) which caused extra queries. Here is fixed code:

$templatesused='error_nopermission,home,home_buddy 1,home_buddy2,home_footer,home_header,home_headinc lude,home_left';
$templatesused.=',home_login,home_logout,home_news ,home_newsbit,home_nothreads,home_poll,home_pollre sult,home_right';
$templatesused.=',home_threadbit,home_threads,foru mhome_loggedinuser,forumhome_loggedinusers,maxlogg edin';

This thread is so long that I hope I'm not reposting something already fixed :)

NTLDR
07-26-2002, 05:43 PM
Originally posted by iblis
NTLDR: I used the code from the "welcome panel" to.. but my index.php is not in the /forum directory..

so the avatar image gets broken, pointing to www.domain.com/avatar.php ..

the correct url would be www.domain.com/forum/avatar.php ..

but I cant find the <a> to fix it :(

You need to change the follwoing:

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>';
}

Change the paths for guestavatar.gif and noavatar.gif, also change the href's for member.php and register.php (you can use $bburl to point to your forums directory). You also need to change:

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

To:

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

The last change should work but is untested.

NTLDR
07-26-2002, 06:06 PM
Originally posted by Grower
Also there is an error on first few lines where templatesused string is filled (missing commas) which caused extra queries. Here is fixed code:

I would also highly recommend everybody does this for all templates that are used in there vBindex, I never got round to doing it properly and have gone through and made sure every template was added and it has saved me 12 queries on my vBindex page, thanks for reminding me to do this ;)

Sigon
07-26-2002, 10:07 PM
i tried the avatar fix and did not get anywhere with it.
www.mediaphorums.com
Any help?

mbaskett
07-28-2002, 09:02 AM
NTLDR:

I've been having the same problems with most users ever online that has been posted about numerous times here. I've sifted through the code extensively, even commented out the Who's online today section of code. Still had the problem, Deleted the code, still had the problem.

I'm still looking into the cause, but the most ever users online works fine until somebody loads home.php, then it reverts the number to however many users are online at that time. :/

Any ideas? I *may have found the problem, or at least something that may lead us to the problem.

When examining the queries that occur just before the update of the template, in home.php I found a query:

Query: SELECT template FROM template WHERE title='maxloggedin' AND (templatesetid=-1 OR templatesetid='5') ORDER BY templatesetid DESC LIMIT 1

Then I looked at the db record for any and all entries in the template table. Found one matching title='maxloggedin' but its templatesetid is -2.

I thought this a bit odd, so I examined the queries around the same update query on the index.php (my forumshome page) and found no similar query.

Now I know that this query is being generated in the ./admin/functions.php file that is called from ./global.php, but I'm wondering why home.php is creating it in the first place, as index.php doesn't, besides the templatesetid's called for in the query don't match the actual id is shows in the db table.

I'm going to keep looking into this, but I'd appreciate any input/suggestions/help you could give, as this 'quirk' is starting to frustrate me....

Thanks,

mbaskett
07-28-2002, 09:35 AM
Okay,

Good news... no, GREAT news... I was going along the lines of thinking in my last post... and edited the record in the templates table to make the 'maxloggedin' record have a templatesetid of -1

I did that edit and then waited on my board for the user count to go up, increase the max users online count, and then for the current number of users online to go below that. Once that happened, I loaded my home.php page, then went back to index.php and it's HOLDING the CORRECT count!!!!!

So, for those of you out there that are having this problem, before you delete the who's onlinetoday code, try this fix and post up if it solves it... It seems to work for me, and I'm going to add the whosonlinetoday code back in to see if it works again... will post results once that's done.

Edit
Have Mystics Whos Online Today hack re-installed and the count seems to be working. Will see how it holds up throughout the week. (we had problems with the onlinetoday count resetting every 24 hours, but I think the db record change will solve that as well.)

I don't know of any adverse effects of making this change. I don't *think* there will be any, but if anyone knows differently, please post up and let me/us know. If I find any, I'll be sure to let eveyone know as well.....

JJR512
07-28-2002, 10:54 AM
The maxloggedin template should have a templatesetid of -2. I also don't know what difference it will make, but that's how it is by default.

I think the problem you all are having is because the index.php file in this hack is missing this:
$loadbirthdays=1;
$loadmaxusers=1;
This needs to be near the top of index.php, just under the $templatesused bits. You'll see it's in vBulletin's own index.php. I've made a similar hack to this one, only I've never released it, and had the same problem with the maxonline record getting reset to the current number whenever someone loaded my home page. Putting those lines in fixed it. It's only the loadmaxusers line that you really need to fix this problem, but you should probably have the loadbirthdays line, too.

mbaskett
07-28-2002, 06:22 PM
Confirmed JJR512: that does work, and I like it much better.... plus it saved me a couple of queries!

EA Junkie
07-28-2002, 07:49 PM
Hmm... I think I followed the instructions correctly, but when I load the new index page it's blank. Just a white screen? Any suggestions... Please...

Thanks in advance!

grooveh
07-30-2002, 11:25 PM
I recently installed this hack and first and foremost, kudos for this meli-melo of hacks. I think you put them together excellently. This really adds a lot to my forum.

I have a couple of questions and am wondering if someone can point me in the right direction here.

1) On the news part, I'd love to be able to only display, say the 1st paragraph of a thread on the home page, with a read full>> button going to the thread with the full article. I've seen a few of the other hacks with something like this, but for the life of me, cant seem to be able to piece them together properly. Is there a simple way to do this, that I'm just missing???

The other thing is that I'm having a devil of a time trying to get some html to post properly when posted on the front page. eg: i put an img src to point to an image. Worked on the actual forum page, but on the front page, all it shows is the code, not the picture.

I would be very grateful to anyone that can help me. I've been beating my head against my desk for a while now trying to get something to work.

Cheers!

countryboy713
07-31-2002, 07:46 AM
i seem to be having a slight problem with this. whenever i try to post news on the front page i get this MySQL error:

Database error in vBulletin 2.2.6:

Invalid SQL: INSERT INTO post (postid,threadid,title,username,userid,dateline,at tachmentid,pagetext,allowsmilie,showsignature,ipad dress,iconid,visible,topic) VALUES (NULL,'5','Site Open!','CoUnTrYbOy','2','1028104984','0','welcome' ,'1','0','IPADDRESS'')
mysql error: Unknown column 'topic' in 'field list'

mysql error number: 1054

Date: Wednesday 31st of July 2002 04:43:04 AM
Script: http://www.digitalkore.net/forums/forums/newthread.php
Referer: http://www.digitalkore.net/forums/newthread.php?s=&action=newthread&forumid=45

i edited out the spot that had my IP and put in IPADDRESS in its place

if anyone can help i'd be extremely greatful.

countryboy713
07-31-2002, 08:56 AM
it will only let me reply to threads, not create any.

NTLDR
07-31-2002, 02:35 PM
Originally posted by countryboy713
it will only let me reply to threads, not create any.

This isn't caused by the vBindex hack and has something to do with when you have edited newthread.php.

You need to find the query thats causing the problem and try removing topic in the query, or check that you have installed the hack that this is for correctly.

NTLDR
07-31-2002, 02:39 PM
Originally posted by EA Junkie
Hmm... I think I followed the instructions correctly, but when I load the new index page it's blank. Just a white screen? Any suggestions... Please...

Thanks in advance!

Did you add all the templates correctly? It sounds like its a template problem you have, check that you have added all the home_ and home templates.

NTLDR
07-31-2002, 02:42 PM
Originally posted by JJR512
The maxloggedin template should have a templatesetid of -2. I also don't know what difference it will make, but that's how it is by default.

I think the problem you all are having is because the index.php file in this hack is missing this:
$loadbirthdays=1;
$loadmaxusers=1;
This needs to be near the top of index.php, just under the $templatesused bits. You'll see it's in vBulletin's own index.php. I've made a similar hack to this one, only I've never released it, and had the same problem with the maxonline record getting reset to the current number whenever someone loaded my home page. Putting those lines in fixed it. It's only the loadmaxusers line that you really need to fix this problem, but you should probably have the loadbirthdays line, too.

Thanks for the fix JJR512, this has been the one thing that has allways bugged me since this hack was released, although it has worked fine for me with just the who's online today hack removed from the vBindex file it hasn't for everyone else and this also cuts the number of queries down by 2.

NTLDR
07-31-2002, 02:46 PM
Originally posted by grooveh
1) On the news part, I'd love to be able to only display, say the 1st paragraph of a thread on the home page, with a read full>> button going to the thread with the full article. I've seen a few of the other hacks with something like this, but for the life of me, cant seem to be able to piece them together properly. Is there a simple way to do this, that I'm just missing???

Can you recall what hacks do use this method? If you can I can take a look at them and I can probably work out how to integrate this into this hack but adding in the code for that function.

Originally posted by grooveh
The other thing is that I'm having a devil of a time trying to get some html to post properly when posted on the front page. eg: i put an img src to point to an image. Worked on the actual forum page, but on the front page, all it shows is the code, not the picture.

HTML to my knowlage will not work on the home page in posts, I think it only parses vB Code and Smiles, this is something I am going to look into for when I re-release this hack as I have el3m3nt's permission to do so now.

mtf169
07-31-2002, 06:18 PM
Do you have a version of this hack with all of the fixes implemented that I've been reading about in previous posts? If not, when do you expect to have the next release set?

NTLDR
07-31-2002, 07:12 PM
Originally posted by mtf169
Do you have a version of this hack with all of the fixes implemented that I've been reading about in previous posts? If not, when do you expect to have the next release set?

I expect to release a new version of this hack in the next couple of weeks with all the fixes and hopefully some new features within the next couple of weeks.

grooveh
07-31-2002, 07:12 PM
Cheers, mate!

I think that Logician's (vportal i think) has that function included. I have seen a few others out there...but none compare to the functionality of the vbindex!

As far as html, if i could find a way to put an image to start the news, and then the news right below it...I'd be as happy as being able to put html in my thread on the home page.

Thanks again!

grooveh
08-01-2002, 08:37 PM
NTLDR: I got that working in my vbindex script today, with a little help from Logician himself! It took a lot of farting around, but I have it integrated now.

What I'd love to see is how to embed photos in the vbindex (say at the beginning of a thread).....do you know any way to do this?

NTLDR
08-01-2002, 09:20 PM
Originally posted by grooveh
What I'd love to see is how to embed photos in the vbindex (say at the beginning of a thread).....do you know any way to do this?

Just use vB Code to insert an image at the start of the thread.

grooveh
08-02-2002, 01:53 AM
Just use vB Code to insert an image at the start of the thread.


Easier said than done. It works fine in the actual forum, but in vbindex, it shows up as a hyperlink to the image, that pops up in a new window when clicked.


Cheers! :laugh:

NTLDR
08-02-2002, 10:17 PM
Originally posted by grooveh
Easier said than done. It works fine in the actual forum, but in vbindex, it shows up as a hyperlink to the image, that pops up in a new window when clicked.

Strange, I thought this worked. Anyway I have this working in the new release of this hack along with the users avatar in the news posts.

grooveh
08-02-2002, 11:39 PM
sounds good.

When are you planning on releasing v. 2.0? I'll be the first to beta it for you. Please let me know. I'm good to go anytime.

NTLDR
08-03-2002, 08:30 PM
I hope to release it in the next two weeks, its built on the core of vBindex 1.3 and includes all the bugfixes a slightly revised layout and a few new fetaures.

Dean C
08-04-2002, 01:36 PM
wicked ! :D

iAlex
08-04-2002, 05:25 PM
Question... I use vbindex just to include the poll on my mainpage, I don't need the rest of the features. And I would like to make the poll question a link to the thread it was posted in but I can't seem to figure out how. Any ideas?

NTLDR
08-04-2002, 11:45 PM
I have just released vBindex v2 in this thread (https://vborg.vbsupport.ru/showthread.php?s=&threadid=41916).

:banana:

Dan
12-31-2002, 01:50 AM
Edit: Sorry wrong thread

salnet
07-17-2003, 01:52 PM
Can you take a look at my page, please?
In the News-Section the threadicons aren't displayed, there is a red cross instead.
In the Latest Threads the icons aren't displayed, too.

Take a look here: http://www.thw-interaktiv.de