$photoplog['select_row'] .= photoplog_select_options($photoplog_list_categories_row, $photoplog_file_catid_default, true, true); $photoplog['select_row'] .= "</select>\n"; ($hook = vBulletinHook::fetch_hook('photoplog_edit_selectcategory')) ? eval($hook) : false; photoplog_output_page('photoplog_edit_select_category', $vbphrase['photoplog_edit_file']); } if ($photoplog_block_category && $photoplog_file_catid != $photoplog_file_catid_default) { photoplog_output_page('photoplog_error_page', $vbphrase['photoplog_error'], $vbphrase['photoplog_bad_max']); } $photoplog['select_row'] = htmlspecialchars_uni(photoplog_get_category_title($photoplog_file_catid)); $photoplog['title'] = $photoplog_file_info['title']; $photoplog['title'] = photoplog_process_text($photoplog['title'], $photoplog_file_catid, true, false); if ($photoplog['title'] == $vbphrase['photoplog_untitled']) { $photoplog['title'] = ''; } $photoplog['description'] = $photoplog_file_info['description']; $photoplog['description'] = photoplog_process_text($photoplog['description'], $photoplog_file_catid, false, false); $photoplog_fielddata = $photoplog_file_info['fielddata']; $photoplog_fielddata = $photoplog_fielddata == '' ? array() : unserialize($photoplog_fielddata); if (!is_array($photoplog_fielddata)) { $photoplog_fielddata = array(); } $photoplog['maxfilesize'] = intval($permissions['photoplogmaxfilesize']); $photoplog['maxfilesize'] = vb_number_format($photoplog['maxfilesize'], 1, true); $do_html = 0; $do_smilies = 0; $do_bbcode = 0; $do_imgcode = 0; if ($photoplog_file_catid > 0 && in_array($photoplog_file_catid, array_keys($photoplog_ds_catopts))) { $photoplog_categorybit = $photoplog_ds_catopts["{$photoplog_file_catid}"]['options']; $photoplog_catoptions = convert_bits_to_array($photoplog_categorybit, $photoplog_categoryoptions); $do_html = $photoplog_catoptions['allowhtml'] ? 1 : 0;
for ($i = 0; $i <= 5; $i++) { $photoplog_checked[$i] = ''; if ($i == $photoplog['rating']) { $photoplog_checked[$i] = "checked=\"checked\""; } } $photoplog['fileid'] = $photoplog_comment_info['fileid']; $photoplog['userid'] = $photoplog_comment_info['fu_userid']; $photoplog['filename'] = $photoplog_comment_info['fu_filename']; $photoplog['title'] = $photoplog_comment_info['title']; $photoplog['title'] = photoplog_process_text($photoplog['title'], $photoplog['catid'], true, false); if ($photoplog['title'] == $vbphrase['photoplog_untitled']) { $photoplog['title'] = ''; } $photoplog['comment'] = $photoplog_comment_info['comment']; $photoplog['comment'] = photoplog_process_text($photoplog['comment'], $photoplog['catid'], false, false); // yep this is how fileid is passed in $editorid = construct_edit_toolbar('', $do_html, 'nonforum', $do_smilies, $photoplog['fileid']); $photoplog_toolbartype = $do_bbcode ? is_wysiwyg_compatible(-1, 'fe') : 0; if ($photoplog_toolbartype != 2) { $photoplog['comment'] = $photoplog_comment_info['comment']; } // special character and link stuff for the editors $photoplog['comment'] = str_replace('src="images/smilies/', 'src="' . $vbulletin->options['bburl'] . '/images/smilies/', $photoplog['comment']); $photoplog['comment'] = htmlspecialchars_uni($photoplog['comment']); // yep this is how to get the comment in $messagearea = str_replace("</textarea>", $photoplog['comment'] . "</textarea>", $messagearea); photoplog_file_link($photoplog['userid'], $photoplog['fileid'], $photoplog['filename']); $photoplog_hslink1 = 'file_' . substr($vbulletin->options['photoplog_highslide_small_thumb'], 0, 1) . 'link'; $photoplog_hslink2 = 'file_' . substr($vbulletin->options['photoplog_highslide_small_thumb'], -1, 1) . 'link'; $photoplog['do_highslide'] = 0;
photoplog_output_page('photoplog_error_page', $vbphrase['photoplog_error'], $vbphrase['photoplog_no_results']); } $photoplog_fid_bits = array(); $photoplog_fid_cnt = 0; while ($photoplog_fid_query = $db->fetch_array($photoplog_fid_querys)) { if (!$photoplog_fid_cnt) { $photoplog['fid_current'] = intval($photoplog_fid_query['fileid']); $photoplog_fid_catid = intval($photoplog_fid_query['catid']); $photoplog['fid_title'] = strval($photoplog_fid_query['title']); $photoplog_fid_userid = $photoplog_fid_query['userid']; $photoplog_fid_filename = $photoplog_fid_query['filename']; if ($vbulletin->options['lastthreadchars'] != 0 && vbstrlen($photoplog['fid_title']) > $vbulletin->options['lastthreadchars']) { $photoplog['fid_title'] = fetch_trimmed_title($photoplog['fid_title'], $vbulletin->options['lastthreadchars']); $photoplog['fid_title'] = photoplog_regexp_text($photoplog['fid_title']); } $photoplog['fid_title'] = photoplog_process_text($photoplog['fid_title'], $photoplog_fid_catid, true, false); photoplog_file_link($photoplog_fid_userid, $photoplog['fid_current'], $photoplog_fid_filename); if ($vbulletin->options['photoplog_highslide_active'] && $photoplog['do_highslide']) { $photoplog['slideshow_slide1'] = $photoplog[$photoplog_hslink1]; $photoplog['slideshow_href1'] = $photoplog[$photoplog_hslink2]; } else { $photoplog['slideshow_slide1'] = $photoplog['file_mlink']; $photoplog['slideshow_href1'] = $photoplog['location'] . '/index.php?' . $vbulletin->session->vars[sessionurl] . 'n=' . $photoplog['fid_current']; } } $photoplog_fid_bits[] = intval($photoplog_fid_query['fileid']); photoplog_file_link($photoplog_fid_query['userid'], $photoplog_fid_query['fileid'], $photoplog_fid_query['filename']); if ($vbulletin->options['photoplog_highslide_active'] && $photoplog['do_highslide']) { $photoplog['slideshow_slidex'] .= "photoplog_slides[" . $photoplog_fid_cnt . "] = '" . $photoplog[$photoplog_hslink1] . "';\n"; $photoplog['slideshow_hrefx'] .= "photoplog_hrefs[" . $photoplog_fid_cnt . "] = '" . $photoplog[$photoplog_hslink2] . "';\n"; } else {
$photoplog_comment_commentid = ''; $photoplog_comment_page = ''; if (isset($photoplog_comments_array[$photoplog['fileid']])) { $photoplog_comment_userid = $photoplog_comments_array[$photoplog['fileid']]['photoplog_comment_userid']; $photoplog_comment_username = $photoplog_comments_array[$photoplog['fileid']]['photoplog_comment_username']; $photoplog_comment_title = $photoplog_comments_array[$photoplog['fileid']]['photoplog_comment_title']; $photoplog_comment_date = vbdate($vbulletin->options['dateformat'], $photoplog_comments_array[$photoplog['fileid']]['photoplog_comment_dateline'], true); $photoplog_comment_time = vbdate($vbulletin->options['timeformat'], $photoplog_comments_array[$photoplog['fileid']]['photoplog_comment_dateline']); $photoplog_comment_commentid = '#comment' . $photoplog_comments_array[$photoplog['fileid']]['photoplog_comment_commentid']; $photoplog_comment_page = $photoplog_comment_pagenum . $photoplog_comment_commentid; } if ($vbulletin->options['lastthreadchars'] != 0 && vbstrlen($photoplog_comment_title) > $vbulletin->options['lastthreadchars']) { $photoplog_comment_title = fetch_trimmed_title($photoplog_comment_title, $vbulletin->options['lastthreadchars']); $photoplog_comment_title = photoplog_regexp_text($photoplog_comment_title); } $photoplog_comment_title = photoplog_process_text($photoplog_comment_title, $photoplog['catid'], true, false); $photoplog_inline_perm = array(); $photoplog_inline_perm['caneditownfiles'] = 0; $photoplog_inline_perm['candeleteownfiles'] = 0; $photoplog_inline_perm['caneditotherfiles'] = 0; $photoplog_inline_perm['candeleteotherfiles'] = 0; if (isset($photoplog_inline_bits[$photoplog['catid']])) { $photoplog_inline_perm = convert_bits_to_array($photoplog_inline_bits[$photoplog['catid']], $photoplog_categoryoptpermissions); } $photoplog['inlinebox'] = 0; if (($photoplog_inline_perm['caneditownfiles'] || $photoplog_inline_perm['candeleteownfiles']) && $vbulletin->userinfo['userid'] == $photoplog['userid'] || $photoplog_inline_perm['caneditotherfiles'] || $photoplog_inline_perm['candeleteotherfiles']) { $photoplog['inlinebox'] = 1; $photoplog['inlineform'] = 1; if ($photoplog_inline_perm['caneditownfiles'] && $vbulletin->userinfo['userid'] == $photoplog['userid'] || $photoplog_inline_perm['caneditotherfiles']) { $photoplog['inlinecanedit'] = 1; $photoplog['select_row'] = photoplog_inline_select_row();
$photoplog['do_comments'] = 0; if ($photoplog_comment_count && !empty($photoplog_catbit_info[$photoplog_key]['fileid2'])) { $photoplog_catbit_fileid2 = $photoplog_catbit_info[$photoplog_key]['fileid2']; $photoplog_catbit_userid2 = $photoplog_catbit_info[$photoplog_key]['userid2']; $photoplog_catbit_username2 = $photoplog_catbit_info[$photoplog_key]['username2']; $photoplog_catbit_lasttitle2 = $photoplog_catbit_info[$photoplog_key]['lasttitle2']; $photoplog_catbit_date2 = $photoplog_catbit_info[$photoplog_key]['date2']; $photoplog_catbit_time2 = $photoplog_catbit_info[$photoplog_key]['time2']; $photoplog_catbit_stamp2 = $photoplog_catbit_info[$photoplog_key]['stamp2']; $photoplog_catbit_page2 = $photoplog_catbit_info[$photoplog_key]['page2']; $photoplog['do_comments'] = $photoplog_catbit_info[$photoplog_key]['docoms2']; if ($vbulletin->options['lastthreadchars'] != 0 && vbstrlen($photoplog_catbit_lasttitle2) > $vbulletin->options['lastthreadchars']) { $photoplog_catbit_lasttitle2 = fetch_trimmed_title($photoplog_catbit_lasttitle2, $vbulletin->options['lastthreadchars']); $photoplog_catbit_lasttitle2 = photoplog_regexp_text($photoplog_catbit_lasttitle2); } $photoplog_catbit_lasttitle2 = photoplog_process_text($photoplog_catbit_lasttitle2, $photoplog_catbit_catid, true, false); } if ($vbulletin->userinfo['lastvisitdate'] == -1 || $vbulletin->userinfo['lastvisit'] < $photoplog_catbit_stamp1 || $vbulletin->userinfo['lastvisit'] < $photoplog_catbit_stamp2) { $photoplog_newold_statusicon = 'new'; } else { $photoplog_newold_statusicon = 'old'; } if (!($permissions['photoplogpermissions'] & $vbulletin->bf_ugp_photoplogpermissions['photoplogcanuploadfiles']) && $vbulletin->options['showlocks']) { $photoplog_newold_statusicon .= '_lock'; } if (!in_array($photoplog_catbit_catid, $photoplog_perm_not_allowed_bits)) { $photoplog_divider_bar = 0; $photoplog_parent_catid = intval($photoplog_ds_catopts[$photoplog_catbit_catid]['parentid']); if (!$photoplog_list_flag) { if ($photoplog_divider_array[$photoplog_catbit_catid]['actasdivider'] && !$photoplog_divider_array[$photoplog_parent_catid]['actasdivider']) { $photoplog_divider_collapse = 'collapseimg_photoplog_catbit_' . $photoplog_catbit_catid;
if ($vbulletin->options['lastthreadchars'] != 0 && vbstrlen($photoplog_user_title1) > $vbulletin->options['lastthreadchars']) { $photoplog_user_title1 = fetch_trimmed_title($photoplog_user_title1, $vbulletin->options['lastthreadchars']); $photoplog_user_title1 = photoplog_regexp_text($photoplog_user_title1); } $photoplog_user_title1 = photoplog_process_text($photoplog_user_title1, $photoplog['catid'], true, false); $photoplog_user_filename = $photoplog_files_array[$photoplog_user_fileid1]['photoplog_file_filename']; $photoplog_user_page = '&page=' . ceil($photoplog_user_cnt2 / 5) . '#comment' . $photoplog_user_commentid; $photoplog_user_fileid2 = $photoplog_comments_array[$photoplog_user_commentid]['photoplog_comment_fileid']; $photoplog_user_userid2 = $photoplog_comments_array[$photoplog_user_commentid]['photoplog_comment_userid']; $photoplog_user_username2 = $photoplog_comments_array[$photoplog_user_commentid]['photoplog_comment_username']; $photoplog_user_title2 = $photoplog_comments_array[$photoplog_user_commentid]['photoplog_comment_title']; if ($vbulletin->options['lastthreadchars'] != 0 && vbstrlen($photoplog_user_title2) > $vbulletin->options['lastthreadchars']) { $photoplog_user_title2 = fetch_trimmed_title($photoplog_user_title2, $vbulletin->options['lastthreadchars']); $photoplog_user_title2 = photoplog_regexp_text($photoplog_user_title2); } $photoplog_user_title2 = photoplog_process_text($photoplog_user_title2, $photoplog['catid'], true, false); $photoplog_user_stamp1 = $photoplog_files_array[$photoplog_user_fileid1]['photoplog_file_dateline']; $photoplog_user_stamp2 = $photoplog_comments_array[$photoplog_user_commentid]['photoplog_comment_dateline']; $photoplog_user_date1 = vbdate($vbulletin->options['dateformat'], $photoplog_user_stamp1, true); $photoplog_user_time1 = vbdate($vbulletin->options['timeformat'], $photoplog_user_stamp1); $photoplog_user_date2 = vbdate($vbulletin->options['dateformat'], $photoplog_user_stamp2, true); $photoplog_user_time2 = vbdate($vbulletin->options['timeformat'], $photoplog_user_stamp2); if ($vbulletin->userinfo['lastvisitdate'] == -1 || $vbulletin->userinfo['lastvisit'] < $photoplog_user_stamp1 || $vbulletin->userinfo['lastvisit'] < $photoplog_user_stamp2) { $photoplog_newold_statusicon = 'new'; } else { $photoplog_newold_statusicon = 'old'; } if (!($permissions['photoplogpermissions'] & $vbulletin->bf_ugp_photoplogpermissions['photoplogcanuploadfiles']) && $vbulletin->options['showlocks']) { $photoplog_newold_statusicon .= '_lock'; } $photoplog['hscnt'] = intval($photoplog['hscnt']) + 1;