Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > Premium Archives > vBgarage
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vBGarage Latest Uploads on ForumHome for 4.x.x Details »»
vBGarage Latest Uploads on ForumHome for 4.x.x
Version: , by noppid noppid is offline
Developer Last Online: Sep 2015 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 02-15-2005 Last Update: Never Installs: 0
 
No support by the author.

This is to display the five latest uploaded pictures to vBG on forumhome just like in the list on the vBGarage.php page.

Backup your database and files before doing any hack work!

In Forumhome index.php

Find ...
PHP Code:
// pre-cache templates used by all actions
$globaltemplates = array(
    
'FORUMHOME',
    
'forumhome_event',
    
'forumhome_forumbit_level1_nopost',
    
'forumhome_forumbit_level1_post',
    
'forumhome_forumbit_level2_nopost',
    
'forumhome_forumbit_level2_post',
    
'forumhome_lastpostby',
    
'forumhome_loggedinuser',
    
'forumhome_moderator',
    
'forumhome_pmloggedin',
    
'forumhome_subforumbit_nopost',
    
'forumhome_subforumbit_post',
    
'forumhome_subforumseparator_nopost',
    
'forumhome_subforumseparator_post',
); 
Add this...
PHP Code:
// begin vbgarage hack
    
'vbgarage_latestbits'
//end vbgarage hack 
Example...
PHP Code:
// pre-cache templates used by all actions
$globaltemplates = array(
    
'FORUMHOME',
    
'forumhome_event',
    
'forumhome_forumbit_level1_nopost',
    
'forumhome_forumbit_level1_post',
    
'forumhome_forumbit_level2_nopost',
    
'forumhome_forumbit_level2_post',
    
'forumhome_lastpostby',
    
'forumhome_loggedinuser',
    
'forumhome_moderator',
    
'forumhome_pmloggedin',
    
'forumhome_subforumbit_nopost',
    
'forumhome_subforumbit_post',
    
'forumhome_subforumseparator_nopost',
    
'forumhome_subforumseparator_post',
    
// begin vbgarage hack
    
'vbgarage_latestbits',
    
//end vbgarage hack
); 
In Forumhome index.php

Find...
PHP Code:
// ### ALL DONE! SPIT OUT THE HTML AND LET'S GET OUTA HERE... ### 
Add this above...
PHP Code:
// begin vbgarage hack

    
$result_latest $DB_site->query("
        SELECT * FROM " 
TABLE_PREFIX "vbgarage_images ORDER BY vbgarageid DESC LIMIT 5
    "
);
    
    while (
$latest $DB_site->fetch_Array($result_latest))
    {
        eval(
'$latestbits .= "' fetch_template('vbgarage_latestbits') . '";');
    }
    
$DB_site->free_result($result_latest); 
// end vbgarage hack 
In the ForumHome Template

Find...
HTML Code:
$navbar
Add Below...
HTML Code:
<!-- Begin vBG Photos -->
<table cellpadding="$stylevar[outerborderwidth]" cellspacing="0" border="0" class="tborder" width="$stylevar[tablewidth]" align="center"><tr><td>
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr>
	<td class="tcat" colspan="5"><b>$vbphrase[vbgarage_latest_uploads] - <a class="smallfont" href="vbgarage.php?do=editgarage&amp;id=$bbuserinfo[userid]">[Add/Edit your Car]</a></b></td>
</tr>
<tr>
$latestbits
</tr>
</table>
</td></tr></table>
<!-- End vBG Photos -->
Upload the index.php and test.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 03-09-2005, 12:22 AM
dknelson dknelson is offline
 
Join Date: Oct 2004
Posts: 412
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not only that...but I don't know of a warn.php in any Vbulletin files either.

Don
Reply With Quote
  #13  
Old 03-09-2005, 11:57 AM
noppid noppid is offline
 
Join Date: Mar 2003
Location: Florida
Posts: 1,875
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dknelson
Not only that...but I don't know of a warn.php in any Vbulletin files either.

Don
It appears he posted in the wrong forum from follow ups I see.
Reply With Quote
  #14  
Old 03-09-2005, 10:01 PM
mr.gamesbay's Avatar
mr.gamesbay mr.gamesbay is offline
 
Join Date: Sep 2004
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mr.gamesbay
Great!
But how i add an collapse, to open and close the pictures?
Any clue how to do it?
Reply With Quote
  #15  
Old 03-10-2005, 12:43 AM
noppid noppid is offline
 
Join Date: Mar 2003
Location: Florida
Posts: 1,875
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mr.gamesbay
Any clue how to do it?
HTML Code:
<!-- Begin vBGarage Collapsable Photos -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
	<thead>
		<tr>
			<td class="tcat" colspan="5">
				<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_vbg')"><img id="collapseimg_forumhome_vbg" src="$stylevar[imgdir_button]/collapse_tcat.gif" alt="" border="0" /></a>
				<b>$vbphrase[vbgarage_latest_uploads]</b>
			</td>
		</tr>
	</thead>	
	<tbody id="collapseobj_forumhome_vbg" style="$vbcollapse[collapseobj_forumhome_vbg]">
		<tr valign="center">
			$latestbits
		</tr>
	</tbody>
</table>
<!-- End vBGarage Collapsable Photos -->
Reply With Quote
  #16  
Old 03-10-2005, 06:56 PM
mr.gamesbay's Avatar
mr.gamesbay mr.gamesbay is offline
 
Join Date: Sep 2004
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks!
http://www.gamesbay.de/index.php?

But after i installed this mod, when someone is on the "index.php" site, on the "Who is online" the user will be shown in the garage, why?
Any way to fix this?
Reply With Quote
  #17  
Old 03-10-2005, 08:44 PM
noppid noppid is offline
 
Join Date: Mar 2003
Location: Florida
Posts: 1,875
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mr.gamesbay
Thanks!
http://www.gamesbay.de/index.php?

But after i installed this mod, when someone is on the "index.php" site, on the "Who is online" the user will be shown in the garage, why?
Any way to fix this?
hehe, doesn't that drive ya nuts?

I have a fix for it I'm using. However, I aint so sure it's perfect. If I get a minute I may open my functions_online.php and post what I did, however, it's new and I won't support it. I'm only one guy and my time is really limited lately.
Reply With Quote
  #18  
Old 03-10-2005, 09:25 PM
mr.gamesbay's Avatar
mr.gamesbay mr.gamesbay is offline
 
Join Date: Sep 2004
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by noppid
hehe, doesn't that drive ya nuts?

I have a fix for it I'm using. However, I aint so sure it's perfect. If I get a minute I may open my functions_online.php and post what I did, however, it's new and I won't support it. I'm only one guy and my time is really limited lately.
Nice ^^
thanks

*waitforthefix*
Reply With Quote
  #19  
Old 03-10-2005, 09:36 PM
noppid noppid is offline
 
Join Date: Mar 2003
Location: Florida
Posts: 1,875
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I took a quick look. I had to mod vbgarage.php and functions_online.php, and the new template for forumhome.

I did this for vbgarage 4.1.0 beta. I don't have 4.0.x anymore. I may just do the release and let 4.0.x die. As I said, my time is limited and I can't support multiple versions. Folks with 4.0.x will have to rely on each other at that point or upgrade. Even that will be more support then I can handle now though, so who knows what I should do?
Reply With Quote
  #20  
Old 03-10-2005, 09:57 PM
mr.gamesbay's Avatar
mr.gamesbay mr.gamesbay is offline
 
Join Date: Sep 2004
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I use 4.1.0 i dont use 4.0.x ^^
Reply With Quote
  #21  
Old 03-11-2005, 05:06 AM
noppid noppid is offline
 
Join Date: Mar 2003
Location: Florida
Posts: 1,875
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mr.gamesbay
I use 4.1.0 i dont use 4.0.x ^^
In forums/includes/functions_online.php find.
PHP Code:
        case 'bugs':
            
$userinfo['action'] = construct_phrase($vbphrase['viewing_x'], 'Bugs'); // Don't report 'bugs' as needing to be translated please :p
            
break; 
add below...

PHP Code:
        case 'vbgarage':
            if (
$userinfo['values']['do'] != "hthumb"
            {
                
$userinfo['action'] = 'Viewing Photos';
                
$userinfo['where'] = "<a href=\"vbgarage.php?$session[sessionurl]&do=list\">$vboptions[bbtitle] Photos</a>";
            }
            else
            {
                
$userinfo['action'] = 'Forum Home Page';
                
$userinfo['where'] = "<a href=\"index.php?$session[sessionurl]\">$vboptions[bbtitle]</a>";
            }
            break; 
Find...

PHP Code:
    case 'bugs.php':
        
$userinfo['activity'] = 'bugs';
        break; 
add below...
PHP Code:
    case 'vbgarage.php':
        
$userinfo['activity'] = 'vbgarage';
        break; 
In vbgarage.php find...
PHP Code:
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// ####################################################################### 
add below...
PHP Code:
if( $_REQUEST['do'] == 'hthumb' )
    
$_REQUEST['do'] = 'thumb'
change vbgarage_latestbits template to this...
HTML Code:
<td class="alt2" colspan="1" align="center"><a href="$vboptions[bburl]/vbgarage.php?$session[sessionurl]do=view&amp;id=$latest[userid]&amp;garage=$latest[id]"><img src="$vboptions[bburl]/vbgarage.php?do=<if condition="THIS_SCRIPT == 'index'">h</if>thumb&amp;id=$latest[vbgarageid]" border="0" alt="Photos" /></a></td>
That should fix ya up.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:59 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.05788 seconds
  • Memory Usage 2,357KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_html
  • (11)bbcode_php
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete