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)

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.


All times are GMT. The time now is 01:22 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.02113 seconds
  • Memory Usage 1,753KB
  • 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
  • (3)bbcode_code_printable
  • (4)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete