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

Mr_P 08-11-2002 09:51 PM

sorry m8 yes was referring to the mini calendar hack.
I can see it if i call it in on a page on its own but cant get it to integrate with vbindex.

NTLDR 08-11-2002 10:33 PM

You need to put:

PHP Code:

include('./filename.php'); 

after the require golbal.php statement.

Add the template for the calendar and then make sure that the calendar php file doesn't output the template but evals it to a variable, eg:

PHP Code:

eval("\$calendar = \"".gettemplate(small_calendar)."\";"); 

ie $calendar instead of dooutput then you just place your variable in this case $calendar in the required template.

DWZ 08-12-2002 01:09 AM

Quote:

Originally posted by NTLDR
After I did this I thought that may be what you wanted, heres the change to vbindex.php which will show the results of the poll for users with the userid 0:
w00t, worked perfectly :D
Quote:

Originally posted by NTLDR
I'll have a look at the logout issue and post here/PM you when its done ;)

great, thanks a million!

atease 08-12-2002 06:20 AM

Quote:

Originally posted by NTLDR

They can be private or public, note that if they are private users can't won't be able to post comments or view the thread ;)

thanks. another question:
like some else said. it takes about ages to load. and i have a lot users (100?) online at the same time.

i'm guessing it's the 'online users' script that might cause, which i don't really need. can i ditch that left column? or maybe ditch everything except for the display of the actual news stories? (i don't need the welcome box either)

i'd like to use it a php include on my news page.

any help would be appreciated.

(excellent hack btw, just needed to say that)

NTLDR 08-12-2002 09:00 AM

Quote:

Originally posted by atease
like some else said. it takes about ages to load. and i have a lot users (100?) online at the same time.
I belive its the poll code that is causing the high load time, try removing that section.

Quote:

i'd like to use it a php include on my news page.
All you need to do is make sure that you have the section with the news code and that in your news page or the vBindex file that you require golbal.php

atease 08-12-2002 11:51 AM

that worked. thank you very much.

but i can't get rid of that 'welcome' table

NTLDR 08-12-2002 02:52 PM

Quote:

Originally posted by atease
but i can't get rid of that 'welcome' table
You need to remove the HTML in the home template.

atease 08-12-2002 02:58 PM

doesn't this remove the welcome message + stats from vbulletin?

NTLDR 08-12-2002 03:12 PM

The home and home_ templates have nothing to do with vBulletin, there all for vBindex so removing that HTML won't effect your forums home page.

atease 08-12-2002 07:01 PM

thanks again.

one more thing (i know: again!):

the news forum is now private. i underdstand that it has to be public to let people post replies, but can i keep people from posting new threads? cause that's not what i want:)

NTLDR 08-12-2002 07:17 PM

Just change the forum permissions in the Admin CP for the usergroups that you don't want to post new threads.

Rose 08-12-2002 09:15 PM

Thanks for the hack! I recently switched from vbhome_lite becuase it's not supported anymore. :(

This seems to be working great. However, I have a few questions.

1.) I'd like for the members to return to the index.php after a)logging in/logging out and b)voting (instead of returning to the poll). I think this is possible with a login.php code you mentioned a page or two back? Could I get this?

2.) In the last posts column - is there a way to hide private forums?

I'm sure I'll have more, but this is all for now. I'm having fun with it all. :D

Edited to say:

Also, I don't really need the who's online bit on the index page. I suppose I can remove this - is it in a template or the index.php?

Mr_P 08-12-2002 09:33 PM

pretty hard this really as aint sure which thread to put it in as it involves 2 hacks.

Is it possible to get the shoutbox from the main Indexpage to show on the VBindex page and in a column ?????

Like most portals have.

Rose 08-12-2002 10:14 PM

Also, if a person isn't logged in - they see two login boxes (one in the welcome panel and one in the left-column). Is there a way to remove the log in box in the left-column, basically either showing the stats or showing nothing and skipping to the online now users?

NTLDR 08-12-2002 10:14 PM

Quote:

