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

Reply
 
Thread Tools
Picture Layout Question Details »»
Picture Layout Question
Version: , by fashunphotog fashunphotog is offline
Developer Last Online: Jul 2005 Show Printable Version Email this Page

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

I'm using vBGarage 3.1.1 and have a question regarding the way the pictures load onto the page in Edit Mode. Is it possible to have them layer out as if they were in a table instead of side by side?

I'm allowing more than 6 pictures per user and it would be convenient if the pictures would line up say in a three by five table and not side by side left to right.

Is this possible?

Thanks! :-)

FaShUnPhOtOg

EDIT: Please see the picture example of what I require, thx

Download Now

File Type: (21.3 KB, 65 views)

Show Your Support

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

Comments
  #12  
Old 05-29-2005, 01:00 PM
wdarton wdarton is offline
 
Join Date: Apr 2003
Location: Phoenix AZ 85308
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

all
I'm still working on this...sorry its taken me so long. My real job got in the way of working on this... (f'n firewalls....) anyway.. I'm just trying to clean it up. Until last week I'd never programmed anything in PHP (Visual C yes, PHP no), so I'm still learning some of the in's and out's of it.... I promise as soon as I have a working something thats clean code wise I'll post it up...

ok I think I got it....the code is a little crude and I will try and refine it, but here goes....

in vbgarage.php

find: <under List Garage>
PHP Code:
    globalize($_REQUEST, array('pagenumber' => INT'perpage' => INT)); 
replace with:
PHP Code:
    globalize($_REQUEST, array('pagenumber' => INT'perpage' => INT'perrow' => INT)); 
find: <under List Garage>
PHP Code:
        SELECT FROM " . TABLE_PREFIX . "vbgarage_images ORDER BY vbgarageid DESC LIMIT 5 
