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)

mccollin 07-31-2003 01:45 PM

Quote:

Both links go to the same place for me.
Oh, but they don't. Check the url... one goes to /forums/portal.php (vB and vBi), the other goes to /phpBB/portal.php (phpBB). I have accomplished my goal if you thought they were the same! :smoke:

I'm amazed that I could take your script and exactly replicate (well, not exactly because I now have a registered and unregistered welcome block) my home page in about 2 days.

Back to the

Thanks for your explanation... it makes perfect since. I had been playing with the templates and finally figured it out. I had accidentally typed "m" instead of "n" in the names (i.e. mewsbits). My editor font made it hard to see. Your approach is cleaner, though because it keeps my edits up at the top of the page, and not down in the code. I'm going to add a setting for number of news posts to include, and I'll be all set.

Thanks a ton.

Now I've got to tackle some custom queries to do the FAQ section. I have to make 7 passes through the article forum, and do a join on an index which drives the order, and which of the threads, to include. :classic:

NTLDR 07-31-2003 02:09 PM

*heh* Indeed it is different *hehe*

You've done a great job converting it, it looks totally different and matches your old page perfectly :)

mccollin 07-31-2003 02:40 PM

OK, that works great. In case anyone else is following this discussion, I'll summarize and add in a few details to your last suggestion. This example may not even make sense to do, but it covers all the things you need in order to have multiple forums, multiple templates working together, and called from a single vbindex.php file.

The scenario is this...

You have a vBulletin that is focused on cars. You want to create a home page that shows all the news for all the cars. You also want "portal" pages where each car owner can see just news about their brand of car... chevy owners see chevy news, ford owners see ford news, etc. You can use the concepts here to expand this into covering the whole range of things that you might want to tailor on a portal page. My motivation was to figure out news first.

This documents what I found out. Many thanks to the great and mighty NTLDR, for creating a script that is easy to understand and work with, and for being willing to help someone that dares to alter their work! :banana:

Make the following changes in vbindex.php

FIND:

PHP Code:

$templatesused.=',home_shoutbox,home_postshout'

ADD AFTER:
PHP Code:

$templatesused.=',home_extra_chevy,home_chevy_news,home_chevy_newsbits';
$templatesused.=',home_extra_ford,home_ford_news,home_ford_newsbits';
$templatesused.=',home_extra_dodge,home_dodge_news,home_dodge_newsbits'

FIND:

PHP Code:

require('./global.php'); 

ADD AFTER:

PHP Code:

// Set variables for this page 

if ($mode=='') { 
  
$newsforum '3, 5, 8, 9'
  
$page ''
} elseif (
$mode=='chevy') { 
  
$newsforum '3'
  
$newsposts '10';
  
$page 'chevy';       
  
$news_template "home_chevy_news"
  
$newsbits_template "home_chevy_newsbits"

} elseif (
$mode=='ford') { 
  
$newsforum '5, 8'
  
$newsposts '10';
  
$page 'ford'
  
$news_template "home_ford_news"
  
$newsbits_template "home_ford_newsbits"
} elseif (
$mode=='dodge') { 
  
$newsforum '9'
  
$newsposts '10';
  
$page 'dodge'
  
$news_template "home_dodge_news"
  
$newsbits_template "home_dodge_newsbits"
} else { 
  
$newsforum $newsforum
  
$newsposts $newspost;
  
$page ''
  
$news_template "home_news"
  
$newsbits_template "home_newsbits"


FIND:

PHP Code:

WHERE forumid '$newsforum' 

REPLACE WITH:

PHP Code:

WHERE forumid in ($newsforum

Then go into the admin control panel and setup a default configuration. You can put in multiple forums for default news like this:

Quote:

3, 5, 8, 9
Then create the following templates...

home_extra_chevy (copy of home)
home_chevy_news (copy of home_news)
home_chevy_newsbits (copy of home_newsbits)
home_extra_ford (copy of home)
home_ford_news (copy of home_news)
home_ford_newsbits (copy of home_newsbits)
home_extra_dodge (copy of home)
home_dodge_news (copy of home_news)
home_dodge_newsbits (copy of home_newsbits)

This assumes that there were already the following news forums:
Chevy News - forum number 3
Ford New Car News - forum number 5
Ford Antique News - forum number 8
Dodge News - forum number 9

Edit the custom templates to your liking.

Then upload the new vbindex.php... you could call it something like cars.php.

Then, if you called cars.php with no parameters, you'd get all the news and use the standard templates.

If you called cars.php?mode=chevy, you'd get the chevy news and use the appropriate news templates.

etc, etc,

Like I said, this is a fictional example to show how to do multiple forums and multiple templates from one vbindex.php. If you wanted separate *.php files, like chevy.php, ford.php, etc., then you would do the same changes and drop the conditional logic. If you want to alter more template, then you would make the same template changes shown...
1. create the new template and copy the orginal
2. add it in the list of templates at the top of the page
3. add it to the conditional logic

This could be used to run targeted banners for each car type, or to include colors and images to match a particular theme.

If anyone finds any mistakes with this, let me know and I'll edit it.

mccollin 08-01-2003 02:53 PM

OK, another night of work and I almost have my more complicated portal page built with vBindex. I am really learning the power of vB, templates, and this great script.

I have FAQ content on my site that I stored in forums by category. With phpBB, I had written separate scripts for each device and the maintenance was getting to be difficult with simple changes requiring me to replicate it across all the scripts.

Using vBi and some custom tables, queries, and templates... I have managed to make this all run from one script... my home page news, my faqs, everything. You just pass "device=" in the url and you are in business. Because NTLDR has made this such a clean single file script, it was very easy to get it to work.

Here is a current example of these techniques in action. This page shows a subset of the news from the home page, and then organizes FAQs that are stored in multiple forum by category. I two tables... one for the index of what FAQ threads go to what category, and another that stores all the device info... specs, newsforums, faqforums, image location, etc, etc. I look for device= at the beginning of the script.... if it doesn't find it it runs the vbindex as designed. If it does find it, it loads variables for news and a custom block of code (based on news) to organize and display the device specs and faqs.

I still have some more work to do to add the blocks for new, updates, and popular FAQs... but that should be a piece of cake to add add using these techniques. I have a lot of data to migrate from the phpBB tables to the vB tables, so I need to do that before putting this in production for all devices. I've got a production page of for an older device... the Audiovox Thera to show how it looks...

vBindex version of Thera Portal page

Old phpBB version of Thera Portal Page

By the way, is it necessary to include the HASH info in the url when callling a vbindex.php?

NTLDR 08-01-2003 03:36 PM

Looking good Mike! :) You have done an superb job of converting you pages and to get them all running from the one script. Its good to see someone else use this hack to its full potential.

As for the hash, I recomend including it in all your links (demo.php?s=$session[sessionhash]&device=test) as this is what tracks non-cookie users on your board.

mccollin 08-02-2003 02:55 PM

OK, I have my whole site converted using this script... took about 4 days total... I don't know whether to be impressed or bummed. It took me about 3 months to develop it to start with! I did reuse most of my template code, so that saved a lot time and trial and error. Here are some comments/suggestions/questions for you your new version.

- keep it this clean and simple - I looked at a lot of other portal scripts and they were powerful, but too complicated to use for a custom look and site. I didn't want the standard nuke look. Having one well written, well documented script is a good thing.

- static version possibly - you might want to create a skinnied down version of this that someone can use to create custom content pages. I am using it for that as well... basically a page that has the header, footer, left and right margins, and the user identity stuff... then a variable for a template so that someone can create "static" pages and use the vb control panel to maintain the html code. I did this, but have a slight problem because if I use the welcome header, its showing a different user than me! This is very odd, because all I did was remove the news, poll,shout, etc sections, and left all the info up top that handles users in there. I just removed the username until i can figure that out.

- I noticed you have a downloads and links section on your site. Can you say which hack you used for that, or did you write it yourself. I'm particularly interested in the downloads, because I haven't seen one for vB anywhere.

- At some point if you want vB V3 beta testers for your new script, let me know. I'll be throwing up a vB V3 test site soon.

Thanks for the good work.

NTLDR 08-02-2003 05:42 PM

Thanks for the suggestions, they will be considered while finishing off the vB3 version, I'll let you know when I've a beta ready and your site is a good one for the new version to be tested on :)

Everything you see on my site is part of vBsite, my portal that I wrote for my dissertation. I won't be releasing it though.

vBFreak 08-02-2003 09:10 PM

Can you make an addon that allows to exclode some forums form the latest thread list?

NTLDR 08-02-2003 09:12 PM