Originally posted by Rose
1.) I'd like for the members to return to the index.php after a)logging in/logging out and b)voting (instead of returning to the poll). I think this is possible with a login.php code you mentioned a page or two back? Could I get this?
I will PM you the two files needed for this, you just need to upload them and change the URL in the home_poll and home_welcomelogin

Quote:

2.) In the last posts column - is there a way to hide private forums?
This is already implimented, but vBulletin doesn't seem to add the permissions for forums that inherit permissions, if the information in the database has canview=0 for the usergroups that can't view it then it excludes it from the list, otherwise it is included.

Quote:

Also, I don't really need the who's online bit on the index page. I suppose I can remove this - is it in a template or the index.php?
Remove the origional vBulletin code and the today online hack, also you need to remove the HTML from the home_left template:

Code:

<tr>
        <td bgcolor="{firstaltcolor}"><smallfont><a href="$bburl/online.php?s=$session[sessionhash]">Online Now</a>: <b>$totalonline</b><br>
Online Today</a>: <b>$todayonline</b><br>
<b>$numberregistered</b> Members | <b>$numberguest</b> Guests<br>
$activeusers<br></smallfont>
</td>
</tr>


NTLDR 08-12-2002 10:15 PM

Quote:

Originally posted by Rose
Also, if a person isn't logged in - they see two login boxes (one in the welcome panel and one in the left-column). Is there a way to remove the log in box in the left-column, basically either showing the stats or showing nothing and skipping to the online now users?
Just remove $logincode from the home_left template

NTLDR 08-12-2002 10:19 PM

Quote:

Originally posted by Mr_P
pretty hard this really as aint sure which thread to put it in as it involves 2 hacks.

Is it possible to get the shoutbox from the main Indexpage to show on the VBindex page and in a column ?????

Like most portals have.

As I've said many times before anything that is avaible to vB is avalible to the vBindex page. Just include the PHP in the vbindex.php and make sure that the template is eval'd as a varible and include it in one of the home templates.

Rose 08-12-2002 10:23 PM

Quote:

Originally posted by NTLDR
This is already implimented, but vBulletin doesn't seem to add the permissions for forums that inherit permissions, if the information in the database has canview=0 for the usergroups that can't view it then it excludes it from the list, otherwise it is included.

Edited to say
I get it. A member won't see the private forums last posts, only those allowed will. (y) Thanks!

And thank you for the rest. I have made the changes, with the exception of the files via pm, which I will do soon. I've taken care of the who'sonline (I just wanted the actual members removed, not the statistics) and have done that.

Now I'm off to reincorporate Kura's quote hack and the microstats! Thanks!

NTLDR 08-12-2002 10:31 PM

Quote:

Originally posted by Rose
Edited to say
I get it. A member won't see the private forums last posts, only those allowed will. (y) Thanks!

This is not strictly true I'm afraid, vB doesn't allways add the information that is needed to do this in the database.

I think if you have manually set the permissions manually so that users can't view them then they shouldn't show. If the forum is just using the permissions of the parent forum then it seems like they will show up.

I hope this is clear ;)

Rose 08-12-2002 10:37 PM

Quote:

Originally posted by NTLDR


This is not strictly true I'm afraid, vB doesn't allways add the information that is needed to do this in the database.

I think if you have manually set the permissions manually so that users can't view them then they shouldn't show. If the forum is just using the permissions of the parent forum then it seems like they will show up.

I hope this is clear ;)

Clear as mud. :nervous: I logged out and couldn't see the forums, so I'm assuming all is okay, of course I need to test as a regular member still. *hehe* Thanks again!!

NTLDR 08-12-2002 10:56 PM

Quote:

Originally posted by Rose
Clear as mud. :nervous: I logged out and couldn't see the forums, so I'm assuming all is okay, of course I need to test as a regular member still. *hehe* Thanks again!!
LOL, Sorry, I tried to explain the best I could!

If you can't see them as a guest, you shouldn't be able to see them as a regular user or anyone else who can't view the forum.

NTLDR 08-13-2002 08:12 PM

Quote:

Originally posted by Mr_P
yeah have to agree with you Carlos if someone can tinker with code and keep menu to left with same options etc and sort board out then they onto a winner
Here is the addon for the Forums menu, as requested by Mr_P.

Firstly edit forum/golbal.php and find:

PHP Code:

// parse css, header & footer ################## 

And add after:
PHP Code:

include('./vbimenu.php');
eval(
"\$menu .= \"".gettemplate('home_menu')."\";"); 

Upload the attached vbimenu.php to your forums directory and remove the functions that you don't want to include in the menu on other pages. I HIGHLY SUGGEST that you DON'T have all the functions displayed, ie Poll, Buddies Login Code etc... this will almost DOUBLE the queries for forum/index.php. Just leave in the functions that you require.

Add the home_menu template that can be found in the zip file.

Don't forget to remove the stuff you won't be using, then lastly edit your header template, in between the following comments:
Code:

<!-- /logo and buttons -->

<!-- content table -->

Add:
Code:

$menu
Thats it :)

Please let me know what functions you would like to see in the forums menu so I can impliment this properly with the next version.

Mr_P 08-13-2002 10:49 PM

Cheers NTLDR for feedback.

I have done the global in root
done the home template and added the code in the header

The forum is to the right so that bit works but to the left only the search box is showing and online users is showing with it but its as if no one is on.Nothing else is showing in the left hand panel.

Small gif to show u how i mean

DWZ 08-13-2002 10:55 PM

Just an idea which would be cool. As you may know, I run a console gaming website. Now, it would be good if we could replace the avatar on the posts with a custom picture on each news story. So, say if I was doing a story on Xbox, I could put a picture of a xbox there. If I was doing a story on PS2, I could put a picture of one there too. If I was doing a story of a mod chip, I could put a picture of it there... etc etc...

I guess you could maybe put it as an attachment to the post, which automatically is shown on the news page where the avatar currently is.

A good example to what I was thinking would be this: http://www.neowin.net/

It would also be nice if I could select previous images I had used as news stories, so I don't need to upload the same xbox image for like 20 stories which just uses up the database.

Anyway, just something to think about :)

Mr_P 08-13-2002 11:07 PM

good idea.

I gather the template for the way the posts are shown on there can be altered in some way to make it look like that sort of post.
All in all good hack and one that can be built upon.

Mr_P 08-13-2002 11:20 PM

sorry i called it in wrong way i was still on the old VBindex php file

switched to this one now and i get this error

Fatal error: Call to a member function on a non-object in /vbb/vbimenu.php on line 40

Line 40 is this : $buddys=$DB_site->query($sql);

NTLDR 08-14-2002 10:12 AM

Quote:

Originally posted by Mr_P
Fatal error: Call to a member function on a non-object in /vbb/vbimenu.php on line 40
There shoudln't be any errors, the file is working correctly for me (see screenshot). Have you edited it at all?

NTLDR 08-14-2002 10:54 AM

Quote:

Originally posted by DWZ
Now, it would be good if we could replace the avatar on the posts with a custom picture on each news story.
The simpilest and easilest way of doing this would be to newmove the avatar code from the home_newsbit template and use [img] code to insert the required image for the story at the top.

DWZ 08-14-2002 01:10 PM

Quote:

Originally posted by NTLDR

The simpilest and easilest way of doing this would be to newmove the avatar code from the home_newsbit template and use [img] code to insert the required image for the story at the top.

sounds good :)

Just a quick question. I thought it would be nice if I could have "Last comment was by username" at the bottom of the news posts. Now, what I put in the home_newsbit template was:
Code:

Last <a href="$bburl/showthread.php?s=$session[sessionhash]&goto=lastpost&threadid=$newsthreadid">comment</a> was by <a href="$bburl/member.php?action=getinfo&find=lastposter&threadid=$newsthreadid"><b>insert name here</b></a>
Now, it will automatically skip down to the last post when you click "comment", and it will link to the person's profile. but i cant work out how to get the person's name up. as you can see, i have insert name here there, it links that text to the person's profile but yeah, i want it to have their name there... lol.