replace with:
PHP Code:
SELECT vbgarageid,userid FROM " . TABLE_PREFIX . "vbgarage_images ORDER BY vbgarageid DESC LIMIT 10 
(or however many results you want displayed...Just replace the 10 with whatever.

find: <under List Garage>
PHP Code:
while ($latest $DB_site->fetch_Array($result_latest))
    {
        eval(
'$latestbits .= "' fetch_template('vbgarage_latestbits') . '";');
    } 
replace with:
PHP Code:
$perrow 0;
    
$pagethrow 0;

    while (
$latest $DB_site->fetch_Array($result_latest))
    {
        if (
$perrow == 5)
        {
            
$perrow 0;
            eval(
'$latestbits .= "' fetch_template('vbgarage_latestbitsa') . '";');
            eval(
'$latestbits .= "' fetch_template('vbgarage_latestbits') . '";');

        }
        else
        {
            eval(
'$latestbits .= "' fetch_template('vbgarage_latestbits') . '";');
            
$perrow $perrow 1;
        }

    } 
Create a new template called vbgarage_latestbitsa and put a <tr> in it.


Like I said its kinda rough, and I don't guarantee that its gonna work everywhere. I'll help out if I can with your installation, just drop me an email or PM....

And if you're interested in the gallery, here's how I did it.

Near the top find:
PHP Code:
// pre-cache templates used by all actions
$globaltemplates = array(
    
'vbgarage_editgarage',
    
'vbgarage_editimagebits',
    
'vbgarage_imagebits',
    
'vbgarage_listbits',
    
'vbgarage_listgarage',
    
'vbgarage_popup',
    
'vbgarage_viewgarage' 
replace with
PHP Code:
// pre-cache templates used by all actions
$globaltemplates = array(
    
'vbgarage_editgarage',
    
'vbgarage_editimagebits',
    
'vbgarage_imagebits',
    
'vbgarage_listbits',
    
'vbgarage_listgarage',
    
'vbgarage_popup',
    
'vbgarage_gallery',
    
'vbgarage_viewgarage' 

Add this at the bottom of vbgarage.php
PHP Code:
// ############################################################################
// ############################# SHOW GALLERY #############################
// ############################################################################

if ($_REQUEST['do'] == 'dogallery')
{
    
globalize($_REQUEST, array('gperrow' => INT));


    
// get the latest uploads for diplay
    
$gresult_latest $DB_site->query("
        SELECT vbgarageid,userid FROM " 
TABLE_PREFIX "vbgarage_images ORDER BY userid ASC
    "
);

    
// load the latest bits template

    
$gperrow 0;
    
$gpagethrow 0;

    while (
$glatest $DB_site->fetch_Array($gresult_latest))
    {
        if (
$gperrow == 5)
        {
            
$gperrow 0;
            eval(
'$glatestbits .= "' fetch_template('vbgarage_gallerybitsa') . '";');

        }
        else
        {
            eval(
'$glatestbits .= "' fetch_template('vbgarage_gallerybits') . '";');
            
$gperrow $gperrow 1;
        }

    }
    
$DB_site->free_result($gresult_latest);

//    $pagenav = construct_page_nav($garagecount[garages],"vbgarage.php?$session[sessionurl]do=$_REQUEST[do]&perpage=$perpage");

    
$navbits construct_navbits(array('' => 'vBGarage'));
    eval(
'$navbar = "' fetch_template('navbar') . '";');

    eval(
'print_output("' fetch_template('vbgarage_gallery') . '");');

Add a new template called vbgarage_gallery
PHP Code:
$stylevar[htmldoctype]
<
html dir="$stylevar[textdirection]lang="$stylevar[languagecode]">
<
head><title>$vboptions[bbtitle] - $vbphrase[vbgarage]</title>
$headinclude
</head>
<
body>
$header
$navbar
<br>
<
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>PSC Garage Gallery</b></td>
</
tr>
<
tr>
$glatestbits 
</tr>
</
table>
</
td></tr></table>

<
br />

$pagenav

$footer

</body>
</
html
Add a new template called vbgarage_gallerybits:
PHP Code:
<td class="alt2"align="center"><a href="$vboptions[bburl]/vbgarage.php?do=view&amp;id=$glatest[userid]"><img src="$vboptions[bburl]/vbgarage.php?do=thumb&amp;width=100&amp;id=$glatest[vbgarageid]border=/></a></td
Add a new template called vbgarage_gallerybitsa:
PHP Code:
<tr
The link to access your gallery would then be http://www.yoursite.com/forums/vbgar...p?do=dogallery


I think thats about it...

My biggest problem was figuring out how to get php/vbb to start a new TR after 5 images. I'm sure there's a cleaner way to do this, and will be happy to modify my code that way if someone can point it out.
Attached Files
File Type: (21.3 KB, 17 views)
File Type: (21.3 KB, 25 views)
Reply With Quote
  #13  
Old 06-09-2005, 01:56 PM
fashunphotog fashunphotog is offline
 
Join Date: Apr 2005
Location: US
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey !

Sorry it's taken so long to get back to you. I've injured my back and was out of it for a while.

Good job! Though not quite what I needed when I originally posted. I need to be able to stack the images in the Edit section, not the listing section of the garage. Any idea if this will work there too?

Cheers!

Mike
Reply With Quote
  #14  
Old 06-09-2005, 02:49 PM
wdarton wdarton is offline
 
Join Date: Apr 2003
Location: Phoenix AZ 85308
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ah got it.

I'm working on another mod fo Crimson (to display 1 image next to each garage in the garage list), and I'll throw this one in there while I'm working on it. That should be pretty easy...
Reply With Quote
  #15  
Old 06-09-2005, 05:20 PM
fashunphotog fashunphotog is offline
 
Join Date: Apr 2005
Location: US
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did install your mods and like the listing feature but I couldn't get the gallery working correctly. Not a big deal, though.... I just watned to try it out and wasn't sure if we'd use it anyway. I'll play with it some more later.

Ciao!

Mike
Reply With Quote
  #16  
Old 06-19-2005, 10:33 AM
CrimsonGT CrimsonGT is offline
 
Join Date: Apr 2005
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by wdarton
ah got it.

I'm working on another mod fo Crimson (to display 1 image next to each garage in the garage list), and I'll throw this one in there while I'm working on it. That should be pretty easy...
Hey man, im about to go to sleep but did you ever make any progress on that? Im still very excited :nervous:
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:19 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04289 seconds
  • Memory Usage 2,337KB
  • Queries Executed 21 (?)
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
  • (12)bbcode_php
  • (1)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
  • (1)pagenav_pagelink
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (3)postbit_attachment
  • (6)postbit_onlinestatus
  • (6)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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete