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 07-08-2003 02:15 PM

vB3 hacks arn't allowed here untill vB3 reaches RC state. Converting it will take a couple of hours at the most. Its only the templates that slow the process down.

However I can guarentee this will work with vB3 as I've already sucessfully converted by portal from vB2 to vB3 without any major problems :)

todd.o.callen 07-08-2003 02:54 PM

Thank goodness! I know that my company can't live without it anymore, so you personally are on the critical path to our upgrade plan. No pressure.

Keep up the good work. :cool:

salnet 07-17-2003 05:45 PM

I just installed your hack, its great!
I just edited some templates, e.g. the "home_threadbit" template
Now I've got several problems:
1. Each post has the same time: 01.01.1970 01:00
2. The threadicon isn't displayed
3. The forum where the thread is, is not displayed

By the way I should say, that I took some code from vbindex 1.3 to make the "home_threadbit" template. That's my "home_threadbit" template:
PHP Code:

<tr>
<
td bgcolor="$threadbgalign="center">$icon</td>
<
td bgcolor="$threadbgalign="left">
<
p><smallfont><b><a href="$bburl/showthread.php?s=$session[sessionhash]&goto=newpost&threadid=$gothreadid">  $title</a></b></smallfont></p>
</
td>
<
td bgcolor="$threadbgalign="center">
<
p><smallfont><a href="$bburl/member.php?s=$session[sessionhash]&action=getinfo&username=$starter">$starter</a></smallfont></p>
</
td>
<
td bgcolor="$threadbgalign="center">
<
p><smallfont><a href="$bburl/forumdisplay.php?s=$session[sessionhash]&forumid=$postforumid">$postforum</a></smallfont></p>
</
td>
<
td bgcolor="$threadbgalign="center">
<
p><smallfont>$numreplies</smallfont></p>
</
td>
<
td bgcolor="$threadbgalign="left">
<
smallfont>
<
table cellpadding="0" cellspacing="0" border="0" width="100%" id="ltlink"><tr align="right">
        <
td nowrap><smallfont>$postdate <font color="{timecolor}">$posttime</font><br>von <a href="$bburl/member.php?s=$session[sessionhash]&action=getinfo&username=$lastposter">$lastposter</a></smallfont></td>
        <
td nowrap>&nbsp;<a href="$bburl/showthread.php?s=$session[sessionhash]&goto=newpost&threadid=$gothreadid"><img src="{imageshome}/lastpost.gif" border="0" alt="Gehe zum letzten Beitrag"></a></td>
    </
tr></table>
</
td>
</
tr

Here you can see it: http://www.thw-interaktiv.de

NTLDR 07-17-2003 07:08 PM

Change:

PHP Code:

        $postdate=vbdate($dateformat,$latestpost[dateline]);
        
$posttime=vbdate($timeformat,$latestpost[dateline]);
        
$postforum=$latestforum['title']; 

To:

PHP Code:

        $postdate=vbdate($dateformat,$latestthread[dateline]);
        
$posttime=vbdate($timeformat,$latestthread[dateline]);
        
$postforum=$latestthread['title']; 


salnet 07-18-2003 03:32 AM

Thanks for your code.
It doesn't work so good.
In the Boardnames it displays the threadnames, and the posttimes are totaly wrong.
And it don't help me with the icons, there is still a zero instead of the icon :disappointed:

Could you look a second time for?

www.thw-interaktiv.de

NTLDR 07-18-2003 09:42 AM

You'll need to write the code for the icons yourself.

Leo Wyatt 07-21-2003 02:13 PM

Hey NTLDR, I just installed vbindex on my test forums to check it out - looks great...Im just looking into customizing it, and I want to change the links on the left - how would I do that? Couldn't find it in the templates.

Also, I want to add a new page, "banners" and want it to include the same table in all schemes [in a specific page]. For example, [when you show me how to add new pages, cuz I reead the post you made here, but am still confused on how to do it] I have three schemes, and want the same page on all schemes and have to update it ONE so that it changes on all schemes...[but of course, with each scheme's colours]

Am I getting confusing? Anyway, any help would be appreciated :)

NTLDR 07-21-2003 02:24 PM

Create a new template called home_extra_banners with the content you want in it then use http://yoururl/vbindex.php?page=banners to view the page.

All pages automatically support all styles avalible to users.

The links on the left are in home_welcomelogout IIRC.

Leo Wyatt 07-21-2003 02:34 PM