I was looking at the forumdisplay templates where they do it for each thread (i.e. where they have Thread name, Thread Starter, replies number, Views and Last Post). I found they were using $thread[lastposter] to do it, but if i put that right into the vBindex templates it does nothing. so yeah, i was guessing it had something to do with the php file and that i would need to add a line or two to the vbindex.php file or something.

Anyway, keep up the good work :)

NTLDR 08-14-2002 03:03 PM

Nice suggestion there DWZ :)

In the vbindex.php file add after:

PHP Code:

$comments=$news[replycount]; 

This:
PHP Code:

$lastposter=$news[lastposter]; 

And add $lastposter in your home_newsbit template where you want the username to appear ;)

I may also add this in to the new version.

Mr_P 08-14-2002 04:19 PM

sorry m8 not calling yout hack but when i run vbimenu.php from main root that is when i get the error.

I have done the global in root - and also put #menu in the header so i have folowed it htough with no luck as yet.

NTLDR 08-14-2002 05:06 PM

You need $menu in the header not #menu (not sure if that was a typo by you or what you have in your template).

Calling vbimenu.php directly isn't supposed to work, if you added both lines to global.php then it should be included automatically for each page and display the home_menu template wherever $menu is placed, on any page the requires global.php

Mr_P 08-14-2002 07:02 PM

yeah is $menu my mistake and will check my global now

// parse css, header & footer ##################
eval("\$headinclude = \"".gettemplate('headinclude')."\";");
eval("\$header .= \"".gettemplate('header')."\";");
eval("\$footer .= \"".gettemplate('footer')."\";");
$timediff='';
if ($bbuserinfo['timezoneoffset']!=0) {
if (abs($bbuserinfo['timezoneoffset'])==1) {
$timediff=" $bbuserinfo[timezoneoffset] hour";
} else {
$timediff=" $bbuserinfo[timezoneoffset] hours";

NTLDR 08-14-2002 07:04 PM

This is what the section of global.php should look like for vB 2.2.6:

PHP Code:

// parse PHP include ##################
eval(gettemplate('phpinclude',0,0));

// parse css, header & footer ##################
include('./vbimenu.php');
eval(
"\$menu .= \"".gettemplate('home_menu')."\";");
eval(
"\$headinclude = \"".gettemplate('headinclude')."\";");
eval(
"\$header .= \"".gettemplate('header')."\";");
eval(
"\$footer .= \"".gettemplate('footer')."\";");

// parse other global templates

eval("\$gobutton = \"".gettemplate('gobutton')."\";"); 


Mr_P 08-14-2002 07:06 PM

// End Forumlinks
// parse css, header & footer #########include('./vbimenu.php');
eval("\$menu .= \"".gettemplate('home_menu')."\";");#########
eval("\$headinclude = \"".gettemplate('headinclude')."\";");
eval("\$header .= \"".gettemplate('header')."\";");
eval("\$footer .= \"".gettemplate('footer')."\";");
include('./vbimenu.php');
eval("\$menu .= \"".gettemplate('home_menu')."\";");

NTLDR 08-14-2002 07:10 PM

You haven't edited gobal.php correctly, see post 154 above.

Mr_P 08-14-2002 07:13 PM

yeah have m8 its jsut that i have added a hack inbetwwen so misses this bit ov
// parse PHP include ##################
eval(gettemplate('phpinclude',0,0));
and thsi bit is further down below
// parse other global templates

eval("\$gobutton = \"".gettemplate('gobutton')."\";");

NTLDR 08-14-2002 07:17 PM

If you have the added code directly after the parse css comment as shown (https://vborg.vbsupport.ru/showthrea...993#post284993) then it will work, you can't add it after this point like you have in your post above.

Mr_P 08-14-2002 07:22 PM

Do u want to hit me m8 ?

NTLDR 08-14-2002 07:26 PM

Quote:

Originally posted by Mr_P
Do u want to hit me m8 ?
If you want to talk like that then don't expect any more support on this hack. All I am trying to do is help.


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