Read the thread, this as already been covered.

Elly 08-07-2003 10:19 PM

I hope this hasnt been answered and if so please just point me to the right page x.x

I had to re-install vbindex due to some problems with my forum, I am currently running 2.3.0 and am getting this error on the main page wich would be www.ultimaforce.net

Warning: main(): stream does not support seeking in /home/asuka/public_html/index.php on line 27
Fatal error: Call to undefined function: getpermissions() in /home/asuka/public_html/index.php on line 30


The main page does not seem to recognize log in or display the vbindex features at all, the vbindex is enabled the forums are not at the moment, can someone please tell me were I went wrong or if I forgot to edit something.

Thank you in advance.

EDIT: I dont know if this will help in aiding me I checked the file in question which would be the vbindex.php file renamed to index.php so it is the main page and there is nothing on line 27 or line 30

Code:


----- Start on line 27, End Line 30 which is blank-----
// un-comment and set the path if vBindex is not run from the forums root directory
chdir('./forum');
require('./global.php');


NTLDR 08-08-2003 12:30 AM

Have you tried entering the full path to the forums directory?

JGM007 08-11-2003 11:49 AM

Hi NTLDR,

I am having a strange issue after upgrading to 2.3.2, everything is working fine but the news.

The title of the news piece shows up, but none of the text within the post does. I checked and I do have it set to show 500 chars of the thread.

It is always possible I dinged something too, i am good like that :D Breaking stuff that is.... heh heh

Anyhow, any thoughts where I could start looking?

Thanks!

JGM007 08-11-2003 12:01 PM

Ok I did just find out more info..

When I go to the counters update and run the: Update postid's For Threads" The text will appear!! But until I do that only the headder shows up.

Very strange indeed!

:)

mccollin 08-11-2003 01:08 PM

Quote:

Today at 02:01 PM JGM007 said this in Post #1493
Ok I did just find out more info..

When I go to the counters update and run the: Update postid's For Threads" The text will appear!! But until I do that only the headder shows up.

Very strange indeed!

:)

Doing this is part of the installation instructions.

NTLDR 08-11-2003 06:52 PM

I can't see that anything in 2.3.x would cause any problems with the news, however I've not tested this on any of the 2.3.x series. There shouldn't be any reason why the update counters option doesn't work, can you update post counts or anything else OK?

Xxman 08-11-2003 08:07 PM

@ NTLDR a little question..

I succesfully installed Vbidex on my board .
My bord mount four user selectable style through forum home template ( using Grog6's change style hack ) .

How can I make allow users to change style of vbindex too ?
Does a module exist already?

NTLDR 08-11-2003 09:56 PM

You should find that the home_* templates are in each template set, by default vBindex will use the users selected style, just like the forum would. For example, users could add &styleid=X to the url to view the page with styleid X, or if they have choosen a different style in the User CP then that will appear instead of the default style.

JGM007 08-12-2003 01:50 AM

Quote:

Today at 10:08 AM mccollin said this in Post #1494
Doing this is part of the installation instructions.

Part of the physical instructions as you install it? That is something I would overlook :(
I did not see it in the .txt file.

mccollin 08-12-2003 02:39 PM

I think its in the instructions during the install script... it tells you to update your counters. Don' feel bad... I did the same thing when I installed it and then found a bunch of posts in this thread that mention it.

mccollin 08-12-2003 02:44 PM

NTLDR,

Got a question for you. I'm trying to modify the code a bit ... as you have seen... and one thing that's giving me trouble is queries that don't return anything. For example, I'm going to use the news script to display formatted articles with my left and right panels in place. So, I modified the script to send a threadid, then I limit the forum to the articles forum, and limit the returned posts to 1. The only problem is that if you type in he threadid incorrectly and it doesn't find it, I get a database error page. I'd like to throw up a template that says the article wasn't found. I've been fussing with the script and seem to be missing something because I can't get it to respond with anything but the error page....

I'm in this code....
PHP Code:

.....

if (
$newsonoff!=0) {
$newsquery=$newsquery=$DB_site->query("SELECT thread.*,threadpost.pagetext AS pagetext 
FROM thread LEFT JOIN post AS threadpost ON (thread.tpostid = threadpost.postid) 
WHERE forumid IN (
$newsforum
AND  thread.threadid = 
$articleid
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];

.... 

I'm assuming I need to do something with the while statement, but I haven't pinned it down.

JGM007 08-12-2003 03:24 PM

NTLDR,
It was stupid user error :(
I did miss a whole line of the instructions....
*hangs head down in shame*

NTLDR 08-12-2003 04:43 PM

@mccollin

PHP Code:

verifyid('Article'$articleid); 

Will do the job, place this above the query and it will show and error message if the threadid doesn't exist :)

mv540 08-21-2003 07:53 PM

stuck on this.....

====================================

Still in vbindex.php find the section that has:

// start vBulletin original code
// -------------------------
// add here the vBulletin code of the original index.php
// lines 142 - 202(in an unhacked 2.2.8 index.php)
// -------------------------
// end vBulletin original code

and replace:

// add here the vBulletin code of the original index.php
// lines 142 - 202(in an unhacked 2.2.8 index.php)

those lines with lines 142-202 (thats the numbers in an unhacked 2.2.8 index.php)

line 142 starts:

$activeusers = "";
$loggedinusers = "";
if ($displayloggedin) {

and 202 ends:

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


anyone possibly have this code thats supposed to be replaced with the 2.2.8 index.php?

this instruction totally blew me away..can anyone assist?

NTLDR 08-21-2003 08:01 PM

Thats the lines you need to copy and paste from vBulletin's index.php

mv540 08-21-2003 10:51 PM

what lines?

142 - 202 ????

does this mean lines 142 TO line 202 or line 142 & line 202?

i still dont undertand what i have to do here to make this portal work...

mv540 08-22-2003 12:06 AM

ok i figured out the line deal....now im stuck on this...

Warning: main(./global.php): failed to open stream: No such file or directoryin /home/web/mysite.com/public_html/vbindex.php on line 27.

so im guessing something should be added infromt of the global?

require('./global.php');

i already have the chdir correct, but under it should the global be as is or am i missing something....?

mv540 08-22-2003 12:40 AM

hello?...come on guys what am i limited 1 question per day here?

NTLDR 08-22-2003 09:09 AM

Quote:

hello?...come on guys what am i limited 1 question per day here?
People aren't hear 24/7 to help you. There is no need to bump a post untill at least 24 hours have pasted.

mv540 08-22-2003 05:58 PM

Quote:

Today at 11:09 AM NTLDR said this in Post #1508
People aren't hear 24/7 to help you. There is no need to bump a post untill at least 24 hours have pasted.
excuse me but do you know the answer? if not then go do something productive. with all do respect, i dont have the patients to even bother posting for support in here anymore...im kind of tired of waiting 3 or 4 days to get ONE question answered and im sure i speak for many.....ya figure will all the members here someone has to have an answer to every question...and it should not take this long to pull an answer out of someone...

no wonder people arnt useing vb product anymore, the support is utterly disappointing.... :devious:

NTLDR 08-22-2003 06:25 PM

Yes I know the answer, do I intend to help you no. Find another hack to use and refrain from filling this thread with pointless posts.

All work here is volentary, so don't go complaining about the lack of support because you show no respect to the hack author.

Chris M 08-22-2003 06:29 PM

Quote:

Today at 07:58 PM mv540 said this in Post #1509
excuse me but do you know the answer? if not then go do something productive. with all do respect, i dont have the patients to even bother posting for support in here anymore...im kind of tired of waiting 3 or 4 days to get ONE question answered and im sure i speak for many.....ya figure will all the members here someone has to have an answer to every question...and it should not take this long to pull an answer out of someone...

no wonder people arnt useing vb product anymore, the support is utterly disappointing.... :devious:

Hackers create hacks for your benefit, and most do not work for vBulletin - Those that post hacks here who do work for vBulletin are not required to give you support for the hacks that they post - Your support entitles you to support for the basic product, unhacked... People offer their support for their hacks or for your board voluntarily as NTLDR said, so show some respect...

Satan

mccollin 08-22-2003 06:45 PM

That is amazing... utterly amazing.

This guys missed the concept of a hack. NTLDR worked and toiled many hours to create and test this great hack, plus all the hours of work to package it in a form that other people could use, work for which the author gets zero benefit because he already knows how to use it, and you the user get all the benefit.... without the hack, the alternative would be???? Coding it yourself? Then questions would be answered by... you???? How many hours would that take? Probably more than the 39 minutes wait time before the sparks flew here.

I think you need to do a bit of homework before blasting the hand that feeds you. My guess is this guy didn't even know that NTLDR is the author of the hack. NTLDR has been very, very, very helpful to anyone who bothers to put minimal effort into solving the problem, shows a bit of patience, and as the prior responder mentioned... a little respect for the great job done with this code. You didn't pay anything for the hack, so that means NTLDR isn't getting paid to write it, and he certainly isn't getting anything for putting up with rude ungreatful people.

Quote:

Yes I know the answer, do I intend to help you no. Find another hack to use and refrain from filling this thread with pointless posts.
WELL SAID! :banana:

mv540 08-22-2003 07:29 PM

well well lookie here, the minute the board gets some fire to it, all the little people come runnin......not bad timing fellas, i think we made record timing here for the books boys....now if we can work with this, go that little extra mile and start helping those who need assistance, there shouldn't be any problems........ :cross-eyed:

go vb go!

congrats again on the response time guys, kudos!

Chris M 08-22-2003 07:43 PM

Quote:

Today at 09:29 PM mv540 said this in Post #1513
well well lookie here, the minute the board gets some fire to it, all the little people come runnin......not bad timing fellas, i think we made record timing here for the books boys....now if we can work with this, go that little extra mile and start helping those who need assistance, there shouldn't be any problems........ :cross-eyed:

go vb go!

congrats again on the response time guys, kudos!

When you grow a brain, learn to use it, and realise we won't be helping you, please tell someone who will actually care...:)

Have a pleasant day;)

Satan

assassingod 08-22-2003 07:47 PM

Usually I wouldn't step in an arugment, but I will this time.

mv540, you waited exactly 34 minutes before you bumped your question which is about 23 hours less than most people bump. Now it may be because this hack isn't working, but to be honest, there is no need to be rude like you were, something like "Please help me" would of been better than what you posted. As NTLDR said, no hacker is here 24/7 to help you when you demand it. Try doing something else for a few hours, come back then you may have gotten the support you wanted.

FulsionV8 08-22-2003 11:57 PM

I posted this in support, but does anyone know how I would change the look of the main page that vbindex.php is on?

It looks like a web portal right now, like php nuke in some ways. I've seen sites do it, but how can I change it so the layout is the layout I used in the pass; only I implement a few functions, such as the news and the poll?

What templates do I edit? Or is it a file?

Also; on the charmed website which was shown as an example, I noticed you used vbIndex to create a review section, I think. How would I go doing that?

mccollin 08-23-2003 01:13 AM

My site is doing just what you described if you check it out. You will need to edit a lot of templates, and create many new ones to do what I've done, but I'd start with the main page and go from there. I'd also recommend reading back through this thread. I posted pretty detailed instructions on some of what I've done, and there are many other tips to help as well.

vbIndex has its templates grouped under vbIndex Home Page templates. Start with "home", and you should be able to figure it out. The names are obvious. If you need to do anything complex, you may need to modify the php file, but it is layed out to make it pretty easy as well (if you no some php).

The Charmed site has a lot of stuff that isn't part of vbIndex, like the reviews section. You'll need to look at other hacks to do that, and possibly combine some things.

Mythril 08-23-2003 03:11 AM

just wondering I see you are making one for vb3 will the portal for that be out when vb has relased the RC version?

NTLDR 08-23-2003 05:12 AM

@FulsionV8 to expand on what mccollin said, its the home* templates you will needed to edit.

@Mythril yes, I hope to have vBindex 3.0.0 released shorty after vB.org allows vB3 hacks :)

mv540 08-24-2003 12:47 AM

Quote:

08-22-03 at 09:47 PM assassingod said this in Post #1515
Usually I wouldn't step in an arugment, but I will this time.

mv540, you waited exactly 34 minutes before you bumped your question which is about 23 hours less than most people bump. Now it may be because this hack isn't working, but to be honest, there is no need to be rude like you were, something like "Please help me" would of been better than what you posted. As NTLDR said, no hacker is here 24/7 to help you when you demand it. Try doing something else for a few hours, come back then you may have gotten the support you wanted.

i know, im sorry guys...was having a rough week. everyone is entitled to having few bad days a year.

cheers..


All times are GMT. The time now is 11:01 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.03089 seconds
  • Memory Usage 1,914KB
  • 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
  • (1)bbcode_code_printable
  • (8)bbcode_php_printable
  • (10)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