Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 05-18-2003, 12:42 AM
colicab-d's Avatar
colicab-d colicab-d is offline
 
Join Date: Dec 2002
Location: Glasgow
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Forum Gallery

Hi all im working ona new forum gallery hack, which will take all the images posted to a forum and show them all nicely..

Anyway im having a few probs with it, ive got the initial query ok, but i cant get it to skip entrys that have no filedata in the attachment (the blank attachments vb seems to create)

Im using basic code at mo no $DBsite query stuff just to get it working i,ll concentrate on all of that later.. anyway i need a helper or helpers and i will have this done anyday..

the main prob is the one stated

anyway heres the code i have for it at the moment which isnt working too well at all..


PHP Code:

                
while($r mysql_fetch_array($galquery1)){

                
$galentid=$r['attachmentid'];

                
$galtime=$r['dateline'];

                
$galentry=$r['filedata'];

                
$galentryname=$r['filename'];
                
                
$galuserid=$r['userid'];
                
                
$galentryvisible=$r['visible'];

                                if(!
$galentry){
                                
$imgshowno "No Image";
                                echo (
"$imgshowno");

                                }
                                else
                                {
                                
$imgshow "<img src = $bburl/attachment.php?postid=$galentid ><br>";
                                
$imgshow.= "<a href = $bburl/attachment.php?postid=$galentid>Full Image</a><br><br>";
                                echo (
"$imgshow");
                                } 
Note I have it putting in a "No image" just for test purposes at current
Reply With Quote
  #2  
Old 05-18-2003, 01:00 AM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Once again, you need to get in the habit of perfectly indenting; all problems will be solved except the ones that don't get solved
Reply With Quote
  #3  
Old 05-18-2003, 01:02 AM
colicab-d's Avatar
colicab-d colicab-d is offline
 
Join Date: Dec 2002
Location: Glasgow
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i will later but this isnt helping the code problem and yes again i do have the } for the while loop at the end.

i mean i have it in there (not above) but its there, i just dont wanna show some of the internal comments i have in the script at mo, but other wise aside from my sloppy indentation all

{`s and }`s are accounted for
Reply With Quote
  #4  
Old 05-18-2003, 01:06 AM
pie pie is offline
 
Join Date: May 2003
Location: Devon, England
Posts: 226
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
all problems will be solved except the ones that don't get solved
Spot the obvious
Reply With Quote
  #5  
Old 05-18-2003, 10:06 AM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ummm isn't this a double-post ?

- miSt
Reply With Quote
  #6  
Old 05-18-2003, 01:11 PM
colicab-d's Avatar
colicab-d colicab-d is offline
 
Join Date: Dec 2002
Location: Glasgow
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can someone help me? im this close to getting a working gallery
Reply With Quote
  #7  
Old 05-18-2003, 02:03 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No offense but we can't do everything for you. I very strongly suggest that you indent properly from the get-go...it helps immensely, especially for us
Reply With Quote
  #8  
Old 05-18-2003, 02:24 PM
Dark_Wizard Dark_Wizard is offline
 
Join Date: Nov 2001
Location: North Carolina
Posts: 1,251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes...proper indenting helps us to help you quicker...
Reply With Quote
  #9  
Old 05-18-2003, 02:35 PM
colicab-d's Avatar
colicab-d colicab-d is offline
 
Join Date: Dec 2002
Location: Glasgow
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thnx guys... was only looking for some friendly help
Reply With Quote
  #10  
Old 05-18-2003, 06:46 PM
Dark_Wizard Dark_Wizard is offline
 
Join Date: Nov 2001
Location: North Carolina
Posts: 1,251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 11:35 AM colicab-d said this in Post #9
thnx guys... was only looking for some friendly help

We are trying to help but all we are asking is you follow coding ethics...
Reply With Quote
Reply

Thread Tools
Display Modes

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 04:28 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.04409 seconds
  • Memory Usage 2,256KB
  • Queries Executed 11 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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