View Single Post
  #385  
Old 05-17-2009, 03:44 AM
RWerksman RWerksman is offline
 
Join Date: Dec 2007
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The album filter doesn't work on PhotoPlog currently. I've been mucking around with it for the last two hours or so, and I just cant get it to work correctly. It just doesn't seem to populate the dropdown so that the filter can apply.

The select in the catagories.php seems correct:

Code:
/*
###### Select statement for useralbums or categories ######
*/
function albums_select ()
{
    global $db_prefix;
    global $userid;
    
    $albums_select = "
        SELECT catid, title
        FROM " . $db_prefix . "categories
        ORDER BY title
        ";
    return $albums_select;
}
I can't seem to figure out what photo_popup.php does with it from there:

Code:
/*
###### What album dropdown  ######
*/
if ($allow_albums AND $albums_possible)
{
    if (!$other_db)
    {
        $result = $db->query_read(albums_select());
    }
    else
    {
        $result = mysql_query(albums_select());
    }
    $album_options = "<div style=\"whitespace: nowrap; display: inline;\"><strong>" . $vbphrase[photo_popup_album_select] . ":</strong>
<select name=\"alb\" onchange=\"this.form.submit();\">";
    $album_options .= "<optgroup label=\"" . $vbphrase[photo_popup_which_albums] . "\">";
    $album_options .= "<option value=\"all\">" . $vbphrase[photo_popup_all_albums] . "</option>";
    echo $album_options;
    echo "a";
    while (list($catid, $catname) = @ mysql_fetch_row($result))
    {
        if ($which_album == $catid)
        {
            $selected = " selected=\"selected\"";
        }
        $album_options .= "<option value=\"" . $catid . "\"" . $selected . ">" . $catname . "</option>";
        $selected = FALSE;
    }
    $album_options .= "</optgroup></select></div>";
}
I *think* it's getting messed up here:

Code:
while (list($catid, $catname) = @ mysql_fetch_row($result))
because it's selecting catid and title. When I echo out $catid and $catname it doesnt return anything.

I'm stumped.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01193 seconds
  • Memory Usage 1,767KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete