vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vBindex v3.0.0 RC5 (https://vborg.vbsupport.ru/showthread.php?t=59524)

NTLDR 02-27-2004 11:45 AM

The navbar template is where I'd say is best to add the link. I'll be making changes in the next version to make it easier to goto the forums from vBindex.

ScruffyDeluxe 02-27-2004 11:15 PM

Quote:

Originally Posted by NTLDR
Do the templates import correctly?

Both the Phrase and Template XML files are generated by vB's standard functions. Can you import the vbulletin-language.xml file (an un-altered one) via the ACP?

All I can think of at the moment is that its a Windows problem.

Sorry, I should have mentioned that :o

The templates don't seem to import via the installer, but I've managed to add them later using the AdminCP's style manager. It looks fine, apart from the missing phrases.

EDIT: Uploading an unmodified vbulletin-language.xml also times out when importing via the AdminCP. I really hoped that the fresh install using the appended language file would work... D:
I'm going to try and add each one individually; I'll soon find out if it is in fact a Windows problem, if that doesn't fix it.

noppid 02-28-2004 03:13 AM

This hack looks good, works good, and was easy to install. Thanks for publishing it.

One of the features we like is the news on the index page. We wanted the first post displayed to be about us and encouraging guests to join. The sticky took care of that.

Here's the but, once registered there is no need for a member to see that post at the top of the vbindex page anymore. So we we added a condition before the vbnews code is run so if the user is a member and stickys is on, stickys is turned off. This was real easy using the bitmasks for vbindex options.

Nice hack nice code! Thanks

ScruffyDeluxe 03-01-2004 05:51 AM

OK, I eventualy got everything working both on my localhost and my live site. Looks well spanky.

I'm at the stage now where I'm tweaking things, so I decided to have a crack at the image paths. This checks the array $phrasegroups[] for 'vbindex' and prepends $vboptions[bburl] to all the image folder URLs in $stylevar['imgdir_xxx'] if it's found.

This can be done in forums/global.php, around line 377:

PHP Code:


// #############################################################################
// get style variables
$stylevar fetch_stylevars($style$bbuserinfo); 


Add BELOW that:

PHP Code:


##///////////////////////////////////////////##
// vBIndex Image Folder Fix by ScruffyDeluxe //
##///////////////////////////////////////////##

if(in_array('vbindex',$phrasegroups))
{
/*
Array $vbi_imagefolders[] assumes you have subfolders in forums/images with these names. Season to taste.
*/
    
$vbi_imagefolders    = array('attach','buttons','editor','misc','polls','rating','reputation','statusicon');

    for(
$go 0;$go count($vbi_imagefolders);$go ++)
    {
        
$stylevar['imgdir_'.$vbi_imagefolders[$go]]    = $vboptions['bburl'].'/'.$stylevar['imgdir_'.$vbi_imagefolders[$go]];
    }
}

##    // End 

EDIT: vB's code box has for some reason inserted extraneous spaces in the above code around 'statusicon'. Use your noggin and strip them out :p

You shouldn't have to hack anything else for this to work, but unfortunately, this only seems to work on the header and navbar, and not the other vBIndex templates. Any ideas?

Scotty2k 03-02-2004 07:43 PM

Hi,
i tried to make a latest Thread Box like this one which you can see in my attachment.. you can check it out on www.msvfans.com.

There is only one problem for me.. how can i read the Forumname for a Thread to show it in my Latest Thread Box.

Must be somewhere here, but i don?t know how to do it

PHP Code:

$getthreads $DB_site->query(
        ## GET LATEST THREADS ## 
        SELECT thread.* 
        "
.iif(($vbindex['options'] & VBI_SUBTHREADS) AND $bbuserinfo['userid'], ', NOT ISNULL(subscribethread.subscribethreadid) AS issubscribed').
        FROM "
.TABLE_PREFIX."thread AS thread 
        LEFT JOIN "
.TABLE_PREFIX."deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread') 
        "
.iif(($vbindex['options'] & VBI_SUBTHREADS) AND $bbuserinfo['userid'], 
        LEFT JOIN " 
TABLE_PREFIX "subscribethread AS subscribethread ON(subscribethread.threadid = thread.threadid AND subscribethread.userid = $bbuserinfo[userid])" 
        
).
        
$previewjoin 
        WHERE open = '1' 
        AND thread.open <> 10 
        AND forumid NOT IN ("
.iif(is_numeric($vbindex[newsfid]), "$vbindex[newsfid],").implode(','$limitfids).") 
        AND thread.visible = '1' 
        AND deletionlog.primaryid IS NULL 
        
$globalignore 
        
$ignorelist 
        ORDER BY lastpost 
        DESC LIMIT 
$vbindex[maxlthreads]"); 

Could someone give me a hint how to change the query to get the forumname

NTLDR 03-02-2004 07:48 PM

You'll need to add another join to add the forum table to the query to get forum.title

Scotty2k 03-02-2004 08:05 PM

My php-mysql knowlege seems not to be good enough to do this, i always get errors-messages

"There seems to have been a slight problem with the database." :ermm:

NTLDR 03-02-2004 08:20 PM

PHP Code:

$getthreads $DB_site->query(
        ## GET LATEST THREADS ## 
        SELECT thread.*, forum.title AS forumtitle
        "
.iif(($vbindex['options'] & VBI_SUBTHREADS) AND $bbuserinfo['userid'], ', NOT ISNULL(subscribethread.subscribethreadid) AS issubscribed').
        FROM "
.TABLE_PREFIX."thread AS thread
        LEFT JOIN "
.TABLE_PREFIX."forum AS forum ON(forum.forumid = thread.forumid) 
        LEFT JOIN "
.TABLE_PREFIX."deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread') 
        "
.iif(($vbindex['options'] & VBI_SUBTHREADS) AND $bbuserinfo['userid'], 
        LEFT JOIN " 
TABLE_PREFIX "subscribethread AS subscribethread ON(subscribethread.threadid = thread.threadid AND subscribethread.userid = $bbuserinfo[userid])" 
        
).
        
$previewjoin 
        WHERE open = '1' 
        AND thread.open <> 10 
        AND forumid NOT IN ("
.iif(is_numeric($vbindex[newsfid]), "$vbindex[newsfid],").implode(','$limitfids).") 
        AND thread.visible = '1' 
        AND deletionlog.primaryid IS NULL 
        
$globalignore 
        
$ignorelist 
        ORDER BY lastpost 
        DESC LIMIT 
$vbindex[maxlthreads]"); 


Scotty2k 03-02-2004 08:34 PM

Thx for your fast support.. but i get the same error message again :surprised:

NTLDR 03-02-2004 09:18 PM

Whats the contents of the email you get with the database error?


All times are GMT. The time now is 03:37 AM.

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.03066 seconds
  • Memory Usage 1,778KB
  • 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (5)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