OK Thanks, Ill try it! Also - what I meant was, I will have the basic page for 'banners' in vbindex, but then [so i don't have to change all schemes to add for instance one banner] ... I want to pull it from another file...can I? How?

ETA: All I see in home_welcomelogout is

< smallfont>< a href="$bburl/member.php?s=$session[sessionhash]&action=logout">Log Out</a><br><a href="$bburl/showgroups.php?s=$session[sessionhash]">Forum Leaders< /a>< /smallfont>

ETA2: ohhhhhhh I see the links, sorry :)

NTLDR 07-21-2003 02:53 PM

The easiest way IMO would be to add in config.php:

PHP Code:

$debug 1

Add the template home_extra_banner to the Global template list you will then see, this will add the template to all styles.

Then remove the line from config.php (This is important). When you want to edit it, follow these steps but edit the template instead of adding it.

Leo Wyatt 07-21-2003 04:24 PM

I'm a little confused, so I add that code so I can add it to the global template - but how do I add it to the global template?

I know Im getting a bit annoying, sorry - but can you explain it in simplest terms ...im not exactly a professional :p

NTLDR 07-21-2003 05:45 PM

I can't really make it much more simpler then in the above post.

NTLDR 07-21-2003 10:03 PM

Just an update to let you know that I've pretty much done a beta of vBindex 3.0.0 for vBulletin 3.0.0 :D

I'm beta testing it on a site right now, there are still a few issues with it, but its a big improvement over v2.1 and should be ready for releasing as soon as vB.org allows vB3 hacks.

If anyone has any sugestions for the vB3 version then let me know, there may be time to fit them in ;)

Leo Wyatt 07-21-2003 10:13 PM

Cool looking forward to it.

OK, one question then - how do I add to the global template?

dark_gear 07-23-2003 07:09 AM

Wow. This looks great. I'm having some troubles though. I installed it and everything is working. I go to the vbindex.php page in my browser and the page loads fine. One problem is that every link links to http://localhost... How do I remove this localhost and have it link directly to my IP?

NTLDR 07-23-2003 12:18 PM

You need to make sure that you have set the forums URL to your IP address in the Admin CP.

Jensie180 07-25-2003 10:28 PM

I really like this hack, good work :)

However...

Sorry if this has been asked already but I don't want to search trough all these posts for my answer. Is there any possibility to have a ?page= system added to it? I want the news to show on the index but when they click on a link the news will be replaced by that page.

Thanks for anyone that will try this :)

NTLDR 07-26-2003 05:06 PM

Create a new template called home_extra_NAME-HERE replacing NAME-HERE with what you want to use after ?page= in the URL.

Jensie180 07-26-2003 10:20 PM

Isn't there an easier way to do it? I want to edit those pages with dreamweaver and I have all the pages in .php ready.

NTLDR 07-27-2003 04:53 PM

Thats the only supported way so far and I'm not planning to impliment a new method yet.

If you have a set of .php files then I sugest you copy the code you require from vbindex.php into each of your PHP files, or into its own file and and require it from each of them.

mccollin 07-28-2003 06:26 AM

I am in the process of converting a site that was based on phpBB to vB. The forums are moved, but I need to redo my portal pages. This script looks like a possibility, but I need to verify if it can do the things I need.

* multiple portal pages for a single vB installation (example, a car website might have a main portal page for its home, but then have a Ford page, a Chevy page, etc... )
* selecting more than one news forum for news on one page (this merges the news from the forums selected into one date sorted stream for the news on that page - example, the Ford page might have taurus, mustang, and explorer news forums included in Ford news.
* list of most popular threads in a forum
* list of most recently added threads in a forum
* list of most recently update threads in a forum
* ability to do multiple lists of news headlines per page.

What I need to do is currently in action at http://pdaphonehome.com/phpBB2/i700faq.php and http://pdaphonehome.com

Would this hack be a good base for me to recreate these pages? I don't mind making changes to it to get what I need, I just need a solid foundation.

NTLDR 07-28-2003 12:45 PM

Quote:

* multiple portal pages for a single vB installation (example, a car website might have a main portal page for its home, but then have a Ford page, a Chevy page, etc... )
There are two methods to do this depending on if you want each page to have different new etc for the page.

Quote:

* selecting more than one news forum for news on one page (this merges the news from the forums selected into one date sorted stream for the news on that page - example, the Ford page might have taurus, mustang, and explorer news forums included in Ford news.
This requires one minor query edit to use multiple forums.

Quote:

* list of most popular threads in a forum
Not part of the default package, but would be very simple to add.

Quote:

* list of most recently added threads in a forum
* list of most recently update threads in a forum
By default this gets the most recent threads from all forums, however can easily be changed to get them from one forum.

Quote:

* ability to do multiple lists of news headlines per page.
No sure what you mean by this one.

Quote:

Would this hack be a good base for me to recreate these pages? I don't mind making changes to it to get what I need, I just need a solid foundation.
Overall I don't think you would need to make many changes to this hack to get it to do what you want.

mccollin 07-28-2003 01:21 PM

Thanks for the quick reply. I was originally looking to use vbPortal for the site, but they don't support multiple portal pages and the system is pretty complex... not easy for me to go in and tweak. The script I used to do the current site was a pretty basic portal script, and so it was very easy for me to go in and make it do what I wanted. I ended up tweaking the queries to do half of what's on my pages.

The part where you didn't understand what I was asking is on the first url that I posted. At the top of the page, I show 2 news items with full text... then there is an xml stream ... then I show the popular, new, and recent lists, then I get to the part that needs explanation.

I added a table with categories. The table has a thread id, a sort number, and the category id. Another table holds the category ids and descriptions. This is for organizing a forum loaded with FAQs. When I display this on the portal page, I loop the news code about 8 times, each time indexing to the next category. I have hard coded the number of loops, and the template variables for each loop. The result is what you see at the bottom half of that url. A list of FAQ titles... then when you select a particular FAQ, it takes you to the thread in phpBB. I've actually altered this a bit as well to go to an article style template on a different page.

Do you think I could figure out how to hack this from the code of vBindex 2.1? I am not that experienced with php and mysql, but I've can usually figure out things if I have a starting point and code that isn't to difficult to understand.

Another question... assuming I do this, how big of a port do you think it would be going to vB V3?

NTLDR 07-28-2003 01:40 PM

Version 3 of vBindex for vB3 is a complete rewrite, so you maybe better of waiting till vB3 hacks are allowed here if you are planning on upgrading to vB3.

The FAQ listing I think should be pretty easy I think, going by what you have said and what I can see from the page. I don't think it would be too dificult to create some code to efficently create those lists.

mccollin 07-28-2003 03:45 PM

I can't really weight, as I am straddling phpBB and vBulletin at the moment. I bought a second site and merged it with mine. Mine was phpBB, the other was vB. I was going to have to do a rewrite of my current site anyway, to upgrade to the latest phpBB, so I decided to go to vB... very impressed so far. I am in a bad spot until I get those pages redone.

I'm looking at this script, vbHomeLite, myvbindex, webtemplates, and vbportal.

Just trying to figure out which will let me do what I want to do the quickest. I would like to create a nearly identical look.. style wise. I could split the pages up though if it would be easier. I don't have to have so much on a single page. I could break up the news from the FAQ, and do those by category. I'd like to create the script this time so that its totally dynamic, because I currently have a separate custom page for each portal. I'd rather pass the device (category) in the url.

Thanks so much for your thoughts on this.

mknott 07-29-2003 09:41 PM

will this work with the latest ver of vbulletin (2.3.0 i think it is)

NTLDR 07-29-2003 10:16 PM

Yes this will work with all the 2.2.x and 2.3.x versions and 3.x when RC is out :)

mccollin 07-30-2003 03:43 AM

OK, Thanks for the quick and friendly help. I have a test page up and running and it is looking pretty promising. I may need some help on some of those queries for the FAQ page. I've done them in phpBB, so I know what needs to be done... just may need you to point me to a few things.

I've played with vbHomeLite and vbPortal. I might be inclined to go with vbHL, but they are shutting down their support site and I don't like that. vbPortal is more complex than I need to get my pages moved over. I really want to just replicate my pages on vB as fast as humanly possible. The simplicity of vBindex is appealing. And, the feature of adding other pages via a new template and url variable is cool. I am going to fool around and see how close I can get the home page here...

Thanks. :banana:

mccollin 07-30-2003 06:01 AM

OK, there are a lot of posts in this thread. I have made it about 1/3 of the way through them in several hours, and I've made great progress on replicating my home page... concentrating on that for now.

One thing I've searched and scanned for to no avail is how do I get multiple forums feeding one news stream? I believe you mentioned that it would take a query edit... a tip there would be appreciated.

I also saw mention of renaming vbindex.php, having many of them, and having them point to custom templates. I will most likely eventually get to that... so if that makes it easier to do the multiple forums, then I'd be cool with that... in other words, if I could hard code the forum list at the head of the vbindex-newone.php, that would be OK. And, I assume that I can also hard code the home template that it will use, no?

If someone can help me on this, I might be able to put my main home page up with this tomorrow. I can't stand having my home page driven by phpBB! :lick:

NTLDR 07-30-2003 09:17 AM

For the news edit find:

PHP Code:

WHERE forumid '$newsforum' 

and replace with:

PHP Code:

WHERE forumid IN($newsforum

And in settings in the ACP for the news forum enter the IDs seperated by commas, for example:

Code:

1, 2, 4, 5
That will then pull the news from forumid 1, 2, 4 and 5.

Depending on how you want you pages to look you maybe able to re-use the same templates for all pages and but have the forum values hard-coded in the file, or if all the templates are the same throughout then just have it set the IDs based on the URL.

mknott 07-30-2003 03:06 PM

is there anyway i could get the forum to load in the middle section by clicking a link for the forum?

NTLDR 07-30-2003 03:25 PM

Yes this is posible, I would say it would be easier to get the side bars to appear on the forum pages then the other way around. I posted a addon-earlier in the thread for a menu for the forums, however it proved to be a bit buggy.

mknott 07-30-2003 04:11 PM

thats a shame :(

i know i need to edit a template to add somthing to the menu on the left...

basicly what im wanting to add is a link to my forums that opens in a new window.

mccollin 07-30-2003 04:35 PM

Quote:

For the news edit find:

...
OK, I'm probably the first person to get burned FOR reading the thread. I spent the last hour reading back through the thread... got through all but about 25 pages and decided that version was too old, pulled out the code and hacked through it, figured it out, came back here excited to post the solution, and OOOPS... you beat me to it!

Thank you for getting back with the answer, just the same. I will post the solution to multiple forums on multiple pages shortly. :rolleyes:

mccollin 07-30-2003 06:30 PM

OK, combining a couple of things here, let me see if this is correct.

Let's use my car example again. I have a main site that deals with all cars. I have various forums for the different types of cars. I want to combine all car news on my home page. I want individual portal pages for the car types that only show news for them... chevy, ford, dodge, etc.

In this example, chevy has one news forum, ford has two, and dodge has one.

I first add the multiple forum hack that was just posted about 5 or 6 posts back. That replaces

PHP Code:

... WHERE forumid '$newsforum' ... 

with

PHP Code:

... WHERE forumid in ($newsforum) ... 

You can then put multiple forums in the field in the control panel and it will work, but you would get all the forums on all the pages. I want to segregate forums on pages. So.....

I add the following just below the opening comments where it says support is only provided in this forum.

PHP Code:

// Set variables for this page

if ($mode=='') { 
  
$newsforum '3, 5, 8, 9';
} elseif (
$mode=='chevy') { 
  
$newsforum '3';
} elseif (
$mode=='ford') { 
  
$newsforum '5, 8';
} elseif (
$mode=='dodge') { 
  
$newsforum '9';
} else { 
  
$newsforum "$newsforum";  // default to what is in cp


Then you would call the home page using

or chevy with

etc, etc.

OK, that solves the multiple forums problem. But, I want to have different page layout as well... in particular I want to have targeted adds, and a panel of different info at the top of each page that talks about that car type. If I modify the code to this...


PHP Code:

// Set variables for this page

if ($mode=='') { 
  
$newsforum '3, 5, 8, 9';
  
$page ''
} elseif (
$mode=='chevy') { 
  
$newsforum '3';
  
$page 'chevypage';     
} elseif (
$mode=='ford') { 
  
$newsforum '5, 8';
  
$page 'fordpage'
} elseif (
$mode=='dodge') { 
  
$newsforum '9';
  
$page 'dodgepage'
} else { 
  
$newsforum "$newsforum";
  
$page ''



I can now have a different template page for each one. These need to be added in the control panel as "home_extra_chevypage", "home_extra_fordpage", and home_extra_dodgepage". No problem, now I have some more control.... but I ran into a problem here... my lack of knowledge on vBulletin.

I want to have other custom templates for the other bits... "home_newsbits", home_header", etc. I tried adding "home_custom_news" and added it to one of the "extra" pages, but I ended up with nothing showing up, telling me that it couldn't find my template. I tried adding the templates in the list at the head of vbindex.php, but that also didn't work. This is probably a basic vB question, but how do I add and call custom templates within the vB template system.

Thanks. (almost done ) ;)

NTLDR 07-30-2003 07:05 PM

The $templatesused list at the top contains all the templates that could be used by vBindex, this removes 1 query for each template, so any you add I strongly recomend that you place them in this list.

For the $mode if clause, make sure this goes after the require global.php line otherwise it will not work.

For the custom templates I assume these are based on $mode? If so then I would rename them in the eval lines to variables, for example:

PHP Code:

eval("\$threadbits .= \"".gettemplate('home_threadbit')."\";"); 

to:

PHP Code:

eval("\$threadbits .= \"".gettemplate($home_threads)."\";"); 

and set $home_threads equal to the template you wish to use in the $mode if statement, this seems the easiest way to me.

I may consider making some of these changes standard in v3 as it seems like many people would find it usefull :)

mccollin 07-30-2003 08:10 PM

Actually, no. I took a left turn on you there. Remember that I'm a phpBB guy and have just been using templates for a few weeks... totally new to me. Assume I'm an idiot with this stuff and may be missing something simple.

In the $mode statement, I've got a new page template for each. Rather than pass two variables in the url, I've just piggy backed on the one you already put there for "page" (it's the last code in vbindex.php at the bottom). So, I'm not passing page... I'm sticking it in there from the $mode conditionals. So, the $page=chevypage is for the template named "home_extra_chevypage" as you've defined in your code.

That works fine. But, it's not enough for me to replace just that home template. I want to let home_extra_chevypage call a different home_news, home_newsbits, home_right, and home_header (than the one that the home page calls).

I created new templates of those names as home_custom_news, etc., then I referenced them in home_extra_chevypage... but they didn't do anything.

The evaluate part of this is probably where I'm missing something. Again, assume I'm an idiot on this. I will keep trying and let you know if I figure it out before you respond. Thanks a ton for your quick responses.

mccollin 07-30-2003 08:22 PM

PHP Code:

// Set variables for this page 

if ($mode=='') { 
  
$newsforum '3, 5, 8, 9'
  
$page ''
} elseif (
$mode=='chevy') { 
  
$newsforum '3'
  
$page 'chevypage';     
  eval(
"\$home_custom_mews = \"".gettemplate('home_custom_news')."\";");
  eval(
"\$home_custom_mewsbits = \"".gettemplate('home_custom_newsbits')."\";");
 
} elseif (
$mode=='ford') { 
  
$newsforum '5, 8'
  
$page 'fordpage'
} elseif (
$mode=='dodge') { 
  
$newsforum '9'
  
$page 'dodgepage'
} else { 
  
$newsforum "$newsforum"
  
$page ''


I tried doing this and it still doesn't work. When I call mode=chevy, it does use the home_extra_chevypage template, but the news part is blank.

mccollin 07-31-2003 05:33 AM

OK,

I still need to get an answer on the template question before I can complete my next phase, but I now have my home page moved from phpBB2/Smartor EZPortal/Heavy Hacking, to vBulletin/vBindex/Heavy Templating. You can see it at pdaPhoneHome New Home Page . The old page that is temporarily still online is at pdaPhoneHome Old Home Page .

So, can you recognize that this started two days ago as a standard vBindex page? ;)

I love this thing... very clean and easy to work with.

By the way, is the users online supposed to only show 12 people? If so, what 12 does it show? I usually have a lot more users online than this.

NTLDR 07-31-2003 11:44 AM

Both links go to the same place for me.

Here is how I would suggest doing the templates:

PHP Code:

// Set variables for this page 

if ($mode=='') { 
  
$newsforum '3, 5, 8, 9'
  
$page ''
} elseif (
$mode=='chevy') { 
  
$newsforum '3'
  
$page 'chevypage';      
  
$news_template "home_custom_news";
  
$newsbits_template "home_custom_newsbits";

} elseif (
$mode=='ford') { 
  
$newsforum '5, 8'
  
$page 'fordpage'
} elseif (
$mode=='dodge') { 
  
$newsforum '9'
  
$page 'dodgepage'
} else { 
  
$newsforum "$newsforum"
  
$page ''
  
$news_template "home_news";
  
$newsbits_template "home_newsbits";


Then change the following lines:

PHP Code:

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

To:

PHP Code:

  eval("\$news = \"".gettemplate($news_template)."\";"); 
  eval(
"\$newsbits .= \"".gettemplate($newsbits_template)."\";"); 

Hope that makes sense ;)


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.02520 seconds
  • Memory Usage 1,944KB
  • 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
  • (16)bbcode_php_printable
  • (9)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